Sfoglia il codice sorgente

1.控制台应收重复数据

wuhp 1 anno fa
parent
commit
65ca0fb219
1 ha cambiato i file con 15 aggiunte e 10 eliminazioni
  1. 15 10
      src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

+ 15 - 10
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -2610,15 +2610,19 @@
                     a.company_id
             ) a
                 LEFT JOIN (
+               select
+                    sum( a.invoicAmount ) AS "invoicAmount",
+                    sum( a.noSettHandlingFee ) AS "noSettHandlingFee",
+                    sum( a.settAmount ) AS "settAmount",
+                    a.subPathner AS "subPathner"
+               from  (
                 SELECT
-                    sum( a.total_amount ) AS "invoicAmount",
-                    sum( a.remaining_amount ) AS "noSettHandlingFee",
-                    sum( a.settlement_amount ) AS "settAmount",
-                    a.task_id AS "taskId",
-                    DATE_FORMAT( a.signing_time, '%Y-%m' ) AS "subSigne",
-                    a.partner_companies_id AS "subPathner"
+                sum( a.total_amount ) AS "invoicAmount",
+                sum( a.remaining_amount ) AS "noSettHandlingFee",
+                sum( a.settlement_amount ) AS "settAmount",
+                a.partner_companies_id AS "subPathner"
                 FROM
-                    sys_insurance_handling_settlement_month a
+                sys_insurance_handling_settlement_month a
                 <where>
                     <if test="vo.isNoCar  != null  and vo.isNoCar !='' ">
                         and   a.is_not_car =#{vo.isNoCar}
@@ -2628,9 +2632,10 @@
                     </if>
                 </where>
                 GROUP BY
-                    a.partner_companies_id,
-                    DATE_FORMAT( a.signing_time, '%Y-%m' ),
-                    a.task_id
+                a.partner_companies_id,
+                DATE_FORMAT( a.signing_time, '%Y-%m' ),
+                a.task_id
+        ) a   group by a.subPathner
             ) b ON b.subPathner = a.partnerCompaniesId
                 LEFT JOIN esm_ins_company  eic  on eic.id = a.companyId
                 LEFT JOIN sys_area  sa  on sa.area_code = a.subPathner