瀏覽代碼

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

Qchen 2 年之前
父節點
當前提交
011ec56673
共有 46 個文件被更改,包括 1082 次插入111 次删除
  1. 5 0
      src/main/java/com/ydtech/components/TokenInterceptor.java
  2. 118 1
      src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceImpl.java
  3. 21 4
      src/main/java/com/ydtech/modules/fnc/service/impl/InsPlySettleServiceImpl.java
  4. 1 2
      src/main/java/com/ydtech/modules/inv/controller/InvReceivableController.java
  5. 62 59
      src/main/java/com/ydtech/modules/inv/model/vo/ReceivableAndSettlementVo.java
  6. 2 1
      src/main/java/com/ydtech/modules/inv/service/InvReceivableService.java
  7. 26 2
      src/main/java/com/ydtech/modules/inv/service/impl/InvReceivableServiceImpl.java
  8. 1 1
      src/main/java/com/ydtech/modules/order/components/bohai/BoHaiRequestApiComponent.java
  9. 5 0
      src/main/java/com/ydtech/modules/order/entity/crawler/request/CrawlerQuoteRequest.java
  10. 19 2
      src/main/java/com/ydtech/modules/order/entity/crawler/response/CrawlerQuoteResponse.java
  11. 3 0
      src/main/java/com/ydtech/modules/order/entity/vo/BaseQuoteVo.java
  12. 25 0
      src/main/java/com/ydtech/modules/order/entity/vo/DistributionLevelVo.java
  13. 52 0
      src/main/java/com/ydtech/modules/order/entity/vo/FeeOrderNewVo.java
  14. 9 0
      src/main/java/com/ydtech/modules/order/entity/vo/OrderVo.java
  15. 10 1
      src/main/java/com/ydtech/modules/order/service/DaJiaOrderService.java
  16. 13 2
      src/main/java/com/ydtech/modules/order/service/GuorenOrderApiService.java
  17. 11 4
      src/main/java/com/ydtech/modules/order/service/HuaTaiOrderApiService.java
  18. 8 0
      src/main/java/com/ydtech/modules/order/service/InsAreaCompanyService.java
  19. 12 0
      src/main/java/com/ydtech/modules/order/service/InsCrawlerOrderService.java
  20. 11 0
      src/main/java/com/ydtech/modules/order/service/InsOrdersTrackService.java
  21. 9 2
      src/main/java/com/ydtech/modules/order/service/YongchengOrderApiService.java
  22. 12 1
      src/main/java/com/ydtech/modules/order/service/ZhongMeiOrderApiService.java
  23. 10 0
      src/main/java/com/ydtech/modules/order/service/ZijinOrderApiService.java
  24. 82 0
      src/main/java/com/ydtech/modules/order/service/impl/DaJiaOrderServiceImpl.java
  25. 71 0
      src/main/java/com/ydtech/modules/order/service/impl/GuorenOrderApiServiceImpl.java
  26. 74 0
      src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java
  27. 15 2
      src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java
  28. 40 7
      src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java
  29. 4 0
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java
  30. 14 2
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersTrackServiceImpl.java
  31. 96 0
      src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java
  32. 51 1
      src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderApiServiceImpl.java
  33. 46 1
      src/main/java/com/ydtech/modules/order/service/impl/ZijinOrderApiServiceImpl.java
  34. 16 8
      src/main/java/com/ydtech/modules/xxl/factory/QueryStatusFactory.java
  35. 4 6
      src/main/java/com/ydtech/modules/xxl/handler/QueryStatusHandler.java
  36. 2 0
      src/main/java/com/ydtech/modules/xxl/service/BaseQueryStatusService.java
  37. 17 0
      src/main/java/com/ydtech/modules/xxl/service/impl/DaJiaQueryStatusService.java
  38. 15 0
      src/main/java/com/ydtech/modules/xxl/service/impl/GuoRenQueryStatusService.java
  39. 15 0
      src/main/java/com/ydtech/modules/xxl/service/impl/HuaTaiQueryStatusService.java
  40. 23 1
      src/main/java/com/ydtech/modules/xxl/service/impl/InsCrawlerQueryStatusService.java
  41. 16 0
      src/main/java/com/ydtech/modules/xxl/service/impl/YongChengQueryStatusService.java
  42. 18 0
      src/main/java/com/ydtech/modules/xxl/service/impl/ZhongMeiQueryStatusService.java
  43. 17 0
      src/main/java/com/ydtech/modules/xxl/service/impl/ZijinQueryStatusService.java
  44. 1 1
      src/main/resources/application-prod.yml
  45. 二進制
      src/main/resources/template/finance/accountsReceivable.xlsx
  46. 二進制
      src/main/resources/template/finance/settlement.xlsx

+ 5 - 0
src/main/java/com/ydtech/components/TokenInterceptor.java

