ly 2 mesi fa
parent
commit
b444d589cc
1 ha cambiato i file con 18 aggiunte e 4 eliminazioni
  1. 18 4
      src/main/resources/mapper/PrjAnnualbudgetdetailDao.xml

+ 18 - 4
src/main/resources/mapper/PrjAnnualbudgetdetailDao.xml

@@ -721,7 +721,13 @@
721 721
     </select>
722 722
     <select id="getBz" resultType="com.liang.entity.PrjAnnualbudgetdetail">
723 723
         SELECT
724
-        b_sub.BZZE * 0.0001 AS BZZE,
724
+        SUM(inner_result.BZZE) AS BZZE,
725
+        MAX(inner_result.YFZE) AS YFZE,
726
+        inner_result.XMMC,
727
+        inner_result.FYMC
728
+        FROM (
729
+        SELECT
730
+        COALESCE((SUM(b_sub.BZZE)), 0.00) * 0.0001 AS BZZE,
725 731
         c_sub.YFZE,
726 732
         b_sub.XMMC,
727 733
         b_sub.ID,
@@ -766,10 +772,18 @@
766 772
         GROUP BY
767 773
         c.FYSQ
768 774
         ) c_sub ON b_sub.ID = c_sub.FYSQ
769
-        ORDER BY
770
-        b_sub.FYMC,
775
+        GROUP BY
776
+        c_sub.YFZE,
771 777
         b_sub.XMMC,
772
-        b_sub.ID;
778
+        b_sub.ID,
779
+        b_sub.FYMC
780
+        ) inner_result
781
+        GROUP BY
782
+        inner_result.XMMC,
783
+        inner_result.FYMC
784
+        ORDER BY
785
+        inner_result.FYMC,
786
+        inner_result.XMMC;
773 787
     </select>
774 788
     <select id="getWw" resultType="java.math.BigDecimal">
775 789
         SELECT