Explorar o código

1.跟单金额统计bug调整

wuhp %!s(int64=2) %!d(string=hai) anos
pai
achega
c3c8427dce

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

@@ -831,8 +831,6 @@
                 AND day(a.signdate) =#{day}
             </if>
         </where>
-
-
     </select>
 
     <select id="allOtherAmount" resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
@@ -841,10 +839,10 @@
         MAX( a.company_name ) AS "companyName",
         MAX( a.company_id ) AS "companyId",
         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(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( a.other_feevalue ) AS "otherFeevalue"
         FROM