|
@@ -14,6 +14,8 @@
|
14
|
14
|
<result property="px" column="PX" jdbcType="VARCHAR"/>
|
15
|
15
|
<result property="hjbm" column="HJBM" jdbcType="VARCHAR"/>
|
16
|
16
|
<result property="bz" column="BZ" jdbcType="VARCHAR"/>
|
|
17
|
+ <result property="bndsqje" column="bndbzje" jdbcType="NUMERIC"/>
|
|
18
|
+ <result property="bndsqje" column="bndbzje" jdbcType="NUMERIC"/>
|
17
|
19
|
<result property="dw1" column="DW1" jdbcType="NUMERIC"/>
|
18
|
20
|
<result property="dw2" column="DW2" jdbcType="NUMERIC"/>
|
19
|
21
|
<result property="dw3" column="DW3" jdbcType="NUMERIC"/>
|
|
@@ -517,8 +519,33 @@
|
517
|
519
|
|
518
|
520
|
<!--获取年度预算-->
|
519
|
521
|
<select id="getBudgetList" resultMap="PrjAnnualbudgetdetailMap">
|
520
|
|
- select (select FYMC from prj_AnnualBudgetDetail where BM = b.FJ and NYS = b.NYS) as FJMC, b.*
|
|
522
|
+ select (select FYMC from prj_AnnualBudgetDetail where BM = b.FJ and NYS = b.NYS) as FJMC,
|
|
523
|
+ ID, b.FYMC, YSJE, YSQJE, NYS, BM, FJ, NF, PX, HJBM, BZ, DW1, DW2, DW3, DW4, DW5, DW6, DW7, DW8, DW9, DW10, SJYS1, SJYS2, SJYS3, SJYS4, SJYS5, SJYS6, SJYS7, SJYS8, SJYS9, SJYS10, XTJSYZX, XMZ,BYJ, ZRJE, RWSYS, XMZYS, YBZJE, ZCBYJ, KYYS, ZCJE, BYJYSQ, BYQYBZ, ZRBYJ, DNZYZF,
|
|
524
|
+ a.bzje sjyzx,
|
|
525
|
+ c.bndsqje,
|
|
526
|
+ c.bndbzje
|
521
|
527
|
from prj_AnnualBudgetDetail b
|
|
528
|
+ left join (
|
|
529
|
+ SELECT convert(decimal(18,2),(sum(BZJE)/10000)) BZJE ,pa.fymc
|
|
530
|
+ from(SELECT id ,fylb
|
|
531
|
+ from sta_BudgetApproval
|
|
532
|
+ where nys in (
|
|
533
|
+ select id
|
|
534
|
+ from prj_AnnualBudget
|
|
535
|
+ where rws = (select rws from prj_AnnualBudget where id = #{nys}) and nf < (select nf from prj_AnnualBudget where id = #{nys}) )) sb
|
|
536
|
+ left join sta_Reimbursement sa on sa.fysq = sb.id
|
|
537
|
+ LEFT join prj_AnnualBudgetDetail pa on pa.id = sb.fylb group by pa.fymc
|
|
538
|
+ ) a on a.fymc = b.fymc
|
|
539
|
+ left join (
|
|
540
|
+ SELECT SUM(sb.SQJE) bndsqje, SUM(sr.BZJE) bndbzje,pa.FYMC
|
|
541
|
+ from
|
|
542
|
+ sta_BudgetApproval sb
|
|
543
|
+ left join sta_Reimbursement sr on sr.FYSQ = sb.ID and sr.SPZT = '审批结束'
|
|
544
|
+ left join prj_AnnualBudgetDetail pa on pa.ID = sb.FYLB
|
|
545
|
+ where
|
|
546
|
+ sb.NYS = #{nys} and sb.SPZT != '作废'
|
|
547
|
+ GROUP by pa.FYMC
|
|
548
|
+ ) c on c.fymc = b.fymc
|
522
|
549
|
where NYS = #{nys}
|
523
|
550
|
</select>
|
524
|
551
|
|
|
@@ -599,12 +626,15 @@
|
599
|
626
|
</select>
|
600
|
627
|
<select id="getYzxqk" resultType="com.liang.vo.PrjAnnualbudgetYzxqkVo">
|
601
|
628
|
SELECT convert(decimal(18,2),(sum(BZJE)/10000)) BZJE ,pa.fymc,sb.nf
|
602
|
|
- from(SELECT id ,fylb,nf
|
603
|
|
- from sta_BudgetApproval
|
|
629
|
+ from(SELECT sb.id ,sb.fylb,pa.nf
|
|
630
|
+ from sta_BudgetApproval sb
|
|
631
|
+ left join prj_AnnualBudget pa on pa.id = sb.nys
|
604
|
632
|
where nys in (
|
605
|
633
|
select id
|
606
|
634
|
from prj_AnnualBudget
|
607
|
|
- where rws = (select rws from prj_AnnualBudget where ID = #{nys}))) sb
|
|
635
|
+ where rws = (select rws from prj_AnnualBudget where ID = #{nys})
|
|
636
|
+ AND NF <( select DISTINCT NF from prj_AnnualBudget where id = #{nys} )
|
|
637
|
+ )) sb
|
608
|
638
|
left join sta_Reimbursement sa on sa.fysq = sb.id
|
609
|
639
|
LEFT join prj_AnnualBudgetDetail pa on pa.id = sb.fylb
|
610
|
640
|
group by pa.fymc,sb.nf
|
|
@@ -613,7 +643,17 @@
|
613
|
643
|
<select id="getNf" resultType="com.liang.vo.PrjAnnualbudgetYzxqkVo">
|
614
|
644
|
select DISTINCT NF
|
615
|
645
|
from prj_AnnualBudget
|
616
|
|
- where rws = (SELECT RWS from prj_AnnualBudget where id = #{nys})
|
|
646
|
+ where
|
|
647
|
+ rws = (SELECT RWS from prj_AnnualBudget where id = #{nys})
|
|
648
|
+ AND NF <( select DISTINCT NF from prj_AnnualBudget where id = #{nys} )
|
|
649
|
+ </select>
|
|
650
|
+ <select id="listAllBudgetDetail" resultType="com.liang.entity.PrjAnnualbudgetdetail">
|
|
651
|
+ select a.FYMC ,a.YSJE ,b.NF
|
|
652
|
+ from
|
|
653
|
+ prj_AnnualBudgetDetail A
|
|
654
|
+ left join prj_AnnualBudget B on b.ID = A.NYS
|
|
655
|
+ where
|
|
656
|
+ nys in (select ID from prj_AnnualBudget where rws = (select rws from prj_AnnualBudget where id = #{nys}))
|
617
|
657
|
</select>
|
618
|
658
|
</mapper>
|
619
|
659
|
|