Kaynağa Gözat

Merge remote-tracking branch 'origin/test' into test

wks 2 yıl önce
ebeveyn
işleme
46383a3dc5
19 değiştirilmiş dosya ile 610 ekleme ve 155 silme
  1. 10 7
      src/main/java/com/ydtech/modules/admin/service/impl/SysUserAccountServiceImpl.java
  2. 9 29
      src/main/java/com/ydtech/modules/fnc/service/impl/ImportAsyncServiceImpl.java
  3. 42 46
      src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java
  4. 2 5
      src/main/java/com/ydtech/modules/fnc/vo/InsPlyIncomeVo.java
  5. 3 15
      src/main/java/com/ydtech/modules/inv/model/dto/InsBxNoPlyIncomeExcelDto.java
  6. 5 5
      src/main/java/com/ydtech/modules/inv/model/dto/InsBxOtherExcelDto.java
  7. 5 31
      src/main/java/com/ydtech/modules/inv/model/dto/InsBxPlyIncomeExcelDto.java
  8. 3 3
      src/main/java/com/ydtech/modules/inv/model/dto/InsNoBxOtherExcelDto.java
  9. 25 4
      src/main/java/com/ydtech/modules/inv/model/dto/InsPlyIncomeExcelDto.java
  10. 12 4
      src/main/java/com/ydtech/modules/order/controller/InsOrdersController.java
  11. 18 0
      src/main/java/com/ydtech/modules/order/entity/dto/InquiryDetalsQueryDto.java
  12. 50 0
      src/main/java/com/ydtech/modules/order/entity/vo/InquiryDetalsVo.java
  13. 86 0
      src/main/java/com/ydtech/modules/order/entity/vo/InsOrderVo.java
  14. 31 0
      src/main/java/com/ydtech/modules/order/entity/vo/PriceParityVo.java
  15. 71 0
      src/main/java/com/ydtech/modules/order/entity/vo/SubOrderVo.java
  16. 8 0
      src/main/java/com/ydtech/modules/order/service/InsOrdersService.java
  17. 1 1
      src/main/java/com/ydtech/modules/order/service/impl/BoHaiOrderApiServiceImpl.java
  18. 222 1
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java
  19. 7 4
      src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

+ 10 - 7
src/main/java/com/ydtech/modules/admin/service/impl/SysUserAccountServiceImpl.java

@@ -247,7 +247,7 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
         SysUserAccountHistory sysUserAccountHistory = new SysUserAccountHistory();  // 记录
         sysUserAccountHistory.setDocumentary(1);  // 1提现
         sysUserAccountHistory.setUserId(userId);
-        sysUserAccountHistory.setProperty(3);
+        sysUserAccountHistory.setProperty(6);
         sysUserAccountHistory.setBusinessSegmentsType(1);
         SysAmountAuditingEntity sysAmountAuditingEntity = new SysAmountAuditingEntity();//审核记录表
         sysAmountAuditingEntity.setUserId(userId);
@@ -357,7 +357,7 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
         SysUserAccountHistory sysUserAccountHistory = new SysUserAccountHistory();  // 记录
         sysUserAccountHistory.setDocumentary(1);  // 1支出
         sysUserAccountHistory.setUserId(userId);
-        sysUserAccountHistory.setProperty(3); //3提现
+        sysUserAccountHistory.setProperty(6); //3提现
         sysUserAccountHistory.setBusinessSegmentsType(1);
         SysAmountAuditingEntity sysAmountAuditingEntity = new SysAmountAuditingEntity();//审核记录表
         sysAmountAuditingEntity.setUserId(userId);
@@ -974,14 +974,14 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
         Page<MyCollectInAdvanceDto> page = new Page<>(myIncomeAndExpensesQueryDto.getPageNum(), myIncomeAndExpensesQueryDto.getPageSize());
         //page.setSearchCount(false).setOptimizeCountSql(false);//关闭count查询
         Page<MyCollectInAdvanceDto> orderVoPage = new Page<>();
-        if (myIncomeAndExpensesQueryDto.getBusinessSegmentsType() != null && "0".equals(myIncomeAndExpensesQueryDto.getBusinessSegmentsType())) {
+        if ("0".equals(myIncomeAndExpensesQueryDto.getBusinessSegmentsType())) {
             myIncomeAndExpensesQueryDto.setBusinessSegmentsType(null);
         }
-        if (myIncomeAndExpensesQueryDto.getTransactionType() != null && "0".equals(myIncomeAndExpensesQueryDto.getTransactionType())) {
+        if ("0".equals(myIncomeAndExpensesQueryDto.getTransactionType())) {
             myIncomeAndExpensesQueryDto.setTransactionType(null);
         }
-        if (myIncomeAndExpensesQueryDto.getIncomeAndExpensesType() != null && "0".equals(myIncomeAndExpensesQueryDto.getIncomeAndExpensesType())) {
-            myIncomeAndExpensesQueryDto.setTransactionType(null);
+        if ("0".equals(myIncomeAndExpensesQueryDto.getIncomeAndExpensesType())) {
+            myIncomeAndExpensesQueryDto.setIncomeAndExpensesType(null);
         }
         // 1为车险板块  1 收入时
         if ( StringUtils.isNotBlank(myIncomeAndExpensesQueryDto.getBusinessSegmentsType()) &&   StringUtils.isNotBlank(myIncomeAndExpensesQueryDto.getIncomeAndExpensesType()) &&"1".equals(myIncomeAndExpensesQueryDto.getBusinessSegmentsType()) &&"1".equals(myIncomeAndExpensesQueryDto.getIncomeAndExpensesType())) {
@@ -1011,6 +1011,8 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
             myIncomeAndExpensesQueryDto.setTransactionType("4");
         } else if (StringUtils.isNotBlank(myIncomeAndExpensesQueryDto.getTransactionType())  &&"4".equals(myIncomeAndExpensesQueryDto.getTransactionType())) {
             myIncomeAndExpensesQueryDto.setTransactionType("5");
+        } else if (StringUtils.isNotBlank(myIncomeAndExpensesQueryDto.getTransactionType())  &&"3".equals(myIncomeAndExpensesQueryDto.getTransactionType())) {
+            myIncomeAndExpensesQueryDto.setTransactionType("6");
         }
         //处理收入和支出类型转换
         if (myIncomeAndExpensesQueryDto.getIncomeAndExpensesType() != null && "0".equals(myIncomeAndExpensesQueryDto.getIncomeAndExpensesType())) {
@@ -1039,8 +1041,9 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
                     dto.setIncomeAndExpensesType("1");
                     dto.setTransactionType("4");
                     //提现
-                }else if("3".equals(dto.getTransactionType()) && "1".equals(dto.getIncomeAndExpensesType())){
+                }else if("6".equals(dto.getTransactionType()) && "1".equals(dto.getIncomeAndExpensesType())){
                     dto.setIncomeAndExpensesType("2");
+                    dto.setTransactionType("3");
                 }
                 recordsNew.add(dto);
             }

+ 9 - 29
src/main/java/com/ydtech/modules/fnc/service/impl/ImportAsyncServiceImpl.java

@@ -116,13 +116,7 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
                     if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
                         totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue());  //添加总手续费
                     }
