Parcourir la source

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

785834757 il y a 2 ans
Parent
commit
c84347d097
29 fichiers modifiés avec 305 ajouts et 185 suppressions
  1. 7 0
      sql/Online.sql
  2. 13 0
      src/main/java/com/ydtech/modules/admin/model/po/SysAmountAuditingEntity.java
  3. 6 0
      src/main/java/com/ydtech/modules/admin/model/vo/SysAmountAuditingVo.java
  4. 16 13
      src/main/java/com/ydtech/modules/admin/service/impl/SysAmountAuditingServiceImpl.java
  5. 2 2
      src/main/java/com/ydtech/modules/admin/service/impl/SysDeptAccountWithdrawServiceImpl.java
  6. 14 1
      src/main/java/com/ydtech/modules/admin/service/impl/SysUserAccountServiceImpl.java
  7. 1 1
      src/main/java/com/ydtech/modules/admin/service/impl/SysUserBankCardServiceImpl.java
  8. 26 30
      src/main/java/com/ydtech/modules/fee/dto/vo/RuleAttrMappingVo.java
  9. 1 1
      src/main/java/com/ydtech/modules/fnc/controller/CarSettleController.java
  10. 1 1
      src/main/java/com/ydtech/modules/fnc/controller/InsPlyIncomeController.java
  11. 2 0
      src/main/java/com/ydtech/modules/fnc/dao/InsPlyIncomeMapper.java
  12. 5 1
      src/main/java/com/ydtech/modules/fnc/entity/InsPlyIncome.java
  13. 3 0
      src/main/java/com/ydtech/modules/fnc/service/InsPlyIncomeService.java
  14. 97 45
      src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java
  15. 3 0
      src/main/java/com/ydtech/modules/fnc/vo/InsPlyIncomeVo.java
  16. 6 0
      src/main/java/com/ydtech/modules/ins/model/vo/QuoteRespVo.java
  17. 4 4
      src/main/java/com/ydtech/modules/ins/model/vo/res/SettlementFeesExcel.java
  18. 1 26
      src/main/java/com/ydtech/modules/ins/model/yc/YcBuildData.java
  19. 1 1
      src/main/java/com/ydtech/modules/order/components/gouren/GuorenDuplicateInsuranceComponent.java
  20. 15 58
      src/main/java/com/ydtech/modules/order/components/zijin/ZijinDuplicateInsuranceComponents.java
  21. 12 0
      src/main/java/com/ydtech/modules/order/components/zijin/ZijinRequestApiComponents.java
  22. 12 0
      src/main/java/com/ydtech/modules/order/entity/InsAreaCompany.java
  23. 12 0
      src/main/java/com/ydtech/modules/order/entity/crawler/response/CrawlerQuoteResponse.java
  24. 12 1
      src/main/java/com/ydtech/modules/order/entity/vo/ya/YaExtendInfoDto.java
  25. 4 0
      src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java
  26. 6 0
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java
  27. 2 0
      src/main/resources/mapper/modules/admin/SysAmountAuditingMapper.xml
  28. 17 0
      src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml
  29. 4 0
      src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

+ 7 - 0
sql/Online.sql

@@ -0,0 +1,7 @@
+# 2024-05-15 wks
+alter table ins_area_company
+    add jq_claims tinyint null comment '交强出险次数', ALGORITHM=INSTANT;
+
+alter table ins_area_company
+    add sy_claims tinyint null comment '商业出险次数', ALGORITHM=INSTANT;
+

+ 13 - 0
src/main/java/com/ydtech/modules/admin/model/po/SysAmountAuditingEntity.java

@@ -36,6 +36,19 @@ public class SysAmountAuditingEntity implements Serializable {
     @TableField(value = "amount")
     @TableField(value = "amount")
     private BigDecimal amount;
     private BigDecimal amount;
 
 
+    /**
+     * 凭证号
+     */
+    @TableField(value = "voucher_id")
+    private String voucherId;
+
+
+    /**
+     * 图片ID
+     */
+    @TableField(value = "pic_id")
+    private String picId;
+
     /**
     /**
      * 创建时间
      * 创建时间
      */
      */

+ 6 - 0
src/main/java/com/ydtech/modules/admin/model/vo/SysAmountAuditingVo.java

@@ -33,6 +33,12 @@ public class SysAmountAuditingVo {
     @ApiModelProperty(value = "提现金额")
     @ApiModelProperty(value = "提现金额")
     private BigDecimal amount;
     private BigDecimal amount;
 
 
+    @ApiModelProperty(value = "凭证号")
+    private String voucherId;
+
+    @ApiModelProperty(value = "图片Id")
+    private String picId;
+
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
     @ApiModelProperty(value = "创建时间")
     @ApiModelProperty(value = "创建时间")
     private Date createTime;
     private Date createTime;

+ 16 - 13
src/main/java/com/ydtech/modules/admin/service/impl/SysAmountAuditingServiceImpl.java

@@ -33,37 +33,40 @@ public class SysAmountAuditingServiceImpl extends ServiceImpl<SysAmountAuditingM
     @Autowired
     @Autowired
     private SysUserAccountService sysUserAccountService;
     private SysUserAccountService sysUserAccountService;
 
 
+    @Autowired
+    private SysAmountAuditingService sysAmountAuditingService;
+
     @Override
     @Override
     @Transactional
     @Transactional
     public void AmountReview(SysAmountAuditingVo sysAmountAuditingVo) {
     public void AmountReview(SysAmountAuditingVo sysAmountAuditingVo) {
 
 
-        SysAmountAuditingEntity sysAmountAuditingEntity = new SysAmountAuditingEntity();
+        SysAmountAuditingEntity sysAmountAuditingEntity = sysAmountAuditingService.getById(sysAmountAuditingVo.getId());
 
 
         BigDecimal amount = sysAmountAuditingVo.getAmount();
         BigDecimal amount = sysAmountAuditingVo.getAmount();
         String userId = sysAmountAuditingVo.getUserId();
         String userId = sysAmountAuditingVo.getUserId();
-        SysUserAccount sysUserAccountEntity = new SysUserAccount();
+//        SysUserAccount sysUserAccountEntity = new SysUserAccount();
 //      用户扣减金额
 //      用户扣减金额
         if (StringUtils.isNotEmpty(userId)) {
         if (StringUtils.isNotEmpty(userId)) {
-            sysUserAccountEntity.setUserId(userId);
+//            sysUserAccountEntity.setUserId(userId);
             SysUserAccount sysUserAccount = sysUserAccountService.getById(userId);
             SysUserAccount sysUserAccount = sysUserAccountService.getById(userId);
             if (ObjectUtils.isNotEmpty(sysUserAccount)) {
             if (ObjectUtils.isNotEmpty(sysUserAccount)) {
                 String amountStatus = sysAmountAuditingVo.getAmountStatus();
                 String amountStatus = sysAmountAuditingVo.getAmountStatus();
                 if (StringUtils.isNotEmpty(amountStatus)) {
                 if (StringUtils.isNotEmpty(amountStatus)) {
                     if ("1".equals(amountStatus)) {
                     if ("1".equals(amountStatus)) {
-                        BigDecimal handlingFee = sysUserAccount.getHandlingFee();
-                        BigDecimal afterAmount = handlingFee.subtract(amount);
-                        sysUserAccountEntity.setHandlingFee(afterAmount);
+                        sysUserAccount.setHandlingAmountAccount(amount);
+                        sysUserAccount.setHandlingAmountPayment(sysUserAccount.getHandlingAmountPayment().subtract(amount));
+//                        sysUserAccountEntity.setHandlingFee(afterAmount);
                     } else if ("2".equals(amountStatus)) {
                     } else if ("2".equals(amountStatus)) {
-                        BigDecimal documentary = sysUserAccount.getDocumentary();
-                        BigDecimal afterAmount = documentary.subtract(amount);
-                        sysUserAccountEntity.setDocumentary(afterAmount);
+                        sysUserAccount.setDocumentaryAmountAccount(amount);
+                        sysUserAccount.setDocumentaryAmountpayment(sysUserAccount.getDocumentaryAmountpayment().subtract(amount));
+//                        sysUserAccountEntity.setDocumentary(afterAmount);
                     } else {
                     } else {
-                        BigDecimal promotion = sysUserAccount.getPromotion();
-                        BigDecimal afterAmount = promotion.subtract(amount);
-                        sysUserAccountEntity.setPromotion(afterAmount);
+                        sysUserAccount.setPromotionAmountAccount(amount);
+                        sysUserAccount.setPromotionAmountPayment(sysUserAccount.getPromotionAmountPayment().subtract(amount));
+//                        sysUserAccountEntity.setPromotion(afterAmount);
                     }
                     }
                 }
                 }
-                sysUserAccountService.updateById(sysUserAccountEntity);
+                sysUserAccountService.updateById(sysUserAccount);
             }
             }
             sysAmountAuditingVo.setAuditingStatus("3");
             sysAmountAuditingVo.setAuditingStatus("3");
             sysAmountAuditingVo.setAuditingUserId(BaseController.getUser().getId());
             sysAmountAuditingVo.setAuditingUserId(BaseController.getUser().getId());

+ 2 - 2
src/main/java/com/ydtech/modules/admin/service/impl/SysDeptAccountWithdrawServiceImpl.java

@@ -73,8 +73,8 @@ public class SysDeptAccountWithdrawServiceImpl extends ServiceImpl<SysDeptAccoun
             sysDeptAccountService.updateById(sysDeptAccount);
             sysDeptAccountService.updateById(sysDeptAccount);
         }
         }
         sysDeptAccountWithdraw.setVoucherId(sysDeptAccountWithdraw.getVoucherId());
         sysDeptAccountWithdraw.setVoucherId(sysDeptAccountWithdraw.getVoucherId());
-        sysDeptAccountWithdraw.setAuditUserid(BaseController.getUser().getName());
-        sysDeptAccountWithdraw.setAuditName(BaseController.getUser().getId());
+        sysDeptAccountWithdraw.setAuditUserid(BaseController.getUser().getId());
+        sysDeptAccountWithdraw.setAuditName(BaseController.getUser().getName());
         sysDeptAccountWithdrawService.updateById(sysDeptAccountWithdraw);
         sysDeptAccountWithdrawService.updateById(sysDeptAccountWithdraw);
         return HttpResult.ok("审核完成",sysDeptAccountWithdraw);
         return HttpResult.ok("审核完成",sysDeptAccountWithdraw);
     }
     }

+ 14 - 1
src/main/java/com/ydtech/modules/admin/service/impl/SysUserAccountServiceImpl.java

@@ -49,6 +49,10 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
 
 
     @Autowired
     @Autowired
     private SysUserAccountHistoryService sysUserAccountHistoryService;
     private SysUserAccountHistoryService sysUserAccountHistoryService;
+
+    @Autowired
+    private SysUserAccountService sysUserAccountService;
+
     @Autowired
     @Autowired
     private EsmUserReferrerService esmUserReferrerService;
     private EsmUserReferrerService esmUserReferrerService;
     @Autowired
     @Autowired
@@ -209,13 +213,22 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
 //                  用户当前费用金
 //                  用户当前费用金
                     beforeAmount = sysUserAccount.getHandlingFee();
                     beforeAmount = sysUserAccount.getHandlingFee();
                     afterAmount = beforeAmount.subtract(amount);
                     afterAmount = beforeAmount.subtract(amount);
+                    sysUserAccount.setHandlingFee(afterAmount);
+                    sysUserAccount.setHandlingAmountPayment(amount);
+                    sysUserAccount.setHandlingAmountWithdrawal(sysUserAccount.getHandlingAmountWithdrawal().add(amount));
                 } else if ("2".equals(sysUserAccountVo.getAmountStatus())) {
                 } else if ("2".equals(sysUserAccountVo.getAmountStatus())) {
 //                    用户当前 非跟单佣金
 //                    用户当前 非跟单佣金
                     beforeAmount = sysUserAccount.getDocumentary();
                     beforeAmount = sysUserAccount.getDocumentary();
                     afterAmount = beforeAmount.subtract(amount);
                     afterAmount = beforeAmount.subtract(amount);
+                    sysUserAccount.setDocumentary(afterAmount);
+                    sysUserAccount.setDocumentaryAmountpayment(amount);
+                    sysUserAccount.setDocumentaryAmountWithdrawal(sysUserAccount.getDocumentaryAmountWithdrawal().add(amount));
                 } else {
                 } else {
                     beforeAmount = sysUserAccount.getPromotion();
                     beforeAmount = sysUserAccount.getPromotion();
                     afterAmount = beforeAmount.subtract(amount);
                     afterAmount = beforeAmount.subtract(amount);
+                    sysUserAccount.setPromotion(afterAmount);
+                    sysUserAccount.setPromotionAmountPayment(amount);
+                    sysUserAccount.setPromotionAmountWithdrawal(sysUserAccount.getPromotionAmountWithdrawal().add(amount));
                 }
                 }
 //              用户相差
 //              用户相差
                 if (beforeAmount.compareTo(zero) == 0 || afterAmount.compareTo(zero) < 0) {
                 if (beforeAmount.compareTo(zero) == 0 || afterAmount.compareTo(zero) < 0) {
@@ -230,7 +243,7 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
 //              新增金额记录
 //              新增金额记录
                 sysAmountAuditingService.save(sysAmountAuditingEntity);
                 sysAmountAuditingService.save(sysAmountAuditingEntity);
                 sysUserAccountHistory.setAuditiingId(sysAmountAuditingEntity.getId());
                 sysUserAccountHistory.setAuditiingId(sysAmountAuditingEntity.getId());
-
+                sysUserAccountService.updateById(sysUserAccount);
                 sysUserAccountHistoryService.updayteByUserAccount(sysUserAccountHistory);
                 sysUserAccountHistoryService.updayteByUserAccount(sysUserAccountHistory);
             }
             }
 
 

