Browse Source

国网项目计算项目总预算优化

lgl 5 months ago
parent
commit
5ad63a5737
1 changed files with 12 additions and 2 deletions
  1. 12 2
      src/main/resources/mapper/PrjAnnualbudgetdetailDao.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">