Bläddra i källkod

1.手续费结算金额调整

wuhp 2 år sedan
förälder
incheckning
7eb7ee36be

+ 1 - 0
src/main/java/com/ydtech/modules/fnc/entity/SettlementDocumentaryFeesEntity.java

@@ -132,6 +132,7 @@ public class SettlementDocumentaryFeesEntity implements Serializable {
 
 
     @ApiModelProperty("图片路径")
+    @TableField(exist = false)
     private String imageUrl;
 
     @ApiModelProperty("税费")

+ 3 - 1
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -737,6 +737,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         ArrayList<HashMap<String, Object>> resultList = new ArrayList<>();
         HashMap<String, Object> resultMap = new HashMap<>();
         StringBuffer strBuilder = new StringBuffer();
+        boolean   open=true;
         String ids="";
         try {
             List<InsBxPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(multipartFile, InsBxPlyIncomeExcelDto.class, 0, 1, 1);
@@ -820,7 +821,8 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
                     params.put("isOther","0");
                     params.put("isNotCar",isNotCar);
                     InsPlyIncome insPlyIncome = baseMapper.findByBxLicenseno(params);
-                    if(i==dtoList.size() &&  ObjectUtils.isNotEmpty(insPlyIncome)){
+                    if(ObjectUtils.isNotEmpty(insPlyIncome)  && open){
+                        open=false;
                         resultMap.put("companyId",insPlyIncome.getCompanyId()); // 保险公司id
                         resultMap.put("partnerCompaniesId",insPlyIncome.getPartnerCompaniesId()); //合作公司id
                         resultMap.put("agreementId",insPlyIncome.getAgreementId());  //协议id

+ 6 - 2
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -800,10 +800,14 @@
         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",
+        CASE
+        WHEN (IFNULL(MAX(d.settleMentAmount), 0.00) - IFNULL(MAX(f.settleMentAmount), 0.00)) = 0.00
+        THEN   IFNULL ( MAX(d.settleMentAmount) ,0.00)
+        ELSE (IFNULL(MAX(d.settleMentAmount), 0.00) - IFNULL(MAX(f.settleMentAmount), 0.00))
+        END AS "allInvoicCommissionFeevalue",
         IFNULL(max(f.settleMentAmount) , 0.00)  as  "readyCommissionFeevalue",
         IFNULL ( max(d.settleMentAmount),0.00) as "invoicCommissionFeevalue",
-        sum(COALESCE( a.commission_feevalue,0.00) )-COALESCE(max(c.settleMentAmount),0.00)  as "noInvoicCommissionFeevalue",
+        sum(COALESCE( a.commission_feevalue,0.00) )-IFNULL ( max(d.settleMentAmount),0.00)  as "noInvoicCommissionFeevalue",
         sum(COALESCE( a.commission_feevalue,0.00) )-COALESCE(max(c.settleMentAmount),0.00)+IFNULL ( max(d.settleMentAmount),0.00)  AS "unSettledAmount",
         sum( a.commission_feevalue ) AS "commissionFeevalue"
         FROM