+ 1 - 1
src/main/java/com/ydtech/modules/admin/service/impl/SysUserBankCardServiceImpl.java

@@ -90,7 +90,7 @@ public class SysUserBankCardServiceImpl extends ServiceImpl<SysUserBankCardMappe
         long count = sysUserBankCardService.count(new QueryWrapper<SysUserBankCard>()
         long count = sysUserBankCardService.count(new QueryWrapper<SysUserBankCard>()
                 .eq("bank_number", sysUserBankCardVO.getBankNumber()));
                 .eq("bank_number", sysUserBankCardVO.getBankNumber()));
         if (count > 0) {
         if (count > 0) {
-            throw new SystemException("该银行卡号被绑定");
+            throw new SystemException("该银行卡号被绑定");
         }
         }
         String id = BaseController.getUser().getId();
         String id = BaseController.getUser().getId();
         if (StringUtils.isNotEmpty(id)) {
         if (StringUtils.isNotEmpty(id)) {

+ 26 - 30
src/main/java/com/ydtech/modules/fee/dto/vo/RuleAttrMappingVo.java

@@ -1,27 +1,22 @@
 package com.ydtech.modules.fee.dto.vo;
 package com.ydtech.modules.fee.dto.vo;
 
 
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.TableField;
 import com.ydtech.constants.enums.InsurKind;
 import com.ydtech.constants.enums.InsurKind;
 import com.ydtech.constants.enums.dict.insurance.VehicleType;
 import com.ydtech.constants.enums.dict.insurance.VehicleType;
-import com.ydtech.modules.ins.model.vo.*;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
+import com.ydtech.modules.ins.model.vo.KindInfoVo;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.api.dajia.constants.TypeVehicleMapping;
 import com.ydtech.modules.order.entity.api.dajia.constants.TypeVehicleMapping;
-import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
-import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.protocol.entity.po.PtlNewCarJudgeRules;
 import com.ydtech.modules.protocol.entity.po.PtlNewCarJudgeRules;
 import com.ydtech.modules.protocols.entity.po.PtlAgreementUndwrtRulesAttr;
 import com.ydtech.modules.protocols.entity.po.PtlAgreementUndwrtRulesAttr;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.Data;
-import org.springframework.beans.factory.annotation.Autowired;
 
 
 import java.time.LocalDate;
 import java.time.LocalDate;
-import java.time.Period;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.ChronoUnit;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
-import java.util.Objects;
 import java.util.regex.Pattern;
 import java.util.regex.Pattern;
 
 
 /**
 /**
@@ -43,7 +38,8 @@ public class RuleAttrMappingVo {
     }
     }
 
 
     public static List<RuleAttrMappingVo> getRuleAttrMappingVoList(InsAreaCompany insAreaCompany, InsOrders insOrders,
     public static List<RuleAttrMappingVo> getRuleAttrMappingVoList(InsAreaCompany insAreaCompany, InsOrders insOrders,
-                                                                   List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList, PtlNewCarJudgeRules carJudgeRule) {
+                                                                   List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList,
+                                                                   PtlNewCarJudgeRules carJudgeRule) {
         List<RuleAttrMappingVo> ruleAttrMappingVoList = new ArrayList<>();
         List<RuleAttrMappingVo> ruleAttrMappingVoList = new ArrayList<>();
         CarInfoVo carInfo = insOrders.getCarinfo().toJavaObject(CarInfoVo.class);
         CarInfoVo carInfo = insOrders.getCarinfo().toJavaObject(CarInfoVo.class);
         //车牌号
         //车牌号
@@ -72,21 +68,18 @@ public class RuleAttrMappingVo {
         //使用注册日期算出自然月 然后判断是否是新旧车
         //使用注册日期算出自然月 然后判断是否是新旧车
         LocalDate registrationDate = LocalDate.parse(carInfo.getRegisterDate());
         LocalDate registrationDate = LocalDate.parse(carInfo.getRegisterDate());
         LocalDate currentDate = LocalDate.now();
         LocalDate currentDate = LocalDate.now();
-        PtlAgreementUndwrtRulesAttr ptlAgreementUndwrtRulesAttr = undwrtRulesAttrList.stream().filter(x -> x.getAttrCode().equals("NewAndOldCars")).findFirst().get();
+
         boolean isNoLicenseFlag = false;
         boolean isNoLicenseFlag = false;
-        if(carJudgeRule != null)
-        {
-            if(carJudgeRule.getUnitTypeCode().equals("天")){
+        if (carJudgeRule != null) {
+            if (carJudgeRule.getUnitTypeCode().equals("天")) {
                 long days = ChronoUnit.DAYS.between(registrationDate, currentDate);
                 long days = ChronoUnit.DAYS.between(registrationDate, currentDate);
-                if(days < Integer.parseInt(carJudgeRule.getUnitTypeValue()))
-                {
+                if (days < Integer.parseInt(carJudgeRule.getUnitTypeValue())) {
                     isNoLicenseFlag = true;
                     isNoLicenseFlag = true;
                 }
                 }
             }
             }
-            if(carJudgeRule.getUnitTypeCode().equals("月")){
+            if (carJudgeRule.getUnitTypeCode().equals("月")) {
                 long months = ChronoUnit.MONTHS.between(registrationDate, currentDate);
                 long months = ChronoUnit.MONTHS.between(registrationDate, currentDate);
-                if(months < Integer.parseInt(carJudgeRule.getUnitTypeValue()))
-                {
+                if (months < Integer.parseInt(carJudgeRule.getUnitTypeValue())) {
                     isNoLicenseFlag = true;
                     isNoLicenseFlag = true;
                 }
                 }
             }
             }
@@ -138,7 +131,8 @@ public class RuleAttrMappingVo {
                 ruleAttrMappingVoList.add(new RuleAttrMappingVo("MotorVehicleDamageInsurance", String.valueOf(kindInfoVo.getAmount())));
                 ruleAttrMappingVoList.add(new RuleAttrMappingVo("MotorVehicleDamageInsurance", String.valueOf(kindInfoVo.getAmount())));
             //第三者责任险
             //第三者责任险
             if (InsurKind.B.getCode().equals(kindInfoVo.getKindCode()))
             if (InsurKind.B.getCode().equals(kindInfoVo.getKindCode()))
-                ruleAttrMappingVoList.add(new RuleAttrMappingVo("ThirdPartyLiabilityInsurance", String.valueOf(Double.valueOf(kindInfoVo.getAmount()).intValue())));
+                ruleAttrMappingVoList.add(new RuleAttrMappingVo("ThirdPartyLiabilityInsurance",
+                        String.valueOf(Double.valueOf(kindInfoVo.getAmount()).intValue())));
             //司机责任险
             //司机责任险
             if (InsurKind.D3.getCode().equals(kindInfoVo.getKindCode()))
             if (InsurKind.D3.getCode().equals(kindInfoVo.getKindCode()))
                 ruleAttrMappingVoList.add(new RuleAttrMappingVo("DriverLiabilityInsurance", String.valueOf(kindInfoVo.getAmount())));
                 ruleAttrMappingVoList.add(new RuleAttrMappingVo("DriverLiabilityInsurance", String.valueOf(kindInfoVo.getAmount())));
@@ -251,25 +245,27 @@ public class RuleAttrMappingVo {
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("CommercialPayoutRate", String.valueOf(insAreaCompany.getSyLossRation())));
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("CommercialPayoutRate", String.valueOf(insAreaCompany.getSyLossRation())));
         //总赔付率
         //总赔付率
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("TotalPayoutRate", String.valueOf(insAreaCompany.getLossRation())));
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("TotalPayoutRate", String.valueOf(insAreaCompany.getLossRation())));
-        //真假单交
-//        ruleAttrMappingVoList.add(new RuleAttrMappingVo("AuthenticAndFakeOrdersExchange", insAreaCompany.getIszdj()));
-        //出险次数
-//        ruleAttrMappingVoList.add(new RuleAttrMappingVo("NumberOfClaims", insAreaCompany.getAccidentInfoStr()));
-        //太平的分区
-//        ruleAttrMappingVoList.add(new RuleAttrMappingVo("PeacefulDistrict", quoteRespVo.getExtendInfo()));
         //太平绿黄红区
         //太平绿黄红区
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("GreenYellowAndRedAreas", insAreaCompany.getTpColorScore()));
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("GreenYellowAndRedAreas", insAreaCompany.getTpColorScore()));
-        if(insAreaCompany.getAccidentalDriving() != null) {
+        if (insAreaCompany.getAccidentalDriving() != null) {
             //非车名称
             //非车名称
             ruleAttrMappingVoList.add(new RuleAttrMappingVo("NonCarName", insAreaCompany.getAccidentalDriving().getRideRiskName()));
             ruleAttrMappingVoList.add(new RuleAttrMappingVo("NonCarName", insAreaCompany.getAccidentalDriving().getRideRiskName()));
             //非车份数
             //非车份数
-            ruleAttrMappingVoList.add(new RuleAttrMappingVo("NonCarQuantity", String.valueOf(insAreaCompany.getAccidentalDriving().getQuantity())));
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("NonCarQuantity",
+                    String.valueOf(insAreaCompany.getAccidentalDriving().getQuantity())));
         }
         }
         //真假单交
         //真假单交
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("IsDJQ",insAreaCompany.getIsDjq()));
+        ruleAttrMappingVoList.add(new RuleAttrMappingVo("IsDJQ", insAreaCompany.getIsDjq()));
         //紫金鼎然评分
         //紫金鼎然评分
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("UbiPredictedInfoScore",insAreaCompany.getUbiPredictedInfoScore()));
-
+        ruleAttrMappingVoList.add(new RuleAttrMappingVo("UbiPredictedInfoScore", insAreaCompany.getUbiPredictedInfoScore()));
+        //交强续保
+        ruleAttrMappingVoList.add(new RuleAttrMappingVo("JqRenewal", insAreaCompany.getJqRenewal()));
+        //商业续保
+        ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyRenewal", insAreaCompany.getSyRenewal()));
+        // 交强出险次数
+        ruleAttrMappingVoList.add(new RuleAttrMappingVo("JqNumberOfClaims", insAreaCompany.getJqClaims()));
+        // 商业出险次数
+        ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyNumberOfClaims", insAreaCompany.getSyClaims()));
         return ruleAttrMappingVoList;
         return ruleAttrMappingVoList;
     }
     }
 }
 }

+ 1 - 1
src/main/java/com/ydtech/modules/fnc/controller/CarSettleController.java

@@ -69,7 +69,7 @@ public class CarSettleController extends BaseController {
 //                .eq("orderno", orderNo)
 //                .eq("orderno", orderNo)
 //                .and(wrapper -> wrapper.eq("orderstatus", "3").or().eq("orderstatus", "2"))
 //                .and(wrapper -> wrapper.eq("orderstatus", "3").or().eq("orderstatus", "2"))
 //                .list();//3已承保
 //                .list();//3已承保
-        if(areaList!=null && areaList.size()>0){
+        if(areaList!=null && !areaList.isEmpty()){
             return insOrdersService.getByCompanyId(areaList.get(0).getId(),"accountingUser");
             return insOrdersService.getByCompanyId(areaList.get(0).getId(),"accountingUser");
         }else{
         }else{
             return HttpResult.error("订单号有误-未承保");
             return HttpResult.error("订单号有误-未承保");

+ 1 - 1
src/main/java/com/ydtech/modules/fnc/controller/InsPlyIncomeController.java

@@ -201,7 +201,7 @@ public class InsPlyIncomeController extends BaseController {
     @GetMapping("/getById/{id}")
     @GetMapping("/getById/{id}")
     @ApiModelProperty(value = "回显")
     @ApiModelProperty(value = "回显")
     public HttpResult<InsPlyIncome> getById(@PathVariable("id") String  id){
     public HttpResult<InsPlyIncome> getById(@PathVariable("id") String  id){
-        InsPlyIncome item = insPlyIncomeService.getById(id);
+        InsPlyIncome item = insPlyIncomeService.getEntityById(id);
         return  HttpResult.ok(item) ;
         return  HttpResult.ok(item) ;
     }
     }
 
 

+ 2 - 0
src/main/java/com/ydtech/modules/fnc/dao/InsPlyIncomeMapper.java

@@ -117,4 +117,6 @@ public interface InsPlyIncomeMapper extends BaseMapper<InsPlyIncome> {
 
 
     List<HashMap<String,Object>> getOtherIds(HashMap<String, Object> params);
     List<HashMap<String,Object>> getOtherIds(HashMap<String, Object> params);
 
 
+    InsPlyIncome getEntityById(@Param("id") String id);
+
 }
 }

+ 5 - 1
src/main/java/com/ydtech/modules/fnc/entity/InsPlyIncome.java

@@ -313,7 +313,7 @@ public class InsPlyIncome implements Serializable {
 
 
     @ApiModelProperty("协议类型")
     @ApiModelProperty("协议类型")
     @TableField(exist = false)
     @TableField(exist = false)
-    private String agreementtype;
+    private String agreementType;
 
 
 
 
     @ApiModelProperty("ids")
     @ApiModelProperty("ids")
@@ -388,6 +388,10 @@ public class InsPlyIncome implements Serializable {
     @TableField(exist = false)
     @TableField(exist = false)
     private String userName;
     private String userName;
 
 
+    @ApiModelProperty("对接人")
+    @TableField(exist = false)
+    private String dockingPerson;
+
 
 
     public InsPlyIncome(String orderno, String policyno, String syPolicyno, String noPolicyno, String settleno, String deptId, String deptName, String riskcode, LocalDateTime payDate, LocalDateTime signDate, String companyId, String companyName, String agreementId, String licenseno, BigDecimal taxamount, BigDecimal noTaxPremium, BigDecimal commissionFeerate, BigDecimal otherFeerate, BigDecimal commissionFeevalue, BigDecimal otherFeevalue, BigDecimal allFeeValue, BigDecimal finalFeeValue, BigDecimal doingFeeValue, LocalDate createTime, String voucherNumber, String contractId, String contractFileId, String handlingFeesStatus, String documentaryFeesStatus, String isNotCar, String isNotDocumentary) {
     public InsPlyIncome(String orderno, String policyno, String syPolicyno, String noPolicyno, String settleno, String deptId, String deptName, String riskcode, LocalDateTime payDate, LocalDateTime signDate, String companyId, String companyName, String agreementId, String licenseno, BigDecimal taxamount, BigDecimal noTaxPremium, BigDecimal commissionFeerate, BigDecimal otherFeerate, BigDecimal commissionFeevalue, BigDecimal otherFeevalue, BigDecimal allFeeValue, BigDecimal finalFeeValue, BigDecimal doingFeeValue, LocalDate createTime, String voucherNumber, String contractId, String contractFileId, String handlingFeesStatus, String documentaryFeesStatus, String isNotCar, String isNotDocumentary) {
         this.orderno = orderno;
         this.orderno = orderno;

+ 3 - 0
src/main/java/com/ydtech/modules/fnc/service/InsPlyIncomeService.java

@@ -118,4 +118,7 @@ public interface InsPlyIncomeService extends IService<InsPlyIncome> {
      * @return  通过开票id分组查出的金额总和
      * @return  通过开票id分组查出的金额总和
      */
      */
     HttpResult<List<HashMap<String,Object>>> otherSettldetail(InsPlyIncomeVo insPlyIncomeVo);
     HttpResult<List<HashMap<String,Object>>> otherSettldetail(InsPlyIncomeVo insPlyIncomeVo);
+
+    InsPlyIncome getEntityById(String id);
+
 }
 }