-                    if (excelItem.getJqSuperviseCostsPremiums() != null && excelItem.getJqSuperviseCostsPremiums().compareTo(BigDecimal.ZERO) != 0 && excelItem.getJqSuperviseCostsPremiums().compareTo(insPlyIncome.getJqSuperviseCostsPremiums()) != 0) {
-                        params.put("jqSuperviseCostsPremiums", excelItem.getJqSuperviseCostsPremiums());
-                        InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
-                        if (ObjectUtils.isEmpty(byBxLicenseno)) {
-                            reason = "该数据交强手续费金额有问题";
-                        }
-                    }
+
                     if (excelItem.getJqSuperviseCostsProportion() != null && excelItem.getJqSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0 && excelItem.getJqSuperviseCostsProportion().compareTo(insPlyIncome.getJqSuperviseCostsProportion()) != 0) {
                         params.put("jqSuperviseCostsProportion", excelItem.getJqSuperviseCostsProportion());
                         InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
@@ -137,28 +131,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
                             reason = "该数据商业手续费比例有问题";
                         }
                     }
-
-                    if (excelItem.getSySuperviseCostsPremiums() != null && excelItem.getSySuperviseCostsPremiums().compareTo(BigDecimal.ZERO) != 0 && excelItem.getSySuperviseCostsPremiums().compareTo(insPlyIncome.getSySuperviseCostsPremiums()) != 0) {
-                        params.put("sySuperviseCostsPremiums", excelItem.getSySuperviseCostsPremiums());
-                        InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
-                        if (ObjectUtils.isEmpty(byBxLicenseno)) {
-                            reason = "该数据商业手续费金额有问题";
-                        }
-                    }
-                    if (excelItem.getJqPremium() != null && excelItem.getJqPremium().compareTo(BigDecimal.ZERO) != 0 && excelItem.getJqPremium().compareTo(insPlyIncome.getJqPremium()) != 0 ) {
-                        params.put("jqPremium", excelItem.getJqPremium());
-                        InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
-                        if (ObjectUtils.isEmpty(byBxLicenseno)) {
-                            reason = "该数据交强保费有问题";
-                        }
-                    }
-                    if (excelItem.getSyPremium() != null && excelItem.getSyPremium().compareTo(BigDecimal.ZERO) != 0 && excelItem.getSyPremium().compareTo(insPlyIncome.getSyPremium()) != 0 ) {
-                        params.put("syPremium", excelItem.getSyPremium());
-                        InsPlyIncome byBxLicenseno = insPlyIncomeMapper.findByBxLicenseno(params);
-                        if (ObjectUtils.isEmpty(byBxLicenseno)) {
-                            reason = "该数据商业保费有问题";
-                        }
-                    }
                 } else {
                     reason = "查询不到该车辆";
                 }
@@ -326,6 +298,9 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
                     if (StringUtils.isNotEmpty(excelItem.getSyPolicyno())) {
                         insImportResult.setSyPolicyno(excelItem.getSyPolicyno());
                     }
+                    insImportResult.setReason(reason);
+                    insImportResultsExcel.add(insImportResult);
+
                 }else {
                     if(StringUtils.isNotEmpty(insPlyIncome.getPartnerCompaniesId())){
                         hashSet.add(insPlyIncome.getPartnerCompaniesId());
@@ -441,6 +416,9 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
                     if (StringUtils.isNotEmpty(excelItem.getNoPolicyno())) {
                         insImportResult.setPolicyno(excelItem.getNoPolicyno());
                     }
+                    insImportResult.setReason(reason);
+                    insImportResultsExcel.add(insImportResult);
+
                 }else {
                     if(StringUtils.isNotEmpty(insPlyIncome.getPartnerCompaniesId())){
                         hashSet.add(insPlyIncome.getPartnerCompaniesId());
@@ -555,6 +533,8 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
                     if (StringUtils.isNotEmpty(excelItem.getNoPolicyno())) {
                         insImportResult.setPolicyno(excelItem.getNoPolicyno());
                     }
+                    insImportResult.setReason(reason);
+                    insImportResultsExcel.add(insImportResult);
 
                 }else {
                     if(StringUtils.isNotEmpty(insPlyIncome.getPartnerCompaniesId())){

+ 42 - 46
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -711,6 +711,9 @@ handlingProportion,
         if(StringUtils.isNotEmpty(insPlyIncomeVo.getCreateTimeQuery())){
             params.put("createTimeQuery", insPlyIncomeVo.getCreateTimeQuery());
         }
+        if(StringUtils.isNotEmpty(insPlyIncomeVo.getSettlementDate())){
+            params.put("settlementDate", insPlyIncomeVo.getSettlementDate());
+        }
 
         return params;
     }
@@ -782,8 +785,10 @@ handlingProportion,
         BigDecimal totalAmount = BigDecimal.ZERO;
         BigDecimal totalHandingAmount = BigDecimal.ZERO;
         BigDecimal totalOtherAmount = BigDecimal.ZERO;
-        HashMap<String, Object> params = new HashMap<>();
         HashMap<String, Object> resultHashMap = new HashMap<>();
+        HashSet<String> partnerCompaniesIdSet = new HashSet<>();
+        LocalDateTime now = LocalDateTime.now();
+        String  reason ="";
         ArrayList<HashMap<String, Object>> resultNoSelect = new ArrayList<>();
         try {
             List<InsPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(multipartFile, InsPlyIncomeExcelDto.class, 0, 1, 1);
@@ -803,6 +808,28 @@ handlingProportion,
                 }
                 InsPlyIncome insPlyIncome = baseMapper.findByLicenseno(objectObjectHashMap);
                 if (ObjectUtils.isNotEmpty(insPlyIncome)) {
+//                  如果能查询出来则 修改结算  变成已结算
+                    if(excelItem.getJqReceivableProportion()!=null  &&  excelItem.getJqReceivableProportion().compareTo(BigDecimal.ZERO) !=0 ){
+                        objectObjectHashMap.put("jqReceivableProportion", excelItem.getJqReceivableProportion());   //非车保单号
+                        List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(objectObjectHashMap);
+                        if(insPlyIncomes.isEmpty()){
+                            reason="交强应收比例错误!";
+                        }
+                    }
+                    if(excelItem.getSyReceivableProportion()!=null  &&  excelItem.getSyReceivableProportion().compareTo(BigDecimal.ZERO) !=0 ){
+                        objectObjectHashMap.put("syReceivableProportion", excelItem.getSyReceivableProportion());   //非车保单号
+                        List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(objectObjectHashMap);
+                        if(insPlyIncomes.isEmpty()){
+                            reason="商业应收比例错误!";
+                        }
+                    }
+                    if(excelItem.getNoReceivableProportion()!=null  &&  excelItem.getNoReceivableProportion().compareTo(BigDecimal.ZERO) !=0 ){
+                        objectObjectHashMap.put("noReceivableProportion", excelItem.getNoReceivableProportion());   //非车保单号
+                        List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(objectObjectHashMap);
+                        if(insPlyIncomes.isEmpty()){
+                            reason="非车应收比例错误!";
+                        }
+                    }
                     if (insPlyIncome.getAllFeeValue() != null && insPlyIncome.getAllFeeValue().compareTo(BigDecimal.ZERO) != 0) {
                         totalAmount = totalAmount.add(insPlyIncome.getAllFeeValue());  //总金额
                     }
@@ -812,11 +839,22 @@ handlingProportion,
                     if (insPlyIncome.getOtherFeevalue() != null && insPlyIncome.getOtherFeevalue().compareTo(BigDecimal.ZERO) != 0) {
                         totalOtherAmount = totalOtherAmount.add(insPlyIncome.getOtherFeevalue());   //总跟单费
                     }
+                        insPlyIncome.setSettlementUserId(BaseController.getUser().getId());
+                        insPlyIncome.setSettlementTime(now);
+                        insPlyIncome.setHandlingFeesStatus("1");
+                        baseMapper.updateById(insPlyIncome);
+                    //判断是否是相同保司机构
+                    partnerCompaniesIdSet.add(insPlyIncome.getPartnerCompaniesId());
+                    objectObjectHashMap.put("reason",reason);
+                    resultNoSelect.add(objectObjectHashMap);  // 添加未匹配的车牌号
                 } else {
+                    objectObjectHashMap.put("reason","未查询车辆");
                     resultNoSelect.add(objectObjectHashMap);  // 添加未匹配的车牌号
                 }
             }
-
+            if(partnerCompaniesIdSet.size()>1){
+                throw new SystemException("表里有不同保司机构");
+            }
             resultHashMap.put("totalAmount", totalAmount);
             resultHashMap.put("totalHandingAmount", totalHandingAmount);
             resultHashMap.put("totalOtherAmount", totalOtherAmount);
@@ -875,13 +913,7 @@ handlingProportion,
                         }
                     }
 
