Quellcode durchsuchen

1.跟单金额统计bug调整

wuhp vor 2 Jahren
Ursprung
Commit
c3c8427dce
1 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen
  1. 3 5
      src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

+ 3 - 5
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -831,8 +831,6 @@
                 AND day(a.signdate) =#{day}
                 AND day(a.signdate) =#{day}
             </if>
             </if>
         </where>
         </where>
-
-
     </select>
     </select>
 
 
     <select id="allOtherAmount" resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
     <select id="allOtherAmount" resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
@@ -841,10 +839,10 @@
         MAX( a.company_name ) AS "companyName",
         MAX( a.company_name ) AS "companyName",
         MAX( a.company_id ) AS "companyId",
         MAX( a.company_id ) AS "companyId",
         MAX( a.partner_companies_name ) AS "partnerCompaniesName",
         MAX( a.partner_companies_name ) AS "partnerCompaniesName",
-        IFNULL ( max(c.settleMentAmount),0.00) as  "allInvoicCommissionFeevalue",
+        IFNULL ( max(d.settleMentAmount),0.00)-IFNULL(max(f.settleMentAmount) , 0.00)  + IFNULL ( max(d.settleMentAmount),0.00)  as  "allInvoicCommissionFeevalue",
         IFNULL(max(f.settleMentAmount) , 0.00)  as  "readyCommissionFeevalue",
         IFNULL(max(f.settleMentAmount) , 0.00)  as  "readyCommissionFeevalue",
-        IFNULL ( max(d.settleMentAmount),0.00) as "invoicCommissionFeevalue",
-        sum(COALESCE( a.other_feevalue,0.00) )-COALESCE(max(c.settleMentAmount),0.00)  as "noInvoicCommissionFeevalue",
+        IFNULL ( max(d.settleMentAmount),0.00)-IFNULL(max(f.settleMentAmount) , 0.00)  as "invoicCommissionFeevalue",
+        sum(COALESCE( a.other_feevalue,0.00) )-IFNULL ( max(d.settleMentAmount),0.00)  as "noInvoicCommissionFeevalue",
         sum(COALESCE( a.other_feevalue,0.00) )-COALESCE(max(c.settleMentAmount),0.00)+IFNULL ( max(d.settleMentAmount),0.00)  AS "unSettledAmount",
         sum(COALESCE( a.other_feevalue,0.00) )-COALESCE(max(c.settleMentAmount),0.00)+IFNULL ( max(d.settleMentAmount),0.00)  AS "unSettledAmount",
         sum( a.other_feevalue ) AS "otherFeevalue"
         sum( a.other_feevalue ) AS "otherFeevalue"
         FROM
         FROM