+ 97 - 45
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -893,6 +893,11 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         return HttpResult.ok();
         return HttpResult.ok();
     }
     }
 
 
+    @Override
+    public InsPlyIncome getEntityById(String id) {
+        return    baseMapper.getEntityById(id);
+    }
+
     @Override
     @Override
     @Transactional
     @Transactional
     public void updateByEntity(InsPlyIncomeVo insPlyIncomeVo) {
     public void updateByEntity(InsPlyIncomeVo insPlyIncomeVo) {
@@ -901,7 +906,6 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         BeanUtils.copyProperties(insPlyIncomeVo, insPlyIncome);
         BeanUtils.copyProperties(insPlyIncomeVo, insPlyIncome);
         this.amountCalculate(insPlyIncomeVo,insPlyIncome);
         this.amountCalculate(insPlyIncomeVo,insPlyIncome);
         baseMapper.updateById(insPlyIncome);
         baseMapper.updateById(insPlyIncome);
-
         insPlyIncomeVo.setCrudStatus("2");
         insPlyIncomeVo.setCrudStatus("2");
         this.saveLog(insPlyIncomeVo);
         this.saveLog(insPlyIncomeVo);
 
 
@@ -916,53 +920,82 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
      * 计算逻辑 交强不含税保费* 交强跟单比例 = 交强跟单金额
      * 计算逻辑 交强不含税保费* 交强跟单比例 = 交强跟单金额
      */
      */
     private void amountCalculate(InsPlyIncomeVo insPlyIncomeVo,InsPlyIncome insPlyIncome) {
     private void amountCalculate(InsPlyIncomeVo insPlyIncomeVo,InsPlyIncome insPlyIncome) {
-        BigDecimal jqNoTaxPremium = insPlyIncomeVo.getJqNoTaxPremium();// 交强手续费  按照思路  交强不含税保费* 交强手续费比例  =交强手续费
-        BigDecimal syNoTaxPremium = insPlyIncomeVo.getSyNoTaxPremium();// 商业手续费  按照思路  商业不含税保费* 商业手续费比例  =商业手续费
-        BigDecimal noNoTaxPremium = insPlyIncomeVo.getNoNoTaxPremium();// 非车手续费  按照思路  非车不含税保费* 非车手续费比例  =非车手续费
-        if(insPlyIncomeVo.getJqSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0){
-            BigDecimal  jqhandingFee = jqNoTaxPremium.multiply(insPlyIncomeVo.getJqSuperviseCostsProportion().divide(new BigDecimal(100)));
-            insPlyIncome.setJqSuperviseCostsPremiums(jqhandingFee);
-        }
+        if("1".equals(insPlyIncomeVo.getAgreementType())){ //平台
+//            平台   手续费 +跟单费 = 应收   手续费 =  手续费比例*保费 应收比例=手续费比例 +  跟单比例
+            BigDecimal jqSuperviseCostsProportion = initializationBigdecimal(insPlyIncomeVo.getJqSuperviseCostsProportion());//交强手续费比例
+            BigDecimal sySuperviseCostsProportion = initializationBigdecimal(insPlyIncomeVo.getSySuperviseCostsProportion()); //商业手续费比例
+            BigDecimal noSuperviseCostsProportion = initializationBigdecimal(insPlyIncomeVo.getNoSuperviseCostsProportion()); //非车手续费比例
+            BigDecimal jqOtherCostsProportion = initializationBigdecimal(insPlyIncomeVo.getJqOtherCostsProportion()); //交强跟单比例
+            BigDecimal syOtherCostsProportion = initializationBigdecimal(insPlyIncomeVo.getSyOtherCostsProportion());  //商业跟单比例
+            BigDecimal noOtherCostsProportion = initializationBigdecimal(insPlyIncomeVo.getNoOtherCostsProportion()); //非车跟单比例
+            BigDecimal jqPremium = initializationBigdecimal(insPlyIncomeVo.getJqPremium()); //交强保费
+            BigDecimal syPremium = initializationBigdecimal(insPlyIncomeVo.getSyPremium());  //商业保费
+            BigDecimal noPremium = initializationBigdecimal(insPlyIncomeVo.getNoPremium()); //非车保费
+            //手续费比例
+            insPlyIncome.setCommissionFeerate(this.calculateTotal(jqSuperviseCostsProportion,sySuperviseCostsProportion,noSuperviseCostsProportion));  //手续费比例 = 商业手续费比例 +  交强手续费比例 + 非车手续费比例
+            if(jqSuperviseCostsProportion !=null &&  jqPremium!=null ){
+                insPlyIncome.setJqSuperviseCostsPremiums(this.algorithmAmount(jqPremium,jqSuperviseCostsProportion));  //交强手续费
+            }
+            if(sySuperviseCostsProportion !=null && syPremium !=null){
+                insPlyIncome.setSySuperviseCostsPremiums(this.algorithmAmount(syPremium,sySuperviseCostsProportion)); //商业手续费
+            }
+            if(noSuperviseCostsProportion !=null && noPremium!=null){
+                insPlyIncome.setNoSuperviseCostsPremiums(this.algorithmAmount(noPremium,noSuperviseCostsProportion));  //非车手续费
+            }
+            if(jqOtherCostsProportion  !=null &&  jqPremium!=null ){
+                insPlyIncome.setJqOtherCostsPremium(this.algorithmAmount(jqPremium,jqOtherCostsProportion));    //交强跟单费
+            }
+            if(syOtherCostsProportion !=null &&  syPremium !=null ){
+                insPlyIncome.setSyOtherCostsPremium(this.algorithmAmount(syPremium,syOtherCostsProportion));  //商业跟单费
+            }
+            if(noOtherCostsProportion  !=null && noPremium !=null){
+                insPlyIncome.setNoOtherCostsPremium(this.algorithmAmount(noPremium,noOtherCostsProportion));   //非车跟单费
+            }
+            insPlyIncome.setCommissionFeevalue(this.calculateTotal(insPlyIncome.getJqSuperviseCostsPremiums(),insPlyIncome.getSySuperviseCostsPremiums(),insPlyIncome.getNoSuperviseCostsPremiums())); //手续费
+            insPlyIncome.setCommissionFeerate(this.calculateTotal(jqSuperviseCostsProportion,sySuperviseCostsProportion,noSuperviseCostsProportion));  //手续费比例
+            insPlyIncome.setOtherFeevalue(this.calculateTotal(insPlyIncome.getJqOtherCostsPremium(),insPlyIncome.getSyOtherCostsPremium(),insPlyIncome.getNoOtherCostsPremium()));  //跟单费金额
+            insPlyIncome.setOtherFeerate(this.calculateTotal(jqOtherCostsProportion,syOtherCostsProportion,noOtherCostsProportion));  //跟单费比例
+            insPlyIncome.setAllFeeValue(this.calculateTotal(insPlyIncome.getCommissionFeevalue(),insPlyIncome.getOtherFeevalue(),null)); // 总费用 =  手续费+跟单费
+            //应收比例 交强应收比例=交强手续费比例+交强非跟单比例
+            insPlyIncome.setJqReceivableProportion(this.calculateTotal(jqSuperviseCostsProportion,jqOtherCostsProportion,null)); //交强应收
+            insPlyIncome.setSyReceivableProportion(this.calculateTotal(sySuperviseCostsProportion,syOtherCostsProportion,null)); //商业应收
+            insPlyIncome.setNoReceivableProportion(this.calculateTotal(noSuperviseCostsProportion,noOtherCostsProportion,null)); //非车应收
 
 
-        if(insPlyIncomeVo.getSySuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0){
-            BigDecimal  syhandingFee = syNoTaxPremium.multiply(insPlyIncomeVo.getSySuperviseCostsProportion().divide(new BigDecimal(100)));
-            insPlyIncome.setSySuperviseCostsPremiums(syhandingFee);
-        }
+        }else {
+            BigDecimal jqNoTaxPremium = insPlyIncomeVo.getJqNoTaxPremium();// 交强手续费  按照思路  交强不含税保费* 交强手续费比例  =交强手续费
+            BigDecimal syNoTaxPremium = insPlyIncomeVo.getSyNoTaxPremium();// 商业手续费  按照思路  商业不含税保费* 商业手续费比例  =商业手续费
+            BigDecimal noNoTaxPremium = insPlyIncomeVo.getNoNoTaxPremium();// 非车手续费  按照思路  非车不含税保费* 非车手续费比例  =非车手续费
+            if(insPlyIncomeVo.getJqSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0){
+                BigDecimal  jqhandingFee = jqNoTaxPremium.multiply(insPlyIncomeVo.getJqSuperviseCostsProportion().divide(new BigDecimal(100)));
+                insPlyIncome.setJqSuperviseCostsPremiums(jqhandingFee);
+            }
 
 
-        if(insPlyIncomeVo.getNoSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0){
-            BigDecimal  nohandingFee = noNoTaxPremium.multiply(insPlyIncomeVo.getNoSuperviseCostsProportion().divide(new BigDecimal(100)));
-            insPlyIncome.setNoSuperviseCostsPremiums(nohandingFee);
-        }
+            if(insPlyIncomeVo.getSySuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0){
+                BigDecimal  syhandingFee = syNoTaxPremium.multiply(insPlyIncomeVo.getSySuperviseCostsProportion().divide(new BigDecimal(100)));
+                insPlyIncome.setSySuperviseCostsPremiums(syhandingFee);
+            }
 
 
-        if(insPlyIncomeVo.getJqOtherCostsProportion().compareTo(BigDecimal.ZERO) != 0){
-            BigDecimal jqother = jqNoTaxPremium.multiply(insPlyIncomeVo.getJqOtherCostsProportion().divide(new BigDecimal(100)));//交强跟单费  按照思路  交强不含税保费* 交强跟单比例 = 交强跟单金额
-            insPlyIncome.setJqOtherCostsPremium(jqother);
-        }
+            if(insPlyIncomeVo.getNoSuperviseCostsProportion().compareTo(BigDecimal.ZERO) != 0){
+                BigDecimal  nohandingFee = noNoTaxPremium.multiply(insPlyIncomeVo.getNoSuperviseCostsProportion().divide(new BigDecimal(100)));
+                insPlyIncome.setNoSuperviseCostsPremiums(nohandingFee);
+            }
 
 
-        if(insPlyIncomeVo.getSyOtherCostsProportion().compareTo(BigDecimal.ZERO) != 0){
-            BigDecimal syother = syNoTaxPremium.multiply(insPlyIncomeVo.getSyOtherCostsProportion().divide(new BigDecimal(100)));//交强跟单费  按照思路  交强不含税保费* 交强跟单比例 = 交强跟单金额
-            insPlyIncome.setSyOtherCostsPremium(syother);
-        }
+            if(insPlyIncomeVo.getJqOtherCostsProportion().compareTo(BigDecimal.ZERO) != 0){
+                BigDecimal jqother = jqNoTaxPremium.multiply(insPlyIncomeVo.getJqOtherCostsProportion().divide(new BigDecimal(100)));//交强跟单费  按照思路  交强不含税保费* 交强跟单比例 = 交强跟单金额
+                insPlyIncome.setJqOtherCostsPremium(jqother);
+            }
 
 
-        if(insPlyIncomeVo.getNoOtherCostsProportion().compareTo(BigDecimal.ZERO) != 0){
-            BigDecimal syother = syNoTaxPremium.multiply(insPlyIncomeVo.getNoOtherCostsProportion().divide(new BigDecimal(100)));//非车跟单费  按照思路  非车不含税保费* 非车跟单比例 = 非车跟单金额
-            insPlyIncome.setNoOtherCostsPremium(syother);
-        }
-        /**
-             判断是否是平台  如果是平台则 手续费= 交强手续费+ 商业手续费+非车手续费  费单非= 交强跟单费+ 商业跟单费 +非车跟单费费
-         *                如果是保险   保险手续费=  交强手续费+商业跟单费   跟单费为null
-         *                           保险跟单    手续费为null  跟单费=   交强跟单费+商业跟单费
-         *                          非车手续费   =非车手续费
-         *                          非车跟单  =  非车跟单费
-         */
-        if("1".equals(insPlyIncomeVo.getAgreementType())){//保险手续费
-            insPlyIncome.setCommissionFeerate(this.calculateTotal(insPlyIncome.getJqSuperviseCostsProportion(),insPlyIncome.getSySuperviseCostsProportion(),insPlyIncome.getNoSuperviseCostsProportion()));  //手续费比例
-            insPlyIncome.setCommissionFeevalue(this.calculateTotal(insPlyIncome.getJqSuperviseCostsPremiums(),insPlyIncome.getSySuperviseCostsPremiums(),insPlyIncome.getNoSuperviseCostsPremiums()));  //手续费金额
-            insPlyIncome.setOtherFeerate(this.calculateTotal(insPlyIncome.getJqOtherCostsProportion(),insPlyIncome.getSyOtherCostsProportion(),insPlyIncome.getNoOtherCostsProportion()));  //跟单比例
-            insPlyIncome.setOtherFeevalue(this.calculateTotal(insPlyIncome.getJqOtherCostsPremium(),insPlyIncome.getSyOtherCostsPremium(),insPlyIncome.getNoOtherCostsPremium()));//跟单费金额
-            insPlyIncome.setAllFeeValue(this.calculateTotal(insPlyIncome.getCommissionFeevalue(),insPlyIncome.getOtherFeevalue(),null)); // 总费用 =  手续费+跟单费
-        }else {
-            if("0".equals(insPlyIncomeVo.getIsNotDocumentary()) && "0".equals(insPlyIncomeVo.getIsNotCar())){  //保险手续费
+            if(insPlyIncomeVo.getSyOtherCostsProportion().compareTo(BigDecimal.ZERO) != 0){
+                BigDecimal syother = syNoTaxPremium.multiply(insPlyIncomeVo.getSyOtherCostsProportion().divide(new BigDecimal(100)));//交强跟单费  按照思路  交强不含税保费* 交强跟单比例 = 交强跟单金额
+                insPlyIncome.setSyOtherCostsPremium(syother);
+            }
+
+            if(insPlyIncomeVo.getNoOtherCostsProportion().compareTo(BigDecimal.ZERO) != 0){
+                BigDecimal syother = syNoTaxPremium.multiply(insPlyIncomeVo.getNoOtherCostsProportion().divide(new BigDecimal(100)));//非车跟单费  按照思路  非车不含税保费* 非车跟单比例 = 非车跟单金额
+                insPlyIncome.setNoOtherCostsPremium(syother);
+            }
+
+            if("0".equals(insPlyIncomeVo.getIsNotDocumentary()) && "0".equals(insPlyIncomeVo.getIsNotCar())){  //保险  手续费 =不含税保费* 手续费比例
                 insPlyIncome.setCommissionFeevalue(this.calculateTotal(insPlyIncome.getJqSuperviseCostsPremiums(),insPlyIncome.getSySuperviseCostsPremiums(),null)); // 手续费
                 insPlyIncome.setCommissionFeevalue(this.calculateTotal(insPlyIncome.getJqSuperviseCostsPremiums(),insPlyIncome.getSySuperviseCostsPremiums(),null)); // 手续费
                 insPlyIncome.setCommissionFeerate(this.calculateTotal(insPlyIncome.getJqSuperviseCostsProportion(),insPlyIncome.getSySuperviseCostsProportion(),null));//手续费比例
                 insPlyIncome.setCommissionFeerate(this.calculateTotal(insPlyIncome.getJqSuperviseCostsProportion(),insPlyIncome.getSySuperviseCostsProportion(),null));//手续费比例
                 insPlyIncome.setAllFeeValue(this.calculateTotal(insPlyIncome.getCommissionFeevalue(),null,null));//总金额
                 insPlyIncome.setAllFeeValue(this.calculateTotal(insPlyIncome.getCommissionFeevalue(),null,null));//总金额
@@ -970,7 +1003,6 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
                 insPlyIncome.setOtherFeevalue(this.calculateTotal(insPlyIncome.getJqOtherCostsPremium(),insPlyIncome.getSyOtherCostsPremium(),null));
                 insPlyIncome.setOtherFeevalue(this.calculateTotal(insPlyIncome.getJqOtherCostsPremium(),insPlyIncome.getSyOtherCostsPremium(),null));
                 insPlyIncome.setOtherFeerate(this.calculateTotal(insPlyIncome.getJqOtherCostsProportion(),insPlyIncome.getSyOtherCostsProportion(),null));
                 insPlyIncome.setOtherFeerate(this.calculateTotal(insPlyIncome.getJqOtherCostsProportion(),insPlyIncome.getSyOtherCostsProportion(),null));
                 insPlyIncome.setAllFeeValue(this.calculateTotal(insPlyIncome.getOtherFeevalue(),null,null));//总金额
                 insPlyIncome.setAllFeeValue(this.calculateTotal(insPlyIncome.getOtherFeevalue(),null,null));//总金额
-
             }
             }
             if("0".equals(insPlyIncomeVo.getIsNotDocumentary()) && "1".equals(insPlyIncomeVo.getIsNotCar())){// 非车
             if("0".equals(insPlyIncomeVo.getIsNotDocumentary()) && "1".equals(insPlyIncomeVo.getIsNotCar())){// 非车
                 insPlyIncome.setCommissionFeevalue(this.calculateTotal(insPlyIncome.getNoSuperviseCostsPremiums(),null,null));  // 非车手续费
                 insPlyIncome.setCommissionFeevalue(this.calculateTotal(insPlyIncome.getNoSuperviseCostsPremiums(),null,null));  // 非车手续费
@@ -981,9 +1013,24 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
                 insPlyIncome.setOtherFeerate(this.calculateTotal(insPlyIncome.getNoOtherCostsProportion(),null,null)); // 非车跟单比例
                 insPlyIncome.setOtherFeerate(this.calculateTotal(insPlyIncome.getNoOtherCostsProportion(),null,null)); // 非车跟单比例
                 insPlyIncome.setAllFeeValue(this.calculateTotal(insPlyIncome.getOtherFeevalue(),null,null));//总金额
                 insPlyIncome.setAllFeeValue(this.calculateTotal(insPlyIncome.getOtherFeevalue(),null,null));//总金额
             }
             }
-
         }
         }
 
 
+    }
+
+    /**
+     *
+     * @param value1   保费
+     * @param value2    比例
+     * @return     费用
+     */
+    private BigDecimal algorithmAmount(BigDecimal value1, BigDecimal value2) {
+
+        return value1.multiply(value2.divide(new BigDecimal(100)));
+
+    }
+
+    private BigDecimal initializationBigdecimal(BigDecimal value) {
+        return value != null ? value : BigDecimal.ZERO;
 
 
     }
     }
 
 
@@ -1361,6 +1408,11 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         for (InsPlyIncome item :insPlyIncomes){
         for (InsPlyIncome item :insPlyIncomes){
             SettlementFeesExcel bxSettlementFeesExcel = new SettlementFeesExcel();
             SettlementFeesExcel bxSettlementFeesExcel = new SettlementFeesExcel();
             BeanUtils.copyProperties(item, bxSettlementFeesExcel);
             BeanUtils.copyProperties(item, bxSettlementFeesExcel);
+            if("1".equals(item.getHandlingFeesStatus())){
+                bxSettlementFeesExcel.setHandlingFeesStatus("已结算");
+            }else {
+                bxSettlementFeesExcel.setHandlingFeesStatus("未结算");
+            }
             resultList.add(bxSettlementFeesExcel);
             resultList.add(bxSettlementFeesExcel);
         }
         }
         String uploadPath = this.uploadPath + "/excel/";
         String uploadPath = this.uploadPath + "/excel/";

+ 3 - 0
src/main/java/com/ydtech/modules/fnc/vo/InsPlyIncomeVo.java

@@ -261,6 +261,9 @@ public class InsPlyIncomeVo implements Serializable {
     @ApiModelProperty("保司机构")
     @ApiModelProperty("保司机构")
     private String partnerCompaniesName;
     private String partnerCompaniesName;
 
 
+    @ApiModelProperty("对接人")
+    private String dockingPerson;
+
     @ApiModelProperty("选择ids")
     @ApiModelProperty("选择ids")
     private List<String> selectIds;
     private List<String> selectIds;
 
 

+ 6 - 0
src/main/java/com/ydtech/modules/ins/model/vo/QuoteRespVo.java

@@ -162,6 +162,12 @@ public class QuoteRespVo {
     @ApiModelProperty("费用不符合描述")
     @ApiModelProperty("费用不符合描述")
     private String feeNoDescription;
     private String feeNoDescription;
 
 
+    @ApiModelProperty("交强出险次数")
+    private String jqClaims;
+
+    @ApiModelProperty("商业出险次数")
+    private String syClaims;
+
     public List<AccidentResponseVo> getAccidentInfo() {
     public List<AccidentResponseVo> getAccidentInfo() {
         return accident == null ? Collections.emptyList() : accident;
         return accident == null ? Collections.emptyList() : accident;
     }
     }

+ 4 - 4
src/main/java/com/ydtech/modules/ins/model/vo/res/SettlementFeesExcel.java

@@ -97,7 +97,7 @@ public class SettlementFeesExcel implements Serializable {
     private BigDecimal jqOtherCostsProportion;
     private BigDecimal jqOtherCostsProportion;
 
 
     @ApiModelProperty("商业应收比例")
     @ApiModelProperty("商业应收比例")
-    @ExcelProperty("交强非跟单比例")
+    @ExcelProperty("商业应收比例")
     private BigDecimal syReceivableProportion;
     private BigDecimal syReceivableProportion;
 
 
     @ApiModelProperty("商业手续费比例")
     @ApiModelProperty("商业手续费比例")
@@ -152,9 +152,9 @@ public class SettlementFeesExcel implements Serializable {
     private String settlementUserName;
     private String settlementUserName;
 
 
 
 
-    @ApiModelProperty("结算人")
-    @ExcelProperty("结算人")
-    private String updateUserName;
+//    @ApiModelProperty("结算人")
+//    @ExcelProperty("结算人")
+//    private String updateUserName;
 
 
 
 
     @ApiModelProperty("手续费结算状态  1 为已结算  2 已经结算")
     @ApiModelProperty("手续费结算状态  1 为已结算  2 已经结算")

+ 1 - 26
src/main/java/com/ydtech/modules/ins/model/yc/YcBuildData.java

@@ -190,34 +190,11 @@ public class YcBuildData {
         quoteRespVo.setStartDateSy(StringUtils.toString(rd.getBase().getTInsrncBgnTmSY()));
         quoteRespVo.setStartDateSy(StringUtils.toString(rd.getBase().getTInsrncBgnTmSY()));
         quoteRespVo.setEndDateSy(StringUtils.toString(rd.getBase().getTInsrncEndTmSY()));
         quoteRespVo.setEndDateSy(StringUtils.toString(rd.getBase().getTInsrncEndTmSY()));
 
 
-
-        //交强险出险字符串
-        StringBuffer ciSB = new StringBuffer("交强险-【无法获取】");
-        //商业险出险字符串
-        StringBuffer biSB = new StringBuffer();
-//        if (null != rd.getVehicleAdjust()) {
-//            //交强险过往出险记录
-//            String jQRecordDanger = StringUtils.toString(rd.getVehicleAdjust().getJQRecordDanger(),"");
-//            ciSB.append("交强险过往出险记录:");
-//            ciSB.append(jQRecordDanger);
-//        }
-
         if (null != rd.getPrmCoef()) {
         if (null != rd.getPrmCoef()) {
             //商业险   连续承保期间出险次数
             //商业险   连续承保期间出险次数
-            int nClaimTimes = StringUtils.toInt(rd.getPrmCoef().getNClaimTimes());
-            biSB.append(",商业险-");
-            biSB.append("连续承保期间出险次数:");
-            biSB.append(nClaimTimes);
-
-//            //连续承保年数
-//            int nInsureYears = StringUtils.toInt(rd.getPrmCoef().getNInsureYears());
-            //        String.format("连续承保期间出险次数 %s ,连续承保年数 %s",nClaimTimes,nInsureYears);
+            quoteRespVo.setJqClaims(rd.getPrmCoef().getNClaimTimes());
         }
         }
 
 
-        //出险信息
-        quoteRespVo.setAccidentInfoStr(String.format("%s%s", ciSB, biSB));
-
-
         //欠税信息
         //欠税信息
         if (null != rd.getTax()) {
         if (null != rd.getTax()) {
             List<TaxArrears> taxArrearsList = new ArrayList<>();
             List<TaxArrears> taxArrearsList = new ArrayList<>();
@@ -230,7 +207,6 @@ public class YcBuildData {
             quoteRespVo.setTaxArrears(taxArrearsList);
             quoteRespVo.setTaxArrears(taxArrearsList);
         }
         }
 
 
-
         //平台返回信息
         //平台返回信息
         if (null != rd.getTfiWarnList()) {
         if (null != rd.getTfiWarnList()) {
             //排空
             //排空
@@ -241,7 +217,6 @@ public class YcBuildData {
             quoteRespVo.setWarnMessageList(warnMessageList);
             quoteRespVo.setWarnMessageList(warnMessageList);
         }
         }
 
 
-
         return quoteRespVo;
         return quoteRespVo;
     }
     }
 
 

+ 1 - 1
src/main/java/com/ydtech/modules/order/components/gouren/GuorenDuplicateInsuranceComponent.java

@@ -89,7 +89,7 @@ public class GuorenDuplicateInsuranceComponent {
                 throw new SystemException(message);
                 throw new SystemException(message);
             }
             }
         }
         }
-        throw new SystemException(message);
+        return "";
     }
     }
 
 
     /**
     /**

+ 15 - 58
src/main/java/com/ydtech/modules/order/components/zijin/ZijinDuplicateInsuranceComponents.java

@@ -3,6 +3,7 @@ package com.ydtech.modules.order.components.zijin;
 
 
 import com.ydtech.constants.InsuranceEnum;
 import com.ydtech.constants.InsuranceEnum;
 import com.ydtech.exception.SystemException;
 import com.ydtech.exception.SystemException;
+import com.ydtech.modules.order.components.gouren.GuorenDuplicateInsuranceComponent;
 import com.ydtech.modules.order.entity.api.zijin.constants.enums.CalculateFlagEnum;
 import com.ydtech.modules.order.entity.api.zijin.constants.enums.CalculateFlagEnum;
 import com.ydtech.modules.order.entity.api.zijin.constants.enums.ResultEnum;
 import com.ydtech.modules.order.entity.api.zijin.constants.enums.ResultEnum;
 import com.ydtech.modules.order.entity.api.zijin.request.CalculatePremiumRequest;
 import com.ydtech.modules.order.entity.api.zijin.request.CalculatePremiumRequest;
@@ -35,61 +36,17 @@ public class ZijinDuplicateInsuranceComponents extends ResponseMessageAbstractHa
 
 
     public static final String JQ = "交强险";
     public static final String JQ = "交强险";
 
 
-    public static final String SY_REGEX = "商业险.+?终保日期(:?)(\\d+)";
-
-    public static final String DAN_SY_REGEX = "商业险.+?终保日期 (.+?);";
+    protected static final String[] SY_REGEX = {"商业险.+?终保日期 (.+?);", "\"商业险.+?终保日期(:?)(.+?)", "商业险.+?终保日期(:?)(\\d+)"};
 
 
     public static final String SY = "商业险";
     public static final String SY = "商业险";
 
 
     private final ZijinRequestApiComponents zijinRequestApiComponents;
     private final ZijinRequestApiComponents zijinRequestApiComponents;
 
 
+
     public ZijinDuplicateInsuranceComponents(@Lazy ZijinRequestApiComponents zijinRequestApiComponents) {
     public ZijinDuplicateInsuranceComponents(@Lazy ZijinRequestApiComponents zijinRequestApiComponents) {
         this.zijinRequestApiComponents = zijinRequestApiComponents;
         this.zijinRequestApiComponents = zijinRequestApiComponents;
     }
     }
 
 
-    /**
-     * 获取终保日期
-     *
-     * @param message 重复投保返回信息
-     * @param regex   正则内容
-     * @return
-     */
-    public static String getTheExpiryDate(String message, String regex) {
-        Pattern pattern = Pattern.compile(regex);
-        Matcher m = pattern.matcher(message.replace("\n", ";"));
-        boolean b = m.find();
-        if (b) {
-            String group = m.group(1);
-            if (group.contains("-")) {
-                return m.group(1) + ":00";
-            } else {
-                try {
-                    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm");
-                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-                    return simpleDateFormat.format(dateFormat.parse(m.group(1)));
-                } catch (Exception e) {
-                    throw new SystemException(message);
-                }
-            }
-        }
-        throw new SystemException(message);
-    }
-
-    /**
-     * 获取终保日期
-     *
-     * @param rtnMsg 返回信息
-     * @param regex  正则
-     * @return 终保日期
-     */
-    public static String getEndDate(String rtnMsg, String regex) {
-        String endDate = getTheExpiryDate(rtnMsg, regex);
-        if (!endDate.isEmpty()) {
-            return endDate;
-        }
-        return "";
-    }
-
 
 
     @Override
     @Override
     public CalculatePremiumResponse messageHandler(CalculatePremiumRequest calculatePremiumRequest,
     public CalculatePremiumResponse messageHandler(CalculatePremiumRequest calculatePremiumRequest,
@@ -99,7 +56,8 @@ public class ZijinDuplicateInsuranceComponents extends ResponseMessageAbstractHa
                                                    String message,
                                                    String message,
                                                    QueryActualValueRequest queryActualValueRequest,
                                                    QueryActualValueRequest queryActualValueRequest,
                                                    boolean retry) {
                                                    boolean retry) {
-        InsuranceLog.infoLog(InsuranceEnum.ZKIC.getPinyin(), "\n\t---------> {}\n\t---------> {}", "紫金财险重复投保处理", calculatePremiumResponse.getRtnMsg());
+        InsuranceLog.infoLog(InsuranceEnum.ZKIC.getPinyin(), "\n\t---------> {}\n\t---------> {}", "紫金财险重复投保处理",
+                calculatePremiumResponse.getRtnMsg());
         String rtnMsg = calculatePremiumResponse.getRtnMsg();
         String rtnMsg = calculatePremiumResponse.getRtnMsg();
         CalculatePremiumRequest.BaseInfoDTO baseInfo = calculatePremiumRequest.getBaseInfo();
         CalculatePremiumRequest.BaseInfoDTO baseInfo = calculatePremiumRequest.getBaseInfo();
         message = rtnMsg;
         message = rtnMsg;
@@ -112,33 +70,32 @@ public class ZijinDuplicateInsuranceComponents extends ResponseMessageAbstractHa
 
 
         // 单交强
         // 单交强
         if (CalculateFlagEnum.CF_2.getCode().equals(calculateFlag)) {
         if (CalculateFlagEnum.CF_2.getCode().equals(calculateFlag)) {
-            jqEndDate = getEndDate(rtnMsg, DAN_JQ_REGEX);
+            jqEndDate = GuorenDuplicateInsuranceComponent.getEndDate(rtnMsg, DAN_JQ_REGEX);
         }
         }
         // 交强险
         // 交强险
         else if (rtnMsg.contains(JQ)) {
         else if (rtnMsg.contains(JQ)) {
-            jqEndDate = getEndDate(rtnMsg, JQ_REGEX);
-        }
-
-        // 商业险
-        if (rtnMsg.contains(SY)) {
-            syEndDate = getEndDate(rtnMsg, SY_REGEX);
+            jqEndDate = GuorenDuplicateInsuranceComponent.getEndDate(rtnMsg, JQ_REGEX);
         }
         }
 
 
         // 商业险
         // 商业险
         if (rtnMsg.contains(SY)) {
         if (rtnMsg.contains(SY)) {
-            syEndDate = getEndDate(rtnMsg, DAN_SY_REGEX);
+            for (String syRegex : SY_REGEX) {
+                syEndDate = GuorenDuplicateInsuranceComponent.getEndDate(rtnMsg, syRegex);
+                if (!syEndDate.isEmpty()) {
+                    break;
+                }
+            }
         }
         }
 
 
-
         if (jqEndDate.isEmpty() && syEndDate.isEmpty()) {
         if (jqEndDate.isEmpty() && syEndDate.isEmpty()) {
             throw new SystemException(rtnMsg);
             throw new SystemException(rtnMsg);
         }
         }
 
 
         baseInfo.setTrafficTime(jqEndDate);
         baseInfo.setTrafficTime(jqEndDate);
         baseInfo.setBusinessTime(syEndDate);
         baseInfo.setBusinessTime(syEndDate);
-        calculatePremiumResponse = zijinRequestApiComponents.calculatePremium(calculatePremiumRequest, httpHeaders, modelQueryRequest, message, queryActualValueRequest, retry);
+        calculatePremiumResponse = zijinRequestApiComponents.calculatePremium(calculatePremiumRequest, httpHeaders, modelQueryRequest,
+                message, queryActualValueRequest, retry);
         return calculatePremiumResponse;
         return calculatePremiumResponse;
     }
     }
 
 
-
 }
 }