-                    if (excelItem.getJqSuperviseCostsPremiums() != null && excelItem.getJqSuperviseCostsPremiums().compareTo(BigDecimal.ZERO) != 0) {
-                        params.put("jqSuperviseCostsPremiums", excelItem.getJqSuperviseCostsPremiums());
-                        InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
-                        if (ObjectUtils.isEmpty(byBxLicenseno)) {
-                            reason = "该数据交强手续费金额有问题";
-                        }
-                    }
+
                     if (excelItem.getJqSuperviseCostsProportion() != null && excelItem.getJqSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0) {
                         params.put("jqSuperviseCostsProportion", excelItem.getJqSuperviseCostsProportion());
                         InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
@@ -897,27 +929,6 @@ handlingProportion,
                         }
                     }
 
-                    if (excelItem.getSySuperviseCostsPremiums() != null && excelItem.getSySuperviseCostsPremiums().compareTo(BigDecimal.ZERO) != 0) {
-                        params.put("sySuperviseCostsPremiums", excelItem.getSySuperviseCostsPremiums());
-                        InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
-                        if (ObjectUtils.isEmpty(byBxLicenseno)) {
-                            reason = "该数据商业手续费金额有问题";
-                        }
-                    }
-                    if (excelItem.getJqPremium() != null && excelItem.getJqPremium().compareTo(BigDecimal.ZERO) != 0) {
-                        params.put("jqPremium", excelItem.getJqPremium());
-                        InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
-                        if (ObjectUtils.isEmpty(byBxLicenseno)) {
-                            reason = "该数据交强保费有问题";
-                        }
-                    }
-                    if (excelItem.getSyPremium() != null && excelItem.getSyPremium().compareTo(BigDecimal.ZERO) != 0) {
-                        params.put("syPremium", excelItem.getSyPremium());
-                        InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
-                        if (ObjectUtils.isEmpty(byBxLicenseno)) {
-                            reason = "该数据商业保费有问题";
-                        }
-                    }
 
 //                  只查手续费
                     params.put("isOther", "0");
@@ -996,21 +1007,6 @@ handlingProportion,
                         }
                     }
 
