2 次代碼提交 a5af33092a ... 5ad63a5737

作者 SHA1 備註 提交日期
  lgl 5ad63a5737 国网项目计算项目总预算优化 5 月之前
  lgl e4939cd850 年度预算-不能重复创建年度预算限制 5 月之前
共有 2 個文件被更改,包括 14 次插入3 次删除
  1. 12 2
      src/main/resources/mapper/PrjAnnualbudgetdetailDao.xml
  2. 2 1
      src/main/resources/mapper/PrjProjectDao.xml

+ 12 - 2
src/main/resources/mapper/PrjAnnualbudgetdetailDao.xml

@@ -605,10 +605,20 @@
605 605
 
606 606
     <select id="selectXMZYS" resultType="java.math.BigDecimal">
607 607
 
608
-        SELECT SUM(CZJE)
608
+        (
609
+         SELECT SUM(CZJE)
609 610
         from prj_feescheme
610 611
         where ZB = #{id}
611
-          and DWMC LIKE '%国网陕西省电力%'
612
+        and DWMC LIKE '%国网陕西省电力%'
613
+            ) + (
614
+        SELECT SUM(puc.SKJE) skje
615
+        from prj_FeeScheme pfs
616
+        left join prj_UndertakeCompany puc  on puc.ZB = pfs.ID
617
+        where
618
+         pfs.ZB = #{id}
619
+        and pfs.DWMC  not like '%国网陕西%'
620
+        and puc.DWMC like '%国网陕西%'
621
+              )
612 622
 
613 623
     </select>
614 624
     <select id="selectXMZYS_SX" resultType="java.math.BigDecimal">

+ 2 - 1
src/main/resources/mapper/PrjProjectDao.xml

@@ -503,9 +503,10 @@
503 503
         left join prj_Member m on m.XM = p.ID and m.XMJS = 1
504 504
         left join prj_Budget b on b.XM = p.ID and b.FJ = ''
505 505
         left join prj_FeeScheme f on f.ZB = p.ID
506
+        left join prj_AnnualBudget pa on pa.rws = f.zb and pa.nf = f.nf
506 507
         where p.XMMB != 1
507 508
         and p.SPZT = '审批结束'
508
-        and CONCAT(p.ID, f.NF) not in (select CONCAT(RWS, NF) from prj_AnnualBudget where XMLX !='s8')
509
+        and (p.xmlx = 's8' or ( pa.nf is null ))
509 510
         <if test="zwmc != null and zwmc != ''">
510 511
             and p.ZWMC like '%'+#{zwmc}+'%'
511 512
         </if>