+ 12 - 0
src/main/java/com/ydtech/modules/order/components/zijin/ZijinRequestApiComponents.java

@@ -12,6 +12,7 @@ import com.ydtech.modules.order.entity.api.zijin.constants.enums.ResultEnum;
 import com.ydtech.modules.order.entity.api.zijin.request.*;
 import com.ydtech.modules.order.entity.api.zijin.request.*;
 import com.ydtech.modules.order.entity.api.zijin.response.*;
 import com.ydtech.modules.order.entity.api.zijin.response.*;
 import com.ydtech.modules.order.entity.config.ZjConfigureParameters;
 import com.ydtech.modules.order.entity.config.ZjConfigureParameters;
+import com.ydtech.utils.StringUtils;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.redisson.api.RLock;
 import org.redisson.api.RLock;
 import org.redisson.api.RedissonClient;
 import org.redisson.api.RedissonClient;
@@ -22,6 +23,7 @@ import org.springframework.util.ObjectUtils;
 
 
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map;
+import java.util.Optional;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeUnit;
 
 
 /**
 /**
@@ -255,6 +257,16 @@ public class ZijinRequestApiComponents {
             baseInfo.setDemandNo(null);
             baseInfo.setDemandNo(null);
         }
         }
 
 
+        // 处理紫金重复投保
+        String reinsureMessage = Optional.ofNullable(calculatePremiumResponse.getBasePart())
+                .map(CalculatePremiumResponse.BasePartDTO::getReinsureMessage)
+                .orElse("");
+
+        if (StringUtils.isNotEmpty(reinsureMessage)) {
+            calculatePremiumResponse.setRtnCode(ResultEnum.C_4001);
+            calculatePremiumResponse.setRtnMsg(reinsureMessage);
+        }
+
         // 通过状态码获取处理器处理
         // 通过状态码获取处理器处理
         ResponseMessageAbstractHandler responseMessageAbstractHandler =
         ResponseMessageAbstractHandler responseMessageAbstractHandler =
                 handlerMap.get(ResponseMessageAbstractHandler.CALCULATE_PREMIUM_COMPONENTS + calculatePremiumResponse.getRtnCode());
                 handlerMap.get(ResponseMessageAbstractHandler.CALCULATE_PREMIUM_COMPONENTS + calculatePremiumResponse.getRtnCode());

+ 12 - 0
src/main/java/com/ydtech/modules/order/entity/InsAreaCompany.java

@@ -453,6 +453,18 @@ public class InsAreaCompany implements Serializable {
     @ApiModelProperty(value = "sy_renewal")
     @ApiModelProperty(value = "sy_renewal")
     private String syRenewal;
     private String syRenewal;
 
 
+    /**
+     * 交强出险次数
+     */
+    @ApiModelProperty(value = "jq_claims")
+    private String jqClaims;
+
+    /**
+     * 商业出险次数
+     */
+    @ApiModelProperty("sy_claims")
+    private String syClaims;
+
 
 
     public InsAreaCompany(QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution) {
     public InsAreaCompany(QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution) {
         this.id = IdGenerate.nextId();
         this.id = IdGenerate.nextId();

+ 12 - 0
src/main/java/com/ydtech/modules/order/entity/crawler/response/CrawlerQuoteResponse.java

@@ -258,6 +258,18 @@ public class CrawlerQuoteResponse extends CrawlerBaseResponse {
         @JsonProperty("sy_renewalflag")
         @JsonProperty("sy_renewalflag")
         private String syRenewalFlag;
         private String syRenewalFlag;
 
 
+        /**
+         * 交强出险次数
+         */
+        @JsonProperty("jq_accident")
+        private String jqAccident;
+
+        /**
+         * 商业出险次数
+         */
+        @JsonProperty("sy_accident")
+        private String syAccident;
+
         /**
         /**
          * 返回1需要验车,返回0不验车。
          * 返回1需要验车,返回0不验车。
          * 是否需要验车
          * 是否需要验车

+ 12 - 1
src/main/java/com/ydtech/modules/order/entity/vo/ya/YaExtendInfoDto.java

@@ -1,6 +1,5 @@
 package com.ydtech.modules.order.entity.vo.ya;
 package com.ydtech.modules.order.entity.vo.ya;
 
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.Data;
@@ -67,6 +66,18 @@ public class YaExtendInfoDto implements Serializable {
     @ApiModelProperty("商业险折扣")
     @ApiModelProperty("商业险折扣")
     private double syAdjustRate;
     private double syAdjustRate;
 
 
+    @ApiModelProperty("交强续保")
+    private String jqRenewal;
+
+    @ApiModelProperty("商业续保")
+    private String syRenewal;
+
+    @ApiModelProperty("交强出险次数")
+    private String jqClaims;
+
+    @ApiModelProperty("商业出险次数")
+    private String syClaims;
+
     /**
     /**
      *  临时增加
      *  临时增加
      *
      *

+ 4 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java

@@ -369,6 +369,10 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         quoteRespVo.setJqRenewal(other.getJqRenewalFlag());
         quoteRespVo.setJqRenewal(other.getJqRenewalFlag());
         // 商业是否续保
         // 商业是否续保
         quoteRespVo.setSyRenewal(other.getSyRenewalFlag());
         quoteRespVo.setSyRenewal(other.getSyRenewalFlag());
+        // 交强出险次数
+        quoteRespVo.setJqClaims(other.getJqAccident());
+        // 商业出险次数
+        quoteRespVo.setSyApplyNo(other.getSyAccident());
         return quoteRespVo;
         return quoteRespVo;
     }
     }
 
 

+ 6 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -703,6 +703,12 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         yaExtendInfoDto.setTotalAdjustRate(iac.getTotalAdjustRate());
         yaExtendInfoDto.setTotalAdjustRate(iac.getTotalAdjustRate());
         yaExtendInfoDto.setJqAdjustRate(iac.getJqAdjustRate());
         yaExtendInfoDto.setJqAdjustRate(iac.getJqAdjustRate());
         yaExtendInfoDto.setSyAdjustRate(iac.getSyAdjustRate());
         yaExtendInfoDto.setSyAdjustRate(iac.getSyAdjustRate());
+        // 续保
+        yaExtendInfoDto.setJqRenewal(iac.getJqRenewal());
+        yaExtendInfoDto.setSyRenewal(iac.getSyRenewal());
+        // 出险次数
+        yaExtendInfoDto.setJqClaims(iac.getJqClaims());
+        yaExtendInfoDto.setSyClaims(iac.getSyClaims());
 
 
         orderAndAreaCompany.setExtendInfo(yaExtendInfoDto);
         orderAndAreaCompany.setExtendInfo(yaExtendInfoDto);
 
 

+ 2 - 0
src/main/resources/mapper/modules/admin/SysAmountAuditingMapper.xml

@@ -100,6 +100,8 @@
         a.amount as "amount",
         a.amount as "amount",
         a.user_id as "userId",
         a.user_id as "userId",
         a.create_time as "createTime",
         a.create_time as "createTime",
+        a.voucher_id as "voucherId",
+        a.pic_id as "picId",
         a.auditing_status as "auditingStatus",
         a.auditing_status as "auditingStatus",
         a.amount_status as "amountStatus",
         a.amount_status as "amountStatus",
         a.auditing_time as "auditingTime",
         a.auditing_time as "auditingTime",

+ 17 - 0
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -139,6 +139,8 @@
     <select id="queryNew"  resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
     <select id="queryNew"  resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
             select
             select
                 pa.agreement_name  as "agreementName",
                 pa.agreement_name  as "agreementName",
+                pa.agreement_type  as "agreementType",
+                pa.docking_person  as "dockingPerson",
                 su.name  as "userName",
                 su.name  as "userName",
                 <include refid="income_com"/>
                 <include refid="income_com"/>
                 from  ins_ply_income a
                 from  ins_ply_income a
@@ -232,6 +234,21 @@
                 </if>
                 </if>
             </where>
             </where>
     </select>
     </select>
+    <select id="getEntityById"  resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
+            select
+                pa.agreement_name  as "agreementName",
+                pa.agreement_type  as "agreementType",
+                su.name  as "userName",
+                <include refid="income_com"/>
+                from  ins_ply_income a
+                LEFT  JOIN  ptl_agreement  pa  on  a.agreement_id  = pa.id
+                LEFT  JOIN  sys_user   su  on su.id=a.user_id
+            <where>
+               <if test="id!=null and id!=''">
+                   a.id=#{id}
+               </if>
+            </where>
+    </select>
 
 
 
 
     <select id="totalQuery"  resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
     <select id="totalQuery"  resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">

+ 4 - 0
src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

@@ -67,6 +67,10 @@
         <result property="insideOrderStatus" column="inside_order_status" jdbcType="TINYINT"/>
         <result property="insideOrderStatus" column="inside_order_status" jdbcType="TINYINT"/>
         <result property="insidePayTime" column="inside_pay_time" jdbcType="TIMESTAMP"/>
         <result property="insidePayTime" column="inside_pay_time" jdbcType="TIMESTAMP"/>
         <result property="signingTime" column="signing_time" jdbcType="TIMESTAMP"/>
         <result property="signingTime" column="signing_time" jdbcType="TIMESTAMP"/>
+        <result property="jqRenewal" column="jq_renewal" jdbcType="VARCHAR"/>
+        <result property="syRenewal" column="sy_renewal" jdbcType="VARCHAR"/>
+        <result property="jqClaims" column="jq_claims" jdbcType="VARCHAR"/>
+        <result property="syClaims" column="sy_claims" jdbcType="VARCHAR"/>
 
 
     </resultMap>
     </resultMap>