@@ -72,6 +72,11 @@ public class TokenInterceptor {
         // 保险公司列表
         notMatchList.add("/esmInsCompany/gainTopList");
 
+        // 渤海回调地址
+        notMatchList.add("/esmInsCompany/gainTopList");
+        notMatchList.add("/esmInsCompany/gainTopList");
+        notMatchList.add("/esmInsCompany/gainTopList");
+
         return new SaInterceptor(handler -> {
             // 指定一条 match 规则
             SaRouter

+ 118 - 1
src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceImpl.java

@@ -29,6 +29,7 @@ import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.protocol.entity.po.*;
 import com.ydtech.modules.protocol.service.*;
 import com.ydtech.modules.protocols.entity.po.InsFeeOrderNew;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.math.NumberUtils;
 import org.springframework.stereotype.Service;
@@ -1779,7 +1780,7 @@ public class FeeRuleSchemeServiceImpl implements FeeRuleSchemeService {
         detailLevel3FeeResultVo.setFcFeeAmountAll(fcDetailFeePremium3.setScale(2,BigDecimal.ROUND_DOWN).toString());
         queryOrderFeeResultVos.add(detailLevel3FeeResultVo);
 
-        return queryOrderFeeResultVos;
+            return queryOrderFeeResultVos;
     }
 
     //把取出的费用信息转换为页面需要展示的数据
@@ -2607,4 +2608,120 @@ public class FeeRuleSchemeServiceImpl implements FeeRuleSchemeService {
         result.append(feeSchemeReqDto.getBusType());
         return result.toString();
     }
+
+    public List<FeeOrderNewVo> newConvertOrderFeeVoData(InsFeeOrderNew insFeeOrderNew) {
+        ArrayList<FeeOrderNewVo> returnList = new ArrayList<>();
+        FeeOrderNewVo jqfeeOrderNewVo = new FeeOrderNewVo();
+
+        jqfeeOrderNewVo.setInsuranceType("交强险");  // 险种
+        jqfeeOrderNewVo.setPremium(insFeeOrderNew.getJqPremium());  //保费
+        jqfeeOrderNewVo.setTotalAmount(insFeeOrderNew.getJqCostsPremiums());   //总费用
+        jqfeeOrderNewVo.setTotalProportion(insFeeOrderNew.getJqCostsProportion()); //总保费
+        jqfeeOrderNewVo.setSySuperviseCostsPremiums(insFeeOrderNew.getJqSuperviseCostsPremiums());   //手续费
+        jqfeeOrderNewVo.setOtherCostsProportion(insFeeOrderNew.getJqOtherCostsProportion());   // 跟单比例
+        jqfeeOrderNewVo.setOtherCostsPremiums(insFeeOrderNew.getJqOtherCostsPremiums());      // 跟单费
+        jqfeeOrderNewVo.setSuperviseCosts(insFeeOrderNew.getJqSuperviseCostsProportion());  // 手续费比例
+        // 五级管理费
+        jqfeeOrderNewVo.setDeptProportionLevelOne(insFeeOrderNew.getJqDeptProportionLevel1());
+        jqfeeOrderNewVo.setDeptPremiumsLevelOne(insFeeOrderNew.getJqDeptPremiumsLevel1());
+        jqfeeOrderNewVo.setDeptProportionLevelTwo(insFeeOrderNew.getJqDeptProportionLevel2());
+        jqfeeOrderNewVo.setDeptPremiumsLevelTwo(insFeeOrderNew.getJqDeptPremiumsLevel2());
+        jqfeeOrderNewVo.setDeptProportionLevelThree(insFeeOrderNew.getJqDeptProportionLevel3());
+        jqfeeOrderNewVo.setDeptPremiumsLevelThree(insFeeOrderNew.getJqDeptPremiumsLevel3());
+        jqfeeOrderNewVo.setDeptProportionLevelFoure(insFeeOrderNew.getJqDeptProportionLevel4());
+        jqfeeOrderNewVo.setDeptPremiumsLevelFoure(insFeeOrderNew.getJqDeptPremiumsLevel4());
+        jqfeeOrderNewVo.setDeptProportionLevelFive(insFeeOrderNew.getJqDeptProportionLevel5());
+        jqfeeOrderNewVo.setDeptPremiumsLevelFive(insFeeOrderNew.getJqDeptPremiumsLevel5());
+        returnList.add(jqfeeOrderNewVo);
+
+        FeeOrderNewVo syfeeOrderNewVo = new FeeOrderNewVo();
+
+        syfeeOrderNewVo.setInsuranceType("商业险");  // 险种
+        syfeeOrderNewVo.setPremium(insFeeOrderNew.getSyPremium());  //保费
+        syfeeOrderNewVo.setTotalProportion(insFeeOrderNew.getSyCostsProportion()); //总保费
+        syfeeOrderNewVo.setTotalAmount(insFeeOrderNew.getSyCostsPremiums());   //总费用
+        syfeeOrderNewVo.setSySuperviseCostsPremiums(insFeeOrderNew.getSySuperviseCostsPremiums());   //手续费
+        syfeeOrderNewVo.setOtherCostsProportion(insFeeOrderNew.getSyOtherCostsProportion());   // 跟单比例
+        syfeeOrderNewVo.setOtherCostsPremiums(insFeeOrderNew.getSyOtherCostsPremiums());      // 跟单费
+        syfeeOrderNewVo.setSuperviseCosts(insFeeOrderNew.getSySuperviseCostsProportion());  // 手续费比例
+
+        // 五级管理费
+        syfeeOrderNewVo.setDeptProportionLevelOne(insFeeOrderNew.getSyDeptProportionLevel1());
+        syfeeOrderNewVo.setDeptPremiumsLevelOne(insFeeOrderNew.getSyDeptPremiumsLevel1());
+        syfeeOrderNewVo.setDeptProportionLevelTwo(insFeeOrderNew.getSyDeptProportionLevel2());
+        syfeeOrderNewVo.setDeptPremiumsLevelTwo(insFeeOrderNew.getSyDeptPremiumsLevel2());
+        syfeeOrderNewVo.setDeptProportionLevelThree(insFeeOrderNew.getSyDeptProportionLevel3());
+        syfeeOrderNewVo.setDeptPremiumsLevelThree(insFeeOrderNew.getSyDeptPremiumsLevel3());
+        syfeeOrderNewVo.setDeptProportionLevelFoure(insFeeOrderNew.getSyDeptProportionLevel4());
+        syfeeOrderNewVo.setDeptPremiumsLevelFoure(insFeeOrderNew.getSyDeptPremiumsLevel4());
+        syfeeOrderNewVo.setDeptProportionLevelFive(insFeeOrderNew.getSyDeptProportionLevel5());
+        syfeeOrderNewVo.setDeptPremiumsLevelFive(insFeeOrderNew.getSyDeptPremiumsLevel5());
+        returnList.add(syfeeOrderNewVo);
+
+
+        FeeOrderNewVo nofeeOrderNewVo = new FeeOrderNewVo();
+
+        nofeeOrderNewVo.setInsuranceType("非车险");  // 险种
+        nofeeOrderNewVo.setPremium(insFeeOrderNew.getNoPremium());  //保费
+        nofeeOrderNewVo.setTotalProportion(insFeeOrderNew.getNoCostsProportion()); //总保费
+        nofeeOrderNewVo.setTotalAmount(insFeeOrderNew.getNoCostsPremiums());   //总费用
+        nofeeOrderNewVo.setSySuperviseCostsPremiums(insFeeOrderNew.getNoSuperviseCostsPremiums());   //手续费
+        nofeeOrderNewVo.setOtherCostsProportion(insFeeOrderNew.getNoOtherCostsProportion());   // 跟单比例
+        nofeeOrderNewVo.setOtherCostsPremiums(insFeeOrderNew.getNoOtherCostsPremiums());      // 跟单费
+        nofeeOrderNewVo.setSuperviseCosts(insFeeOrderNew.getNoSuperviseCostsProportion());  // 手续费比例
+
+        // 五级管理费
+        nofeeOrderNewVo.setDeptProportionLevelOne(insFeeOrderNew.getNoDeptProportionLevel1());
+        nofeeOrderNewVo.setDeptPremiumsLevelOne(insFeeOrderNew.getNoDeptPremiumsLevel1());
+        nofeeOrderNewVo.setDeptProportionLevelTwo(insFeeOrderNew.getNoDeptProportionLevel2());
+        nofeeOrderNewVo.setDeptPremiumsLevelTwo(insFeeOrderNew.getNoDeptPremiumsLevel2());
+        nofeeOrderNewVo.setDeptProportionLevelThree(insFeeOrderNew.getNoDeptProportionLevel3());
+        nofeeOrderNewVo.setDeptPremiumsLevelThree(insFeeOrderNew.getNoDeptPremiumsLevel3());
+        nofeeOrderNewVo.setDeptProportionLevelFoure(insFeeOrderNew.getNoDeptProportionLevel4());
+        nofeeOrderNewVo.setDeptPremiumsLevelFoure(insFeeOrderNew.getNoDeptPremiumsLevel4());
+        nofeeOrderNewVo.setDeptProportionLevelFive(insFeeOrderNew.getNoDeptProportionLevel5());
+        nofeeOrderNewVo.setDeptPremiumsLevelFive(insFeeOrderNew.getNoDeptPremiumsLevel5());
+        returnList.add(nofeeOrderNewVo);
+        return returnList;
+    }
+
+    public List<DistributionLevelVo> converDistrbutionData(InsFeeOrderNew insFeeOrderNew) {
+        ArrayList<DistributionLevelVo> resultList = new ArrayList<>();
+        DistributionLevelVo  levelOne  =  new DistributionLevelVo();
+        levelOne.setDistributionLevel("一级分销");
+        String oneUserName=  this.getUserName(insFeeOrderNew.getFirstLevelUserId());
+        levelOne.setUserName(oneUserName);  //分销人
+        levelOne.setDistributionRatio(insFeeOrderNew.getFirstDetailProportion());  // 分销比例
+        levelOne.setAmount(insFeeOrderNew.getFirstDetailPremiums());   // 分销金额
+        resultList.add(levelOne);
+
+
+        DistributionLevelVo levelTwo = new DistributionLevelVo();
+        levelTwo.setDistributionLevel("二级分销");
+        String twoUserName=  this.getUserName(insFeeOrderNew.getTwoLevelUserId());
+        levelTwo.setUserName(twoUserName);  //分销人
+        levelTwo.setDistributionRatio(insFeeOrderNew.getSecondDetailProportion());  // 分销比例
+        levelTwo.setAmount(insFeeOrderNew.getSecondDetailPremiums());   // 分销金额
+        resultList.add(levelTwo);
+
+
+        DistributionLevelVo levelThree = new DistributionLevelVo();
+        levelThree.setDistributionLevel("三级分销");
+        String threeUserName=  this.getUserName(insFeeOrderNew.getThreeLevelUserId());
+        levelThree.setUserName(threeUserName);  //分销人
+        levelThree.setDistributionRatio(insFeeOrderNew.getThirdDetailProportion());  // 分销比例
+        levelThree.setAmount(insFeeOrderNew.getThirdDetailPremiums());   // 分销金额
+        resultList.add(levelThree);
+        return resultList;
+    }
+
+    private String getUserName(String firstLevelUserId) {
+        if(StringUtils.isNotEmpty(firstLevelUserId)){
+            SysUser sysUser = sysUserService.getBaseMapper().selectById(firstLevelUserId);
+            if(ObjectUtils.isNotEmpty(sysUser)){
+                return sysUser.getName();
+            }
+        }
+        return null;
+    }
 }

+ 21 - 4
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlySettleServiceImpl.java

@@ -74,9 +74,13 @@ public class InsPlySettleServiceImpl extends ServiceImpl<InsPlySettleMapper, Ins
     @Transactional
     public HttpResult generateSettleAndDetail(GenerateSettleVo generateSettleVo) {
 
+
+//      保单号数组
         List<String> plyNoList= generateSettleVo.getPlyNoList();
+//      保险公司
         String companyId=generateSettleVo.getCompanyId();
         String deptId =generateSettleVo.getDeptId();
+//      结算月份
         String settleMonth=generateSettleVo.getSettleMonth();
         if(StringUtils.isNullOrEmpty(companyId)
                 ||StringUtils.isNullOrEmpty(deptId)
@@ -90,31 +94,42 @@ public class InsPlySettleServiceImpl extends ServiceImpl<InsPlySettleMapper, Ins
         if(plyNoList==null || plyNoList.size()==0){
             return HttpResult.error("结算清单不能传空");
         }
-        // 生成结算单号
-//        InsPlyIncome insPlyIncome_t=insPlyIncomeMapper.selectByPlyno(plyNoList.get(0));
+//      生成结算单号
+//      InsPlyIncome insPlyIncome_t=insPlyIncomeMapper.selectByPlyno(plyNoList.get(0));
         settleno = companyId+ DateUtil.yyyyMMddHHmmss(new Date());
         for(String plyNo:plyNoList){
             InsPlyIncome insPlyIncome=insPlyIncomeMapper.selectByPlyno(plyNo);
             InsPlySettleDetail insPlySettleDetail =new InsPlySettleDetail();
+
+
+
             insPlySettleDetail.setSettleno(settleno);
+//          订单号
             insPlySettleDetail.setOrderno(insPlyIncome.getOrderno());
+//          保单号
             insPlySettleDetail.setPolicyno(insPlyIncome.getPolicyno());
             insPlySettleDetail.setDeptId(insPlyIncome.getDeptId());
+//          手续费
             insPlySettleDetail.setCommissionFeevalue(insPlyIncome.getCommissionFeevalue());
+//          其他费用金额
             insPlySettleDetail.setOtherFeevalue(insPlyIncome.getOtherFeevalue());
+//          总费用
             insPlySettleDetail.setAllFeeValue(insPlyIncome.getAllFeeValue());
             insPlySettleDetail.setCreateTime(LocalDateTime.now());
             insPlySettleDetailMapper.insert(insPlySettleDetail);
-            //修改ins_ply_income
+            //修改ins_ply_income   将总费用转成计算费用
             insPlyIncome.setFinalFeeValue(insPlyIncome.getAllFeeValue());
             LambdaQueryWrapper<InsPlyIncome> queryWrapper=new LambdaQueryWrapper();
             queryWrapper.eq(InsPlyIncome::getPolicyno,plyNo);
             insPlyIncomeMapper.update(insPlyIncome,queryWrapper);
-
+//          手续费金额
             commissionFeevalue=commissionFeevalue.add(insPlyIncome.getCommissionFeevalue());
+//          其他费用金额
             otherFeevalue=otherFeevalue.add(insPlyIncome.getOtherFeevalue());
+//          总费用
             allFeeValue=allFeeValue.add(insPlyIncome.getAllFeeValue());
         }
+//      月度结算单汇总表
         InsPlySettle insPlySettle =new InsPlySettle();
         insPlySettle.setSettleno(settleno);
         insPlySettle.setCompanyId(companyId);
@@ -183,10 +198,12 @@ public class InsPlySettleServiceImpl extends ServiceImpl<InsPlySettleMapper, Ins
         insPlySettle.setHxamount(insPlySettle.getHxamount() ==null ? BigDecimal.ZERO:insPlySettle.getHxamount());
         insPlySettle.setCommissionHxamount(insPlySettle.getCommissionHxamount() ==null ? BigDecimal.ZERO:insPlySettle.getCommissionHxamount());
         insPlySettle.setOtherHxamount(insPlySettle.getOtherHxamount() ==null ? BigDecimal.ZERO:insPlySettle.getOtherHxamount());
+//       如果等于手续费时   核销金额  比  手续费 >0
         if(insPlySettleHx.getFeeType().equals("S")
                 &&insPlySettle.getCommissionHxamount().add(insPlySettleHx.getAmount()).compareTo(insPlySettle.getCommissionFeevalue())>0){
             return HttpResult.error("核销手续费金额已超过结算单手续费,请修改");
         }
+//      其他费用    核销金额 比 其他费用
         if(insPlySettleHx.getFeeType().equals("O")
                 &&insPlySettle.getOtherHxamount().add(insPlySettleHx.getAmount()).compareTo(insPlySettle.getOtherFeevalue())>0){
             return HttpResult.error("核销其他费用金额已超过结算单其他费用,请修改");

+ 1 - 2
src/main/java/com/ydtech/modules/inv/controller/InvReceivableController.java

@@ -139,8 +139,7 @@ public class InvReceivableController extends BaseController {
     @ApiOperation("结算导入新增")
     @PostMapping("addSettlement")
     public HttpResult addSettlement(@RequestBody InvSettlementSource invSettlementSource){
-        Boolean b = invReceivableService.addSettlement(invSettlementSource);
-        return b ? HttpResult.ok("新增成功") : HttpResult.error("新增失败");
+        return invReceivableService.addSettlement(invSettlementSource);
     }
 
 

+ 62 - 59
src/main/java/com/ydtech/modules/inv/model/vo/ReceivableAndSettlementVo.java

@@ -21,14 +21,14 @@ public class ReceivableAndSettlementVo {
     @ExcelProperty(value = "渠道分类")
     private String channelClassification; // 渠道分类
 
-    @ApiModelProperty(value = "签约日期")
-    @ExcelProperty(value = "签约日期")
-    private String signDate; // 签约日期
-
     @ApiModelProperty(value = "渠道")
     @ExcelProperty(value = "渠道")
     private String channel; // 渠道
 
+    @ApiModelProperty(value = "签约日期")
+    @ExcelProperty(value = "签约日期")
+    private String signDate; // 签约日期
+
     @ApiModelProperty(value = "车牌号")
     @ExcelProperty(value = "车牌号")
     private String licenseNo; // 执照号
@@ -45,17 +45,18 @@ public class ReceivableAndSettlementVo {
     @ExcelProperty(value = "保险公司")
     private String insuranceCompany; // 保险公司
 
-    @ApiModelProperty(value = "部门id")
-    @ExcelProperty(value = "部门id")
-    private String insuranceDeptId; // 保险部门ID
+    @ApiModelProperty(value = "险种")
+    @ExcelProperty(value = "险种")
+    private String insuranceType; // 保险类型
 
     @ApiModelProperty(value = "保司结构")
     @ExcelProperty(value = "保司结构")
     private String insuranceDept; // 保司结构
 
-    @ApiModelProperty(value = "险种")
-    @ExcelProperty(value = "险种")
-    private String insuranceType; // 保险类型
+    @ApiModelProperty(value = "部门id")
+    @ExcelProperty(value = "部门id")
+    private String insuranceDeptId; // 保险部门ID
+
 
     @ApiModelProperty(value = "业务归属")
     @ExcelProperty(value = "业务归属")
@@ -65,45 +66,75 @@ public class ReceivableAndSettlementVo {
     @ExcelProperty(value = "交强保单号")
     private String jqPolicyId;
 
+    @ApiModelProperty(value = "商业保单号")
+    @ExcelProperty(value = "商业保单号")
+    private String syPolicyId;
+
+    @ApiModelProperty(value = "非车保单号")
+    @ExcelProperty(value = "非车保单号")
+    private String nonCarPolicyId;
+
     @ApiModelProperty(value = "交强险保费")
     @ExcelProperty(value = "交强险保费")
     private String jqPremiumTax; // 交强险税额
 
-    @ApiModelProperty(value = "交强险保费不含税")
-    @ExcelProperty(value = "交强险保费不含税")
-    private String jqPremium; // 交强险保费
-
-    @ApiModelProperty(value = "商业保单号")
-    @ExcelProperty(value = "商业保单号")
-    private String syPolicyId;
+    @ApiModelProperty(value = "车船税")
+    @ExcelProperty(value = "车船税")
+    private String taxAmount; // 税额
 
     @ApiModelProperty(value = "商业险保费")
     @ExcelProperty(value = "商业险保费")
     private String syPremiumTax; // 商业险税额
 
-    @ApiModelProperty(value = "商业险保费不含税")
-    @ExcelProperty(value = "商业险保费不含税")
-    private String syPremium; // 商业险保费
-
-    @ApiModelProperty(value = "非车保单号")
-    @ExcelProperty(value = "非车保单号")
-    private String nonCarPolicyId;
-
     @ApiModelProperty(value = "非车险保费")
     @ExcelProperty(value = "非车险保费")
     private String nonCarPremiumTax; // 非车险税额
 
-    @ApiModelProperty(value = "非车险保费不含税")
-    @ExcelProperty(value = "非车险保费不含税")
-    private String nonCarPremium; // 非车险保费
+    @ApiModelProperty(value = "最大交强险应付比例")
+    @ExcelProperty(value = "最大交强险应付比例")
+    private String maxJqReceivableRatio; // 最大交强险应收比例
+
+    @ApiModelProperty(value = "最大商业险应付比例")
+    @ExcelProperty(value = "最大商业险应付比例")
+    private String maxSyReceivableRatio; // 最大商业险应收比例
+
+    @ApiModelProperty(value = "最大非车险应付比例")
+    @ExcelProperty(value = "最大非车险应付比例")
+    private String maxNonCarReceivableRatio; // 最大非车险应收比例
+
+    @ApiModelProperty(value = "补贴比例")
+    @ExcelProperty(value = "补贴比例")
+    private String subsidyRatio; // 补贴比例
+
+    @ApiModelProperty(value = "补贴金额")
+    @ExcelProperty(value = "补贴金额")
+    private String subsidyAmount; // 补贴金额
+
+    @ApiModelProperty(value = "最大应付金额")
+    @ExcelProperty(value = "最大应付金额")
+    private String maxReceivable; // 最大应付金额
+
+    @ApiModelProperty(value = "结算金额")
+    @ExcelProperty(value = "结算金额")
+    private String settlementAmount;
 
     @ApiModelProperty(value = "代理结算时间")
     @ExcelProperty(value = "代理结算时间")
     private String agencySettlementTime; // 代理结算时间
 
-    @ApiModelProperty(value = "车船税")
-    @ExcelProperty(value = "车船税")
-    private String taxAmount; // 税额
+    @ApiModelProperty(value = "交强险保费不含税")
+    @ExcelProperty(value = "交强险保费不含税")
+    private String jqPremium; // 交强险保费
+
+    @ApiModelProperty(value = "商业险保费不含税")
+    @ExcelProperty(value = "商业险保费不含税")
+    private String syPremium; // 商业险保费
+
+
+    @ApiModelProperty(value = "非车险保费不含税")
+    @ExcelProperty(value = "非车险保费不含税")
+    private String nonCarPremium; // 非车险保费
+
 
     @ApiModelProperty(value = "交强险应收比例")
     @ExcelProperty(value = "交强险应收比例")
@@ -153,38 +184,10 @@ public class ReceivableAndSettlementVo {
     @ExcelProperty(value = "应收")
     private String receivable; // 应收
 
-    @ApiModelProperty(value = "补贴比例")
-    @ExcelProperty(value = "补贴比例")
-    private String subsidyRatio; // 补贴比例
-
-    @ApiModelProperty(value = "补贴金额")
-    @ExcelProperty(value = "补贴金额")
-    private String subsidyAmount; // 补贴金额
-
-    @ApiModelProperty(value = "最大交强险应付比例")
-    @ExcelProperty(value = "最大交强险应付比例")
-    private String maxJqReceivableRatio; // 最大交强险应收比例
-
-    @ApiModelProperty(value = "最大商业险应付比例")
-    @ExcelProperty(value = "最大商业险应付比例")
-    private String maxSyReceivableRatio; // 最大商业险应收比例
-
-    @ApiModelProperty(value = "最大非车险应付比例")
-    @ExcelProperty(value = "最大非车险应付比例")
-    private String maxNonCarReceivableRatio; // 最大非车险应收比例
-
-    @ApiModelProperty(value = "最大应付金额")
-    @ExcelProperty(value = "最大应付金额")
-    private String maxReceivable; // 最大应付金额
-
     @ApiModelProperty(value = "总应收金额")
     @ExcelProperty(value = "总应收金额")
     private String totalReceivableAmount;
 
-    @ApiModelProperty(value = "结算金额")
-    @ExcelProperty(value = "结算金额")
-    private String settlementAmount;
-
     @ApiModelProperty(value = "结算状态")
     @ExcelProperty(value = "结算状态")
     private String clearingState; // 结算状态

+ 2 - 1
src/main/java/com/ydtech/modules/inv/service/InvReceivableService.java

@@ -2,6 +2,7 @@ package com.ydtech.modules.inv.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.inv.model.po.InvSettlementSource;
 import com.ydtech.modules.inv.model.po.InvSource;
@@ -53,7 +54,7 @@ public interface InvReceivableService {
 
     Boolean addReceivable(InvSource invSource);
 
-    Boolean addSettlement(InvSettlementSource invSettlementSource);
+    HttpResult addSettlement(InvSettlementSource invSettlementSource);
 
     List<String> dataMatching();
 

+ 26 - 2
src/main/java/com/ydtech/modules/inv/service/impl/InvReceivableServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateTime;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.PageRequest;
 import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.inv.dao.InvReceivableMapper;
@@ -17,6 +18,7 @@ import com.ydtech.modules.inv.service.InvSourceService;
 import com.ydtech.utils.idgen.IdGenerate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
@@ -44,6 +46,9 @@ public class InvReceivableServiceImpl implements InvReceivableService {
     @Autowired
     InvSettlementSourceMapper invSettlementSourceMapper;
 
+    @Autowired
+    private InvReceivableService invReceivableService;
+
     @Override
     public List<ReceivableResultVo> getReceivableList(String startTime, String endTime, String insuranceId) {
         return invReceivableMapper.getReceivableList(startTime, endTime, insuranceId);
@@ -711,7 +716,7 @@ public class InvReceivableServiceImpl implements InvReceivableService {
     }
 
     @Override
-    public Boolean addSettlement(InvSettlementSource invSettlementSource) {
+    public HttpResult addSettlement(InvSettlementSource invSettlementSource) {
         invSettlementSource.setId(IdGenerate.nextId());
         invSettlementSource.builder();
         //处理补贴金额
@@ -725,10 +730,29 @@ public class InvReceivableServiceImpl implements InvReceivableService {
                         .add(invSettlementSource.getSyPremiumTax().multiply(invSettlementSource.getCommercialExportRatio())
                                 .add(invSettlementSource.getNonCarPremiumTax().multiply(invSettlementSource.getNonVehicleExportRatio())))
         );
+
+        String licenseno = invSettlementSource.getLicenseno();
+        List<String> namesList = new ArrayList<>();
+        namesList.add(licenseno);
+
+        StringBuilder licensenos = new StringBuilder();
+
+        List<String> receivableLicensenos = invReceivableService.getReceivableListByLicenseno(namesList);
+
+        if (CollectionUtils.isEmpty(receivableLicensenos)) {
+            licensenos.append(invSettlementSource.getLicenseno());
+            licensenos.append(",");
+        }
+
         DateTime dateTime = new DateTime();
         invSettlementSource.setRevenueTime(dateTime.toString());
         boolean save = invSettlementSourceMapper.insert(invSettlementSource) > 0 ? true : false;
-        return save;
+
+        if (licensenos.length() > 0) {
+            licensenos.append("未在应收表中查询到对应车牌号");
+            return save ? HttpResult.ok("新增成功", licensenos.toString()) : HttpResult.error("新增失败");
+        }
+        return save ? HttpResult.ok("新增成功") : HttpResult.error("新增失败");
     }
 
     @Override

+ 1 - 1
src/main/java/com/ydtech/modules/order/components/bohai/BoHaiRequestApiComponent.java

@@ -171,7 +171,7 @@ public class BoHaiRequestApiComponent {
      * @return 响应
      */
     public QuotationResponse quotation(QuotationRequest request, String sysSourceCode) throws Exception {
-        return post(request, properties.getUrl(), QuotationResponse.class, sysSourceCode, RequestType.Z00006);
+        return verificationResponse(request, properties.getUrl(), QuotationResponse.class, sysSourceCode, RequestType.Z00006);
     }
 
     /**

+ 5 - 0
src/main/java/com/ydtech/modules/order/entity/crawler/request/CrawlerQuoteRequest.java

@@ -29,5 +29,10 @@ public class CrawlerQuoteRequest extends BaseQuoteInfoVo {
      * 折扣
      */
     private String discount;
+    /**
+     * 上次订单号
+     */
+    private String lastOrderNo;
+
 
 }

+ 19 - 2
src/main/java/com/ydtech/modules/order/entity/crawler/response/CrawlerQuoteResponse.java

@@ -9,7 +9,6 @@ import org.springframework.util.ObjectUtils;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -209,11 +208,29 @@ public class CrawlerQuoteResponse extends CrawlerBaseResponse {
         private static final long serialVersionUID = -7644262314380189512L;
 
         /**
-         * 评分
+         * 评分
          */
         @JsonProperty("mark")
         private String mark;
 
+        /**
+         * 交强评分
+         */
+        @JsonProperty(" jq_mark")
+        private String jqMark;
+
+        /**
+         * 商业评分
+         */
+        @JsonProperty("sy_mark")
+        private String syMark;
+
+        /**
+         * 总折扣
+         */
+        @JsonProperty("discount")
+        private String discount;
+
         /**
          * 交强折扣
          */

+ 3 - 0
src/main/java/com/ydtech/modules/order/entity/vo/BaseQuoteVo.java

@@ -43,4 +43,7 @@ public class BaseQuoteVo<T> {
     @ApiModelProperty("折扣")
     private String discount;
 
+    @ApiModelProperty("上一次订单号")
+    private String lastCompanyId;
+
 }

+ 25 - 0
src/main/java/com/ydtech/modules/order/entity/vo/DistributionLevelVo.java

@@ -0,0 +1,25 @@
+package com.ydtech.modules.order.entity.vo;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+@Data
+@ApiModel(description = "分销明细")
+public class DistributionLevelVo implements Serializable {
+    @ApiModelProperty("分销等级")
+    private String distributionLevel;
+
+    @ApiModelProperty("接收人")
+    private String userName;
+
+    @ApiModelProperty("分销比例")
+    private BigDecimal distributionRatio;
+
+    @ApiModelProperty("金额")
+    private BigDecimal amount;
+}

+ 52 - 0
src/main/java/com/ydtech/modules/order/entity/vo/FeeOrderNewVo.java

@@ -0,0 +1,52 @@
+package com.ydtech.modules.order.entity.vo;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.poi.hpsf.Decimal;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+@ApiModel(description = "费用明细")
+@Data
+public class FeeOrderNewVo implements Serializable {
+    @ApiModelProperty("险种")
+    private  String insuranceType;
+    @ApiModelProperty("保费")
+    private BigDecimal premium ;
+    @ApiModelProperty("总比例")
+    private BigDecimal totalProportion;
+    @ApiModelProperty("总费用")
+    private BigDecimal totalAmount;
+    @ApiModelProperty("手续费比例")
+    private BigDecimal superviseCosts;
+    @ApiModelProperty("手续费")
+    private  BigDecimal  sySuperviseCostsPremiums;
+    @ApiModelProperty("跟单比例")
+    private  BigDecimal otherCostsProportion;
+    @ApiModelProperty("跟单费")
+    private  BigDecimal otherCostsPremiums;
+    @ApiModelProperty("一级管理费比例")
+    private BigDecimal deptProportionLevelOne;
+    @ApiModelProperty("一级管理费")
+    private BigDecimal deptPremiumsLevelOne;
+    @ApiModelProperty("二级管理费比例")
+    private BigDecimal deptProportionLevelTwo;
+    @ApiModelProperty("二级管理费")
+    private BigDecimal deptPremiumsLevelTwo;
+    @ApiModelProperty("三级管理费比例")
+    private BigDecimal deptProportionLevelThree;
+    @ApiModelProperty("三级管理费")
+    private BigDecimal deptPremiumsLevelThree;
+    @ApiModelProperty("四级管理费比例")
+    private BigDecimal deptProportionLevelFoure;
+    @ApiModelProperty("四级管理费")
+    private BigDecimal deptPremiumsLevelFoure;
+    @ApiModelProperty("五级管理费比例")
+    private BigDecimal deptProportionLevelFive;
+    @ApiModelProperty("五级管理费")
+    private BigDecimal deptPremiumsLevelFive;
+
+}

+ 9 - 0
src/main/java/com/ydtech/modules/order/entity/vo/OrderVo.java

@@ -350,5 +350,14 @@ public class OrderVo implements Serializable {
      * 费用审核时调整费用使用
      */
     private AdjustFeeDescVo adjustFeeDescVo;
+    /**
+     * 费用信息
+     */
+    private List<FeeOrderNewVo> feeOrderNewVoList;
+
+    /**
+     * 分销明细
+     */
+    private List<DistributionLevelVo>  distributionLevelVoList;
 
 }

+ 10 - 1
src/main/java/com/ydtech/modules/order/service/DaJiaOrderService.java

@@ -41,5 +41,14 @@ public interface DaJiaOrderService extends BaseOrderService<Object>{
      */
     HttpResult<Object> accidentalDrivingInfo(String accidentalId);
 
-
+    /**
+    * @Description 自动更新承保状态
+    * @Author  xingming
+    * @Date   2024/3/28 16:36
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void verifyPaymentNew(String companyId);
 }

+ 13 - 2
src/main/java/com/ydtech/modules/order/service/GuorenOrderApiService.java

@@ -3,9 +3,8 @@ package com.ydtech.modules.order.service;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.guoren.CarModelResp;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
-import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
-import com.ydtech.modules.order.entity.api.guoren.response.SpecialAgreementResponse;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
 import com.ydtech.modules.order.entity.vo.guoren.GuoRenSpecialAgreement;
 import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceList;
 import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceQueryVo;
@@ -81,4 +80,16 @@ public interface GuorenOrderApiService {
     HttpResult<String> getPolicyPrintApi(PolicyPrintVo policyPrintVo);
 
 
+    /**
+    * @Description 更新支付状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 16:47
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void insOrderInfoNew(String companyId);
+
+
 }

+ 11 - 4
src/main/java/com/ydtech/modules/order/service/HuaTaiOrderApiService.java

@@ -2,10 +2,6 @@ package com.ydtech.modules.order.service;
 
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
-import com.ydtech.modules.ins.model.ya.CarModelDTO;
-import com.ydtech.modules.order.entity.api.zhongmei.request.ApprovedRequest;
-import com.ydtech.modules.order.entity.api.zhongmei.request.CoverageRequest;
-import com.ydtech.modules.order.entity.api.zijin.response.QueryClauseDataResponse;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
 import com.ydtech.modules.order.entity.po.InsHuataiContributing;
 import com.ydtech.modules.order.entity.vo.*;
@@ -79,4 +75,15 @@ public interface HuaTaiOrderApiService{
      *//*
     HttpResult<Object> getPaymentUrl(String companyId);*/
 
+    /**
+    * @Description  更新订单状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 16:53
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void paymentEnquiryNew(String companyId);
+
 }

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

@@ -37,6 +37,14 @@ public interface InsAreaCompanyService extends IService<InsAreaCompany> {
      */
     void updateCompanyAndOrders(InsAreaCompany insAreaCompany);
 
+
+    /**
+     * 修改子订单 并且修改订单状态 最新
+     *
+     * @param insAreaCompany
+     */
+    void updateCompanyAndOrdersNew(InsAreaCompany insAreaCompany);
+
     /**
      * 插入子订单 并且修改订单状态
      *

+ 12 - 0
src/main/java/com/ydtech/modules/order/service/InsCrawlerOrderService.java

@@ -47,4 +47,16 @@ public interface InsCrawlerOrderService extends BaseOrderService<Object> {
      * @return Object
      */
     HttpResult<Object> auditStatusQuery(String subOrderNo);
+
+
+    /**
+    * @Description  更新承保状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 17:32
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void verifyPaymentNew(String insAreaCompanyId);
 }

+ 11 - 0
src/main/java/com/ydtech/modules/order/service/InsOrdersTrackService.java

@@ -20,6 +20,17 @@ public interface InsOrdersTrackService extends IService<InsOrdersTrack> {
      */
     void addingTrajectories(InsAreaCompany insAreaCompany);
 
+    /**
+    * @Description 添加轨迹自动填充
+    * @Author  hxl
+    * @Date   2024/3/28 15:54
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    void addingTrajectoriesNew(InsAreaCompany insAreaCompany);
+
     /**
      * 通过订单号查询报价轨迹
      *

+ 9 - 2
src/main/java/com/ydtech/modules/order/service/YongchengOrderApiService.java

@@ -3,7 +3,6 @@ package com.ydtech.modules.order.service;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.esm.model.EsmInsAttachInsure;
-import com.ydtech.modules.ins.model.yc.CallBackRequest;
 import com.ydtech.modules.ins.model.yc.pay.response.AccidentResponse;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
@@ -12,7 +11,6 @@ import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
 
 import java.util.List;
-import java.util.Map;
 
 public interface YongchengOrderApiService {
 
@@ -73,4 +71,13 @@ public interface YongchengOrderApiService {
      */
     HttpResult getPolicyPrintApi(PolicyPrintVo policyPrintVo);
 
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/3/28 17:01
+     *  @Description: 更新承保状态和支付时间
+     */
+    public void callbackAnOrderNew(String insAreaCompanyId);
+
 }

+ 12 - 1
src/main/java/com/ydtech/modules/order/service/ZhongMeiOrderApiService.java

@@ -7,7 +7,6 @@ import com.ydtech.modules.ins.model.ya.CarModelDTO;
 import com.ydtech.modules.order.entity.api.zhongmei.request.ApprovedRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.request.CoverageRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.response.RideAccidentQueryResponse;
-import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
 
@@ -82,4 +81,16 @@ public interface ZhongMeiOrderApiService extends BaseOrderService<AccidentalDriv
      * @return
      */
     HttpResult<List<RideAccidentQueryResponse.RideAccidentDTO>> rideAccidentQuery(GeneralNonCarProductReqVo reqVo);
+
+
+    /**
+    * @Description  更新承保状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 17:06
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void paymentEnquiryNew(String companyId);
 }

+ 10 - 0
src/main/java/com/ydtech/modules/order/service/ZijinOrderApiService.java

@@ -88,4 +88,14 @@ public interface ZijinOrderApiService {
      * @param companyId 子订单号
      */
     HttpResult<Object> auditStatusQuery(String companyId);
+
+    /**
+    * @Description   更新承保状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 17:18
+    * @Param
+    * @Return
+    * @Exception
+    */
+    public void getOrderDetailNew(String companyId);
 }

+ 82 - 0
src/main/java/com/ydtech/modules/order/service/impl/DaJiaOrderServiceImpl.java

@@ -932,5 +932,87 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
         return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);
     }
 
+    /**
+     * 查询订单状态
+     *
+     * @param companyId
+     * @return
+     */
+    @Override
+    public void verifyPaymentNew(String companyId) {
+        try {
+            InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+            //获取公司配置信息
+            DaJiaConfigureParameters daJiaConfigureParameters = new DaJiaConfigureParameters();
+            configureParametersComponents.toEntity(daJiaConfigureParameters, insAreaCompany.getAgreementId());
+            ODR2010Request odr2010Request = new ODR2010Request(insAreaCompany.getInsOrderNo(), daJiaConfigureParameters);
+            ODR2010Response odr2010Response = daJiaRequestApiComponents.verifyPayment(odr2010Request);
+            if (odr2010Response.getStatus().equals(Message.M0000.getCode())) {
+                List<ODR2010Response.ResultDTO> result = odr2010Response.getResult();
+                //是否人工核保
+                if (checkArtificial(result)) {
+                    //是否存在核保退回
+                    if (checkBack(result)) {
+                       // insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
+                       // insAreaCompanyService.updateById(insAreaCompany);
+                    } else
+                        //存在 核保通过 并且 不存在支付连接 则 生成支付连接
+                        if (!checkPayLink(result, insAreaCompany)) {
+                            //核保成功  获取支付二维码
+                            //驾意险 返回数据
+                           // List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS = null;
+                           // if (!Objects.isNull(insAreaCompany.getCrossInsurance())) {
+                           //     policyInfosDTOS = JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()),
+                           //             NVHLODR1001Response.policyInfosDTO.class);
+                           // }
+                            //ODR1011Request odr1011Request = new ODR1011Request(insAreaCompany.getInsOrderNo(), daJiaConfigureParameters,
+                            //        policyInfosDTOS);
+                           // ODR1011Response payNo = daJiaRequestApiComponents.getPayNo(odr1011Request);
+                           // if (payNo.getStatus().equals(Message.M0000.getCode())) {
+                                //获取支付二维码成功  保存支付二维码
+                             //   insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+                             //   insAreaCompany.setPaymentLink(payNo.getResult().getSignInfoUrl());
+                             //   insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+                           // } else {
+                               // return HttpResult.error("获取支付二维码失败");
+                           // }
+                        }
+                }
+                //是否存在保单生成
+                if (checkBdGen(result) && !"3".equals(insAreaCompany.getOrderstatus())) {
+                    List<ODR2010Response.ResultDTO> collect =
+                            result.stream().filter(x -> x.getNotifyType().equals("2009")).collect(Collectors.toList());
+
+                    //如果交强和商业都不为空
+                    if (insAreaCompany.getJqapplyno() != null && insAreaCompany.getSyapplyno() != null) {
+                        if (collect.size() < 2) {
+                          //  return HttpResult.ok("查询订单状态成功");
+                        }
+                    }
 
+                    for (int i = 0, length = collect.size(); i < length; i++) {
+                        //交强或商业 的 保单号
+                        if (collect.get(i).getProdNo().equals(CProdNo.JQ.getCode())) {
+                            insAreaCompany.setJqpolicyno(collect.get(i).getPlyNo());
+                        } else if (collect.get(i).getProdNo().equals(CProdNo.SY.getCode())) {
+                            insAreaCompany.setSypolicyno(collect.get(i).getPlyNo());
+                        } else if (collect.get(i).getProdNo().equals(CProdNo.SY_XNY.getCode())) {
+                            //新能源保单号
+                            insAreaCompany.setSypolicyno(collect.get(i).getPlyNo());
+                        }
+                        //设置签单时间
+                        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+                        LocalDateTime parse = LocalDateTime.parse(collect.get(i).getIssueTm(), formatter);
+                        insAreaCompany.setPayDate(parse);
+                    }
+                    //更新订单状态
+                    insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+                    insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+                }
+            }
+           // return HttpResult.ok("查询订单状态成功");
+        } catch (Exception e) {
+           // throw new RuntimeException(e.getMessage());
+        }
+    }
 }

+ 71 - 0
src/main/java/com/ydtech/modules/order/service/impl/GuorenOrderApiServiceImpl.java

@@ -544,6 +544,9 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
     }
 
 
+
+
+
     @Override
     @Transactional
     public HttpResult callBackApi(HttpServletRequest request) {
@@ -1089,4 +1092,72 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
     }
 
 
+    /**
+     * 更新内部状态和支付时间
+     */
+    @Override
+    @Transactional
+    public void insOrderInfoNew(String companyId) {
+        //子订单
+        InsAreaCompany iac = insAreaCompanyService.getByIdIsExist(companyId);
+        // 获取协议配置信息
+        InsOrderStatusResp iosr = insOrderStatus(iac);
+
+        if (null != iosr && CollUtil.isNotEmpty(iosr.getData())) {
+            InsOrderStatusResp.DataDTO jqDataDTO =
+                    iosr.getData().stream().filter(a -> a.getProposalNo().equals(iac.getJqapplyno())).findFirst().orElse(null);
+            InsOrderStatusResp.DataDTO syDataDTO =
+                    iosr.getData().stream().filter(b -> b.getProposalNo().equals(iac.getSyapplyno())).findFirst().orElse(null);
+
+            //待核保订单处理
+            /**
+            if (iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_AUDIT.getCode())) {
+                //单交
+                boolean jqBoo = null != jqDataDTO && null == syDataDTO && jqDataDTO.getUnderwriteFlag().equals("1");
+                //单商
+                boolean syBoo = null != syDataDTO && null == jqDataDTO && syDataDTO.getUnderwriteFlag().equals("1");
+                //交商
+                boolean jqSyBoo =
+                        null != syDataDTO && null != jqDataDTO && syDataDTO.getUnderwriteFlag().equals("1") && jqDataDTO.getUnderwriteFlag().equals("1");
+                if (jqBoo || syBoo || jqSyBoo) {
+                    iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+                    更新支付链接
+                    SignatureResponse signature = guorenRequestApiComponent.signature(iac);
+                    iac.setPaymentLink(signature.getQrCode());
+
+                    insAreaCompanyService.updateCompanyAndOrdersNew(iac);
+                    return HttpResult.ok();
+                } else {
+                    //return HttpResult.ok("核保状态未更新");
+                }
+
+            }
+            **/
+
+            boolean updateFlag = false;
+            if (null != jqDataDTO && StringUtils.isNotEmpty(jqDataDTO.getPolicyNo())) {
+                iac.setJqpolicyno(jqDataDTO.getPolicyNo());
+                updateFlag = true;
+            }
+            if (null != syDataDTO && StringUtils.isNotEmpty(syDataDTO.getPolicyNo())) {
+                iac.setSypolicyno(syDataDTO.getPolicyNo());
+                updateFlag = true;
+            }
+
+            // 支付
+            if (updateFlag) {
+                //设置支付时间
+                if(iac.getPayDate()==null){
+                    iac.setPayDate(LocalDateTime.now());
+                }
+                iac.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+                guorenRequestApiComponent.queryNoCarPolicyNo(iac);
+                insAreaCompanyService.updateCompanyAndOrdersNew(iac);
+               // return HttpResult.ok("订单已支付,订单状态修改完成");
+            } else {
+               // return HttpResult.error("订单还未支付哦");
+            }
+        }
+    }
+
 }

+ 74 - 0
src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java

@@ -42,6 +42,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -336,6 +337,9 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
      * @param companyId 子订单号
      * @return
      */
+
+
+
     @Override
     public HttpResult<Object> paymentEnquiry(String companyId) {
         InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
@@ -723,6 +727,76 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
                 huaTaiRequestApiComponents.submitStatus(huaTaiSubmitStatusQueryRequest, HuaTaiSubmitStatusQueryResponse.class, huaTaiConfigureParameters.getInsuredCode());
         return submitStatusQueryResponse;
     }
+
+    /**
+    * @Description  更新支付状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 16:49
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void paymentEnquiryNew(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
+
+        // 1. 协议id获取配置实体
+        HuaTaiConfigureParameters huaTaiConfigureParameters = configureParametersComponents.toEntity(HuaTaiConfigureParameters.class,
+                insAreaCompany.getAgreementId());
+
+        if (insAreaCompany.getOrderstatus().equals(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode())) {
+           //  return HttpResult.ok(InsOrderStatusEnum.ACCEPT_INSURANCE.getDesc());
+            return;
+        }
+        // 2. 组装请求体
+        HuaTaiOrderStatusRequest orderStatusRequest = new HuaTaiOrderStatusRequest(insAreaCompany, huaTaiConfigureParameters);
+        orderStatusRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
+        HuaTaiOrderStatusResponse orderStatusResponse = huaTaiRequestApiComponents.orderStatus(orderStatusRequest,
+                HuaTaiOrderStatusResponse.class, huaTaiConfigureParameters.getInsuredCode());
+
+        boolean jqExistFlag = false;
+        boolean syExistFlag = false;
+        String jqFailReason = "";
+        String syFailReason = "";
+        List<HuaTaiOrderStatusResponse.PayDetaiDto> payDetaiList = orderStatusResponse.getPayDetaiList();
+        for (HuaTaiOrderStatusResponse.PayDetaiDto payDetai : payDetaiList) {
+            //交强保单号存值
+            if (StringUtils.isNotEmpty(insAreaCompany.getJqapplyno()) && insAreaCompany.getJqapplyno().equals(payDetai.getBUSINESSNO())) {
+                if ("1".equals(payDetai.getPOLICYSTATUS())) {
+                    jqExistFlag = true;
+                    insAreaCompany.setJqpolicyno(payDetai.getPOLICYNO());
+                } else {
+                    jqFailReason = payDetai.getFAILREASON();
+                }
+            }
+            //商业保单号存值
+            if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno().equals(payDetai.getBUSINESSNO())) {
+                if ("1".equals(payDetai.getPOLICYSTATUS())) {
+                    syExistFlag = true;
+                    insAreaCompany.setSypolicyno(payDetai.getPOLICYNO());
+                } else {
+                    syFailReason = payDetai.getFAILREASON();
+                }
+            }
+        }
+
+        if (jqExistFlag || syExistFlag) {
+            //设置支付时间
+            if(insAreaCompany.getPayDate()==null){
+                insAreaCompany.setPayDate(LocalDateTime.now());
+            }
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+            insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+           // return HttpResult.ok("保单生成成功");
+        } else {
+            if (StringUtils.isNotEmpty(jqFailReason) || StringUtils.isNotEmpty(syFailReason)) {
+              //  return HttpResult.error("保单生成失败,原因为:" + jqFailReason + syFailReason);
+            } else {
+              //  return HttpResult.error("保单生成失败,华泰返回异常,请联系管理员排查!");
+            }
+        }
+    }
 }
 
 

+ 15 - 2
src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java

@@ -2,7 +2,6 @@ package com.ydtech.modules.order.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
 import com.ydtech.exception.SystemException;
 import com.ydtech.modules.order.dao.InsAreaCompanyMapper;
 import com.ydtech.modules.order.entity.InsAreaCompany;
@@ -15,7 +14,6 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.ObjectUtils;
 
-import java.util.Collections;
 import java.util.List;
 
 /**
@@ -57,6 +55,21 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
         insOrdersTrackService.addingTrajectories(insAreaCompany);
         insOrdersService.updateByOrderStatus(insAreaCompany);
     }
+    /**
+    * @Description   新的订单内部状态修改
+    * @Author  xingming
+    * @Date   2024/3/28 15:58
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void updateCompanyAndOrdersNew(InsAreaCompany insAreaCompany) {
+        baseMapper.updateById(insAreaCompany);
+        insOrdersTrackService.addingTrajectoriesNew(insAreaCompany);
+        insOrdersService.updateByOrderStatus(insAreaCompany);
+    }
 
     @Override
     public void insertCompanyAndOrders(InsAreaCompany insAreaCompany) {

+ 40 - 7
src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java

@@ -111,6 +111,11 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         crawlerQuoteRequest.setCoefficient(t.getCoefficient());
         //  折扣
         crawlerQuoteRequest.setDiscount(t.getDiscount());
+        // 上次订单
+        if(StringUtils.isNotEmpty(t.getLastCompanyId())){
+            InsAreaCompany insAreaCompany = insAreaCompanyService.getById(t.getLastCompanyId());
+            crawlerQuoteRequest.setLastOrderNo(insAreaCompany.getInsOrderNo());
+        }
 
         // 发送请求
         CrawlerQuoteResponse response = insCrawlerOrderComponents.request(apiUrl, ptlAgreementAttribution.getInsCompanyId(),
@@ -122,13 +127,6 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         //处理订单信息
         QuoteRespVo responseVo = responseOrder(response, quoteRespVo, ptlAgreementAttribution);
 
-        //添加调用费用匹配功能
-        String insCom = "";
-        if (ptlAgreementAttribution.getInsCompanyId() != null && ptlAgreementAttribution.getInsCompanyId().length() > 4) {
-            insCom = ptlAgreementAttribution.getInsCompanyId().substring(0, 4);
-        }
-        //这里调用费用匹配功能
-//        feeRuleSchemeService.dealFeeOrderInfo(quoteInfoVo, quoteRespVo, ptlAgreementAttribution.getId(), responseVo.getCompanyId());
         return HttpResult.ok("成功", responseVo);
     }
 
@@ -324,6 +322,10 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         //评分
         CrawlerQuoteResponse.OtherDto other = response.getOther();
         quoteRespVo.setILogPreUdwMess(other.getMark());
+        quoteRespVo.setJqScore(other.getJqMark());
+        quoteRespVo.setSyScore(other.getSyMark());
+
+        quoteRespVo.setTotalAdjustRate(Double.parseDouble(other.getDiscount()));
         quoteRespVo.setJqAdjustRate(other.getJqDiscount());
         quoteRespVo.setSyAdjustRate(other.getSyDiscount());
         quoteRespVo.setOrderno(orderNo); //订单号
@@ -419,4 +421,35 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         return HttpResult.ok("核保通过");
     }
 
+
+    @Override
+    public void verifyPaymentNew(String insAreaCompanyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getById(insAreaCompanyId);
+        // 请求地址
+        String apiUrl = ptlCrawlerApiService.getApiUrl(insAreaCompany.getAgreementId(), PtlCrawlerApiType.API_5);
+        //组装参数
+        CrawlerBaseRequest crawlerBaseRequest = new CrawlerBaseRequest(insAreaCompany.getInsOrderNo());
+        CrawlerVerifyPaymentResponse crawlerAuditResponse = insCrawlerOrderComponents.request(apiUrl, insAreaCompany.getCompanyId(),
+                PtlCrawlerApiType.API_5.getDesc(), crawlerBaseRequest, CrawlerVerifyPaymentResponse.class);
+
+        // 0未缴费,1已缴费
+        if (crawlerAuditResponse.getState() == CrawlerVerifyPaymentConstants.PAID) {
+            // 保单号
+            insAreaCompany.setJqpolicyno(crawlerAuditResponse.getJqApplication());
+            insAreaCompany.setSypolicyno(crawlerAuditResponse.getSyApplication());
+
+            //设置支付时间
+            if(insAreaCompany.getPayDate()==null){
+                insAreaCompany.setPayDate(LocalDateTime.now());
+            }
+            // 3 交叉销售
+            List<CrawlerVerifyPaymentResponse.DrivingInsurancesDTO> drivingInsurances = crawlerAuditResponse.getDrivingInsurancesDto();
+            insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsurances)));
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());//已承保
+            insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+           // return HttpResult.ok("支付成功");
+        }
+
+       // throw new SystemException("此订单还未缴费");
+    }
 }

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

@@ -609,6 +609,10 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         if (!Objects.isNull(insFeeOrderNew)) {
             List<QueryOrderFeeResultVo> orderFeeVoList = feeRuleSchemeService.convertOrderFeeVoData(insFeeOrderNew);
             orderAndAreaCompany.setOrderFeeResult(orderFeeVoList);
+            List<FeeOrderNewVo>  feeOrderNewVoList =   feeRuleSchemeService.newConvertOrderFeeVoData(insFeeOrderNew);
+            orderAndAreaCompany.setFeeOrderNewVoList(feeOrderNewVoList);
+            List<DistributionLevelVo> distributionLevelVoList = feeRuleSchemeService.converDistrbutionData(insFeeOrderNew);
+            orderAndAreaCompany.setDistributionLevelVoList(distributionLevelVoList);
         }
         //查询费用审核状态
         List<InsFeeAudit> feeAuditList = insFeeAuditService.query().eq("ins_order_no", companyId).list();

+ 14 - 2
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersTrackServiceImpl.java

@@ -26,8 +26,20 @@ public class InsOrdersTrackServiceImpl extends ServiceImpl<InsOrdersTrackMapper,
         InsOrdersTrack insOrdersTrack = new InsOrdersTrack(insAreaCompany, sysUser.getId(), sysUser.getName());
         this.baseMapper.insert(insOrdersTrack);
     }
-
-
+    /**
+    * @Description  添加轨迹自动填充
+    * @Author  hxl
+    * @Date   2024/3/28 15:53
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void addingTrajectoriesNew(InsAreaCompany insAreaCompany) {
+        InsOrdersTrack insOrdersTrack = new InsOrdersTrack(insAreaCompany, "admin", "自动操作");
+        this.baseMapper.insert(insOrdersTrack);
+    }
 }
 
 

+ 96 - 0
src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java

@@ -754,6 +754,9 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
     /**
      * 补传回调
      */
+
+
+
     @Override
     public HttpResult callbackAnOrder(String quoteOrderNo) {
 
@@ -1353,4 +1356,97 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
     }
 
+     /**
+     * @Description  更新订单状态和支付时间
+     * @Author  xingming
+     * @Date   2024/3/28 16:55
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    @Override
+    public void callbackAnOrderNew(String insAreaCompanyId) {
+
+        InsAreaCompany iac = insAreaCompanyService.getById(insAreaCompanyId);
+        InsOrders order = insOrdersService.getById(iac.getOrderno());
+        //AssertionUtils.isEmpty(iac, "报价订单不存在");
+
+        if (StringUtils.isEmpty(iac.getAgreementId())) {
+           // return HttpResult.error("协议号空");
+        }
+
+        // 获取协议配置信息
+        YcConfigureParameters ycConfigureParameters = gainYcConfigParams(iac.getAgreementId());
+
+        //0 支付回调 1核保回调 5直接返回字符串信息
+        String type = "5";
+        //组装参数
+        CallbackAnOrder o = CallbackAnOrder.buildCallbackAnOrderParam(iac, ycConfigureParameters.gainAuthorityDataXml(), type);
+        //接口请求
+        try {
+            submitPolicy(iac.getJypremium(), ycConfigureParameters, iac.getInsOrderNo());
+            String cleanStr = yongchengRequestApiComponents.payCallback(o);
+            CallBackRequest param = CallBackRequest.buildCallBackParam(cleanStr);
+            log.info("永诚API方式 - 补传回调 - 参数:{},车牌号:{}", JSON.toJSONString(param), order.getLicenseno());
+
+            //成功
+            if (param.getResult().equals("0")) {
+
+                if (iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
+                    /**
+                    buildCallBackStatus(iac, param.getJqstatus());
+                    if (StringUtils.isNotEmpty(param.getBizPolicyNo())) {
+                        iac.setSypolicyno(param.getBizPolicyNo());
+                    }
+
+                    if (StringUtils.isNotEmpty(param.getCiPolicyNo())) {
+                        iac.setJqpolicyno(param.getCiPolicyNo());
+                    }
+
+                    if (StringUtils.isNotEmpty(param.getYwPolicyAppNo())) {
+                        DrivingInsuranceDto drivingInsuranceDto = new DrivingInsuranceDto();
+                        drivingInsuranceDto.setPolicyNumber(param.getYwPolicyNo());
+                        drivingInsuranceDto.setApplicationNumber(param.getYwPolicyAppNo());
+                        JSONArray objects = JSON.parseArray(JSON.toJSONString(Collections.singletonList(drivingInsuranceDto)));
+                        iac.setCrossInsurance(objects);
+                    }
+
+                    if (StringUtils.isNotEmpty(param.getPay_date()) && !"null".equals(param.getPay_date())) {
+                        iac.setPayDate(LocalDateTime.parse(param.getPay_date(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+                    }
+                    **/
+                } else {
+                    iac = buildCallBack(iac, param);
+                }
+                /**
+                if (iac.getOrderstatus().equals(InsOrderStatusEnum.TO_BACK.getCode())) {
+                    iac.setAuditopinion("交强审核意见:" + param.getJqmessage() + "| 商业审核意见:" + param.getSymessage());
+                }
+                **/
+                //设置支付时间
+                if(iac.getPayDate()==null){
+                    iac.setPayDate(LocalDateTime.now());
+                }
+                StringBuffer sss = new StringBuffer();
+                sss.append("变更前订单状态:" + order.getOrderstatus());
+                sss.append("变更前子订单状态:" + iac.getOrderstatus());
+                sss.append("变更后订单状态:" + order.getOrderstatus());
+                log.info("-----------订单状态变动----------:" + sss);
+                insAreaCompanyService.updateCompanyAndOrdersNew(iac);
+
+            } else {
+                //失败原因
+                log.info(String.format("永诚API方式 - 补传回调 - 失败,交强保单号:{} ,商业保单号:{},类型:{}", param.getCiPolicyNo(), param.getBizPolicyNo(),
+                        param.getType()));
+               // return HttpResult.error(param.getMessage());
+            }
+            //return HttpResult.ok("操作成功,状态已更新。");
+        } catch (JsonProcessingException jsonProcessingException) {
+            jsonProcessingException.printStackTrace();
+        }
+
+       // throw new SystemException("获取支付连接失败");
+    }
+
 }

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

@@ -279,7 +279,6 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         insImagesUploadCacheComponents.setUploadImageCache(companyId, insTaskImagesBase64s);
         return HttpResult.ok("上传文件成功");
     }
-
     @Override
     public HttpResult<Object> underwritingCallback(CoverageRequest coverageRequest) {
         try {
@@ -688,6 +687,57 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         return sumAmount;
     }
 
+    /**
+    * @Description  更新投保状态和支付状态
+    * @Author  hxl
+    * @Date   2024/3/28 17:04
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void paymentEnquiryNew(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+
+        // 1. 协议id获取配置实体
+        ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class,
+                insAreaCompany.getAgreementId());
+
+        if (insAreaCompany.getOrderstatus().equals(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode())) {
+            //return HttpResult.ok(InsOrderStatusEnum.ACCEPT_INSURANCE.getDesc());
+            return;
+        }
+
+        // 2. 组装请求体
+        OrderStatusRequest orderStatusRequest = new OrderStatusRequest();
+        orderStatusRequest.setBusinessNo(insAreaCompany.getId());
+        orderStatusRequest.setHead(new BaseRequestHead(zmConfigureParameters));
+
+        OrderStatusResponse orderStatusResponse = zhongmeiRequestApiComponents.orderStatus(orderStatusRequest, OrderStatusResponse.class);
+        String status = orderStatusResponse.getStatus();
+
+        // 3. 承保成功修改状态
+        if (status.equals(String.valueOf(PaymentStatusEnum.P_2.getCode()))) {
+            insAreaCompany.setJqpolicyno(orderStatusResponse.getSubContractNoJ());
+            insAreaCompany.setSypolicyno(orderStatusResponse.getSubContractNoS());
+            String payDate = orderStatusResponse.getPayDate();
+            //支付时间
+            if (StringUtils.isNotEmpty(payDate)) {
+                insAreaCompany.setPayDate(LocalDateTime.parse(payDate, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+            }
+            if (orderStatusResponse.getAccidentPolicyNos() != null) {
+                insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(orderStatusResponse.getAccidentPolicyNos())));
+            }
+            //承保状态
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+            insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+
+            //return HttpResult.ok(PaymentStatusEnum.P_2.getMeaning());
+        }
+
+        //return HttpResult.error(Enum.valueOf(PaymentStatusEnum.class, "P_" + status).getMeaning());
+    }
 }
 
 

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

@@ -391,7 +391,12 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
 
         return HttpResult.ok("撤单成功");
     }
-
+    /**
+     *  @version 
+     *  @author: hxl
+     *  @Date: 2024/3/28 16:03
+     *  @Description:
+     */ 
     @Override
     public HttpResult<Object> paymentCallbacks(PaymentCallbacksRequest paymentCallbacksRequest) {
 
@@ -575,6 +580,46 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
 //        feeRuleSchemeService.dealFeeOrderInfo(quoteInfoVo, quoteRespVo, ptlAgreementAttribution.getId(), insAreaCompany.getId());
         return HttpResult.ok("报价成功", quoteRespVo);
     }
+    /**
+    * @Description  更新订单状态和支付时间
+    * @Author  xingming
+    * @Date   2024/3/28 17:17
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void getOrderDetailNew(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+
+        // 1 通过 协议id获取配置实体
+        HttpHeaders httpHeaders = zijinRequestApiComponents.getHttpHeaders(insAreaCompany.getAgreementId());
+
+        // 2 请求查看订单状态
+        OrderNoRequest orderNoRequest = new OrderNoRequest(insAreaCompany.getId());
+        QueryOrderDetailResponse queryOrderDetailResponse = zijinRequestApiComponents.getOrderDetail(orderNoRequest, httpHeaders);
+        QueryOrderDetailResponse.ResultObjDTO resultObj = queryOrderDetailResponse.getResultObj();
+
+        String orderStatus = resultObj.getOrderStatus();
 
+        // 3. 订单生效以后修改状态
+        if (OrderStatusEnum.O_4.getCode().equals(orderStatus)) {
+            // 3.1 非车险订单存入数据
+            String payTime = resultObj.getPayTime();
+            //更新支付时间
+            if (StringUtils.isNotEmpty(payTime)) {
+                insAreaCompany.setPayDate(LocalDateTime.parse(payTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+            }
 
+            List<DrivingInsuranceDto> drivingInsuranceDto = queryOrderDetailResponse.getDrivingInsuranceDto();
+            insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsuranceDto)));
+            //更新承保状态
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+            insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+           // return HttpResult.ok("订单已支付,订单状态修改完成");
+        }
+
+        //return HttpResult.ok("订单还未支付哦.");
+    }
 }

+ 16 - 8
src/main/java/com/ydtech/modules/xxl/factory/QueryStatusFactory.java

@@ -8,6 +8,7 @@ import com.ydtech.modules.order.components.gouren.GuorenRequestApiComponent;
 import com.ydtech.modules.order.components.huatai.HuaTaiRequestApiComponents;
 import com.ydtech.modules.order.components.yongcheng.YongchengRequestApiComponents;
 import com.ydtech.modules.order.components.zijin.ZijinRequestApiComponents;
+import com.ydtech.modules.order.service.*;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.protocol.service.PtlCrawlerApiService;
 import com.ydtech.modules.xxl.service.BaseQueryStatusService;
@@ -24,38 +25,45 @@ public class QueryStatusFactory {
             return new YongChengQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (YongchengRequestApiComponents) map.get("yongchengRequestApiComponents"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (YongchengOrderApiService) map.get("yongchengOrderApiService"));
         } else if (companyId.startsWith("DJPC1000000")) {
             return new DaJiaQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (DaJiaRequestApiComponents) map.get("daJiaRequestApiComponents"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (DaJiaOrderService) map.get("daJiaOrderService"));
         } else if (companyId.startsWith("XDCX1000000")){
             return new GuoRenQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (GuorenRequestApiComponent) map.get("guorenRequestApiComponent"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (GuorenOrderApiService) map.get("guorenOrderApiService"));
         } else if(companyId.startsWith("HTIC1000000")){
             return new HuaTaiQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (HuaTaiRequestApiComponents) map.get("huaTaiRequestApiComponents"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (HuaTaiOrderApiService) map.get("huaTaiOrderApiService"));
         } else if(companyId.startsWith("ZMBX1000000")){
             return new ZhongMeiQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (ZhongmeiRequestApiComponents) map.get("zhongmeiRequestApiComponents"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (ZhongMeiOrderApiService) map.get("zhongMeiOrderApiService"));
         } else if(companyId.startsWith("ZKIC1000000")){
             return new ZijinQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (ZijinRequestApiComponents) map.get("zijinRequestApiComponents"),
-                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"));
+                    (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
+                    (ZijinOrderApiService) map.get("zijinOrderApiService"));
         } else if(companyId.startsWith("TPBX1000000") || companyId.startsWith("TPIC1000000") || companyId.startsWith("HBIC1000000") || companyId.startsWith("GPIC1000000") ||
                     companyId.startsWith("HNIC1000000") || companyId.startsWith("ZAPA1000000")){
-            return new ReptileQueryStatusService(
+            return new InsCrawlerQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (PtlCrawlerApiService) map.get("ptlCrawlerApiService"),
-                    (InsCrawlerOrderComponents) map.get("insCrawlerOrderComponents"));
+                    (InsCrawlerOrderComponents) map.get("insCrawlerOrderComponents"),
+                    (InsCrawlerOrderService) map.get("insCrawlerOrderService"));
         } else {
             return null;
         }

+ 4 - 6
src/main/java/com/ydtech/modules/xxl/handler/QueryStatusHandler.java

@@ -1,8 +1,6 @@
 package com.ydtech.modules.xxl.handler;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.xxl.job.core.handler.annotation.XxlJob;
-import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
 import com.ydtech.modules.order.components.ConfigureParametersComponents;
 import com.ydtech.modules.order.components.InsCrawlerOrderComponents;
 import com.ydtech.modules.order.components.ZhongmeiRequestApiComponents;
@@ -12,16 +10,13 @@ import com.ydtech.modules.order.components.huatai.HuaTaiRequestApiComponents;
 import com.ydtech.modules.order.components.yongcheng.YongchengRequestApiComponents;
 import com.ydtech.modules.order.components.zijin.ZijinRequestApiComponents;
 import com.ydtech.modules.order.dao.InsOrdersMapper;
-import com.ydtech.modules.order.entity.InsOrders;
-import com.ydtech.modules.order.entity.InsOrdersTrack;
 import com.ydtech.modules.order.service.InsOrdersTrackService;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.protocol.service.PtlCrawlerApiService;
+import com.ydtech.modules.xxl.factory.QueryStatusFactory;
 import com.ydtech.modules.xxl.mapper.XxlInsAreaCompanyMapper;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
-import com.ydtech.modules.xxl.model.QueryStatusResult;
 import com.ydtech.modules.xxl.service.BaseQueryStatusService;
-import com.ydtech.modules.xxl.factory.QueryStatusFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -94,6 +89,8 @@ public class QueryStatusHandler {
                     //根据保险公司编号id获取对应的承保接口的service
                     BaseQueryStatusService queryStatusService = QueryStatusFactory.getQueryStatusService(components, insAreaCompany.getCompanyId());
                     if (queryStatusService != null) {
+                        queryStatusService.updateOrderStatusAndPayDate(insAreaCompany);
+                        /**
                         QueryStatusResult queryStatusResult = queryStatusService.queryStatus(insAreaCompany);
                         if (queryStatusResult.getStatus()) {
                             //更新 ins_area_company
@@ -128,6 +125,7 @@ public class QueryStatusHandler {
                             insOrdersTrack.setCreateTime(LocalDateTime.now());
                             insOrdersTrackService.save(insOrdersTrack);
                         }
+                         **/
                     }
                 } catch (Exception e) {
                     e.printStackTrace();

+ 2 - 0
src/main/java/com/ydtech/modules/xxl/service/BaseQueryStatusService.java

@@ -7,4 +7,6 @@ import org.springframework.stereotype.Service;
 @Service
 public interface BaseQueryStatusService {
     QueryStatusResult queryStatus(InsAreaCompany insAreaCompany);
+
+    void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany);
 }

+ 17 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/DaJiaQueryStatusService.java

@@ -5,6 +5,7 @@ import com.ydtech.modules.order.components.dajia.DaJiaRequestApiComponents;
 import com.ydtech.modules.order.entity.api.dajia.DaJiaConfigureParameters;
 import com.ydtech.modules.order.entity.api.dajia.request.ODR2010Request;
 import com.ydtech.modules.order.entity.api.dajia.response.ODR2010Response;
+import com.ydtech.modules.order.service.DaJiaOrderService;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
@@ -28,6 +29,9 @@ public class DaJiaQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final DaJiaRequestApiComponents daJiaRequestApiComponents;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+    private final DaJiaOrderService daJiaOrderService;
+
+
 
     /**
      *
@@ -64,4 +68,17 @@ public class DaJiaQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        daJiaOrderService.verifyPaymentNew(insAreaCompany.getId());
+    }
 }

+ 15 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/GuoRenQueryStatusService.java

@@ -6,6 +6,7 @@ import com.ydtech.modules.order.components.ConfigureParametersComponents;
 import com.ydtech.modules.order.components.gouren.GuorenRequestApiComponent;
 import com.ydtech.modules.order.entity.api.guoren.constants.PlatformInterfaceCode;
 import com.ydtech.modules.order.entity.api.guoren.request.ApplicationDetailsRequest;
+import com.ydtech.modules.order.service.GuorenOrderApiService;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
 import com.ydtech.modules.xxl.model.QueryStatusResult;
@@ -29,6 +30,7 @@ public class GuoRenQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final GuorenRequestApiComponent guorenRequestApiComponent;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+    private final GuorenOrderApiService  guorenOrderApiService;
 
     public InsOrderStatusResp insOrderStatus(InsAreaCompany iac) {
         ApplicationDetailsRequest applicationDetailsRequest = new ApplicationDetailsRequest();
@@ -76,4 +78,17 @@ public class GuoRenQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        guorenOrderApiService.insOrderInfoNew(insAreaCompany.getId());
+    }
 }

+ 15 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/HuaTaiQueryStatusService.java

@@ -8,6 +8,7 @@ import com.ydtech.modules.order.entity.api.huatai.constants.HuaTaiSubmitCommon;
 import com.ydtech.modules.order.entity.api.huatai.request.HuaTaiSubmitStatusQueryRequest;
 import com.ydtech.modules.order.entity.api.huatai.response.HuaTaiSubmitStatusQueryResponse;
 import com.ydtech.modules.order.entity.config.HuaTaiConfigureParameters;
+import com.ydtech.modules.order.service.HuaTaiOrderApiService;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
@@ -32,6 +33,7 @@ public class HuaTaiQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final HuaTaiRequestApiComponents huaTaiRequestApiComponents;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+    private final HuaTaiOrderApiService huaTaiOrderApiService;
 
     public HuaTaiSubmitStatusQueryResponse submitStatus(InsAreaCompany insAreaCompany,
                                                          HuaTaiConfigureParameters huaTaiConfigureParameters,
@@ -152,4 +154,17 @@ public class HuaTaiQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        huaTaiOrderApiService.paymentEnquiryNew(insAreaCompany.getId());
+    }
 }

+ 23 - 1
src/main/java/com/ydtech/modules/xxl/service/impl/ReptileQueryStatusService.java → src/main/java/com/ydtech/modules/xxl/service/impl/InsCrawlerQueryStatusService.java

@@ -5,6 +5,7 @@ import com.ydtech.modules.order.components.InsCrawlerOrderComponents;
 import com.ydtech.modules.order.entity.crawler.constants.CrawlerVerifyPaymentConstants;
 import com.ydtech.modules.order.entity.crawler.request.CrawlerBaseRequest;
 import com.ydtech.modules.order.entity.crawler.response.CrawlerVerifyPaymentResponse;
+import com.ydtech.modules.order.service.InsCrawlerOrderService;
 import com.ydtech.modules.protocol.entity.constants.PtlCrawlerApiType;
 import com.ydtech.modules.protocol.service.PtlCrawlerApiService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
@@ -18,11 +19,20 @@ import java.time.format.DateTimeFormatter;
 
 @Service
 @RequiredArgsConstructor
-public class ReptileQueryStatusService implements BaseQueryStatusService {
+/**
+ *  @version 爬虫对接
+ *  @author: hxl
+ *  @Date: 2024/3/28 17:38
+ *  @Description:
+ */
+public class InsCrawlerQueryStatusService implements BaseQueryStatusService {
 
     private final ConfigureParametersComponents configureParametersComponents;
     private final PtlCrawlerApiService ptlCrawlerApiService;
     private final InsCrawlerOrderComponents insCrawlerOrderComponents;
+    private final InsCrawlerOrderService insCrawlerOrderService;
+
+
     /**
      *
      * @param insAreaCompany 业务订单
@@ -46,4 +56,16 @@ public class ReptileQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+     /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        insCrawlerOrderService.verifyPaymentNew(insAreaCompany.getId());
+    }
 }

+ 16 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/YongChengQueryStatusService.java

@@ -11,6 +11,7 @@ import com.ydtech.modules.order.components.yongcheng.YongchengRequestApiComponen
 import com.ydtech.modules.order.entity.api.yongcheng.constants.MessageStatusCode;
 import com.ydtech.modules.order.entity.api.yongcheng.request.AccidentUnderwritingRequest;
 import com.ydtech.modules.order.entity.api.yongcheng.response.AccidentUnderwritingResponse;
+import com.ydtech.modules.order.service.YongchengOrderApiService;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
@@ -36,6 +37,8 @@ public class YongChengQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final YongchengRequestApiComponents yongchengRequestApiComponents;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+
+    private final YongchengOrderApiService yongchengOrderApiService;
     public void submitPolicy(BigDecimal jyPremium, YcConfigureParameters ycConfigureParameters, String insOrderNo) throws JsonProcessingException {
         if (jyPremium.compareTo(new BigDecimal(0)) <= 0) {
             return;
@@ -108,4 +111,17 @@ public class YongChengQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        yongchengOrderApiService.callbackAnOrderNew(insAreaCompany.getId());
+    }
 }

+ 18 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/ZhongMeiQueryStatusService.java

@@ -7,6 +7,7 @@ import com.ydtech.modules.order.entity.api.zhongmei.constants.enums.PaymentStatu
 import com.ydtech.modules.order.entity.api.zhongmei.request.OrderStatusRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.response.OrderStatusResponse;
 import com.ydtech.modules.order.entity.config.ZmConfigureParameters;
+import com.ydtech.modules.order.service.ZhongMeiOrderApiService;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
@@ -28,6 +29,10 @@ public class ZhongMeiQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final ZhongmeiRequestApiComponents zhongmeiRequestApiComponents;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+    private final ZhongMeiOrderApiService zhongMeiOrderApiService;
+
+
+
     /**
      *
      * @param insAreaCompany 业务订单
@@ -64,4 +69,17 @@ public class ZhongMeiQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        zhongMeiOrderApiService.paymentEnquiryNew(insAreaCompany.getId());
+    }
 }

+ 17 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/ZijinQueryStatusService.java

@@ -5,6 +5,7 @@ import com.ydtech.modules.order.components.zijin.ZijinRequestApiComponents;
 import com.ydtech.modules.order.entity.api.zijin.constants.enums.OrderStatusEnum;
 import com.ydtech.modules.order.entity.api.zijin.request.OrderNoRequest;
 import com.ydtech.modules.order.entity.api.zijin.response.QueryOrderDetailResponse;
+import com.ydtech.modules.order.service.ZijinOrderApiService;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.xxl.model.InsAreaCompany;
 import com.ydtech.modules.xxl.model.QueryStatusResult;
@@ -25,6 +26,9 @@ public class ZijinQueryStatusService implements BaseQueryStatusService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final ZijinRequestApiComponents zijinRequestApiComponents;
     private final PtlAgreementAttributionService ptlAgreementAttributionService;
+    private final ZijinOrderApiService zijinOrderApiService;
+
+
 
     /**
      *
@@ -55,4 +59,17 @@ public class ZijinQueryStatusService implements BaseQueryStatusService {
         }
         return queryStatusResult;
     }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        zijinOrderApiService.getOrderDetailNew(insAreaCompany.getId());
+    }
 }

+ 1 - 1
src/main/resources/application-prod.yml

@@ -281,7 +281,7 @@ dajia:
 # 渤海财险
 bohai:
   api:
-    url: http://uatwhale.bpic.com.cn/app-intermediary/gatewayFromPlat
+    url: https://esales.bpic.com.cn/app-intermediary/gatewayFromPlat
     selfPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCGw4XAPHi+K+/F1yb4pP3MTSOurAWsV+o2bzeVLaI+L4AYeXWhMSZ/L5yEX1OvpZKkBRD6KeIzDFqlP+wZ3qgt4n8MoaeA4//Zj4TSXbyXVPtFAtpeTidd7oWBJWcydvhtcWXrhBRh9wErYZ6+hCwh10JBWmSbTcDm0qY8PyqusQIDAQAB
     selfPrivateKey: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIbDhcA8eL4r78XXJvik/cxNI66sBaxX6jZvN5Utoj4vgBh5daExJn8vnIRfU6+lkqQFEPop4jMMWqU/7BneqC3ifwyhp4Dj/9mPhNJdvJdU+0UC2l5OJ13uhYElZzJ2+G1xZeuEFGH3ASthnr6ELCHXQkFaZJtNwObSpjw/Kq6xAgMBAAECgYB2odAwNgukfVEJvCjWYYf6PT3YGh60ZIANg0JO1GkqjO4anXFrgLT+6Y7DCJfG296G/N7BGfXCMnHpXqgc7eDlmSy2JVfKzvptgKJBLktP7Yfajg3oY9S8parSK+iyHT6qYqQv6wBmQ3Q9smOp/TM2ndBMDXu9MjoTkNJhrfMDsQJBANbWHciQhazb3Y2DY42hW/zBf7rmmJFrw7aOrEjzw5E+SnGs/vcr3LUWBbSRTYHcoJ+V/kudfwRMlz0SLkfMAvMCQQCglcjNRx35Zw6vNKHE4vTN/ny2gukjvtkzXpPeTUfblrXjK3w3x9aWBZ/MUiphVe5NB8CAtlfYZMo4UG+WMEjLAkA4yHsyydArMinK/5FOm/meQt6p3c0xkpQ2KlurJJLqTtaKWTlCx1scmeeEJGuiCViDFbgS8FvkHQJUZ/vHikq1AkAHbUX/MHXTbg/AzKdaqsB1snpkGoPb0lzLQmmGU36qSjsZSY6SKdzjzVjJo1cwbz/5Mg2WJljDuk2b8yRmBs+nAkEAzoEZmM031u/0KBpukSbqef8JgJOZ0Do9KDbf2P6YuBal6drUeNYVhImKBxQAbjETp9m5TxxW/dkKmHCnc3zqsA==
     boHaiPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCIC3wgJd+7Wue63Qjdh3/uscQSKec2m9gaeCq007kjEiSFES5Tfx75VPSxRj6qk6XN4umHOsHY+W9jkv+Cj4+z3XpPozsRdoj21oxPx8fPJzpVeaUHrEkZtj9Yvo/KhByBK5sRjKmlENXVF3wXVfAg48JZR2XUyUcBdZhR9aHhoQIDAQAB

二進制
src/main/resources/template/finance/accountsReceivable.xlsx


二進制
src/main/resources/template/finance/settlement.xlsx