-                    if (excelItem.getNoPremium() != null && excelItem.getNoPremium().compareTo(BigDecimal.ZERO) != 0) {
-                        params.put("noPolicyno", excelItem.getNoPremium());
-                        InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
-                        if (ObjectUtils.isEmpty(byBxLicenseno)) {
-                            reason = "该数据非车保费有问题";
-                        }
-                    }
-
-                    if (excelItem.getNoSuperviseCostsPremiums() != null && excelItem.getNoSuperviseCostsPremiums().compareTo(BigDecimal.ZERO) != 0) {
-                        params.put("noSuperviseCostsPremiums", excelItem.getNoSuperviseCostsPremiums());
-                        InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
-                        if (ObjectUtils.isEmpty(byBxLicenseno)) {
-                            reason = "该数据非车手续费有问题";
-                        }
-                    }
                     if (excelItem.getNoSuperviseCostsProportion() != null && excelItem.getNoSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0) {
                         params.put("noSuperviseCostsProportion", excelItem.getNoSuperviseCostsProportion());
                         InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
@@ -2653,9 +2649,9 @@ handlingProportion,
 
                     InsPlyIncomeLog insPlyIncomeLog = new InsPlyIncomeLog();
                     insPlyIncomeLog.setIncomeId(byBxLicenseno.getId());
-                    byBxLicenseno.setId(null);
                     BeanUtils.copyProperties(byBxLicenseno,insPlyIncomeLog);
                     insPlyIncomeLog.setOperationStatus("2");
+                    insPlyIncomeLog.setId(null);
                     insPlyIncomeLogService.saveLog(insPlyIncomeLog);  //添加日志
 
 

+ 2 - 5
src/main/java/com/ydtech/modules/fnc/vo/InsPlyIncomeVo.java

@@ -388,10 +388,7 @@ public class InsPlyIncomeVo implements Serializable {
     @ApiModelProperty("创建时间查询")
     private String createTimeQuery;
 
-
-
-
-
-
+    @ApiModelProperty(value = "结算日期")
+    private String settlementDate;
 
 }

+ 3 - 15
src/main/java/com/ydtech/modules/inv/model/dto/InsBxNoPlyIncomeExcelDto.java

@@ -10,30 +10,18 @@ public class InsBxNoPlyIncomeExcelDto {
     /**
      * 车牌号
      */
-    @Excel(name = "车牌号")
+    @Excel(name = "车牌号" ,isImportField = "true")
     private String licenseno;
     /**
      * 非车保单号
      */
-    @Excel(name = "非车保单号")
+    @Excel(name = "非车保单号" ,isImportField = "true")
     private String noPolicyno;
 
-    /**
-     * 非车保费
-     */
-    @Excel(name = "非车保费")
-    private BigDecimal noPremium;
-
-    /**
-     * 非车手续费金额
-     */
-    @Excel(name = "非车手续费金额")
-    private BigDecimal noSuperviseCostsPremiums;
-
     /**
      * 非车手续费比例
      */
-    @Excel(name = "非车手续费比例")
+    @Excel(name = "非车手续费比例" ,isImportField = "true")
     private BigDecimal noSuperviseCostsProportion;
 
 

+ 5 - 5
src/main/java/com/ydtech/modules/inv/model/dto/InsBxOtherExcelDto.java

@@ -12,31 +12,31 @@ public class InsBxOtherExcelDto {
     /**
      * 车牌号
      */
-    @Excel(name = "车牌号")
+    @Excel(name = "车牌号" , isImportField = "true")
     private String licenseno;
 
     /**
      * 交强保单号
      */
-    @Excel(name = "交强保单号")
+    @Excel(name = "交强保单号" , isImportField = "true")
     private String policyno;
 
     /**
      * 商业保单号
      */
-    @Excel(name =  "商业保单号")
+    @Excel(name =  "商业保单号", isImportField = "true")
     private String syPolicyno;
 
     /**
      * 交强跟单比例
      */
-    @Excel(name = "交强跟单比例")
+    @Excel(name = "交强跟单比例" , isImportField = "true")
     private BigDecimal jqOtherCostsProportion;
 
     /**
      * 商业保单号
      */
-    @Excel(name = "商业跟单比例")
+    @Excel(name = "商业跟单比例" , isImportField = "true")
     private BigDecimal syOtherCostsProportion;
 
 

+ 5 - 31
src/main/java/com/ydtech/modules/inv/model/dto/InsBxPlyIncomeExcelDto.java

@@ -10,58 +10,32 @@ public class InsBxPlyIncomeExcelDto {
     /**
      * 车牌号
      */
-    @Excel(name = "车牌号")
+    @Excel(name = "车牌号" ,isImportField = "true")
     private String licenseno;
     /**
      * 交强保单号
      */
-    @Excel(name = "交强保单号")
+    @Excel(name = "交强保单号",isImportField = "true")
     private String policyno;
 
     /**
      * 商业保单号
      */
-    @Excel(name = "商业保单号")
+    @Excel(name = "商业保单号",isImportField = "true")
     private String syPolicyno;
 
-
-    /**
-     * 交强手续费金额
-     */
-    @Excel(name = "交强手续费金额")
-    private BigDecimal jqSuperviseCostsPremiums;
-
     /**
      * 交强手续费比例
      */
-    @Excel(name = "交强手续费比例")
+    @Excel(name = "交强手续费比例",isImportField = "true")
     private BigDecimal jqSuperviseCostsProportion;
 
 
-    /**
-     * 商业手续费金额
-     */
-    @Excel(name = "商业手续费金额")
-    private BigDecimal sySuperviseCostsPremiums;
-
     /**
      * 商业手续费比例
      */
-    @Excel(name = "商业手续费比例")
+    @Excel(name = "商业手续费比例",isImportField = "true")
     private BigDecimal sySuperviseCostsProportion;
 
-    /**
-     * 交强保费
-     */
-    @Excel(name = "交强保费")
-    private BigDecimal jqPremium;
-
-
-    /**
-     * 商业保费
-     */
-    @Excel(name = "商业保费")
-    private BigDecimal syPremium;
-
 
 }

+ 3 - 3
src/main/java/com/ydtech/modules/inv/model/dto/InsNoBxOtherExcelDto.java

@@ -13,19 +13,19 @@ public class InsNoBxOtherExcelDto {
     /**
      * 车牌号
      */
-    @Excel(name = "车牌号")
+    @Excel(name = "车牌号", isImportField = "true")
     private String licenseno;
 
     /**
      * 非车保单号
      */
-    @Excel(name = "非车保单号")
+    @Excel(name = "非车保单号" , isImportField = "true")
     private String noPolicyno;
 
     /**
      * 非车跟单比例
      */
-    @Excel(name = "非车跟单比例")
+    @Excel(name = "非车跟单比例" , isImportField = "true")
     private BigDecimal noOtherCostsProportion;
 
 

+ 25 - 4
src/main/java/com/ydtech/modules/inv/model/dto/InsPlyIncomeExcelDto.java

@@ -4,28 +4,49 @@ package com.ydtech.modules.inv.model.dto;
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import lombok.Data;
 
+import java.math.BigDecimal;
+
 @Data
 public class InsPlyIncomeExcelDto {
     /**
      * 车牌号
      */
-    @Excel(name = "车牌号")
+    @Excel(name = "车牌号" ,isImportField = "true")
     private String licenseno;
     /**
      * 交强保单号
      */
-    @Excel(name = "交强保单号")
+    @Excel(name = "交强保单号" ,isImportField = "true")
     private String policyno;
 
     /**
      * 商业保单号
      */
-    @Excel(name = "商业保单号")
+    @Excel(name = "商业保单号" ,isImportField = "true")
     private String syPolicyno;
 
     /**
      * 非车保单号
      */
-    @Excel(name = "非车保单号")
+    @Excel(name = "非车保单号" ,isImportField = "true")
     private String noPolicyno;
+
+    /**
+     * 交强应收比例
+     */
+    @Excel(name = "交强应收比例" ,isImportField = "true" )
+    private BigDecimal jqReceivableProportion;
+
+
+    /**
+     * 商业应收比例
+     */
+    @Excel(name = "商业应收比例" ,isImportField = "true")
+    private BigDecimal syReceivableProportion;
+
+    /**
+     * 非车应收比例
+     */
+    @Excel(name = "非车应收比例" ,isImportField = "true")
+    private BigDecimal noReceivableProportion;
 }

+ 12 - 4
src/main/java/com/ydtech/modules/order/controller/InsOrdersController.java

@@ -10,11 +10,11 @@ import com.ydtech.exception.SystemException;
 import com.ydtech.modules.admin.model.po.SysUserIsDial;
 import com.ydtech.modules.admin.service.SysUserIsDialService;
 import com.ydtech.modules.base.controller.BaseController;
-import com.ydtech.modules.base.model.dto.PageDto;
 import com.ydtech.modules.ins.model.InsOrdersExcelVo;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.constants.OrderLinkTypeConstants;
 import com.ydtech.modules.order.entity.*;
+import com.ydtech.modules.order.entity.dto.InquiryDetalsQueryDto;
 import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
 import com.ydtech.modules.order.entity.vo.*;
 import com.ydtech.modules.order.service.*;
@@ -22,15 +22,12 @@ import com.ydtech.modules.protocol.entity.dto.PtlAgreementInsCompanyDto;
 import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.BeanUtils;
 import org.springframework.util.ObjectUtils;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
-import java.time.LocalDateTime;
-import java.time.temporal.ChronoUnit;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -396,4 +393,15 @@ public class InsOrdersController extends BaseController {
     public HttpResult savePosition(@RequestBody InsAreaCompanyPosition insAreaCompanyPosition){
         return HttpResult.ok(insAreaCompanyPositionService.save(insAreaCompanyPosition));
     }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/6/24 18:07
+     *  @Description: 通过子订单ids获取比价信息
+     */
+    @PostMapping("/getInquiryDetalsBySubOrderNos")
+    @ApiOperation(value = "通过子订单ids获取比价信息")
+    public HttpResult<InquiryDetalsVo> getInquiryDetalsBySubOrderNos(@RequestBody InquiryDetalsQueryDto inquiryDetalsDto){
+        return HttpResult.ok(insOrdersService.getInquiryDetalsBySubOrderIds(inquiryDetalsDto));
+    }
 }

+ 18 - 0
src/main/java/com/ydtech/modules/order/entity/dto/InquiryDetalsQueryDto.java

@@ -0,0 +1,18 @@
+package com.ydtech.modules.order.entity.dto;
+
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/6/24 18:10
+ *  @Description:  询价信息的前台传参对象
+ */
+@Data
+public class InquiryDetalsQueryDto {
+
+    private List<String>  subOrderNos=new ArrayList<String>();
+}

+ 50 - 0
src/main/java/com/ydtech/modules/order/entity/vo/InquiryDetalsVo.java

@@ -0,0 +1,50 @@
+package com.ydtech.modules.order.entity.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/6/24 18:10
+ *  @Description:  询价详情对象
+ */
+@Data
+public class InquiryDetalsVo implements Serializable {
+    /***
+     *  主订单信息
+     */
+    @ApiModelProperty("主订单信息")
+    private InsOrderVo  insOrderVo=new InsOrderVo();
+
+    /***
+     * 子订单列表信息
+     */
+    @ApiModelProperty("子订单列表信息")
+    private List<SubOrderVo>  subOrderVos=new ArrayList<SubOrderVo>();
+    /***
+     * 比价信息
+     */
+    @ApiModelProperty("比价列表信息")
+    private List<List<PriceParityVo>>  parityPriceVo=new ArrayList<List<PriceParityVo>>();
+
+    /***
+     * 最优惠公司
+     */
+    @ApiModelProperty("最优惠公司")
+    private String companyName;
+
+    public InquiryDetalsVo() {
+    }
+
+    public InquiryDetalsVo(InsOrderVo insOrderVo, List<SubOrderVo> subOrderVos, List<List<PriceParityVo>> parityPriceVo, String companyName) {
+        this.insOrderVo = insOrderVo;
+        this.subOrderVos = subOrderVos;
+        this.parityPriceVo = parityPriceVo;
+        this.companyName = companyName;
+    }
+}

+ 86 - 0
src/main/java/com/ydtech/modules/order/entity/vo/InsOrderVo.java

@@ -0,0 +1,86 @@
+package com.ydtech.modules.order.entity.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/6/24 18:28
+ *  @Description:  主订单信息
+ */
+@Data
+public class InsOrderVo implements Serializable {
+
+
+    @ApiModelProperty("主订单号")
+    private String  orderNo;
+
+    @ApiModelProperty("车架号")
+    private String frameNo;
+
+    @ApiModelProperty("车牌号")
+    private String licenseNo;
+
+    @ApiModelProperty("品牌型号")
+    private String brandName;
+
+    @ApiModelProperty("发动机号")
+    private String engineNo;
+    @ApiModelProperty("座位数")
+    private String seatCount;
+
+    @ApiModelProperty("车主姓名")
+    private String carOwnerName;
+
+    @ApiModelProperty("车主身份证号")
+    private String ownerIdentifyNumber;
+
+    @ApiModelProperty("投保人姓名")
+    private String applyName;
+
+    @ApiModelProperty("投保人身份证号")
+    private String applyIdentifyNumber;
+
+    @ApiModelProperty("被保人姓名")
+    private String insuredName;
+
+    @ApiModelProperty("被保人身份证号")
+    private String insuredNumber;
+
+    @ApiModelProperty("交强险开始时间")
+    private String jqstartDate;
+
+    @ApiModelProperty("交强险结束时间")
+    private String jqendDate;
+
+    @ApiModelProperty("商业险开始时间")
+    private String systartDate;
+
+    @ApiModelProperty("商业险结束时间")
+    private String syendDate;
+
+    public InsOrderVo() {
+    }
+
+    public InsOrderVo(String orderNo, String frameNo, String licenseNo,String brandName, String engineNo, String seatCount, String carOwnerName, String ownerIdentifyNumber, String applyName, String applyIdentifyNumber, String insuredName, String insuredNumber, String jqstartDate, String jqendDate, String systartDate, String syendDate) {
+        this.orderNo = orderNo;
+        this.frameNo = frameNo;
+        this.licenseNo = licenseNo;
+        this.brandName = brandName;
+        this.engineNo = engineNo;
+        this.seatCount = seatCount;
+        this.carOwnerName = carOwnerName;
+        this.ownerIdentifyNumber = ownerIdentifyNumber;
+        this.applyName = applyName;
+        this.applyIdentifyNumber = applyIdentifyNumber;
+        this.insuredName = insuredName;
+        this.insuredNumber = insuredNumber;
+        this.jqstartDate = jqstartDate;
+        this.jqendDate = jqendDate;
+        this.systartDate = systartDate;
+        this.syendDate = syendDate;
+    }
+}

+ 31 - 0
src/main/java/com/ydtech/modules/order/entity/vo/PriceParityVo.java

@@ -0,0 +1,31 @@
+package com.ydtech.modules.order.entity.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/6/25 16:12
+ *  @Description: 前台添加比价最低的颜色区分
+ */
+@Data
+public class PriceParityVo {
+
+    @ApiModelProperty("内容")
+    private String value;
+    @ApiModelProperty("颜色标志 true false")
+    private boolean flag;
+
+    @ApiModelProperty("优惠后金额颜色标志 true false")
+    private boolean yzhFlag;
+
+    public PriceParityVo() {
+    }
+
+    public PriceParityVo(String value, boolean flag,boolean yzhFlag) {
+        this.value = value;
+        this.flag = flag;
+        this.yzhFlag = yzhFlag;
+    }
+}

+ 71 - 0
src/main/java/com/ydtech/modules/order/entity/vo/SubOrderVo.java

@@ -0,0 +1,71 @@
+package com.ydtech.modules.order.entity.vo;
+
+import com.alibaba.fastjson.JSONArray;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/6/24 18:28
+ *  @Description:  子订单信息
+ */
+@Data
+public class SubOrderVo {
+
+    /***
+     * 公司公司名称
+     */
+    @ApiModelProperty("公司公司名称")
+    private String  companyName;
+
+
+    @ApiModelProperty("交强险保费")
+    private BigDecimal jqpremium;
+    /***
+     * 交强险种信息
+     */
+    @ApiModelProperty("交强险种列表信息")
+    private JSONArray jqInsuranceType;
+
+    @ApiModelProperty("商业险保费")
+    private BigDecimal sypremium;
+    /***
+     * 商业险种列表信息
+     */
+    @ApiModelProperty("商业险种列表信息")
+    private JSONArray  kindinfo;
+
+
+    @ApiModelProperty(value = "车船税费用")
+    private BigDecimal taxaMount;
+
+
+    @ApiModelProperty("驾意险保费")
+    private  BigDecimal jypremium;
+    /***
+     * 意外险种列表信息
+     */
+    @ApiModelProperty("驾意险种列表信息")
+    private  JSONArray accidentInfo;
+
+    @ApiModelProperty("总保费")
+    private BigDecimal sumpremium;
+
+    public SubOrderVo() {
+    }
+
+    public SubOrderVo(String companyName, BigDecimal jqpremium, JSONArray jqInsuranceType, BigDecimal sypremium, JSONArray kindinfo, BigDecimal taxaMount, BigDecimal jypremium, JSONArray accidentInfo, BigDecimal sumpremium) {
+        this.companyName = companyName;
+        this.jqpremium = jqpremium;
+        this.jqInsuranceType = jqInsuranceType;
+        this.sypremium = sypremium;
+        this.kindinfo = kindinfo;
+        this.taxaMount = taxaMount;
+        this.jypremium = jypremium;
+        this.accidentInfo = accidentInfo;
+        this.sumpremium = sumpremium;
+    }
+}

+ 8 - 0
src/main/java/com/ydtech/modules/order/service/InsOrdersService.java

@@ -8,6 +8,7 @@ import com.ydtech.modules.ins.model.ya.CarModelDTO;
 import com.ydtech.modules.order.entity.BasePageResult;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.dto.InquiryDetalsQueryDto;
 import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
 import com.ydtech.modules.order.entity.vo.*;
 import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
@@ -194,4 +195,11 @@ public interface InsOrdersService extends IService<InsOrders> {
      * @return
      */
     Page<OrderExpirationVo> getExpirationInsure(Page page,OrderExpirationQueryVo orderExpirationQueryVo);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/6/24 18:14
+     *  @Description:  通过子订单号查询询价信息
+     */
+    InquiryDetalsVo getInquiryDetalsBySubOrderIds(InquiryDetalsQueryDto inquiryDetalsDto);
 }

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/impl/BoHaiOrderApiServiceImpl.java

@@ -406,7 +406,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
         if (StringUtils.isNotEmpty(data.getTrafficEPolicyUrl())) {
             crawlerPolicyPrintVo.setJqxPolicyUrl(fileComponents.gainCarInsPolicy(data.getTrafficEPolicyUrl(),
                     licenseno + "-" + insAreaCompany.getJqpolicyno() + "-交强险保单.pdf", licenseno, customerInfoVo.getIdentifyNumber()));
-            crawlerPolicyPrintVo.setJqxFlagUrl(fileComponents.gainCarInsPolicy(data.getTrafficEPolicyUrl(),
+            crawlerPolicyPrintVo.setJqxFlagUrl(fileComponents.gainCarInsPolicy(data.getTrafficEFlagUrl(),
                     licenseno + "-" + insAreaCompany.getJqpolicyno() + "-交强险标志.pdf", licenseno, customerInfoVo.getIdentifyNumber()));
 
         }

+ 222 - 1
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -13,7 +13,6 @@ import com.ydtech.config.DictEnumConfig;
 import com.ydtech.constants.InsuranceEnum;
 import com.ydtech.constants.enums.dict.DictionaryData;
 import com.ydtech.constants.enums.dict.DictionaryManagement;
-import com.ydtech.constants.enums.dict.FeeAuditAuditstatus;
 import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
 import com.ydtech.constants.enums.dict.agreement.ProductsType;
 import com.ydtech.constants.enums.dict.insurance.NatureOfVehicleUse;
@@ -51,6 +50,7 @@ import com.ydtech.modules.order.dao.InsOrdersMapper;
 import com.ydtech.modules.order.entity.*;
 import com.ydtech.modules.order.entity.crawler.response.CrawlerVerifyPaymentResponse;
 import com.ydtech.modules.order.entity.dto.DrivingInsuranceDto;
+import com.ydtech.modules.order.entity.dto.InquiryDetalsQueryDto;
 import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
 import com.ydtech.modules.order.entity.vo.*;
 import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
@@ -1153,6 +1153,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             jsonObject.put("planName",accidentObject.getString("projectName"));
             jsonObject.put("sumAmount",accidentObject.getString("sumAmount"));
             jsonObject.put("sumPremium",accidentObject.getString("sumPremium"));
+            taiKangBaseQuoteVo.setAccidentalDrivingVo(jsonObject);
             return taiKangBaseQuoteVo;
         }
         return null;
@@ -1250,4 +1251,224 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         expirationInsure.setRecords(records);
         return expirationInsure;
     }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/6/24 18:14
+     *  @Description:  通过子订单号查询询价详情信息
+     */
+    @Override
+    public InquiryDetalsVo getInquiryDetalsBySubOrderIds(InquiryDetalsQueryDto inquiryDetalsDto) {
+        //通过其中一个子订单id查询主订单的id
+        if(inquiryDetalsDto.getSubOrderNos()==null || inquiryDetalsDto.getSubOrderNos().size()==0){
+            throw new SystemException("子订单号数组为空不能比价");
+        }
+        if(inquiryDetalsDto.getSubOrderNos()!=null && inquiryDetalsDto.getSubOrderNos().size()==1){
+            throw new SystemException("子订单号数据为一个不能比价");
+        }
+        String subOrderNo = inquiryDetalsDto.getSubOrderNos().get(0);
+        InsAreaCompany  insAreaCompany = insAreaCompanyService.getById(subOrderNo);
+        //主订单信息
+        InsOrders orders = this.getById(insAreaCompany.getOrderno());
+        InsOrderVo  insOrderVo = getInsOrderVoDetals(orders);
+        List<List<PriceParityVo>>  priceList=new ArrayList<>();
+        List<PriceParityVo> companyList=new ArrayList<>();
+        List<String> companyAllList=new ArrayList<>();
+        companyList.add(new PriceParityVo("公司",false,false));
+        List<PriceParityVo> jqList=new ArrayList<>();
+        jqList.add(new PriceParityVo("交强险",false,false));
+        List<PriceParityVo> syList=new ArrayList<>();
+        syList.add(new PriceParityVo("商业险",false,false));
+        List<PriceParityVo> ccList=new ArrayList<>();
+        ccList.add(new PriceParityVo("车船税",false,false));
+        List<PriceParityVo> jyList=new ArrayList<>();
+        jyList.add(new PriceParityVo("驾意险",false,false));
+        List<PriceParityVo> zbfList=new ArrayList<>();
+        zbfList.add(new PriceParityVo("总保费",false,false));
+        List<PriceParityVo> yhjList=new ArrayList<>();
+        yhjList.add(new PriceParityVo("优惠金额",false,false));
+        List<PriceParityVo> yhhList=new ArrayList<>();
+        yhhList.add(new PriceParityVo("优惠后",false,false));
+        List<String> yhhbjList=new ArrayList<>();
+        List<SubOrderVo> subOrderVos=new ArrayList<>();
+        String companyName="";
+        if(inquiryDetalsDto.getSubOrderNos()!=null && inquiryDetalsDto.getSubOrderNos().size()>0){
+            for(String subOrderId :inquiryDetalsDto.getSubOrderNos()){
+                BigDecimal sumyh =BigDecimal.ZERO;
+                InsAreaCompany  insAreaCompanySingle = insAreaCompanyService.getById(subOrderId);
+                //查询费用信息
+                InsFeeOrderNew insFeeOrderNew = insFeeOrderNewService.getOne(new LambdaQueryWrapper<InsFeeOrderNew>()
+                        .eq(InsFeeOrderNew::getInsOrderNo, subOrderNo));
+                if (!Objects.isNull(insFeeOrderNew)) {
+                    PtlAgreementProductCostsNew ptlAgreementProductCostsNew =
+                            ptlAgreementProductCostsNewService.getById(insFeeOrderNew.getCostsId());
+                    FeeOrderNewVo feeOrderNewVo = feeRuleSchemeService.newConvertOrderFeeVoData(insFeeOrderNew, ptlAgreementProductCostsNew);
+                    //优惠信息
+                    if(feeOrderNewVo!=null && feeOrderNewVo.getExportFee()!=null && feeOrderNewVo.getExportFee().size()>0){
+                        sumyh = feeOrderNewVo.getExportFee()
+                                .stream()
+                                .map(FeeOrderNewVo.ExportFee::getTotalAmount)
+                                .reduce(BigDecimal.ZERO, BigDecimal::add);
+                    }
+                }
+                SubOrderVo subOrderVo = new SubOrderVo(insAreaCompanySingle.getInscompany(), insAreaCompanySingle.getJqpremium(), getJQRiskList(insAreaCompanySingle),
+                        insAreaCompanySingle.getSypremium(), insAreaCompanySingle.getKindinfo()==null?new JSONArray():insAreaCompanySingle.getKindinfo(),
+                        insAreaCompanySingle.getTaxamount(), insAreaCompanySingle.getJypremium(), getJYRiskList(insAreaCompanySingle), insAreaCompanySingle.getSumpremium());
+                //保险公司名称
+                companyAllList.add(insAreaCompanySingle.getInscompany());
+                companyList.add(new PriceParityVo(insAreaCompanySingle.getInscompany(),false,false));
+                jqList.add(new PriceParityVo(insAreaCompanySingle.getJqpremium().toString(),false,false));
+                syList.add(new PriceParityVo(insAreaCompanySingle.getSypremium().toString(),false,false));
+                ccList.add(new PriceParityVo(insAreaCompanySingle.getTaxamount().toString(),false,false));
+                jyList.add(new PriceParityVo(insAreaCompanySingle.getJypremium().toString(),false,false));
+                zbfList.add(new PriceParityVo(insAreaCompanySingle.getSumpremium().toString(),false,false));
+                yhjList.add(new PriceParityVo(sumyh.toString(),false,false));
+                //优惠后金额
+                BigDecimal sumyhh = insAreaCompanySingle.getSumpremium().subtract(sumyh);
+                yhhList.add(new PriceParityVo(sumyhh.toString(),false,false));
+                yhhbjList.add(sumyhh.toString());
+                subOrderVos.add(subOrderVo);
+            }
+            //最优惠公司
+            int index = getCompanyNameByMinAmount(yhhbjList)+1;
+            companyName = companyAllList.get(index);
+           // priceList.add(getZYList(companyList,index,false));
+            priceList.add(companyList);
+            priceList.add(getZYList(jqList,index,false));
+            priceList.add(getZYList(syList,index,false));
+            priceList.add(getZYList(ccList,index,false));
+            priceList.add(getZYList(jyList,index,false));
+            priceList.add(getZYList(zbfList,index,false));
+            priceList.add(getZYList(yhjList,index,false));
+            priceList.add(getZYList(yhhList,index,true));
+        }
+        return new InquiryDetalsVo(insOrderVo,subOrderVos,priceList,companyName);
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/6/25 16:31
+     *  @Description:  设置优惠公司数据颜色区分
+     */
+    private List<PriceParityVo> getZYList(List<PriceParityVo> companyList, int index, boolean flag) {
+           List<PriceParityVo>  newList=new ArrayList<>();
+           if(companyList !=null && companyList.size()>0){
+                for (int i = 1; i < companyList.size(); i++) {
+                    if (i==index) {
+                        PriceParityVo priceParityVo = companyList.get(i);
+                        priceParityVo.setFlag(true);
+                        priceParityVo.setYzhFlag(flag);
+                        newList.add(priceParityVo);
+                    }else{
+                        newList.add(companyList.get(i));
+                    }
+                }
+            }
+      return newList;
+    }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/6/25 9:47
+     *  @Description: 获取优惠后最低的公司
+     */
+    private static int getCompanyNameByMinAmount(List<String> yhhbjList) {
+        int minIndex=0;
+        if(yhhbjList !=null && yhhbjList.size()>0){
+            String minValue = yhhbjList.get(0);
+            for (int i = 1; i < yhhbjList.size(); i++) {
+                if (minValue.compareTo(yhhbjList.get(i)) > 0) {
+                    minIndex = i;
+                }
+            }
+        }
+        return minIndex;
+    }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/6/25 9:13
+     *  @Description:  获取驾意险信息
+     */
+    private JSONArray getJYRiskList(InsAreaCompany insAreaCompanySingle) {
+        InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = insAreaCompanyAccidentalDrivingService.getByCompanyId(insAreaCompanySingle.getCompanyId());
+        if (insAreaCompanyAccidentalDriving != null) {
+            List<InsDrivingIntentionInsuranceSon> insDrivingIntentionInsuranceSon = insDrivingIntentionInsuranceService.getInsDrivingIntentionInsuranceSon(
+                    insAreaCompanySingle.getCompanyId(),
+                    insAreaCompanyAccidentalDriving.getRideRiskCode());
+            if(insDrivingIntentionInsuranceSon.size() == 1 && insDrivingIntentionInsuranceSon.get(0).getPremium() == null) {
+                insDrivingIntentionInsuranceSon.get(0).setPremium(insAreaCompanySingle.getJypremium().toString());
+            }
+            JSONArray accidentInfo = JSON.parseArray(JSON.toJSONString(insDrivingIntentionInsuranceSon));
+            return accidentInfo;
+        }else{
+            return new JSONArray();
+        }
+    }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/6/25 9:06
+     *  @Description:  获取交强险险种列表
+     */
+    private static JSONArray getJQRiskList(InsAreaCompany insAreaCompanySingle) {
+        if(insAreaCompanySingle.getProductid().equals(ProductsType.PT_0330.getCode()) ||
+                insAreaCompanySingle.getProductid().equals(ProductsType.PT_0330034001.getCode()) ||
+                insAreaCompanySingle.getProductid().equals(ProductsType.PT_0330034002.getCode())) {
+            return JqInsuranceType.toJsonArray();
+        }else{
+            return new JSONArray();
+        }
+    }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/6/24 18:58
+     *  @Description: 返回详情信息
+     */
+    private InsOrderVo getInsOrderVoDetals(InsOrders orders) {
+        JSONObject carinfo = orders.getCarinfo();
+        JSONObject ownerinfo = orders.getOwnerinfo();
+        JSONObject applyinfo = orders.getApplyinfo();
+        JSONObject insureinfo = orders.getInsureinfo();
+        InsOrderVo insOrderVo =new InsOrderVo(StringUtils.isEmpty(orders.getOrderno())?"":orders.getOrderno(),
+                StringUtils.isEmpty(orders.getFrameno())?"":orders.getFrameno(),
+                StringUtils.isEmpty(orders.getLicenseno())?"":orders.getLicenseno(),
+                StringUtils.isEmpty(carinfo.getString("brandName"))?"":carinfo.getString("brandName"),
+                StringUtils.isEmpty(carinfo.getString("engineNo"))?"":carinfo.getString("engineNo"),
+                StringUtils.isEmpty(carinfo.getString("seatCount"))?"":carinfo.getString("seatCount"),
+                StringUtils.isEmpty(ownerinfo.getString("name"))?"":ownerinfo.getString("name"),
+                setNewIdCard(ownerinfo),
+                StringUtils.isEmpty(applyinfo.getString("name"))?"":applyinfo.getString("name"),
+                setNewIdCard(applyinfo),
+                StringUtils.isEmpty(insureinfo.getString("name"))?"":insureinfo.getString("name"),
+                setNewIdCard(insureinfo),
+                StringUtils.isEmpty(orders.getJqstartdate())?"":orders.getJqstartdate(),
+                StringUtils.isEmpty(orders.getJqenddate())?"":orders.getJqenddate(),
+                StringUtils.isEmpty(orders.getSystartdate())?"":orders.getSystartdate(),
+                StringUtils.isEmpty(orders.getSyenddate())?"": orders.getSyenddate());
+        return  insOrderVo;
+    }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/5/9 16:18
+     *  @Description:  处理身份证为01返回身份证
+     */
+    private static String setNewIdCard(JSONObject ownerinfo) {
+        String identify="";
+        if(ownerinfo !=null ){
+            String identifyType = ownerinfo.getString("identifyNumber");
+            if(StringUtils.isNotBlank(identifyType)){
+                identify=identifyType.replaceAll("(\\d{4})\\d{10}(\\d{4})", "$1****$2");
+            }
+        }
+        return identify;
+    }
 }

+ 7 - 4
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -304,6 +304,10 @@
                 AND a.settlement_time =#{settlementTime}
             </if>
 
+            <if test="settlementDate !=null  and  settlementDate  !=''">
+                AND a.settlement_time =#{settlementDate}
+            </if>
+
             <if test="userId !=null  and  userId  !=''">
                 and a.userId   =#{userId}
             </if>
@@ -933,15 +937,14 @@
 
     <select id="totalPinAmount" resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
         select
-        MAX(a.partner_companies_id) as "partnerCompaniesId",
+        a.partner_companies_id as "partnerCompaniesId",
         MAX( ec.name ) AS "companyName",
         sum( a.commission_feevalue ) AS "commissionFeevalue",
         sum( a.other_feevalue ) AS "otherFeevalue",
         SUM( a.commission_feevalue + a.other_feevalue ) AS "totalFeevalue",
         GROUP_CONCAT(a.id) as "ids",
         MAX( a.partner_companies_name) as "partnerCompaniesName",
-        MAX(pa.docking_person) as "dockingPerson",
-        a.agreement_id AS "agreementId"
+        MAX(pa.docking_person) as "dockingPerson"
         from ins_ply_income a
         LEFT JOIN esm_ins_company ec on ec.id= a.company_id
         LEFT JOIN ptl_agreement pa on pa.id= a.agreement_id
@@ -975,7 +978,7 @@
                 AND day(a.signdate) =#{day}
             </if>
         </where>
-        GROUP BY a.agreement_id
+        GROUP BY a.partner_companies_id
     </select>
 
     <select id="queryInvoicing" resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">