Kaynağa Gözat

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

haoyu 2 yıl önce
ebeveyn
işleme
f93af3fdc7
96 değiştirilmiş dosya ile 3737 ekleme ve 647 silme
  1. 37 0
      src/main/java/com/ydtech/constants/enums/dict/ser/AnnualAuditOrderEnum.java
  2. 173 73
      src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceImpl.java
  3. 22 11
      src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceNewImpl.java
  4. 45 15
      src/main/java/com/ydtech/modules/fnc/service/impl/InsFeeAuditServiceImpl.java
  5. 3 2
      src/main/java/com/ydtech/modules/ins/model/guoren/InsuranceSlipReq.java
  6. 13 1
      src/main/java/com/ydtech/modules/ins/model/guoren/NonAutoInsOrderReq.java
  7. 16 0
      src/main/java/com/ydtech/modules/ins/model/pingan/respose/PingAnQuoteRespVo.java
  8. 9 4
      src/main/java/com/ydtech/modules/inv/service/impl/InvAccountIncoiceServiceImpl.java
  9. 31 6
      src/main/java/com/ydtech/modules/inv/service/impl/InvAccountServiceImpl.java
  10. 7 12
      src/main/java/com/ydtech/modules/order/aop/aspect/AuditVerificationAspect.java
  11. 2 1
      src/main/java/com/ydtech/modules/order/components/bohai/BoHaiRequestApiComponent.java
  12. 385 143
      src/main/java/com/ydtech/modules/order/components/pingan/PinganRequestApiComponents.java
  13. 2 0
      src/main/java/com/ydtech/modules/order/controller/BoHaiOrderApiController.java
  14. 1 1
      src/main/java/com/ydtech/modules/order/controller/DaJiaOrderController.java
  15. 2 0
      src/main/java/com/ydtech/modules/order/controller/GuoRenOrderApiController.java
  16. 2 0
      src/main/java/com/ydtech/modules/order/controller/HuaTaiOrderApiController.java
  17. 2 0
      src/main/java/com/ydtech/modules/order/controller/InsCrawlerOrderController.java
  18. 47 11
      src/main/java/com/ydtech/modules/order/controller/PingAnOrderApiController.java
  19. 2 0
      src/main/java/com/ydtech/modules/order/controller/YongAnOrderApiController.java
  20. 3 0
      src/main/java/com/ydtech/modules/order/controller/YongChengOrderApiController.java
  21. 2 0
      src/main/java/com/ydtech/modules/order/controller/ZhongMeiOrderApiController.java
  22. 2 0
      src/main/java/com/ydtech/modules/order/controller/ZhongMeiOrderController.java
  23. 2 0
      src/main/java/com/ydtech/modules/order/controller/ZijinOrderApiController.java
  24. 6 1
      src/main/java/com/ydtech/modules/order/entity/api/bohai/request/VehicleTypeQueryRequest.java
  25. 30 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/accept/AcceptResponseCodeEnum.java
  26. 53 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/accept/AcceptResponseStatusCodeEnum.java
  27. 52 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/carConfirm/CarConfirmResponseCodeEnum.java
  28. 26 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/dmvehicleInfo/DmvehicleInfoResponseCodeEnum.java
  29. 37 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/documentStatusList/DocumentStatusListResponseCodeEnum.java
  30. 40 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/index/IndexResposeCodeEnum.java
  31. 49 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/policyPdf/PolicyPdfResponseCodeEnum.java
  32. 62 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/quote/QuoteResponseCodeEnum.java
  33. 34 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/renewalConfirm/RenewalConfirmResponseCodeEnum.java
  34. 31 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/repealDocument/RepealDocumentResponseCodeEnum.java
  35. 29 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/scanCodeURL/ScanCodeURLResponseCodeEnum.java
  36. 32 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/scanCodeURL/ScanCodeURLResponseDocumentTypeCodeEnum.java
  37. 38 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/searchPAVehicleList/SearchPAVehicleListResponseCodeEnum.java
  38. 32 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/serviceContract/ServiceContractResponseCodeEnum.java
  39. 64 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/submitApply/SubmitApplyResponseCodeEnum.java
  40. 33 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/unAutoProductDetail/UnAutoProductDetailResponseCodeEnum.java
  41. 32 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/unAutoProductList/UnAutoProductListResponseCodeEnum.java
  42. 29 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/uploadFiles/UploadFilesResponseCodeEnum.java
  43. 30 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/AcceptRequest.java
  44. 120 37
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/CarConfirmRequest.java
  45. 36 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/DmvehicleInfoRequst.java
  46. 29 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/DocumentStatusListRequest.java
  47. 10 11
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/IndexRequest.java
  48. 3 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/PingAnBaseRequest.java
  49. 37 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/PolicyPdfRequest.java
  50. 58 1
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/QuoteRequest.java
  51. 26 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/RenewalConfirmRequest.java
  52. 24 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/RepealDocumentRequest.java
  53. 34 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/ScanCodeURLRequest.java
  54. 21 1
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/SearchPAVehicleListRequest.java
  55. 24 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/ServiceContractRequest.java
  56. 75 1
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/SubmitApplyRequest.java
  57. 29 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/UnAutoProductDetailRequest.java
  58. 31 1
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/UnAutoProductListRequest.java
  59. 40 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/request/UploadFilesRequest.java
  60. 10 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/response/IndexResponse.java
  61. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/pingan/response/QuoteResponse.java
  62. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/pingan/response/RenewalConfirmResponse.java
  63. 5 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/response/SearchPAVehicleListResponse.java
  64. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/pingan/response/UnAutoProductListResponse.java
  65. 36 67
      src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/Base64Convert.java
  66. 67 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/NetworkUtils.java
  67. 0 134
      src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/PDFUtil.java
  68. 30 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/PinAnEnumUtils.java
  69. 26 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/UUIDUtils.java
  70. 14 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/checkNull/CheckNotEmpty.java
  71. 13 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/checkNull/FieldEmptyException.java
  72. 16 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/checkNull/Validate.java
  73. 69 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/checkNull/Validator.java
  74. 12 0
      src/main/java/com/ydtech/modules/order/entity/vo/CoreModelsVo.java
  75. 84 36
      src/main/java/com/ydtech/modules/order/entity/vo/FeeOrderNewVo.java
  76. 1 1
      src/main/java/com/ydtech/modules/order/entity/vo/OrderVo.java
  77. 56 0
      src/main/java/com/ydtech/modules/order/entity/vo/pingan/PingAnQuoteVo.java
  78. 12 1
      src/main/java/com/ydtech/modules/order/service/BoHaiOrderApiService.java
  79. 99 10
      src/main/java/com/ydtech/modules/order/service/PingAnOrderApiService.java
  80. 9 0
      src/main/java/com/ydtech/modules/order/service/YongAnOrderService.java
  81. 75 16
      src/main/java/com/ydtech/modules/order/service/impl/BoHaiOrderApiServiceImpl.java
  82. 4 2
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java
  83. 731 32
      src/main/java/com/ydtech/modules/order/service/impl/PingAnOrderApiServiceImpl.java
  84. 10 0
      src/main/java/com/ydtech/modules/order/service/impl/YongAnOrderServiceImpl.java
  85. 23 0
      src/main/java/com/ydtech/modules/order/utils/StringSubStringUtils.java
  86. 12 0
      src/main/java/com/ydtech/modules/protocols/entity/po/InsFeeOrderNew.java
  87. 5 0
      src/main/java/com/ydtech/modules/protocols/service/impl/PtlAgreementProductCostsNewServiceImpl.java
  88. 9 1
      src/main/java/com/ydtech/modules/ser/service/impl/SerAnnualAuditOrderServiceImpl.java
  89. 18 1
      src/main/java/com/ydtech/modules/xxl/factory/QueryStatusFactory.java
  90. 1 1
      src/main/java/com/ydtech/modules/xxl/service/BaseQueryStatusService.java
  91. 47 0
      src/main/java/com/ydtech/modules/xxl/service/impl/BoHaiQueryStatusService.java
  92. 45 0
      src/main/java/com/ydtech/modules/xxl/service/impl/PingAnQueryStatusService.java
  93. 46 0
      src/main/java/com/ydtech/modules/xxl/service/impl/YongAnQueryStatusService.java
  94. 2 2
      src/main/resources/application-pre.yml
  95. 1 1
      src/main/resources/application-prod.yml
  96. 0 6
      src/main/resources/mapper/modules/admin/SysUserMapper.xml

+ 37 - 0
src/main/java/com/ydtech/constants/enums/dict/ser/AnnualAuditOrderEnum.java

@@ -0,0 +1,37 @@
+package com.ydtech.constants.enums.dict.ser;
+
+import com.ydtech.aop.request.DictEnum;
+import com.ydtech.constants.enums.dict.IBaseEnum;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+@DictEnum(key = "annualAuditOrderStatus", desc = "年检代办订单状态")
+public enum AnnualAuditOrderEnum implements IBaseEnum {
+
+    UNPAID("1","待支付",0,1),
+
+    AWAIT_ANNUAL("2","待年检",0,1),
+
+    FINISHED("3","订单完成",0,1);
+
+    // 编号
+    private final String code;
+    //说明
+    private final String desc;
+    // 排序
+    private final Integer sort;
+    // 状态  0 启用  1 不启用
+    private final Integer status;
+
+
+    public static AnnualAuditOrderEnum getAnnualAuditOrderEnum(String code) {
+        for (AnnualAuditOrderEnum annualAuditOrderEnum : AnnualAuditOrderEnum.values()) {
+            if (annualAuditOrderEnum.getCode().equals(code)) {
+                return annualAuditOrderEnum;
+            }
+        }
+        return null;
+    }
+}

+ 173 - 73
src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceImpl.java

@@ -2609,80 +2609,180 @@ public class FeeRuleSchemeServiceImpl implements FeeRuleSchemeService {
         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());  // 手续费比例
+    public FeeOrderNewVo newConvertOrderFeeVoData(InsFeeOrderNew insFeeOrderNew) {
+        FeeOrderNewVo feeOrderNewVo = new FeeOrderNewVo();
+        List<FeeOrderNewVo.EntranceFee> entranceFeeList = new ArrayList<>();
+        List<FeeOrderNewVo.ExportFee> exportFeeList = new ArrayList<>();
+        List<FeeOrderNewVo.DeptManagerFee> deptManagerFeeList = new ArrayList<>();
+
+        FeeOrderNewVo.EntranceFee jqEntranceFee = new FeeOrderNewVo.EntranceFee();
+        FeeOrderNewVo.ExportFee jqExportFee = new  FeeOrderNewVo.ExportFee();
+        FeeOrderNewVo.DeptManagerFee jqDeptManagerFee = new FeeOrderNewVo.DeptManagerFee();
+
+        FeeOrderNewVo.EntranceFee syEntranceFee = new FeeOrderNewVo.EntranceFee();
+        FeeOrderNewVo.ExportFee syExportFee = new  FeeOrderNewVo.ExportFee();
+        FeeOrderNewVo.DeptManagerFee syDeptManagerFee = new FeeOrderNewVo.DeptManagerFee();
+
+        FeeOrderNewVo.EntranceFee nonEntranceFee = new FeeOrderNewVo.EntranceFee();
+        FeeOrderNewVo.ExportFee nonExportFee = new  FeeOrderNewVo.ExportFee();
+        FeeOrderNewVo.DeptManagerFee nonDeptManagerFee = new FeeOrderNewVo.DeptManagerFee();
+
+        //入口费用
+        jqEntranceFee.setInsuranceType("交强险");  // 险种
+        jqEntranceFee.setPremium(insFeeOrderNew.getJqPremium());  //保费
+        jqEntranceFee.setTotalAmount(insFeeOrderNew.getJqCostsPremiums());   //总费用
+        jqEntranceFee.setTotalProportion(insFeeOrderNew.getJqCostsProportion()); //总保费
+        jqEntranceFee.setSySuperviseCostsPremiums(insFeeOrderNew.getJqSuperviseCostsPremiums());   //手续费
+        jqEntranceFee.setOtherCostsProportion(insFeeOrderNew.getJqOtherCostsProportion());   // 跟单比例
+        jqEntranceFee.setOtherCostsPremiums(insFeeOrderNew.getJqOtherCostsPremiums());      // 跟单费
+        jqEntranceFee.setSuperviseCosts(insFeeOrderNew.getJqSuperviseCostsProportion());  // 手续费比例
+        entranceFeeList.add(jqEntranceFee);
+
+        //出口费用
+        jqExportFee.setInsuranceType("交强险");  // 险种
+        BigDecimal sumJqDeptPremiums = insFeeOrderNew.getJqDeptPremiumsLevel1()
+                .add(insFeeOrderNew.getJqDeptPremiumsLevel2())
+                .add(insFeeOrderNew.getJqDeptPremiumsLevel3())
+                .add(insFeeOrderNew.getJqDeptPremiumsLevel4())
+                .add(insFeeOrderNew.getJqDeptPremiumsLevel5());
+        BigDecimal jqProportion = insFeeOrderNew.getJqDeptProportionLevel1()
+                .add(insFeeOrderNew.getJqDeptProportionLevel2())
+                .add(insFeeOrderNew.getJqDeptProportionLevel3())
+                .add(insFeeOrderNew.getJqDeptProportionLevel4())
+                .add(insFeeOrderNew.getJqDeptProportionLevel5());
+        jqExportFee.setTotalAmount(sumJqDeptPremiums);
+        jqExportFee.setTotalProportion(jqProportion);
+        if(sumJqDeptPremiums.compareTo(new BigDecimal(4)) > 0) {
+            jqExportFee.setSuperviseCosts(new BigDecimal(4));
+            jqExportFee.setSuperviseCostsPremiums(insFeeOrderNew.getJqPremium().multiply(new BigDecimal(4).divide(new BigDecimal(100))));
+            jqExportFee.setOtherCostsProportion(jqProportion.subtract(new BigDecimal(4)));
+            jqExportFee.setOtherCostsPremiums(sumJqDeptPremiums.subtract(jqExportFee.getSuperviseCostsPremiums()));
+        }else{
+            jqExportFee.setSuperviseCosts(jqProportion);
+            jqExportFee.setSuperviseCostsPremiums(sumJqDeptPremiums);
+            jqExportFee.setOtherCostsProportion(new BigDecimal(0));
+            jqExportFee.setOtherCostsPremiums(new BigDecimal(0));
+        }
+        exportFeeList.add(jqExportFee);
+
+        // 机构管理费
+        jqDeptManagerFee.setInsuranceType("交强险");
+        jqDeptManagerFee.setDeptProportionLevelOne(insFeeOrderNew.getJqDeptProportionLevel1());
+        jqDeptManagerFee.setDeptPremiumsLevelOne(insFeeOrderNew.getJqDeptPremiumsLevel1());
+        jqDeptManagerFee.setDeptProportionLevelTwo(insFeeOrderNew.getJqDeptProportionLevel2());
+        jqDeptManagerFee.setDeptPremiumsLevelTwo(insFeeOrderNew.getJqDeptPremiumsLevel2());
+        jqDeptManagerFee.setDeptProportionLevelThree(insFeeOrderNew.getJqDeptProportionLevel3());
+        jqDeptManagerFee.setDeptPremiumsLevelThree(insFeeOrderNew.getJqDeptPremiumsLevel3());
+        jqDeptManagerFee.setDeptProportionLevelFoure(insFeeOrderNew.getJqDeptProportionLevel4());
+        jqDeptManagerFee.setDeptPremiumsLevelFoure(insFeeOrderNew.getJqDeptPremiumsLevel4());
+        jqDeptManagerFee.setDeptProportionLevelFive(insFeeOrderNew.getJqDeptProportionLevel5());
+        jqDeptManagerFee.setDeptPremiumsLevelFive(insFeeOrderNew.getJqDeptPremiumsLevel5());
+        deptManagerFeeList.add(jqDeptManagerFee);
+
+
+        //商业入口
+        syEntranceFee.setInsuranceType("商业险");  // 险种
+        syEntranceFee.setPremium(insFeeOrderNew.getSyPremium());  //保费
+        syEntranceFee.setTotalProportion(insFeeOrderNew.getSyCostsProportion()); //总保费
+        syEntranceFee.setTotalAmount(insFeeOrderNew.getSyCostsPremiums());   //总费用
+        syEntranceFee.setSySuperviseCostsPremiums(insFeeOrderNew.getSySuperviseCostsPremiums());   //手续费
+        syEntranceFee.setOtherCostsProportion(insFeeOrderNew.getSyOtherCostsProportion());   // 跟单比例
+        syEntranceFee.setOtherCostsPremiums(insFeeOrderNew.getSyOtherCostsPremiums());      // 跟单费
+        syEntranceFee.setSuperviseCosts(insFeeOrderNew.getSySuperviseCostsProportion());  // 手续费比例
+        entranceFeeList.add(syEntranceFee);
+
+        //商业出口
+        syExportFee.setInsuranceType("商业险");  // 险种
+        BigDecimal sumSyDeptPremiums = insFeeOrderNew.getSyDeptPremiumsLevel1()
+                .add(insFeeOrderNew.getSyDeptPremiumsLevel2())
+                .add(insFeeOrderNew.getSyDeptPremiumsLevel3())
+                .add(insFeeOrderNew.getSyDeptPremiumsLevel4())
+                .add(insFeeOrderNew.getSyDeptPremiumsLevel5());
+        BigDecimal syProportion = insFeeOrderNew.getSyPremium().multiply(sumSyDeptPremiums);
+        syExportFee.setTotalAmount(sumSyDeptPremiums);
+        syExportFee.setTotalProportion(syProportion);
+        if(sumSyDeptPremiums.compareTo(new BigDecimal(4)) > 0) {
+            syExportFee.setSuperviseCosts(new BigDecimal(4));
+            syExportFee.setSuperviseCostsPremiums(insFeeOrderNew.getSyPremium().multiply(new BigDecimal(4).divide(new BigDecimal(100))));
+            syExportFee.setOtherCostsProportion(syProportion.subtract(new BigDecimal(4)));
+            syExportFee.setOtherCostsPremiums(sumSyDeptPremiums.subtract(syExportFee.getSuperviseCostsPremiums()));
+        }else{
+            syExportFee.setSuperviseCosts(syProportion);
+            syExportFee.setSuperviseCostsPremiums(sumSyDeptPremiums);
+            syExportFee.setOtherCostsProportion(syProportion.subtract(new BigDecimal(0)));
+            syExportFee.setOtherCostsPremiums(sumSyDeptPremiums.subtract(new BigDecimal(0)));
+        }
+        exportFeeList.add(syExportFee);
+
+
+        // 商业管理费
+        syDeptManagerFee.setInsuranceType("商业险");
+        syDeptManagerFee.setDeptProportionLevelOne(insFeeOrderNew.getSyDeptProportionLevel1());
+        syDeptManagerFee.setDeptPremiumsLevelOne(insFeeOrderNew.getSyDeptPremiumsLevel1());
+        syDeptManagerFee.setDeptProportionLevelTwo(insFeeOrderNew.getSyDeptProportionLevel2());
+        syDeptManagerFee.setDeptPremiumsLevelTwo(insFeeOrderNew.getSyDeptPremiumsLevel2());
+        syDeptManagerFee.setDeptProportionLevelThree(insFeeOrderNew.getSyDeptProportionLevel3());
+        syDeptManagerFee.setDeptPremiumsLevelThree(insFeeOrderNew.getSyDeptPremiumsLevel3());
+        syDeptManagerFee.setDeptProportionLevelFoure(insFeeOrderNew.getSyDeptProportionLevel4());
+        syDeptManagerFee.setDeptPremiumsLevelFoure(insFeeOrderNew.getSyDeptPremiumsLevel4());
+        syDeptManagerFee.setDeptProportionLevelFive(insFeeOrderNew.getSyDeptProportionLevel5());
+        syDeptManagerFee.setDeptPremiumsLevelFive(insFeeOrderNew.getSyDeptPremiumsLevel5());
+        deptManagerFeeList.add(syDeptManagerFee);
+
+
+        //非车入口
+        nonEntranceFee.setInsuranceType("非车险");  // 险种
+        nonEntranceFee.setPremium(insFeeOrderNew.getNoPremium());  //保费
+        nonEntranceFee.setTotalProportion(insFeeOrderNew.getNoCostsProportion()); //总保费
+        nonEntranceFee.setTotalAmount(insFeeOrderNew.getNoCostsPremiums());   //总费用
+        nonEntranceFee.setSySuperviseCostsPremiums(insFeeOrderNew.getNoSuperviseCostsPremiums());   //手续费
+        nonEntranceFee.setOtherCostsProportion(insFeeOrderNew.getNoOtherCostsProportion());   // 跟单比例
+        nonEntranceFee.setOtherCostsPremiums(insFeeOrderNew.getNoOtherCostsPremiums());      // 跟单费
+        nonEntranceFee.setSuperviseCosts(insFeeOrderNew.getNoSuperviseCostsProportion());  // 手续费比例
+        entranceFeeList.add(nonEntranceFee);
+
+        //非车出口
+        nonExportFee.setInsuranceType("非车险");  // 险种
+        BigDecimal sumNonDeptPremiums = insFeeOrderNew.getNoDeptPremiumsLevel1()
+                .add(insFeeOrderNew.getNoDeptPremiumsLevel2())
+                .add(insFeeOrderNew.getNoDeptPremiumsLevel3())
+                .add(insFeeOrderNew.getNoDeptPremiumsLevel4())
+                .add(insFeeOrderNew.getNoDeptPremiumsLevel5());
+        BigDecimal nonProportion = insFeeOrderNew.getNoPremium().multiply(sumNonDeptPremiums);
+        nonExportFee.setTotalAmount(sumNonDeptPremiums);
+        nonExportFee.setTotalProportion(nonProportion);
+        if(sumNonDeptPremiums.compareTo(new BigDecimal(4)) > 0) {
+            nonExportFee.setSuperviseCosts(new BigDecimal(4));
+            nonExportFee.setSuperviseCostsPremiums(insFeeOrderNew.getNoPremium().multiply(new BigDecimal(4).divide(new BigDecimal(100))));
+            nonExportFee.setOtherCostsProportion(nonProportion.subtract(new BigDecimal(4)));
+            nonExportFee.setOtherCostsPremiums(sumNonDeptPremiums.subtract(nonExportFee.getSuperviseCostsPremiums()));
+        }else{
+            nonExportFee.setSuperviseCosts(nonProportion);
+            nonExportFee.setSuperviseCostsPremiums(sumNonDeptPremiums);
+            nonExportFee.setOtherCostsProportion(new BigDecimal(0));
+            nonExportFee.setOtherCostsPremiums(new BigDecimal(0));
+        }
+        exportFeeList.add(nonExportFee);
 
         // 五级管理费
-        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;
+        nonDeptManagerFee.setInsuranceType("非车险");
+        nonDeptManagerFee.setDeptProportionLevelOne(insFeeOrderNew.getNoDeptProportionLevel1());
+        nonDeptManagerFee.setDeptPremiumsLevelOne(insFeeOrderNew.getNoDeptPremiumsLevel1());
+        nonDeptManagerFee.setDeptProportionLevelTwo(insFeeOrderNew.getNoDeptProportionLevel2());
+        nonDeptManagerFee.setDeptPremiumsLevelTwo(insFeeOrderNew.getNoDeptPremiumsLevel2());
+        nonDeptManagerFee.setDeptProportionLevelThree(insFeeOrderNew.getNoDeptProportionLevel3());
+        nonDeptManagerFee.setDeptPremiumsLevelThree(insFeeOrderNew.getNoDeptPremiumsLevel3());
+        nonDeptManagerFee.setDeptProportionLevelFoure(insFeeOrderNew.getNoDeptProportionLevel4());
+        nonDeptManagerFee.setDeptPremiumsLevelFoure(insFeeOrderNew.getNoDeptPremiumsLevel4());
+        nonDeptManagerFee.setDeptProportionLevelFive(insFeeOrderNew.getNoDeptProportionLevel5());
+        nonDeptManagerFee.setDeptPremiumsLevelFive(insFeeOrderNew.getNoDeptPremiumsLevel5());
+        deptManagerFeeList.add(nonDeptManagerFee);
+
+
+        feeOrderNewVo.setEntranceFee(entranceFeeList);
+        feeOrderNewVo.setExportFee(exportFeeList);
+        feeOrderNewVo.setDeptManagerFee(deptManagerFeeList);
+        return feeOrderNewVo;
     }
 
     public List<DistributionLevelVo> converDistrbutionData(InsFeeOrderNew insFeeOrderNew) {
@@ -2719,7 +2819,7 @@ public class FeeRuleSchemeServiceImpl implements FeeRuleSchemeService {
         if(StringUtils.isNotEmpty(firstLevelUserId)){
             SysUser sysUser = sysUserService.getBaseMapper().selectById(firstLevelUserId);
             if(ObjectUtils.isNotEmpty(sysUser)){
-                return sysUser.getName();
+                return sysUser.getName() + "(" + sysUser.getId() + ")";
             }
         }
         return null;

+ 22 - 11
src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceNewImpl.java

@@ -96,14 +96,24 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
     public void verificationCostFactor(InsAreaCompany insAreaCompany,InsOrders insOrders){
 
         List<AgreementProductCosts> agreementProductCosts = ptlAgreementProductCostsNewService.costsGetList(insAreaCompany.getAgreementId(),insOrders.getProductid());
-        if(agreementProductCosts == null || agreementProductCosts.size() == 0){
-            throw new SystemException("协议费用因子为空");
+//        if(agreementProductCosts == null || agreementProductCosts.size() == 0){
+//            throw new SystemException("协议费用因子为空");
+//        }
+        for(int i=0;i<agreementProductCosts.size();i++)
+        {
+            if(agreementProductCosts.get(i).getPriorityLevel()==null){
+                agreementProductCosts.get(i).setPriorityLevel(1);
+            }
+        }
+        if(agreementProductCosts.size() > 0) {
+            //按优先级进行排序
+            Collections.sort(agreementProductCosts, Comparator.comparingInt(AgreementProductCosts::getPriorityLevel).reversed());
+            //遍历费用因子
+            String costsId = verificationCosts(agreementProductCosts, insAreaCompany, insOrders);
+            if(costsId != null) {
+                calcCosts(costsId, insAreaCompany);
+            }
         }
-        //按优先级进行排序
-        Collections.sort(agreementProductCosts, Comparator.comparingInt(AgreementProductCosts::getPriorityLevel).reversed());
-        //遍历费用因子
-        String costsId = verificationCosts(agreementProductCosts, insAreaCompany,insOrders);
-        calcCosts(costsId,insAreaCompany);
     }
 
     /**
@@ -372,21 +382,21 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
                 if(Integer.parseInt(esmRetail.getRetailtype()) >= 3){
                     insFeeOrderNew.setFirstDetailProportion(new BigDecimal(esmRetail.getDisrate1()));
                     insFeeOrderNew.setFirstDetailPremiums(insFeeOrderNew.getJqNoTaxPremium().multiply(new BigDecimal(esmRetail.getDisrate1())).divide(new BigDecimal("100")));
-                    if(parents.size() > 2){
+                    if(parents != null && parents.size() > 2){
                         insFeeOrderNew.setThreeLevelUserId(parents.get(2).getId());
                     }
                 }
                 if(Integer.parseInt(esmRetail.getRetailtype()) >= 2){
                     insFeeOrderNew.setSecondDetailProportion(new BigDecimal(esmRetail.getDisrate2()));
                     insFeeOrderNew.setSecondDetailPremiums(insFeeOrderNew.getJqNoTaxPremium().multiply(new BigDecimal(esmRetail.getDisrate2())).divide(new BigDecimal("100")));
-                    if(parents.size() > 1){
+                    if(parents != null && parents.size() > 1){
                         insFeeOrderNew.setTwoLevelUserId(parents.get(1).getId());
                     }
                 }
                 if(Integer.parseInt(esmRetail.getRetailtype()) >= 1){
                     insFeeOrderNew.setThirdDetailProportion(new BigDecimal(esmRetail.getDisrate3()));
                     insFeeOrderNew.setThirdDetailPremiums(insFeeOrderNew.getJqNoTaxPremium().multiply(new BigDecimal(esmRetail.getDisrate3())).divide(new BigDecimal("100")));
-                    if(parents.size() > 0) {
+                    if(parents != null && parents.size() > 0) {
                         insFeeOrderNew.setFirstLevelUserId(parents.get(0).getId());
                     }
                 }
@@ -458,7 +468,8 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
                 }
             }
         }
-        throw new SystemException("费用因子匹配失败");
+        return null;
+//        throw new SystemException("费用因子匹配失败");
     }
 
 

+ 45 - 15
src/main/java/com/ydtech/modules/fnc/service/impl/InsFeeAuditServiceImpl.java

@@ -110,7 +110,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
 
 
         InsOrders order=insOrdersMapper.selectById(orderNo);
-        InsFeeOrder insFeeOrder=insFeeOrderService.getByInsOrderNo(insFeeAudit.getInsOrderNo());
+        InsFeeOrderNew insFeeOrder=insFeeOrderNewService.getInsFeeOrderNewByCompanyId(insFeeAudit.getInsOrderNo());
         InsAreaCompany insAreaCompany=insAreaCompanyMapper.selectById(insFeeAudit.getInsOrderNo());
 
         //获取该订单的费用
@@ -133,13 +133,13 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         //bigdecimal为null时设置为0
 //        handleBigdecimal(insFeeOrder);
         //生成保司费用(应收费用)
-        gene_orderIncome( order, insFeeOrder,insAreaCompany);
+        gene_orderIncome( order, insFeeOrderNew,insAreaCompany);
         //生成机构费用
-        gene_deptfee( order, insFeeOrder,insAreaCompany);
+        gene_deptfee( order, insFeeOrderNew,insAreaCompany);
         //生成分销费用
-        saveRetail(order,insFeeOrder,insAreaCompany);
+//        saveRetail(order,insFeeOrderNew,insAreaCompany);
         //个代费用生成
-        saveInsCompanyFee(order,insFeeOrder,insAreaCompany);
+//        saveInsCompanyFee(order,insFeeOrderNew,insAreaCompany);
 
 
 //      生成  用户账户表  数据
@@ -284,7 +284,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
      * @param insFeeOrder
      * @throws Exception
      */
-    private void gene_orderIncome( InsOrders order, InsFeeOrder insFeeOrder,InsAreaCompany plyDto) throws Exception{
+    private void gene_orderIncome( InsOrders order, InsFeeOrderNew insFeeOrder,InsAreaCompany plyDto) throws Exception{
 
         InsPlyIncome insPlyIncome =new InsPlyIncome();
         insPlyIncome.setOrderno(order.getOrderno());
@@ -331,7 +331,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
      * @param insFeeOrder
      * @throws Exception
      */
-    private void gene_deptfee( InsOrders order, InsFeeOrder insFeeOrder,InsAreaCompany plyDto) throws Exception{
+    private void gene_deptfee( InsOrders order, InsFeeOrderNew insFeeOrder,InsAreaCompany plyDto) throws Exception{
         InsDeptFee deptFee = new InsDeptFee();
         deptFee.setOrderno(order.getOrderno());
         if(!ObjectUtils.isEmpty(insFeeOrder)){
@@ -349,40 +349,70 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
             deptFee.setPolicyno(plyDto.getJqpolicyno());
             deptFee.setRiskcode("交强");
             deptFee.setLicenseno(order.getLicenseno());
-            geneInsDeptFee(order, insFeeOrder, deptFee);
+            geneJqInsDeptFee(order, insFeeOrder, deptFee);
         }
         if(StringUtils.isNotEmpty(plyDto.getSypolicyno())){
             deptFee.setPolicyno(plyDto.getSypolicyno());
             deptFee.setRiskcode("商业");
             deptFee.setLicenseno(order.getLicenseno());
-            geneInsDeptFee(order, insFeeOrder, deptFee);
+            geneSyInsDeptFee(order, insFeeOrder, deptFee);
         }
 
     }
 
-    private void geneInsDeptFee(InsOrders order, InsFeeOrder insFeeOrder, InsDeptFee deptFee) {
+    private void geneJqInsDeptFee(InsOrders order, InsFeeOrderNew insFeeOrder, InsDeptFee deptFee) {
         if(!ObjectUtils.isEmpty(insFeeOrder)){
-            if (insFeeOrder.getFirstDeptPremiums().doubleValue() > 0) {
+            if (insFeeOrder.getJqDeptPremiumsLevel1().doubleValue() > 0) {
                 deptFee.setComcode(order.getDeptid().substring(0, 2));  //99140302M01D01
                 deptFee.setComlevel("一级");
                 insDeptFeeService.insert(deptFee);
             }
-            if (insFeeOrder.getSecondDeptPremiums().doubleValue() > 0) {
+            if (insFeeOrder.getJqDeptPremiumsLevel2().doubleValue() > 0) {
                 deptFee.setComcode(order.getDeptid().substring(0, 4));  //99140302M01D01
                 deptFee.setComlevel("二级");
                 insDeptFeeService.insert(deptFee);
             }
-            if (insFeeOrder.getThirdDeptPremiums().doubleValue() > 0) {
+            if (insFeeOrder.getJqDeptPremiumsLevel3().doubleValue() > 0) {
                 deptFee.setComcode(order.getDeptid().substring(0, 6));  //99140302M01D01
                 deptFee.setComlevel("三级");
                 insDeptFeeService.insert(deptFee);
             }
-            if (insFeeOrder.getForthDeptPremiums().doubleValue() > 0) {
+            if (insFeeOrder.getJqDeptPremiumsLevel4().doubleValue() > 0) {
                 deptFee.setComcode(order.getDeptid().substring(0, 8));  //99140302M01D01
                 deptFee.setComlevel("四级");
                 insDeptFeeService.insert(deptFee);
             }
-            if (insFeeOrder.getFifthDeptPremiums().doubleValue() > 0) {
+            if (insFeeOrder.getJqDeptPremiumsLevel5().doubleValue() > 0) {
+                deptFee.setComcode(order.getDeptid().substring(0, 11));  //99140302M01D01
+                deptFee.setComlevel("五级");
+                insDeptFeeService.insert(deptFee);
+            }
+        }
+    }
+
+    private void geneSyInsDeptFee(InsOrders order, InsFeeOrderNew insFeeOrder, InsDeptFee deptFee) {
+        if(!ObjectUtils.isEmpty(insFeeOrder)){
+            if (insFeeOrder.getSyDeptPremiumsLevel1().doubleValue() > 0) {
+                deptFee.setComcode(order.getDeptid().substring(0, 2));  //99140302M01D01
+                deptFee.setComlevel("一级");
+                insDeptFeeService.insert(deptFee);
+            }
+            if (insFeeOrder.getSyDeptPremiumsLevel2().doubleValue() > 0) {
+                deptFee.setComcode(order.getDeptid().substring(0, 4));  //99140302M01D01
+                deptFee.setComlevel("二级");
+                insDeptFeeService.insert(deptFee);
+            }
+            if (insFeeOrder.getSyDeptPremiumsLevel3().doubleValue() > 0) {
+                deptFee.setComcode(order.getDeptid().substring(0, 6));  //99140302M01D01
+                deptFee.setComlevel("三级");
+                insDeptFeeService.insert(deptFee);
+            }
+            if (insFeeOrder.getSyDeptPremiumsLevel4().doubleValue() > 0) {
+                deptFee.setComcode(order.getDeptid().substring(0, 8));  //99140302M01D01
+                deptFee.setComlevel("四级");
+                insDeptFeeService.insert(deptFee);
+            }
+            if (insFeeOrder.getSyDeptPremiumsLevel5().doubleValue() > 0) {
                 deptFee.setComcode(order.getDeptid().substring(0, 11));  //99140302M01D01
                 deptFee.setComlevel("五级");
                 insDeptFeeService.insert(deptFee);

+ 3 - 2
src/main/java/com/ydtech/modules/ins/model/guoren/InsuranceSlipReq.java

@@ -3,6 +3,7 @@ package com.ydtech.modules.ins.model.guoren;
 import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.constants.enums.InsuranceRisk;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
 import com.ydtech.modules.order.entity.api.guoren.constants.GuoRenRiskCode;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
@@ -95,12 +96,12 @@ public class InsuranceSlipReq {
         req.setPrpTinsured(prpTinsured);
 
         List<PremiumResp.DataDTO.CiPrptenagesDTO> ciPrptenages = specialAgreementVo.stream()
-                .filter(x -> GuoRenRiskCode.R_0507.getCode().equals(x.getRiskCode()))
+                .filter(x -> InsuranceRisk.TRAFFIC.getCode().equals(x.getRiskCode()))
                 .map(PremiumResp.DataDTO.CiPrptenagesDTO::new)
                 .collect(Collectors.toList());
 
         List<PremiumResp.DataDTO.BiPrptenagesDTO> biPrptenages = specialAgreementVo.stream()
-                .filter(x -> GuoRenRiskCode.R_0518.getCode().equals(x.getRiskCode()))
+                .filter(x -> InsuranceRisk.BUSINESS.getCode().equals(x.getRiskCode()))
                 .map(PremiumResp.DataDTO.BiPrptenagesDTO::new)
                 .collect(Collectors.toList());
 

+ 13 - 1
src/main/java/com/ydtech/modules/ins/model/guoren/NonAutoInsOrderReq.java

@@ -3,6 +3,7 @@ package com.ydtech.modules.ins.model.guoren;
 import cn.hutool.core.date.DateUtil;
 import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.constants.enums.dict.insurance.VehicleType;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
 import com.ydtech.modules.ins.model.vo.RiskInfoVo;
@@ -349,6 +350,10 @@ public class NonAutoInsOrderReq {
                 @JSONField(name = "carModels")
                 private String carModels;
 
+                @JsonProperty(value = "carCategory")
+                @JSONField(name = "carCategory")
+                private String carCategory;
+
                 @JsonProperty(value = "carType")
                 @JSONField(name = "carType")
                 private String carType;
@@ -387,8 +392,15 @@ public class NonAutoInsOrderReq {
 
                 public ObjCarListDTO(CarInfoVo carInfo, VinQueryResp.DataDTO vinQ) {
                     this.carModels = vinQ.getBrandNameBC();
-                    this.carType = "0";
+                    this.carType = carInfo.getCartype();
                     this.carTypeCode = "8A";
+                    //设置车辆大类
+                    if(VehicleType.VT_A0.getCode().equals(carInfo.getCimodelclass())){
+                        this.carCategory = "A";
+                    }else if(VehicleType.VT_A1.getCode().equals(carInfo.getCimodelclass())) {
+                        this.carCategory = "H";
+                    }
+
                     this.clnt = StringUtils.isNotEmpty(carInfo.getLicenseNo()) ? "2" : "1";
                     this.frameNo = carInfo.getFrameNo();
                     this.licenseNo = carInfo.getLicenseNo();

+ 16 - 0
src/main/java/com/ydtech/modules/ins/model/pingan/respose/PingAnQuoteRespVo.java

@@ -0,0 +1,16 @@
+package com.ydtech.modules.ins.model.pingan.respose;
+
+
+import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.entity.api.pingan.response.QuoteResponse;
+import lombok.Data;
+
+@Data
+public class PingAnQuoteRespVo extends QuoteRespVo {
+
+    // 财意险保费
+    QuoteResponse.AhsUpcActualPremiumDTO ahsUpcActualPremium =new QuoteResponse.AhsUpcActualPremiumDTO();
+    // 小微险保费
+    QuoteResponse.XwActualPremiumDTO xwActualPremium = new QuoteResponse.XwActualPremiumDTO();
+
+}

+ 9 - 4
src/main/java/com/ydtech/modules/inv/service/impl/InvAccountIncoiceServiceImpl.java

@@ -76,7 +76,8 @@ public class InvAccountIncoiceServiceImpl extends ServiceImpl<InvAccountIncoiceM
         invAccountIncoice.setTax(noHasTax.toString());
         //不含税金额
         invAccountIncoice.setNoHasTax(tax.toString());
-
+        //进账金额
+        invAccountIncoice.setPayoutMoney("0");
         return HttpResult.ok(invAccountIncoiceMapper.insert(invAccountIncoice));
     }
 
@@ -257,9 +258,6 @@ public class InvAccountIncoiceServiceImpl extends ServiceImpl<InvAccountIncoiceM
         if (invAccountIncoice.getInvoiceMoney().isEmpty()) {
             throw new SystemException("请填写开票金额");
         }
-        if (invAccountIncoice.getPayoutMoney().isEmpty()) {
-            throw new SystemException("请填写进账金额");
-        }
         //税率百分数转为小数
         BigDecimal divide = new BigDecimal(invAccountIncoice.getRate()).divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP);
         //税额
@@ -469,6 +467,13 @@ public class InvAccountIncoiceServiceImpl extends ServiceImpl<InvAccountIncoiceM
             invAccountIncoiceResult1.setTotal(invAccountIncoicePage.getTotal());
             invAccountIncoiceResult1.setSize(invAccountIncoice.getPageSize());
             return invAccountIncoiceResult1;
+        } else {
+            invAccountIncoiceResult.setInvoiceNumSum(invAccountIncoiceResult.getInvoiceNumSum().setScale(2, RoundingMode.HALF_UP));
+            invAccountIncoiceResult.setInvoiceMoneySum(invAccountIncoiceResult.getInvoiceMoneySum().setScale(2, RoundingMode.HALF_UP));
+            invAccountIncoiceResult.setTaxSum(invAccountIncoiceResult.getTaxSum().setScale(2, RoundingMode.HALF_UP));
+            invAccountIncoiceResult.setNoHasTaxSum(invAccountIncoiceResult.getNoHasTaxSum().setScale(2, RoundingMode.HALF_UP));
+            invAccountIncoiceResult.setNotPayoutMoneySum(invAccountIncoiceResult.getNotPayoutMoneySum().setScale(2, RoundingMode.HALF_UP));
+            invAccountIncoiceResult.setPayoutMoneySum(invAccountIncoiceResult.getPayoutMoneySum().setScale(2, RoundingMode.HALF_UP));
         }
         invAccountIncoiceResult.setRecords(invAccountIncoicePage.getRecords());
         invAccountIncoiceResult.setCurrent(invAccountIncoice.getPageNo());

+ 31 - 6
src/main/java/com/ydtech/modules/inv/service/impl/InvAccountServiceImpl.java

@@ -25,6 +25,8 @@ import org.springframework.stereotype.Service;
 
 import java.io.File;
 import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.DecimalFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -66,6 +68,17 @@ public class InvAccountServiceImpl extends ServiceImpl<InvAccountMapper, InvAcco
 
         List<InvAccount> invAccountIPage = insAccountMapper.selectAccountsListPage(invAccountQueryVo);
 
+        for (InvAccount invAccount : invAccountIPage) {
+            if (invAccount.getInvoicingAmountExcess() != null) {
+                String invoicingAmountExcess = invAccount.getInvoicingAmountExcess();
+                BigDecimal amount = new BigDecimal(invoicingAmountExcess);
+                BigDecimal roundedAmount = amount.setScale(2, RoundingMode.HALF_UP);
+                invAccount.setInvoicingAmountExcess(roundedAmount.toString());
+            } else {
+                invAccount.setInvoicingAmountExcess(null);
+            }
+        }
+
 
         //计算当前季度剩余300000减去
         invAccountQueryVo.setInvoiceTimeStart(LocalDateTimeUtils.quarterStartTime());
@@ -102,7 +115,10 @@ public class InvAccountServiceImpl extends ServiceImpl<InvAccountMapper, InvAcco
                         .findFirst()
                         .map(ord -> {
                             if (ord.getSumInvoicingAmount() != null) {
-                                rel.setSumInvoicingAmount(new BigDecimal(rel.getSumInvoicingAmount()).add(new BigDecimal(ord.getSumInvoicingAmount())).toString());
+                                BigDecimal sumInvoicingAmountDecimal = new BigDecimal(rel.getSumInvoicingAmount()).add(new BigDecimal(ord.getSumInvoicingAmount()));
+                                DecimalFormat df = new DecimalFormat("0.00");
+                                String sumInvoicingAmountString = df.format(sumInvoicingAmountDecimal);
+                                rel.setSumInvoicingAmount(sumInvoicingAmountString);
                             }
                             return rel;
                         }).orElse(null)
@@ -127,8 +143,11 @@ public class InvAccountServiceImpl extends ServiceImpl<InvAccountMapper, InvAcco
             boolean found = false;
             for (InvAccountSumAmount yearAmount : sumYearAmount) {
                 if (yearAmount.getAccountId().equals(invAccount.getAccountId())) {
-                    invAccount.setYearAmount(yearAmount.getYearAmount());
-                    invAccount.setQuarterAmount(yearAmount.getQuarterAmount());
+                    DecimalFormat df = new DecimalFormat("0.00");
+                    String formattedYearAmount = df.format(Double.parseDouble(yearAmount.getYearAmount()));
+                    String formattedQuarterAmount = df.format(Double.parseDouble(yearAmount.getQuarterAmount()));
+                    invAccount.setYearAmount(formattedYearAmount);
+                    invAccount.setQuarterAmount(formattedQuarterAmount);
                     found = true;
                 }
             }
@@ -235,7 +254,10 @@ public class InvAccountServiceImpl extends ServiceImpl<InvAccountMapper, InvAcco
                         .findFirst()
                         .map(ord -> {
                             if (ord.getSumInvoicingAmount() != null) {
-                                rel.setSumInvoicingAmount(new BigDecimal(rel.getSumInvoicingAmount()).add(new BigDecimal(ord.getSumInvoicingAmount())).toString());
+                                BigDecimal sumSumInvoicingAmountDecimal = new BigDecimal(rel.getSumInvoicingAmount()).add(new BigDecimal(ord.getSumInvoicingAmount()));
+                                DecimalFormat df = new DecimalFormat("0.00");
+                                String sumQuarterAmountExcessString = df.format(sumSumInvoicingAmountDecimal);
+                                rel.setSumInvoicingAmount(sumQuarterAmountExcessString);
                             }
                             return rel;
                         }).orElse(null)
@@ -281,8 +303,11 @@ public class InvAccountServiceImpl extends ServiceImpl<InvAccountMapper, InvAcco
                 boolean found = false;
                 for (InvAccountSumAmount yearAmount : sumYearAmount) {
                     if (yearAmount.getAccountId().equals(invAccount.getAccountId())) {
-                        accountExcel.setYearAmount(yearAmount.getYearAmount());
-                        accountExcel.setQuarterAmount(yearAmount.getQuarterAmount());
+                        DecimalFormat df = new DecimalFormat("0.00");
+                        String formattedYearAmount = df.format(Double.parseDouble(yearAmount.getYearAmount()));
+                        String formattedQuarterAmount = df.format(Double.parseDouble(yearAmount.getQuarterAmount()));
+                        accountExcel.setYearAmount(formattedYearAmount);
+                        accountExcel.setQuarterAmount(formattedQuarterAmount);
                         found = true;
                     }
                 }

+ 7 - 12
src/main/java/com/ydtech/modules/order/aop/aspect/AuditVerificationAspect.java

@@ -2,23 +2,16 @@ package com.ydtech.modules.order.aop.aspect;
 
 
 import com.alibaba.fastjson.JSONObject;
-import com.ydtech.constants.sys.SystemConstant;
-import com.ydtech.exception.SystemException;
-import com.ydtech.modules.admin.model.SysUserRole;
 import com.ydtech.modules.admin.service.SysUserRoleService;
-import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.fee.service.FeeRuleSchemeNewService;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
-import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.SpecialAuditVo;
 import com.ydtech.modules.order.service.InsAreaCompanyService;
 import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.protocol.service.PtlAgreementDeptService;
 import com.ydtech.modules.protocol.service.impl.TaxSourceServiceImpl;
-import com.ydtech.utils.StringUtils;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.aspectj.lang.JoinPoint;
@@ -26,8 +19,6 @@ import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Before;
 import org.springframework.stereotype.Component;
 
-import java.util.Arrays;
-
 @Slf4j
 @Aspect
 @Component
@@ -56,16 +47,20 @@ public class AuditVerificationAspect {
             if (arg instanceof SpecialAuditVo) {
                 JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(arg));
                 companyId = jsonObject.getString("companyId");
-            }else {
+            } else {
                 //接收保险公司id参数
                 companyId = arg.toString();
             }
             InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
             InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
             //先进行承保规则判断
-            feeRuleSchemeNewService.verificationRuleFactor(insAreaCompany, insOrders);
+//            feeRuleSchemeNewService.verificationRuleFactor(insAreaCompany, insOrders);
             //再进行费用因子判断
-            feeRuleSchemeNewService.verificationCostFactor(insAreaCompany, insOrders);
+            try {
+                feeRuleSchemeNewService.verificationCostFactor(insAreaCompany, insOrders);
+            } catch (Exception ignored) {
+
+            }
         }
     }
 

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

@@ -128,7 +128,8 @@ public class BoHaiRequestApiComponent {
         if (ResponseCode.R_Z00001.getCode().equals(response.getResponseCode())) {
             return response;
         }
-        throw new SystemException(response.getResponseMsg());
+       // throw new SystemException(response.getResponseMsg());
+        return response;
     }
 
     /**

+ 385 - 143
src/main/java/com/ydtech/modules/order/components/pingan/PinganRequestApiComponents.java

@@ -6,11 +6,30 @@ import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.serializer.SerializerFeature;
 import com.ydtech.config.properties.PingAnApiConfigurationProperties;
 import com.ydtech.constants.InsuranceEnum;
+import com.ydtech.exception.SystemException;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.order.entity.api.pingan.constants.RequestUrl;
+import com.ydtech.modules.order.entity.api.pingan.constants.accept.AcceptResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.carConfirm.CarConfirmResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.dmvehicleInfo.DmvehicleInfoResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.documentStatusList.DocumentStatusListResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.index.IndexResposeCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.policyPdf.PolicyPdfResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.quote.QuoteResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.renewalConfirm.RenewalConfirmResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.repealDocument.RepealDocumentResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.scanCodeURL.ScanCodeURLResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.searchPAVehicleList.SearchPAVehicleListResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.serviceContract.ServiceContractResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.submitApply.SubmitApplyResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.unAutoProductDetail.UnAutoProductDetailResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.unAutoProductList.UnAutoProductListResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.uploadFiles.UploadFilesResponseCodeEnum;
 import com.ydtech.modules.order.entity.api.pingan.request.*;
 import com.ydtech.modules.order.entity.api.pingan.response.*;
+import com.ydtech.modules.order.entity.api.pingan.utils.PinAnEnumUtils;
 import com.ydtech.modules.order.entity.api.pingan.utils.RSAPINGANUtils;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
 import com.ydtech.modules.order.entity.filter.CarModelsFilterUtils;
 import com.ydtech.modules.order.utils.InsuranceLog;
 import com.ydtech.utils.RequestIdUtils;
@@ -30,50 +49,47 @@ import java.util.TreeMap;
 import java.util.TreeSet;
 
 /**
- *  @version
- *  @author: hxl
- *  @Date: 2024/3/26 14:19
- *  @Description:  平安接口请求封装
- *
- *  除北京、上海、深圳以外的地区
+ * @author: hxl
+ * @Date: 2024/3/26 14:19
+ * @Description: 平安接口请求封装
+ * <p>
+ * 除北京、上海、深圳以外的地区
  * index  --》carConfirm---》quote--》submitApply--》signEleApply--》getApplyVerifyCode--》recoverApplyVerifyCode--》noticeDo
  * 商业险通融报价(仅限调整折扣,部分报价拦截返回推荐折扣、手续费等信息时,其余报价拦截等通融暂不支持)
  * index--》carConfirm--》quote--》quote (包含通融报价参数)--》 submitApply--》noticeDo
  * 继续支付流程(引导跳转到平安页面完成后续流程)
  * index--》carConfirm--》quote --》submitApply--》viewToPay
- *
- *
- *  接口协议:HTTPS
+ * <p>
+ * <p>
+ * 接口协议:HTTPS
  * HTTP请求方式:POST
  * Content-Type:application/json;charset=utf-8;Accept:application/json;charset=utf-8
  * 接口权限校验方式:令牌
  * 接口调用地址:见附录
- *  接口调用举例
+ * 接口调用举例
  * 1、使用平安分配的client_id和client_secret,调用令牌地址获得令牌
  * https://test-api.pingan.com.cn:20443/oauth/oauth2/access_token?client_id={client_id} &grant_type=client_credentials&client_secret={client_secret}
  * 返回:
  * {
- *     "ret": "0",
- *     "data": {
- *         "expires_in": "1438",【令牌有效时长(分钟)】
- *         "openid": "***",
- *         "access_token": "3FFC24C8374D4274844BD714BF01A93D"
- *     },
- *     "msg": ""
+ * "ret": "0",
+ * "data": {
+ * "expires_in": "1438",【令牌有效时长(分钟)】
+ * "openid": "***",
+ * "access_token": "3FFC24C8374D4274844BD714BF01A93D"
+ * },
+ * "msg": ""
  * }
  * 2、发起接口调用
  * https://test-api.pingan.com.cn:20443/open/appsvr/{各接口地址}?access_token={令牌}&request_id={请求随机流水号}
  * 返回(返回内容均在data节点中):
  * {
- * 	"ret":"0",
- * 		"msg":"",
- * 		"requestId":"{请求随机流水号}",
- * 		"data":{
- *
- * 		        }
+ * "ret":"0",
+ * "msg":"",
+ * "requestId":"{请求随机流水号}",
+ * "data":{
+ * <p>
+ * }
  * }
- *
- *
  */
 @Component
 @RequiredArgsConstructor
@@ -84,42 +100,45 @@ public class PinganRequestApiComponents {
     private final PingAnApiConfigurationProperties properties;
 
     public static final Logger logger = LoggerFactory.getLogger(PinganRequestApiComponents.class);
+
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/3/26 14:52
-     *  @Description: 通过客户端id和客户端密钥获取令牌
+     * @version
+     * @author: hxl
+     * @Date: 2024/3/26 14:52
+     * @Description: 通过客户端id和客户端密钥获取令牌
      */
-    private  String  getToken(String url){
+    private String getToken(String url) throws Exception {
         HttpHeaders headers = new HttpHeaders();
         HttpEntity<String> entity = new HttpEntity<>(headers);
         RestTemplate restTemplate = new RestTemplate();
         String clientId = properties.getClientId();
         String clientSecret = properties.getClientSecret();
-        logger.info("客户端id=========="+clientId);
-        logger.info("客户端密钥=========="+clientSecret);
-        if((clientId!=null && !"".equals(clientId)) &&  (clientSecret==null && !"".equals(clientSecret)) ){
-            url=url+"?client_id="+clientId+"&grant_type=client_credentials&client_secret="+clientSecret;
-            ResponseEntity<JSONObject> response = restTemplate.exchange(url , HttpMethod.GET, entity, JSONObject.class);
-            JSONObject body = response.getBody();
-            TokenResponse token = JSON.toJavaObject(body, TokenResponse.class);
-            if(token!=null){
-                String expiresIn = token.getData().getExpires_in();
-                if(expiresIn!=null && Integer.parseInt(expiresIn)>0){
-                    return token.getData().getAccess_token();
-                }else{
-                    logger.error("令牌已过期");
-                    return null;
+        logger.info("客户端id==========" + clientId);
+        logger.info("客户端密钥==========" + clientSecret);
+        if ((clientId != null && !"".equals(clientId)) && (clientSecret == null && !"".equals(clientSecret))) {
+            url = url + "?client_id=" + clientId + "&grant_type=client_credentials&client_secret=" + clientSecret;
+            try {
+                ResponseEntity<JSONObject> response = restTemplate.exchange(url, HttpMethod.GET, entity, JSONObject.class);
+                JSONObject body = response.getBody();
+                TokenResponse token = JSON.toJavaObject(body, TokenResponse.class);
+                if (token != null) {
+                    String expiresIn = token.getData().getExpires_in();
+                    if (expiresIn != null && Integer.parseInt(expiresIn) > 0) {
+                        return token.getData().getAccess_token();
+                    } else {
+                        throw new SystemException("令牌已过期");
+                    }
+                } else {
+                    throw new SystemException("返回值为空,请检查访问路径以及参数!!!");
                 }
-            }else{
-                logger.error("返回值为空,请检查访问路径以及参数!!!");
-                return null;
+            }catch (Exception e) {
+                throw new SystemException("接口请求异常,请检查请求路径以及参数");
             }
-        }else{
-            logger.error("clientId或clientSecret值为空,请检查配置!!!");
-            return null;
+        } else {
+            throw new SystemException("clientId或clientSecret值为空,请检查配置!!!");
         }
     }
+
     /**
      * 加密请求
      *
@@ -130,102 +149,172 @@ public class PinganRequestApiComponents {
      * @param <S>    Response 响应体
      * @return <S>
      */
-   private <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S post(Q q, String url, Class<S> tClass, RequestUrl requestUrl) throws Exception {
-       HttpHeaders httpHeaders = new HttpHeaders();
-       //设置请求头类型
-       httpHeaders.add("Content-Type","application/json;charset=utf-8");
-       httpHeaders.add("Accept","application/json;charset=utf-8");
-       String busReqString = JSON.toJSONString(q, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
-       //打印入参参数
-       InsuranceLog.infoLog(InsuranceEnum.PAIC.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
-               requestUrl.getCode()+"--"+requestUrl.getUrl()+"--"+requestUrl.getDesc(), url, busReqString);
+    private <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S post(Q q, String url, Class<S> tClass, RequestUrl requestUrl) throws Exception {
+        HttpHeaders httpHeaders = new HttpHeaders();
+        //设置请求头类型
+        httpHeaders.add("Content-Type", "application/json;charset=utf-8");
+        httpHeaders.add("Accept", "application/json;charset=utf-8");
+        String busReqString = JSON.toJSONString(q, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
+        //打印入参参数
+        InsuranceLog.infoLog(InsuranceEnum.PAIC.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
+                requestUrl.getCode() + "--" + requestUrl.getUrl() + "--" + requestUrl.getDesc(), url, busReqString);
 
-       JSONObject jsonObject = (JSONObject) JSON.toJSON(q);
-       //获取令牌token
-       String token = getToken(properties.getAccessUrl());
-       if(token==null){
-           logger.error("获取令牌接口失败!!!");
-           throw new IllegalArgumentException("获取令牌接口失败");
-       }
-       //拼接token和请求id
-        url=url+"/"+requestUrl.getUrl()+"?access_token="+token+"&request_id="+ RequestIdUtils.createID(requestUrl.getCode());
+        JSONObject jsonObject = (JSONObject) JSON.toJSON(q);
+        String token = null;
+        try{
+            //获取令牌token
+            token = getToken(properties.getAccessUrl());
+        }catch (Exception e){
+            throw new SystemException("接口请求异常,请检查请求路径以及参数");
+        }
+
+        if (token == null) {
+            throw new SystemException("获取令牌接口失败");
+        }
+        //拼接token和请求id
+        url = url + "/" + requestUrl.getUrl() + "?access_token=" + token + "&request_id=" + RequestIdUtils.createID(requestUrl.getCode());
         HttpEntity<String> httpEntity = new HttpEntity<>(jsonObject.toJSONString(), httpHeaders);
-        ResponseEntity<String> response = restTemplate.postForEntity(url, httpEntity, String.class);
-        String body = response.getBody();
-        InsuranceLog.infoLog(InsuranceEnum.PAIC.getPinyin(), "\n\t---------> {} \n\t---------> 返回数据:{}", requestUrl.getCode()+"--"+requestUrl.getUrl()+"--"+requestUrl.getDesc(), body);
-       return JSON.parseObject(body).toJavaObject(tClass);
-   }
+        try{
+            ResponseEntity<String> response = restTemplate.postForEntity(url, httpEntity, String.class);
+            String body = response.getBody();
+            InsuranceLog.infoLog(InsuranceEnum.PAIC.getPinyin(), "\n\t---------> {} \n\t---------> 返回数据:{}", requestUrl.getCode() + "--" + requestUrl.getUrl() + "--" + requestUrl.getDesc(), body);
+            return JSON.parseObject(body).toJavaObject(tClass);
+        }catch (Exception e){
+            throw new SystemException("接口请求异常,请检查请求路径以及参数");
+        }
+    }
+
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/3/26 16:07
-     *  @Description: 接口分装
+     * @version
+     * @author: hxl
+     * @Date: 2024/3/26 16:07
+     * @Description: 接口分装
      */
     public <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S verificationResponse(Q q, String url, Class<S> tClass,
-                                                                                            RequestUrl requestUrl) throws Exception {
+                                                                                              RequestUrl requestUrl) throws Exception {
         S response = post(q, url, tClass, requestUrl);
-        if("001".equals(requestUrl.getCode())){
-             //处理models[]数据会使用RSA公钥进行加密,合作伙伴使用RSA私钥进行解密
-            SearchPAVehicleListResponse res=(SearchPAVehicleListResponse)response;
+        if ("001".equals(requestUrl.getCode())) {
+            //处理models[]数据会使用RSA公钥进行加密,合作伙伴使用RSA私钥进行解密
+            SearchPAVehicleListResponse res = (SearchPAVehicleListResponse) response;
             String modelsStr = JSON.toJSONString(res, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
             //解密
-             logger.info("加密前的内容"+modelsStr);
+            logger.info("加密前的内容" + modelsStr);
             String modelsStrDec = RSAPINGANUtils.extracted(modelsStr, properties.getSelfPrivateKey());
-            logger.info("解密后的内容"+modelsStrDec);
+            logger.info("解密后的内容" + modelsStrDec);
             SearchPAVehicleListResponse.ModelsDto models = JSON.parseObject(modelsStrDec).toJavaObject(SearchPAVehicleListResponse.ModelsDto.class);
             res.setModels((List<SearchPAVehicleListResponse.ModelsDto>) models);
         }
         //注意002 pdf的解密文件
         return response;
     }
+    /**
+     * @Description  验证入参数据
+     * @Author  hxl
+     * @Date   2024/4/1 9:47
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    private static <Q extends PingAnBaseRequest> void checkRequestParams(Q q) {
+        try {
+            q.validate();
+        } catch (FieldEmptyException e) {
+            throw new FieldEmptyException(e.getMessage());
+        }
+    }
 
-   /**
-   *  @version
-   *  @author: hxl
-   *  @Date: 2024/3/26 14:14
-   *  @Description:  获取标的信息接口  3.1
-   */
-   public IndexResponse index(IndexRequest indexRequest) throws Exception {
-        return verificationResponse(indexRequest, properties.getUrl(), IndexResponse.class,RequestUrl.R_31);
+    /**
+    * @Description  返回参数验证
+    * @Author  hxl
+    * @Date   2024/4/1 9:37
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    private <Q extends PingAnBaseRequest, S extends PingAnBaseResponse> S getCheckResponseResult(Q q,Class<S> tClass,RequestUrl requestUrl,Class enumCodeClass) {
+        S response;
+        try {
+            response = verificationResponse(q, properties.getUrl(), tClass, requestUrl);
+            if(!"0".equals(response.getResultCode())){
+                throw new SystemException(requestUrl.getCode()+"-"+requestUrl.getDesc()+"-"+requestUrl.getUrl()+"接口返回信息"+PinAnEnumUtils.getEnumValueByCode(enumCodeClass,response.getResultCode()));
+            }
+        } catch (Exception e) {
+            throw new SystemException(requestUrl.getCode()+"-"+requestUrl.getDesc()+"-"+requestUrl.getUrl()+"接口报错,请检查请求路径及参数");
+        }
+        return response;
+    }
+    /**
+     * @version
+     * @author: hxl
+     * @Date: 2024/3/26 14:14
+     * @Description: 获取标的信息接口  3.1
+     */
+    public IndexResponse index(IndexRequest indexRequest) throws Exception {
+        //验证入参数据
+        checkRequestParams(indexRequest);
+        //验证出参数据
+        IndexResponse indexResponse=null;
+        try {
+            indexResponse = (IndexResponse)getCheckResponseResult(indexRequest,IndexResponse.class,RequestUrl.R_31,IndexResposeCodeEnum.class);
+        }catch (Exception e){
+             throw new SystemException(e.getMessage());
+        }
+        return indexResponse;
     }
 
 
+
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/3/26 16:29
-     *  @Description:  续保确认  4.1
+     * @version
+     * @author: hxl
+     * @Date: 2024/3/26 16:29
+     * @Description: 续保确认  4.1  使用3.1的流程id
+     * 使用接口3.1出参flowid
+     * 3.1的index接口返回1时调用
+     *
      */
-    public RenewalConfirmResponse index(RenewalConfirmRequest renewalConfirmRequest) throws Exception {
+    public RenewalConfirmResponse renewalConfirm(RenewalConfirmRequest renewalConfirmRequest) throws Exception {
         //签名加密
         Map<String, String> params = new TreeMap<>();
         params.put("flowid", renewalConfirmRequest.getFlowid());
         params.put("checkNo", renewalConfirmRequest.getCheckNo());
         params.put("userId", renewalConfirmRequest.getUserId());
-        logger.info("加密前的内容"+params.toString());
+        logger.info("加密前的内容" + params.toString());
         //添加加密内容
-        String encryptContent =RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
-        logger.info("加密后的内容"+encryptContent);
+        String encryptContent = RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
+        logger.info("加密后的内容" + encryptContent);
         renewalConfirmRequest.setSignature(encryptContent);
-        //对参数进行签名
-        return verificationResponse(renewalConfirmRequest, properties.getUrl(), RenewalConfirmResponse.class,RequestUrl.R_41);
+        //验证入参数据
+        checkRequestParams(renewalConfirmRequest);
+        //验证出参数据
+        RenewalConfirmResponse renewalConfirmResponse=null;
+        try {
+            renewalConfirmResponse = (RenewalConfirmResponse)getCheckResponseResult(renewalConfirmRequest,RenewalConfirmResponse.class,RequestUrl.R_41, RenewalConfirmResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return renewalConfirmResponse;
     }
+
     /**
-     * 平安车型搜索接口  001
+     * 平安车型搜索接口
      *
-     * @param searchPAVehicleListRequest 平安车型请求参数
+     * @param searchPAVehicleListResponse 平安车型相应参数
      * @return 平安车型
      */
-    public SearchPAVehicleListResponse.ModelsDto searchPAVehicle(SearchPAVehicleListRequest searchPAVehicleListRequest,
+    public SearchPAVehicleListResponse.ModelsDto searchPAVehicle(SearchPAVehicleListResponse searchPAVehicleListResponse,
                                                                  CarInfoVo carInfoVo) {
-        SearchPAVehicleListResponse searchPAVehicleListResponse = new SearchPAVehicleListResponse();
         List<SearchPAVehicleListResponse.ModelsDto> models = searchPAVehicleListResponse.getModels();
         return new CarModelsFilterUtils<SearchPAVehicleListResponse.ModelsDto>().to(models, carInfoVo);
     }
+
     /**
      * 平安车型请求参数   001
      * 对userId、keyword、flowid参数按照字段名的ASCII 码从小到大排序(字典序)后,使用URL键值对的格式(即key1=value1&key2=value2)拼接成字符串,然后对该字符串进行签名,得到signature
      * RSA私钥找平安获取
+     *   流程id使用3.1的流程id
      * @param searchPAVehicleListRequest
      * @return
      */
@@ -235,16 +324,25 @@ public class PinganRequestApiComponents {
         params.put("userId", searchPAVehicleListRequest.getUserId());
         params.put("keyword", searchPAVehicleListRequest.getKeyword());
         params.put("flowid", searchPAVehicleListRequest.getFlowid());
-        logger.info("加密前的内容"+params.toString());
+        logger.info("加密前的内容" + params.toString());
         //添加加密内容
-        String encryptContent =RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
-        logger.info("加密后的内容"+encryptContent);
+        String encryptContent = RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
+        logger.info("加密后的内容" + encryptContent);
         searchPAVehicleListRequest.setSignature(encryptContent);
-
-        return verificationResponse(searchPAVehicleListRequest, properties.getUrl(), SearchPAVehicleListResponse.class,RequestUrl.R_001);
+        //验证入参数据
+        checkRequestParams(searchPAVehicleListRequest);
+        //验证出参数据
+        SearchPAVehicleListResponse searchPAVehicleListResponse=null;
+        try {
+            searchPAVehicleListResponse = (SearchPAVehicleListResponse)getCheckResponseResult(searchPAVehicleListRequest,SearchPAVehicleListResponse.class, RequestUrl.R_001, SearchPAVehicleListResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return searchPAVehicleListResponse;
     }
+
     /**
-     * 电子保单   002
+     * 电子保单 pdf  002   入参不需要流程id
      *
      * @param policyPdfRequest
      * @return
@@ -255,104 +353,217 @@ public class PinganRequestApiComponents {
         params.put("userId", policyPdfRequest.getUserId());
         params.put("documentNo", policyPdfRequest.getDocumentNo());
         params.put("checkNo", policyPdfRequest.getCheckNo());
-        params.put("vehicle.licenseNo", policyPdfRequest.getVehicle()==null?"":policyPdfRequest.getVehicle().getLicenseNo());
-        params.put("vehicle.frameNo", policyPdfRequest.getVehicle()==null?"":policyPdfRequest.getVehicle().getFrameNo());
-        logger.info("加密前的内容"+params.toString());
+        params.put("vehicle.licenseNo", policyPdfRequest.getVehicle() == null ? "" : policyPdfRequest.getVehicle().getLicenseNo());
+        params.put("vehicle.frameNo", policyPdfRequest.getVehicle() == null ? "" : policyPdfRequest.getVehicle().getFrameNo());
+        logger.info("加密前的内容" + params.toString());
         //添加加密内容
-        String encryptContent =RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
-        logger.info("加密后的内容"+encryptContent);
+        String encryptContent = RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
+        logger.info("加密后的内容" + encryptContent);
         policyPdfRequest.setSignature(encryptContent);
-        return verificationResponse(policyPdfRequest, properties.getUrl(), PolicyPdfResponse.class,RequestUrl.R_002);
+        //验证入参数据
+        checkRequestParams(policyPdfRequest);
+        //验证出参数据
+        PolicyPdfResponse policyPdfResponse=null;
+        try {
+            policyPdfResponse = (PolicyPdfResponse)getCheckResponseResult(policyPdfRequest,PolicyPdfResponse.class, RequestUrl.R_002,PolicyPdfResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return policyPdfResponse;
     }
 
     /**
      * 车辆确认接口   4.2
-     *
+     *  录入车辆信息,包括其他定价的字段	必调
+     *  流程id使用3.1返回
      * @param carConfirmRequest
      * @return
      */
     public CarConfirmResponse carConfirm(CarConfirmRequest carConfirmRequest) throws Exception {
-        return verificationResponse(carConfirmRequest, properties.getUrl(), CarConfirmResponse.class,RequestUrl.R_42);
+        //验证入参数据
+        checkRequestParams(carConfirmRequest);
+        //验证出参数据
+        CarConfirmResponse carConfirmResponse=null;
+        try {
+            carConfirmResponse = (CarConfirmResponse)getCheckResponseResult(carConfirmRequest,CarConfirmResponse.class, RequestUrl.R_42, CarConfirmResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return carConfirmResponse;
     }
 
     /**
-     * 交管车辆验证码   4.3
+     * 交管车辆验证码   4.3   流程Id使用   使用 index3.1返回的流程id
+     * 监管要求,投保前进行交管车辆查询校验	部分机构&&本地已上牌车
      * @param dmvehicleInfoRequst
      * @return
      */
     public DmvehicleInfoResponse getDmvehicleInfo(DmvehicleInfoRequst dmvehicleInfoRequst) throws Exception {
-        return verificationResponse(dmvehicleInfoRequst, properties.getUrl(), DmvehicleInfoResponse.class,RequestUrl.R_43);
+        //验证入参数据
+        checkRequestParams(dmvehicleInfoRequst);
+        //验证出参数据
+        DmvehicleInfoResponse dmvehicleInfoResponse=null;
+        try {
+            dmvehicleInfoResponse = (DmvehicleInfoResponse)getCheckResponseResult(dmvehicleInfoRequst,DmvehicleInfoResponse.class, RequestUrl.R_43, DmvehicleInfoResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return dmvehicleInfoResponse;
     }
 
     /**
      * 获取财意险险种套餐列表   4.4
+     * 不需要流程id
      * @param unAutoProductListRequest
      * @return
      */
     public UnAutoProductListResponse getUnAutoProductList(UnAutoProductListRequest unAutoProductListRequest) throws Exception {
-        return verificationResponse(unAutoProductListRequest, properties.getUrl(), UnAutoProductListResponse.class,RequestUrl.R_44);
+        //验证入参数据
+        checkRequestParams(unAutoProductListRequest);
+        //验证出参数据
+        UnAutoProductListResponse unAutoProductListResponse=null;
+        try {
+            unAutoProductListResponse = (UnAutoProductListResponse)getCheckResponseResult(unAutoProductListRequest,UnAutoProductListResponse.class, RequestUrl.R_44, UnAutoProductListResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return unAutoProductListResponse;
     }
 
     /**
      * 获取财意险险种套餐责任信息   4.5
+     * 不需要流程id
      * @param unAutoProductDetailRequest
      * @return
      */
     public UnAutoProductDetailResponse getUnAutoProductDetail(UnAutoProductDetailRequest unAutoProductDetailRequest) throws Exception {
-        return verificationResponse(unAutoProductDetailRequest, properties.getUrl(), UnAutoProductDetailResponse.class,RequestUrl.R_45);
+        //验证入参数据
+        checkRequestParams(unAutoProductDetailRequest);
+        //验证出参数据
+        UnAutoProductDetailResponse unAutoProductDetailResponse=null;
+        try {
+            unAutoProductDetailResponse = (UnAutoProductDetailResponse)getCheckResponseResult(unAutoProductDetailRequest,UnAutoProductDetailResponse.class, RequestUrl.R_45, UnAutoProductDetailResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return unAutoProductDetailResponse;
     }
 
     /**
-     * 保费计算   5.1
+     * 保费计算   5.1       流程id使用???    猜测使用 上一步的返回的流程id   暂时使用4.2返回的流程id
+     *  商业险+交强险(车船税)保费计算	必调
      * @param quoteRequest
      * @return
      */
     public QuoteResponse quote(QuoteRequest quoteRequest) throws Exception {
-        return verificationResponse(quoteRequest, properties.getUrl(), QuoteResponse.class,RequestUrl.R_51);
+        //验证入参数据
+        checkRequestParams(quoteRequest);
+        //验证出参数据
+        QuoteResponse quoteResponse=null;
+        try {
+            quoteResponse = (QuoteResponse)getCheckResponseResult(quoteRequest,QuoteResponse.class, RequestUrl.R_51, QuoteResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return quoteResponse;
     }
 
     /**
      * 服务类特约检索   5.2
+     * flowid	C	深圳地区传入流程号
+     * 不需要流程id
+     *
      * @param serviceContractRequest
      * @return
      */
     public ServiceContractResponse queryServiceContract(ServiceContractRequest serviceContractRequest) throws Exception {
-        return verificationResponse(serviceContractRequest, properties.getUrl(), ServiceContractResponse.class,RequestUrl.R_52);
+        //验证入参数据
+        checkRequestParams(serviceContractRequest);
+        //验证出参数据
+        ServiceContractResponse serviceContractResponse=null;
+        try {
+            serviceContractResponse = (ServiceContractResponse)getCheckResponseResult(serviceContractRequest,ServiceContractResponse.class,  RequestUrl.R_52, ServiceContractResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return serviceContractResponse;
     }
 
     /**
      * 补充信息并核保   6.1
+     *   流程id使用?????   暂时使用5.1返回的流程id
+     * 补充信息并核保	查看特别约定
+     * 查看车辆验车状态
+     * 申请核保	必调
+     *
      * @param submitApplyRequest
      * @return
      */
     public SubmitApplyResponse submitApply(SubmitApplyRequest submitApplyRequest) throws Exception {
-        return verificationResponse(submitApplyRequest, properties.getUrl(), SubmitApplyResponse.class,RequestUrl.R_61);
+        //验证入参数据
+        checkRequestParams(submitApplyRequest);
+        //验证出参数据
+        SubmitApplyResponse submitApplyResponse=null;
+        try {
+            submitApplyResponse = (SubmitApplyResponse)getCheckResponseResult(submitApplyRequest,SubmitApplyResponse.class,RequestUrl.R_61, SubmitApplyResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return submitApplyResponse;
     }
+
     /**
      * 二维码支付   78
+     *  不需要流程id
+     * 二维码支付	返回的是一个短链接,需要合作伙伴自己生成二维码	二维码支付
+     *
      * @param scanCodeURLRequest
      * @return
      */
     public ScanCodeURLResponse getScanCodeURL(ScanCodeURLRequest scanCodeURLRequest) throws Exception {
-        return verificationResponse(scanCodeURLRequest, properties.getUrl(),ScanCodeURLResponse.class,RequestUrl.R_78);
+        //验证入参数据
+        checkRequestParams(scanCodeURLRequest);
+        //验证出参数据
+        ScanCodeURLResponse scanCodeURLResponse=null;
+        try {
+            scanCodeURLResponse = (ScanCodeURLResponse)getCheckResponseResult(scanCodeURLRequest,ScanCodeURLResponse.class,  RequestUrl.R_78, ScanCodeURLResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return scanCodeURLResponse;
     }
 
     /**
      * 承保接口   82
+     *  承保接口
+     *  不需要流程id
+     *  承保获取保单号	承保失败,尝试重新承保。或主动获取承保保单号(主要针对验证码录入错误,补录验证码后期望承保情况)
      * @param acceptRequest
      * @return
      */
     public AcceptResponse accept(AcceptRequest acceptRequest) throws Exception {
-        return verificationResponse(acceptRequest, properties.getUrl(), AcceptResponse.class,RequestUrl.R_82);
+        //验证入参数据
+        checkRequestParams(acceptRequest);
+        //验证出参数据
+        AcceptResponse acceptResponse=null;
+        try {
+            acceptResponse = (AcceptResponse)getCheckResponseResult(acceptRequest,AcceptResponse.class, RequestUrl.R_82, AcceptResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return acceptResponse;
     }
 
     /**
      * 单证状态查询   91
-     *
+     * 不需要流程id
+     * 单证状态查询	投保单概要字段	合作伙伴主动获取投保单状态(包括保单号)
+     * <p>
      * 对userId 、documentNoList、参数按照字段名的ASCII 码从小到大排序(字典序)后,使用URL键值对的格式(即key1=value1&key2=value2)拼接成字符串,然后对该字符串进行签名,得到signature
-     *      * documentNoList值中的单证号按照字典顺序从小到大排序,用逗号分隔,例如
-     *      * documentNoList=1234,2345
-     *      * RSA秘钥找平安获取
+     * * documentNoList值中的单证号按照字典顺序从小到大排序,用逗号分隔,例如
+     * * documentNoList=1234,2345
+     * * RSA秘钥找平安获取
+     *
      * @param documentStatusListRequest
      * @return
      */
@@ -363,38 +574,69 @@ public class PinganRequestApiComponents {
         //documentNoList排序加逗号拼接
         String[] documentNoList = documentStatusListRequest.getDocumentNoList();
         TreeSet<String> treeSet = new TreeSet<>();
-        for (String  documentNo : documentNoList) {
-             treeSet.add(documentNo);
+        for (String documentNo : documentNoList) {
+            treeSet.add(documentNo);
         }
-        String documentNoListStr="";
+        String documentNoListStr = "";
         for (String documentNoSort : treeSet) {
-            documentNoListStr+=",";
+            documentNoListStr += ",";
         }
         params.put("documentNoList", documentNoListStr.substring(0, documentNoListStr.length() - 1));
         //添加加密内容
-        logger.info("加密前的内容"+params.toString());
+        logger.info("加密前的内容" + params.toString());
         //添加加密内容
-        String encryptContent =RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
-        logger.info("加密后的内容"+encryptContent);
+        String encryptContent = RSAPINGANUtils.getStringStringMap(params, properties.getSelfPrivateKey());
+        logger.info("加密后的内容" + encryptContent);
         documentStatusListRequest.setSignature(encryptContent);
-        return verificationResponse(documentStatusListRequest, properties.getUrl(), DocumentStatusListResponse.class,RequestUrl.R_91);
+        //验证入参数据
+        checkRequestParams(documentStatusListRequest);
+        //验证出参数据
+        DocumentStatusListResponse documentStatusListResponse=null;
+        try {
+            documentStatusListResponse = (DocumentStatusListResponse)getCheckResponseResult(documentStatusListRequest,DocumentStatusListResponse.class, RequestUrl.R_91, DocumentStatusListResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return documentStatusListResponse;
     }
 
     /**
      * 撤销单证   92
+     * 撤销单证	撤销投保单或者通知单
+     *   不需要传流程id
      * @param repealDocumentRequest
      * @return
      */
     public RepealDocumentResponse repealDocument(RepealDocumentRequest repealDocumentRequest) throws Exception {
-        return verificationResponse(repealDocumentRequest, properties.getUrl(), RepealDocumentResponse.class,RequestUrl.R_92);
+        //验证入参数据
+        checkRequestParams(repealDocumentRequest);
+        //验证出参数据
+        RepealDocumentResponse repealDocumentResponse=null;
+        try {
+            repealDocumentResponse = (RepealDocumentResponse)getCheckResponseResult(repealDocumentRequest,RepealDocumentResponse.class, RequestUrl.R_92, RepealDocumentResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return repealDocumentResponse;
     }
 
     /**
      * 资料上传   93
+     * 资料上传	资料退回补传、事后资料上传
+     *      *   不需要传流程id
      * @param uploadFilesRequest
      * @return
      */
     public UploadFilesResponse uploadFiles(UploadFilesRequest uploadFilesRequest) throws Exception {
-        return verificationResponse(uploadFilesRequest, properties.getUrl(), UploadFilesResponse.class,RequestUrl.R_93);
+        //验证入参数据
+        checkRequestParams(uploadFilesRequest);
+        //验证出参数据
+        UploadFilesResponse uploadFilesResponse=null;
+        try {
+            uploadFilesResponse = (UploadFilesResponse)getCheckResponseResult(uploadFilesRequest,UploadFilesResponse.class,  RequestUrl.R_93, UploadFilesResponseCodeEnum.class);
+        }catch (Exception e){
+            throw new SystemException(e.getMessage());
+        }
+        return uploadFilesResponse;
     }
 }

+ 2 - 0
src/main/java/com/ydtech/modules/order/controller/BoHaiOrderApiController.java

@@ -5,6 +5,7 @@ import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.config.properties.BohaiApiConfigurationProperties;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.api.bohai.BoHaiEncrypted;
@@ -72,6 +73,7 @@ public class BoHaiOrderApiController {
         return this.boHaiOrderApiService.submitImage(companyId);
     }
 
+    @AuditVerification("核保")
     @PostMapping(value = "/audit")
     @ApiOperation(value = "提交核保")
     public HttpResult<Object> audit(@RequestSingleParam(value = "companyId") String companyId) throws Exception {

+ 1 - 1
src/main/java/com/ydtech/modules/order/controller/DaJiaOrderController.java

@@ -47,7 +47,7 @@ public class DaJiaOrderController {
 //        return HttpResult.ok("ok");
     }
 
-//    @AuditVerification("核保")
+    @AuditVerification("核保")
     @PostMapping(value = "/audit")
     @ApiOperation(value = "提交核保")
     public HttpResult<Object> audit(@RequestSingleParam(value = "companyId") String companyId) {

+ 2 - 0
src/main/java/com/ydtech/modules/order/controller/GuoRenOrderApiController.java

@@ -5,6 +5,7 @@ import com.ydtech.aop.request.RequestSingleParam;
 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.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.entity.api.guoren.constants.GoodsClassifyList;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
@@ -76,6 +77,7 @@ public class GuoRenOrderApiController {
         return guorenOrderApiService.pay(companyId);
     }
 
+    @AuditVerification("核保")
     @ApiOperation(value = "核保")
     @PostMapping("/audit")
     public HttpResult auditApi(@RequestSingleParam(value = "companyId") String companyId) {

+ 2 - 0
src/main/java/com/ydtech/modules/order/controller/HuaTaiOrderApiController.java

@@ -4,6 +4,7 @@ package com.ydtech.modules.order.controller;
 import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.components.huatai.HuiTaiUploadImageComponents;
@@ -54,6 +55,7 @@ public class HuaTaiOrderApiController {
         return this.huaTaiOrderApiService.queryClauseData(companyId);
     }
 
+    @AuditVerification("核保")
     @PostMapping(value = "/audit")
     @ApiOperation(value = "提交核保")//3.6.	转投保接口
     public HttpResult<Object> audit(@RequestBody SpecialAuditVo<InsHuataiContributingVo> specialAudit) {

+ 2 - 0
src/main/java/com/ydtech/modules/order/controller/InsCrawlerOrderController.java

@@ -5,6 +5,7 @@ import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
@@ -44,6 +45,7 @@ public class InsCrawlerOrderController extends BaseController {
         return insuranceCrawlerOrderService.submitImage(subOrderNo);
     }
 
+    @AuditVerification("核保")
     @PostMapping("/audit")
     @ApiOperation("核保")
     public HttpResult<Object> audit(@RequestSingleParam(value = "subOrderNo") String subOrderNo) {

+ 47 - 11
src/main/java/com/ydtech/modules/order/controller/PingAnOrderApiController.java

@@ -4,22 +4,17 @@ package com.ydtech.modules.order.controller;
 import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
-import com.ydtech.modules.order.entity.api.bohai.BoHaiEncrypted;
-import com.ydtech.modules.order.entity.api.bohai.request.ManualReviewRequest;
-import com.ydtech.modules.order.entity.api.bohai.request.PaymentCallbackRequest;
-import com.ydtech.modules.order.entity.api.bohai.request.PolicyResultCallbackRequest;
-import com.ydtech.modules.order.entity.api.bohai.response.NonAutomotiveProductsDetailsResponse;
-import com.ydtech.modules.order.entity.api.bohai.response.NonAutomotiveProductsResponse;
+import com.ydtech.modules.order.entity.api.pingan.response.UnAutoProductDetailResponse;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.bohai.BoHaiQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.bohai.ProductDetailsQueryVo;
 import com.ydtech.modules.order.entity.vo.bohai.ProductQueryVo;
+import com.ydtech.modules.order.entity.vo.pingan.PingAnQuoteVo;
 import com.ydtech.modules.order.service.PingAnOrderApiService;
-import com.ydtech.modules.order.utils.SignatureUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
@@ -30,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
+import java.util.Map;
 
 @Api(tags = "平安财险 API ")
 @Slf4j
@@ -46,7 +42,7 @@ public class PingAnOrderApiController {
     @QuoteVerification("报价授权")
     @PostMapping("/quote")
     @ApiOperation("报价")
-    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo) throws Exception {
+    public HttpResult<QuoteRespVo> quote(@RequestBody PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo) throws Exception {
         BaseQuoteInfoVo quoteInfo = this.insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo(), quoteVo.getAgreementId());
         return this.pingAnOrderApiService.quote(quoteInfo, quoteVo);
     }
@@ -57,10 +53,11 @@ public class PingAnOrderApiController {
         return this.pingAnOrderApiService.submitImage(companyId);
     }
 
+    @AuditVerification("核保")
     @PostMapping(value = "/audit")
     @ApiOperation(value = "提交核保")
-    public HttpResult<Object> audit(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
-        return this.pingAnOrderApiService.audit(companyId);
+    public HttpResult<Object> audit(@RequestBody BaseQuoteInfoVo quoteInfo) throws Exception {
+        return this.pingAnOrderApiService.audit(quoteInfo);
     }
 
     @PostMapping("/getPolicyPrint")
@@ -81,6 +78,45 @@ public class PingAnOrderApiController {
         return this.pingAnOrderApiService.auditStatusQuery(companyId);
     }
 
+    @PostMapping("/productQuery")
+    @ApiOperation("获取财意险险种套餐列表")
+    public HttpResult<Map<String,Object>> productQuery(@RequestBody ProductQueryVo productQueryVo) throws Exception {
+        return this.pingAnOrderApiService.productQuery(productQueryVo);
+    }
+
+    @PostMapping("/renewalConfirm")
+    @ApiOperation("续保")
+    public HttpResult<Object> renewalConfirm(@RequestBody PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo,BaseQuoteInfoVo quoteInfo) throws Exception {
+        return this.pingAnOrderApiService.renewalConfirm(quoteVo,quoteInfo);
+    }
 
+    @PostMapping("/queryServiceContract")
+    @ApiOperation("服务类特约检索")
+    public HttpResult<Object> queryServiceContract(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
+        return this.pingAnOrderApiService.queryServiceContract(companyId);
+    }
+
+    @PostMapping("/getDocumentStatusList")
+    @ApiOperation("单证状态查询")
+    public HttpResult<Object> getDocumentStatusList(@RequestBody PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo) throws Exception {
+        return this.pingAnOrderApiService.getDocumentStatusList(quoteVo);
+    }
 
+    @PostMapping("/repealDocument")
+    @ApiOperation("撤销单证")
+    public HttpResult<Object> repealDocument(@RequestBody PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo) throws Exception {
+        return this.pingAnOrderApiService.repealDocument(quoteVo);
+    }
+
+    @PostMapping("/getDmvehicleInfo")
+    @ApiOperation("获取交管车辆验证码")
+    public HttpResult<Object> getDmvehicleInfo(@RequestBody PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo, BaseQuoteInfoVo quoteInfo) throws Exception {
+        return this.pingAnOrderApiService.getDmvehicleInfo(quoteVo,quoteInfo);
+    }
+
+    @PostMapping("/productDetailsQuery")
+    @ApiOperation("获取财意险险种套餐责任信息")
+    public HttpResult<List<UnAutoProductDetailResponse.UnAutoProductDetailsDTO>> productDetailsQuery(@RequestBody ProductDetailsQueryVo productDetailsQueryVo) throws Exception {
+        return this.pingAnOrderApiService.productDetailsQuery(productDetailsQueryVo);
+    }
 }

+ 2 - 0
src/main/java/com/ydtech/modules/order/controller/YongAnOrderApiController.java

@@ -3,6 +3,7 @@ package com.ydtech.modules.order.controller;
 
 import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
@@ -41,6 +42,7 @@ public class YongAnOrderApiController {
         return this.yongAnOrderService.quote(quoteInfo, quoteVo);
     }
 
+    @AuditVerification("核保")
     @PostMapping("/audit")
     @ApiOperation("核保")
     public HttpResult audit(@RequestSingleParam(value = "companyId") String companyId) {

+ 3 - 0
src/main/java/com/ydtech/modules/order/controller/YongChengOrderApiController.java

@@ -7,6 +7,7 @@ import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.esm.model.EsmInsAttachInsure;
+import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
@@ -50,6 +51,7 @@ public class YongChengOrderApiController {
         return yongchengOrderApiService.quoteApi(quoteVo);
     }
 
+    @AuditVerification("核保")
     @ApiOperation(value = "永诚API方式 - 核保")
     @PostMapping("/audit")
     public HttpResult auditApi(@RequestSingleParam(value = "companyId") String companyId) {
@@ -60,6 +62,7 @@ public class YongChengOrderApiController {
     @PostMapping(value = "/uploadImage")
     public HttpResult uploadImageApi(@RequestSingleParam(value = "companyId") String companyId) {
         return yongchengOrderApiService.uploadImageApi(companyId);
+//        return HttpResult.ok("ok");
     }
 
     @ApiOperation(value = "永诚API方式 -电子保单")

+ 2 - 0
src/main/java/com/ydtech/modules/order/controller/ZhongMeiOrderApiController.java

@@ -8,6 +8,7 @@ import com.ydtech.modules.ins.model.vo.GeneralNonCarProductReqVo;
 import com.ydtech.modules.ins.model.vo.GeneralNonCarProductResVo;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.ins.model.ya.CarModelDTO;
+import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.api.zhongmei.request.ApprovedRequest;
@@ -63,6 +64,7 @@ public class ZhongMeiOrderApiController {
         return this.zhongMeiOrderApiService.quote(quoteInfo, zmQuoteVo);
     }
 
+    @AuditVerification("核保")
     @PostMapping(value = "/audit")
     @ApiOperation(value = "提交核保")
     public HttpResult<Object> audit(@RequestSingleParam(value = "companyId") String companyId) {

+ 2 - 0
src/main/java/com/ydtech/modules/order/controller/ZhongMeiOrderController.java

@@ -3,6 +3,7 @@ package com.ydtech.modules.order.controller;
 
 import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
@@ -46,6 +47,7 @@ public class ZhongMeiOrderController {
         return this.zhongMeiOrderService.submitImage(companyId);
     }
 
+    @AuditVerification("核保")
     @PostMapping("/audit")
     @ApiOperation("核保")
     public HttpResult audit(@RequestSingleParam(value = "companyId") String companyId) {

+ 2 - 0
src/main/java/com/ydtech/modules/order/controller/ZijinOrderApiController.java

@@ -4,6 +4,7 @@ package com.ydtech.modules.order.controller;
 import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.api.zijin.request.PaymentCallbacksRequest;
@@ -66,6 +67,7 @@ public class ZijinOrderApiController {
         return this.zijinOrderApiService.queryClauseData(companyId);
     }
 
+    @AuditVerification("核保")
     @PostMapping(value = "/audit")
     @ApiOperation(value = "提交核保")
     public HttpResult<Object> audit(@RequestBody SpecialAuditVo<SubmitVerifyRequest.EngageListDTO> specialAudit) {

+ 6 - 1
src/main/java/com/ydtech/modules/order/entity/api/bohai/request/VehicleTypeQueryRequest.java

@@ -1,7 +1,6 @@
 package com.ydtech.modules.order.entity.api.bohai.request;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
-import com.ydtech.modules.order.entity.api.bohai.constants.RequestType;
 import com.ydtech.modules.order.entity.config.BoHaiConfigureParameters;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -50,6 +49,12 @@ public class VehicleTypeQueryRequest extends BoHaiBaseRequest {
     @JsonProperty("newVehicleFlag")
     private String newVehicleFlag;
 
+    /**
+      * add by hxl  2024-04-03  添加行业车型编码
+     */
+    @JsonProperty("modelCode")
+    private String modelCode;
+
     public VehicleTypeQueryRequest(BoHaiConfigureParameters parameters, String vehicleBrandModelKey, String orderNo) {
         this.setBaseParam(parameters, orderNo);
         this.vehicleBrandModelKey = vehicleBrandModelKey;

+ 30 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/accept/AcceptResponseCodeEnum.java

@@ -0,0 +1,30 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.accept;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 13:44
+ *  @Description: 承保接口 8.2 返回信息枚举
+ *
+ *  0-成功
+ *  1-承保失败/接口异常
+ */
+@AllArgsConstructor
+@Getter
+public enum AcceptResponseCodeEnum  {
+
+
+    ACCEPT_CODE_MSG_0("0","成功"),
+    ACCEPT_CODE_MSG_1("1","承保失败/接口异常");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 53 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/accept/AcceptResponseStatusCodeEnum.java

@@ -0,0 +1,53 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.accept;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 13:44
+ *  @Description: 承保接口 8.2 返回状态枚举
+ *  投保单状态
+ *  BE-待审批,
+ *  B1-待审核,
+ *  BH-待验车,
+ *  B2-待缴费,
+ *  B3-待承保,
+ *  B5-已承保,
+ *  B6-AI审核,
+ *  B4-待修改,
+ *  B9-拒保,
+ *  B0-承保失败,
+ *  99-已失效,
+ *  BZ-系统异常,
+ *  BT-已退费
+ */
+@AllArgsConstructor
+@Getter
+public enum AcceptResponseStatusCodeEnum {
+
+
+    ACCEPT_CODE_STATUS_BE("BE","待审批"),
+    ACCEPT_CODE_STATUS_BH("BH","待验车"),
+    ACCEPT_CODE_STATUS_B0("B0","承保失败"),
+    ACCEPT_CODE_STATUS_B1("B1","待审核"),
+    ACCEPT_CODE_STATUS_B2("B2","待缴费"),
+    ACCEPT_CODE_STATUS_B3("B3","待承保"),
+    ACCEPT_CODE_STATUS_B4("B4","待修改"),
+    ACCEPT_CODE_STATUS_B5("B5","已承保"),
+    ACCEPT_CODE_STATUS_B6("B6","AI审核"),
+    ACCEPT_CODE_STATUS_B9("B9","拒保"),
+    ACCEPT_CODE_STATUS_99("99","已失效"),
+    ACCEPT_CODE_STATUS_BZ("BZ","系统异常"),
+    ACCEPT_CODE_STATUS_BT("BT","已退费");
+
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 52 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/carConfirm/CarConfirmResponseCodeEnum.java

@@ -0,0 +1,52 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.carConfirm;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 8:52
+ *  @Description:  车辆确认   4.2  返回code的枚举类
+ *
+ *  resultCode
+ *  0-[成功]
+ * 1-找不到此车型,请再次确认车型
+ * 2-平台返回多个车型,需要确认车型
+ * 3-您的车辆属于新款车型,暂无法投保
+ * 4-江苏交管车辆验证码错误
+ * 5-连接江苏交管平台异常
+ * 6-三种异常中的一种a)该车平台返回为过户车;b)未传送车辆过户标志,查询的车主名称与上张保单不一致c)传送了车辆过户标志,查询的车主名称与上张保单一致
+ * 7-北京新车备案异常
+ * 9-广东交管平台校验失败
+ * 10-车辆信息确认接口失败
+ * 11-
+ *
+ *
+ */
+@AllArgsConstructor
+@Getter
+public enum CarConfirmResponseCodeEnum  {
+
+    CAR_CONFIRM_CODE_MSG_0("0","[成功]"),
+    CAR_CONFIRM_CODE_MSG_1("1","找不到此车型,请再次确认车型"),
+    CAR_CONFIRM_CODE_MSG_2("2","平台返回多个车型,需要确认车型"),
+    CAR_CONFIRM_CODE_MSG_3("3","您的车辆属于新款车型,暂无法投保"),
+    CAR_CONFIRM_CODE_MSG_4("4","江苏交管车辆验证码错误"),
+    CAR_CONFIRM_CODE_MSG_5("5","连接江苏交管平台异常"),
+    CAR_CONFIRM_CODE_MSG_6("6","三种异常中的一种a)该车平台返回为过户车;b)未传送车辆过户标志,查询的车主名称与上张保单不一致c)传送了车辆过户标志,查询的车主名称与上张保单一致"),
+    CAR_CONFIRM_CODE_MSG_7("7","北京新车备案异常"),
+    CAR_CONFIRM_CODE_MSG_9("9","广东交管平台校验失败"),
+    CAR_CONFIRM_CODE_MSG_10("10","车辆信息确认接口失败"),
+    CAR_CONFIRM_CODE_MSG_11("11","-");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+
+
+}

+ 26 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/dmvehicleInfo/DmvehicleInfoResponseCodeEnum.java

@@ -0,0 +1,26 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.dmvehicleInfo;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 9:26
+ *  @Description:   交管车辆验证码   4.3   接口出参
+ */
+@AllArgsConstructor
+@Getter
+public enum DmvehicleInfoResponseCodeEnum  {
+
+    DMVEHICLE_INFO_CODE_MSG_0("0","成功"),
+    DMVEHICLE_INFO_CODE_MSG_1("1","失败/接口异常");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 37 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/documentStatusList/DocumentStatusListResponseCodeEnum.java

@@ -0,0 +1,37 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.documentStatusList;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 13:44
+ *  @Description: 单证状态查询  9.1 接口出参
+ *  resultMessage	O	后台接口执行信息
+ * resultCode	M	0-成功
+ * 1-验签失败
+ * 2-接口调用超过上限
+ * 3-合作伙伴标识不存在
+ * 4-单证列表过长
+ * 5-系统异常
+ */
+@AllArgsConstructor
+@Getter
+public enum DocumentStatusListResponseCodeEnum  {
+
+    DOCUMENTSTATUSLIST_CODE_MSG_0("0","成功"),
+    DOCUMENTSTATUSLIST_CODE_MSG_1("1","验签失败"),
+    DOCUMENTSTATUSLIST_CODE_MSG_2("2","接口调用超过上限"),
+    DOCUMENTSTATUSLIST_CODE_MSG_3("3","合作伙伴标识不存在"),
+    DOCUMENTSTATUSLIST_CODE_MSG_4("4","单证列表过长"),
+    DOCUMENTSTATUSLIST_CODE_MSG_5("5","系统异常");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 40 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/index/IndexResposeCodeEnum.java

@@ -0,0 +1,40 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.index;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/29 16:22
+ *  @Description: 标地信息返回的枚举类
+ *  0-[成功]
+ *  1-上年在平安有投保记录[成功]
+ *  * 2-商交均未到期,不满足提前投保天数
+ *  * 3-未查到当前城市
+ *  * 4-未开通当前渠道机构
+ *  * 5-好伙伴账号校验不通过(不存在or账号绑定的相关字段已失效)
+ *  * 6-该车牌对应多个标的,需要进行确认
+ *  * 7-北京地区兼业代理投保且为非金融业务,并未维护兼业代理从业人员信息,请到PMS维护
+ */
+@AllArgsConstructor
+@Getter
+public enum IndexResposeCodeEnum  {
+
+    INDEX_CODE_MSG_0("0","[成功]"),
+    INDEX_CODE_MSG_1("1","上年在平安有投保记录[成功]"),
+    INDEX_CODE_MSG_2("2","商交均未到期,不满足提前投保天数"),
+    INDEX_CODE_MSG_3("3","未查到当前城市"),
+    INDEX_CODE_MSG_4("4","未开通当前渠道机构"),
+    INDEX_CODE_MSG_5("5","好伙伴账号校验不通过(不存在or账号绑定的相关字段已失效)"),
+    INDEX_CODE_MSG_6("6","该车牌对应多个标的,需要进行确认"),
+    INDEX_CODE_MSG_7("7","北京地区兼业代理投保且为非金融业务,并未维护兼业代理从业人员信息,请到PMS维护");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 49 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/policyPdf/PolicyPdfResponseCodeEnum.java

@@ -0,0 +1,49 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.policyPdf;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 17:08
+ *  @Description: 电子保单pdf  001  接口出参resultCode的枚举值
+ * resultMessage	O	后台接口执行信息
+ * resultCode	M	0-成功
+ * 1-验签失败
+ * 3-合作伙伴标识不存在
+ * 5-系统异常
+ * 6-此机构无权限查询
+ * 7-此渠道无权限查询
+ * 8-userId为空
+ * 9请核实证件号和保单号是否正确
+ * 10-暂仅支持交强险查询
+ * 11当前标的调用次数过于频繁,请稍候重试
+ * 13非当前合作方所出保单
+ *
+ *
+ *pdf解密参考
+ */
+@AllArgsConstructor
+@Getter
+public enum PolicyPdfResponseCodeEnum  {
+    POLICY_PDF_CODE_MSG_0("0","成功"),
+    POLICY_PDF_CODE_MSG_1("1","验签失败"),
+    POLICY_PDF_CODE_MSG_3("3","合作伙伴标识不存在"),
+    POLICY_PDF_CODE_MSG_5("5","系统异常"),
+    POLICY_PDF_CODE_MSG_6("6","此机构无权限查询"),
+    POLICY_PDF_CODE_MSG_7("7","此渠道无权限查询"),
+    POLICY_PDF_CODE_MSG_8("8","userId为空"),
+    POLICY_PDF_CODE_MSG_9("9","请核实证件号和保单号是否正确"),
+    POLICY_PDF_CODE_MSG_10("10","暂仅支持交强险查询"),
+    POLICY_PDF_CODE_MSG_11("11","当前标的调用次数过于频繁,请稍候重试"),
+    POLICY_PDF_CODE_MSG_13("13","非当前合作方所出保单");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 62 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/quote/QuoteResponseCodeEnum.java

@@ -0,0 +1,62 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.quote;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 10:35
+ *  @Description:  保费计算   5.1  接口出参resultCode枚举值
+ *
+ *  resultMessage    O	后台接口执行信息
+ * resultCode	M	0-[成功]
+ * 10-商业险、交强险至少投保一个!
+ * 11-商业险通融报价失败
+ * 110-商业险通融上传资料失败
+ * a)只投保商业险时;或者商交同时投保时,商业险失败、交强险成功:
+ * 1-保险起期不满足投保条件
+ * 2-未选择任何险别
+ * 3-平安报价规则校验不通过
+ * 4-保费计算出错
+ * 8-需要录入转保验证码
+ *
+ * b)只投保交强险时;或者商交同时投保时,商业险成功、交强险失败:
+ * 5-保险起期不满足投保条件
+ * 6-过户车主提示
+ * 7-保费计算出错
+ * 9-需要录入转保验证码
+ *
+ * c)商交同时投保时,同时失败
+ * resultCode=a+b(例如:15、37)
+ * flowid	ME	流程ID
+ */
+@AllArgsConstructor
+@Getter
+public enum QuoteResponseCodeEnum  {
+
+    QUOTE_CODE_MSG_0("0","[成功]"),
+    QUOTE_CODE_MSG_1("1","保险起期不满足投保条件"),
+    QUOTE_CODE_MSG_2("2","未选择任何险别"),
+    QUOTE_CODE_MSG_3("3","平安报价规则校验不通过"),
+    QUOTE_CODE_MSG_4("4","保费计算出错"),
+    QUOTE_CODE_MSG_5("5","保险起期不满足投保条件"),
+    QUOTE_CODE_MSG_6("6","过户车主提示"),
+    QUOTE_CODE_MSG_7("7","保费计算出错"),
+    QUOTE_CODE_MSG_8("8","需要录入转保验证码"),
+    QUOTE_CODE_MSG_9("9","需要录入转保验证码"),
+    QUOTE_CODE_MSG_10("10","商业险、交强险至少投保一个!"),
+    QUOTE_CODE_MSG_11("11","商业险通融报价失败"),
+    QUOTE_CODE_MSG_110("110","商业险通融上传资料失败");
+
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+
+
+}

+ 34 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/renewalConfirm/RenewalConfirmResponseCodeEnum.java

@@ -0,0 +1,34 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.renewalConfirm;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+
+/**
+ * @description: 续保确认 4.1 出参 resultCode枚举分装
+ * resultCode 返回值
+ * 0-[成功]
+ * 1-车主证件校验不通过
+ * 2-不支持的投保范围(例如:上年非9座及9座以下客车)
+ * 3-系统异常
+ * @author: wenks
+ * @date: 2024/3/21 9:28
+ **/
+@AllArgsConstructor
+@Getter
+public enum RenewalConfirmResponseCodeEnum {
+
+    RENEWAL_CONFIRM_CODE_MSG_0("0","[成功]"),
+    RENEWAL_CONFIRM_CODE_MSG_1("1","车主证件校验不通过"),
+    RENEWAL_CONFIRM_CODE_MSG_2("2","不支持的投保范围(例如:上年非9座及9座以下客车)"),
+    RENEWAL_CONFIRM_CODE_MSG_3("3","系统异常");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 31 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/repealDocument/RepealDocumentResponseCodeEnum.java

@@ -0,0 +1,31 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.repealDocument;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 13:44
+ *  @Description: 撤销单证  9.2 接口出参
+ *  resultMessage	O	后台接口执行信息
+ * resultCode	M	后台接口执行编码
+ * 0-[成功]
+ * 1-异常
+ */
+@AllArgsConstructor
+@Getter
+public enum RepealDocumentResponseCodeEnum {
+
+
+    REPEAL_DOCUMENT_CODE_MSG_0("0","[成功]"),
+    REPEAL_DOCUMENT_CODE_MSG_1("1","异常");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 29 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/scanCodeURL/ScanCodeURLResponseCodeEnum.java

@@ -0,0 +1,29 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.scanCodeURL;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 13:42
+ *  @Description: 二维码支付  7.8  接口出参 resultCode枚举
+ *  	resultMessage	O	后台接口执行信息
+ * 	resultCode	M	后台接口执行编码
+ * 'Y'成功;'N'失败
+ */
+@AllArgsConstructor
+@Getter
+public enum ScanCodeURLResponseCodeEnum {
+
+    SCAN_CODE_URL_CODE_MSG_Y("Y","成功"),
+    SCAN_CODE_URL_CODE_MSG_N("N","失败");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 32 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/scanCodeURL/ScanCodeURLResponseDocumentTypeCodeEnum.java

@@ -0,0 +1,32 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.scanCodeURL;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 13:42
+ *  @Description: 二维码支付  7.8  接口出参 documentType 枚举类
+ *  单证类型(01投保单02保单03批改申请单04批单05赔案号06报案号07通知单号)
+ */
+@AllArgsConstructor
+@Getter
+public enum ScanCodeURLResponseDocumentTypeCodeEnum {
+
+    DOCUMENT_TYPE_CODE_MSG_01("01","投保单"),
+    DOCUMENT_TYPE_CODE_MSG_02("02","保单"),
+    DOCUMENT_TYPE_CODE_MSG_03("03","批改申请单"),
+    DOCUMENT_TYPE_CODE_MSG_04("04","批单"),
+    DOCUMENT_TYPE_CODE_MSG_05("05","赔案号"),
+    DOCUMENT_TYPE_CODE_MSG_06("06","报案号"),
+    DOCUMENT_TYPE_CODE_MSG_07("07","通知单号");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 38 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/searchPAVehicleList/SearchPAVehicleListResponseCodeEnum.java

@@ -0,0 +1,38 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.searchPAVehicleList;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+
+/**
+ * @version
+ * @description: 平安车型搜索接口 响应参数
+ * @author: wenks
+ * @date: 2024/3/20 10:14
+ * resultMessage	O	后台接口执行信息
+ * resultCode	M	0-[成功]
+ * 1-调用次数超过上限/根据传入参数未检索到车型数据
+ * 2-搜索到的车型结果集超过上限,请优化搜索条件
+ * 3-系统异常
+ * 4-无权限调用
+ * 验签失败
+ **/
+@AllArgsConstructor
+@Getter
+public enum SearchPAVehicleListResponseCodeEnum  {
+
+    SEARCH_PA_VEHICLE_LIST_CODE_MSG_0("0","[成功]"),
+    SEARCH_PA_VEHICLE_LIST_CODE_MSG_1("1","调用次数超过上限/根据传入参数未检索到车型数据"),
+    SEARCH_PA_VEHICLE_LIST_CODE_MSG_2("2","搜索到的车型结果集超过上限,请优化搜索条件"),
+    SEARCH_PA_VEHICLE_LIST_CODE_MSG_3("3","系统异常"),
+    SEARCH_PA_VEHICLE_LIST_CODE_MSG_4("4","无权限调用验签失败");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+
+}

+ 32 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/serviceContract/ServiceContractResponseCodeEnum.java

@@ -0,0 +1,32 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.serviceContract;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 11:49
+ *  @Description:  服务类特约检索   5.2   接口出参resultCode的枚举类
+ *
+ *  resultMessage	O	后台接口执行信息
+ * resultCode	M	0-[成功]
+ * 1-失败
+ */
+@AllArgsConstructor
+@Getter
+public enum ServiceContractResponseCodeEnum {
+
+    SERVICE_CONTRACT_CODE_MSG_0("0","[成功]"),
+    SERVICE_CONTRACT_CODE_MSG_1("1","失败");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+
+
+}

+ 64 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/submitApply/SubmitApplyResponseCodeEnum.java

@@ -0,0 +1,64 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.submitApply;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 12:55
+ *  @Description: 补充信息并核保   61  接口出参resultCode的枚举类
+ *  resultMessage	O	后台接口执行信息
+ * resultCode	M	0-[成功]
+ * 1-意健险投保人年龄大于18岁校验
+ * 2-意健险被保人年龄范围校验
+ * 3-您填写的车主姓名与行驶证上不一致,请修改
+ * 4-投保查询失败
+ * 5-车辆需要验车
+ * 6-核保失败
+ * 7-商业险通过;交强险不通过
+ * 8-商业险不通过,交强险通过
+ * 9-北京身份信息采集,用户输入的身份采集验证码申请核保时校验失败
+ * 11-事中验车(录入验车字段)
+ * 12-商业险需要录入转保验证码
+ * 13-交强险需要录入转保验证码
+ * 14-商业、交强均需要录入转保验证码
+ * 15- 事中上传资料
+ * 16-客户真实性校验失败
+ * flowid	ME	流程ID
+ *
+ */
+@AllArgsConstructor
+@Getter
+public enum SubmitApplyResponseCodeEnum {
+
+    SUBMIT_APPLY_CODE_MSG_0("0","[成功]"),
+    SUBMIT_APPLY_MSG_1("1","意健险投保人年龄大于18岁校验"),
+    SUBMIT_APPLY_MSG_2("2","意健险被保人年龄范围校验"),
+    SUBMIT_APPLY_MSG_3("3","您填写的车主姓名与行驶证上不一致,请修改"),
+    SUBMIT_APPLY_MSG_4("4","投保查询失败"),
+    SUBMIT_APPLY_MSG_5("5","车辆需要验车"),
+    SUBMIT_APPLY_MSG_6("6","核保失败"),
+    SUBMIT_APPLY_MSG_7("7","商业险通过;交强险不通过"),
+    SUBMIT_APPLY_MSG_8("8","商业险不通过,交强险通过"),
+    SUBMIT_APPLY_MSG_9("9","北京身份信息采集,用户输入的身份采集验证码申请核保时校验失败"),
+
+    SUBMIT_APPLY_CODE_MSG_11("11","事中验车(录入验车字段)"),
+    SUBMIT_APPLY_CODE_MSG_12("12","商业险需要录入转保验证码"),
+    SUBMIT_APPLY_CODE_MSG_13("13","交强险需要录入转保验证码"),
+    SUBMIT_APPLY_CODE_MSG_14("14","商业、交强均需要录入转保验证码"),
+    SUBMIT_APPLY_CODE_MSG_15("15","事中上传资料"),
+    SUBMIT_APPLY_CODE_MSG_16("16","客户真实性校验失败");
+
+
+
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 33 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/unAutoProductDetail/UnAutoProductDetailResponseCodeEnum.java

@@ -0,0 +1,33 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.unAutoProductDetail;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version 
+ *  @author: hxl
+ *  @Date: 2024/3/27 9:53
+ *  @Description: 获取财意险险种套餐责任信息   4.5  接口出参resultCode枚举类
+ *
+ *  resultMessage	O	后台接口执行信息
+ * resultCode	M	后台接口执行编码
+ * 0-[成功]
+ * 1-异常
+ */
+@AllArgsConstructor
+@Getter
+public enum UnAutoProductDetailResponseCodeEnum {
+
+    UN_AUTO_PRODUCT_DETAIL_CODE_MSG_0("0","[成功]"),
+    UN_AUTO_PRODUCT_DETAIL_CODE_MSG_1("1","异常");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+
+
+}

+ 32 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/unAutoProductList/UnAutoProductListResponseCodeEnum.java

@@ -0,0 +1,32 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.unAutoProductList;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 9:41
+ *  @Description:   获取财意险险种套餐列表 接口出参枚举类
+ *  resultCode	M	后台接口执行编码
+ *  0-[成功]
+ *  1-异常
+ * resultMessage	O	后台接口执行信息
+ *
+ */
+@AllArgsConstructor
+@Getter
+public enum UnAutoProductListResponseCodeEnum {
+
+    UN_AUTO_PRODUCT_LIST_CODE_MSG_0("0","[成功]"),
+    UN_AUTO_PRODUCT_LIST_CODE_MSG_1("1","异常");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+
+}

+ 29 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/constants/uploadFiles/UploadFilesResponseCodeEnum.java

@@ -0,0 +1,29 @@
+package com.ydtech.modules.order.entity.api.pingan.constants.uploadFiles;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/27 13:44
+ *  @Description: 资料上传  9.3 接口出参
+ *  resultCode	M	后台接口执行编码
+ * 0-[成功]
+ * 1-异常
+ * resultMessage	C	返回信息
+ */
+@AllArgsConstructor
+@Getter
+public enum UploadFilesResponseCodeEnum {
+    UPLOAD_FILES_CODE_MSG_0("0","[成功]"),
+    UPLOAD_FILES_CODE_MSG_1("1","异常");
+    /**
+     * 编码
+     */
+    private final String code;
+    /**
+     * 描述
+     */
+    private final String msg;
+}

+ 30 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/AcceptRequest.java

@@ -1,5 +1,7 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -21,6 +23,22 @@ public class AcceptRequest extends PingAnBaseRequest{
      * 投保单号集合
      */
     private ArrayList<ApplyPolicyNoDTO> applyPolicyNoList=new ArrayList<ApplyPolicyNoDTO>();
+    /**
+    * @Description  通过保单号封装请求数据
+    * @Author  hxl
+    * @Date   2024/4/1 11:49
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public AcceptRequest(String insOrderNo) {
+        ArrayList<AcceptRequest.ApplyPolicyNoDTO> applyPolicyNoList=new ArrayList<AcceptRequest.ApplyPolicyNoDTO>();
+        AcceptRequest.ApplyPolicyNoDTO  dto=new  AcceptRequest.ApplyPolicyNoDTO(insOrderNo);
+        applyPolicyNoList.add(dto);
+        this.setApplyPolicyNoList(applyPolicyNoList);
+    }
+
     /***
      *投保单号信息
      *
@@ -34,5 +52,17 @@ public class AcceptRequest extends PingAnBaseRequest{
          * M
          */
         private String documentNo;
+
+        public ApplyPolicyNoDTO(String documentNo) {
+            this.documentNo=documentNo;
+        }
+    }
+
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getApplyPolicyNoList()==null || this.getApplyPolicyNoList().size()==0){
+            throw new FieldEmptyException("投保单号不能为空!!!");
+        }
     }
 }

+ 120 - 37
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/CarConfirmRequest.java

@@ -4,12 +4,19 @@ package com.ydtech.modules.order.entity.api.pingan.request;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
 import com.ydtech.modules.order.entity.api.pingan.response.SearchPAVehicleListResponse;
+import com.ydtech.modules.order.entity.api.pingan.utils.NetworkUtils;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.CheckNotEmpty;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validator;
 import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
 import java.io.Serializable;
+import java.util.Map;
+
 /**
  *  @version 
  *  @author: hxl
@@ -28,18 +35,20 @@ public class CarConfirmRequest extends PingAnBaseRequest {
      *  发起该次查验请求终端设备的物理网卡地址
      *  M必传
      */
+    @CheckNotEmpty(fieldName = "物理网卡地址", message = "物理网卡地址不能为空")
     private String macAddress;
     /**
      *  请求终端设备的ip地址;
      *  M必传
      */
+    @CheckNotEmpty(fieldName = "ip", message = "ip不能为空")
     private String ip;
     /***
      * 请求终端设备类型
      *  可移动设备/不可移动设备。
      *  M必传
      */
-    private String deviceType;
+    private String deviceType="不可移动设备";
     /**
      * 是否是互联网业务,不传默认为N
      * C
@@ -50,14 +59,17 @@ public class CarConfirmRequest extends PingAnBaseRequest {
     /**
      *  车辆信息
      */
+    @CheckNotEmpty(fieldName = "车辆信息")
     private VehicleDTO vehicle;
     /**
      *  车主信息
      */
+    @CheckNotEmpty(fieldName = "车主信息")
     private RegisterDTO register;
     /**
      *  被保人信息
      */
+    @CheckNotEmpty(fieldName = "被保人信息")
     private InsuredDTO insured;
     /**
      *  投保人信息
@@ -66,6 +78,7 @@ public class CarConfirmRequest extends PingAnBaseRequest {
     /**
      *  过户信息
      */
+    @CheckNotEmpty(fieldName = "过户信息")
     private BizQuoteDTO bizQuote;
     /**
      *  交强险信息
@@ -74,6 +87,7 @@ public class CarConfirmRequest extends PingAnBaseRequest {
     /**
      *  车船税信息
      */
+    @CheckNotEmpty(fieldName = "车船税信息")
     private TaxFormDTO taxForm;
     /**
      *  江苏交管验证码
@@ -169,18 +183,24 @@ public class CarConfirmRequest extends PingAnBaseRequest {
      *  O
      */
     private String developmentStage;
-
-    public CarConfirmRequest(PingAnConfigureParameters parameters, BaseQuoteInfoVo quoteInfo, SearchPAVehicleListResponse.ModelsDto modelsDto) {
+    //todo
+    public CarConfirmRequest(PingAnConfigureParameters parameters, BaseQuoteInfoVo quoteInfo, SearchPAVehicleListResponse.ModelsDto modelsDto,String flowid) {
         this.setUserId(parameters.getUserId());
+        this.setFlowid(flowid);
+        Map<String, String> map = NetworkUtils.printNetworkInfo();
+        this.setIp(map.get("ip"));
+        this.setMacAddress(map.get("mac"));
         CarInfoVo carInfo = quoteInfo.getCarInfo();
-//        this.vehicle = new VehicleDTO(carInfo, modelsDto);
-
+        this.vehicle = new VehicleDTO(carInfo, modelsDto);
         // 车主
         CustomerInfoVo ownerInfo = quoteInfo.getOwnerInfo();
+        this.register=new RegisterDTO(ownerInfo);
         // 投保人信息
         CustomerInfoVo policyHolderInfo = quoteInfo.getPolicyHolderInfo();
+        this.applicant=new ApplicantDTO(policyHolderInfo);
         // 被保人信息
         CustomerInfoVo insuredPersonInfo = quoteInfo.getInsuredPersonInfo();
+        this.insured=new InsuredDTO(insuredPersonInfo);
 
 
 
@@ -195,18 +215,22 @@ public class CarConfirmRequest extends PingAnBaseRequest {
         private static final long serialVersionUID = -2016238508046403647L;
         /**
          * 车辆初登日期
+         * yyyy-mm-dd
          * m
          */
+        @CheckNotEmpty(fieldName = "车辆初登日期", message = "车辆初登日期不能为空")
         private String registerDate;
         /**
          * 车架号
          * m
          */
+        @CheckNotEmpty(fieldName = "车架号", message = "车架号不能为空")
         private String frameNo;
         /**
          * 发动机号
          * m
          */
+        @CheckNotEmpty(fieldName = "发动机号", message = "发动机号不能为空")
         private String engineNo;
         /**
          * 精友车型编码
@@ -363,37 +387,35 @@ public class CarConfirmRequest extends PingAnBaseRequest {
          */
         private String specialCarLicense;
 
-//        public VehicleDTO(CarInfoVo carInfo, SearchPAVehicleListResponse.ModelsDto modelsDto) {
-//            this.registerDate = carInfo.getRegisterDate();
-//            this.frameNo = carInfo.getFrameNo();
-//            this.engineNo = carInfo.getEngineNo();
-//
-////            this.modelCode = modelsDto.getmod;
-//            this.paModelCode = modelsDto.getPaModelCode();
-//            this.modelIndex = modelsDto.getModelIndex();
-////            this.vehicleStyleUniqueId = vehicleStyleUniqueId;
-//            this.autoModelName = modelsDto.getModelName();
-//            this.seats = carInfo.getSeatCount();
-//
-//            this.wholeWeight = String.valueOf(Float.parseFloat(carInfo.getCompleteKerbMass()) / 1000);
-//            this.tonNumber = tonNumber;
-//
-//            this.exhaustMeasure = modelsDto.getExhaustMeasure();
-////            this.power = modelsDto.get;
-//            this.vehicleCertiType = vehicleCertiType;
-//            this.vehicleCertiNo = vehicleCertiNo;
-//            this.vehicleCertiDate = vehicleCertiDate;
-//            this.invoiceDate = invoiceDate;
-//            this.useAttribute = useAttribute;
-//            this.useAttributDetailCode = useAttributDetailCode;
-//            this.ownAttribute = ownAttribute;
-//            this.offerLastPolicyFlag = offerLastPolicyFlag;
-//            this.isOfferLocalUseProof = isOfferLocalUseProof;
-//            this.shanghaiVehicleType = shanghaiVehicleType;
-//            this.isNewEnergyVehicle = isNewEnergyVehicle;
-//            this.vehicleCodeForShangHai = vehicleCodeForShangHai;
-//            this.specialCarLicense = specialCarLicense;
-//        }
+
+        public VehicleDTO(CarInfoVo carInfo, SearchPAVehicleListResponse.ModelsDto modelsDto) {
+            this.registerDate = carInfo.getRegisterDate();
+            this.frameNo = carInfo.getFrameNo();
+            this.engineNo = carInfo.getEngineNo();
+            //this.modelCode = modelCode;
+            this.paModelCode = modelsDto.getPaModelCode();
+            this.modelIndex = modelsDto.getModelIndex();
+//            this.vehicleStyleUniqueId = vehicleStyleUniqueId;
+            this.autoModelName = modelsDto.getModelName();
+            this.seats = carInfo.getSeatCount();
+            this.wholeWeight = String.valueOf(Float.parseFloat(carInfo.getCompleteKerbMass()) / 1000);
+            this.tonNumber = carInfo.getCompleteKerbMass();
+            this.exhaustMeasure = modelsDto.getExhaustMeasure();
+            this.power = carInfo.getPowerScale();
+           // this.vehicleCertiType = vehicleCertiType;
+           // this.vehicleCertiNo = vehicleCertiNo;
+           // this.vehicleCertiDate = vehicleCertiDate;
+           // this.invoiceDate = invoiceDate;
+           // this.useAttribute = carInfo.getVehicleUse();
+           // this.useAttributDetailCode = useAttributDetailCode;
+          //  this.ownAttribute = carInfo.getCarnature();
+           // this.offerLastPolicyFlag = offerLastPolicyFlag;
+           // this.isOfferLocalUseProof = isOfferLocalUseProof;
+          //  this.shanghaiVehicleType = shanghaiVehicleType;
+          //  this.isNewEnergyVehicle = isNewEnergyVehicle;
+           // this.vehicleCodeForShangHai = vehicleCodeForShangHai;
+          //  this.specialCarLicense = specialCarLicense;
+        }
 
 
     }
@@ -407,6 +429,7 @@ public class CarConfirmRequest extends PingAnBaseRequest {
         /***
          * 车主名称
          */
+        @CheckNotEmpty(fieldName = "车主名称", message = "车主名称不能为空")
         private String name;
         /***
          * 生日
@@ -435,10 +458,12 @@ public class CarConfirmRequest extends PingAnBaseRequest {
          *
          * 证件类型续保模式录入回传给平安,则需要录入生日、性别。
          */
+        @CheckNotEmpty(fieldName = "证件类型", message = "证件类型不能为空")
         private String idType;
         /***
          * 证件号码
          */
+        @CheckNotEmpty(fieldName = "证件号码", message = "证件号码不能为空")
         private String idNo;
         /***
          * 手机或者家庭电话
@@ -458,6 +483,18 @@ public class CarConfirmRequest extends PingAnBaseRequest {
          */
         private String certificateDate;
 
+        public RegisterDTO(CustomerInfoVo ownerInfo) {
+            this.name=ownerInfo.getName();
+            //this.birthday=birthday;
+            this.gender=ownerInfo.getGender();
+            this.idType=ownerInfo.getIdentifyType();
+            this.idNo=ownerInfo.getIdentifyNumber();
+            this.mobile=ownerInfo.getMobile();
+            this.address=ownerInfo.getAddr();
+           // this.addressCode=addressCode;
+           // this.certificateDate=certificateDate;
+
+        }
     }
 
     /***
@@ -477,6 +514,7 @@ public class CarConfirmRequest extends PingAnBaseRequest {
          * 被保人名称
          * M
          */
+        @CheckNotEmpty(fieldName = "被保人名称", message = "被保人名称不能为空")
         private String name;
         /***
          * 证件类型
@@ -493,11 +531,13 @@ public class CarConfirmRequest extends PingAnBaseRequest {
          * 上海切换全国后,T团体时只支持01,03,05
          * M
          */
+        @CheckNotEmpty(fieldName = "证件类型", message = "证件类型不能为空")
         private String idType;
         /***
          *   证件号码
          *   M
          */
+        @CheckNotEmpty(fieldName = "证件号码", message = "证件号码不能为空")
         private String idNo;
         /***
          *  性别
@@ -606,6 +646,26 @@ public class CarConfirmRequest extends PingAnBaseRequest {
          */
         private String address;
 
+        public InsuredDTO(CustomerInfoVo insuredPersonInfo) {
+            //this.personnelType = personnelType;
+            this.name = insuredPersonInfo.getName();
+            this.idType = insuredPersonInfo.getIdentifyType();
+            this.idNo = insuredPersonInfo.getIdentifyNumber();
+            this.gender = insuredPersonInfo.getGender();
+            this.certificateIssueDate = insuredPersonInfo.getIdentifyValidDate();
+            this.certificateValidDate = insuredPersonInfo.getIdentifyValidEndDate();
+            //this.birthday = birthday;
+            this.mobile = insuredPersonInfo.getMobile();
+            //this.organizationType = organizationType;
+           // this.phoneExchange = phoneExchange;
+           // this.contactName = contactName;
+           // this.linkManCertificateTypeCode = linkManCertificateTypeCode;
+           // this.linkManCertificateNo = linkManCertificateNo;
+           // this.phoneHolderName = phoneHolderName;
+           // this.phoneHolderCertificateType = phoneHolderCertificateType;
+           // this.phoneHolderCertificateNo = phoneHolderCertificateNo;
+            this.address = insuredPersonInfo.getAddr();
+        }
     }
     /***
      * 投保人信息
@@ -639,6 +699,13 @@ public class CarConfirmRequest extends PingAnBaseRequest {
          * 证件类型为身份证、护照、台湾通行证、港澳通行证、港澳台居住证、外国永久居留证、外国居留证、外国临时居住证时必传
          */
         private String certificateValidDate;
+
+        public ApplicantDTO(CustomerInfoVo policyHolderInfo) {
+            //this.personnelType = personnelType;
+            this.name = policyHolderInfo.getName();
+            this.certificateIssueDate = policyHolderInfo.getIdentifyValidDate();
+            this.certificateValidDate = policyHolderInfo.getIdentifyValidEndDate();
+        }
     }
     /***
      *  过户信息
@@ -652,6 +719,7 @@ public class CarConfirmRequest extends PingAnBaseRequest {
          * 是-1,否-0
          * M
          */
+        @CheckNotEmpty(fieldName = "是否为过户车", message = "是否为过户车不能为空")
         private String specialCarFlag;
         /***
          * 过户日期
@@ -700,6 +768,7 @@ public class CarConfirmRequest extends PingAnBaseRequest {
          * M
          * 全国车船税是否代缴
          */
+        @CheckNotEmpty(fieldName = "全国车船税是否代缴", message = "全国车船税是否代缴不能为空")
         private String taxType;
         /***
          * 完税凭证号
@@ -729,5 +798,19 @@ public class CarConfirmRequest extends PingAnBaseRequest {
 
     }
 
-
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+         if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+         }
+         if(this.getFlowid()==null || "".equals(this.getFlowid())){
+            throw new FieldEmptyException("3.1返回的流程id不能为空!!!");
+         }
+         try {
+         Validator.validate(this);
+         }catch (Exception e){
+         throw new FieldEmptyException(e.getMessage());
+         }
+    }
 }

+ 36 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/DmvehicleInfoRequst.java

@@ -1,5 +1,10 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.CheckNotEmpty;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validator;
+import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -21,8 +26,15 @@ public class DmvehicleInfoRequst extends PingAnBaseRequest {
     /**
      *  车辆信息
      */
+    @CheckNotEmpty(fieldName = "车辆信息")
     private VehicleDTO vehicle;
 
+    public DmvehicleInfoRequst(PingAnConfigureParameters parameters, String flowid,String frameNo, String engineNo,String licenceTypeCode) {
+        this.setUserId(parameters.getUserId());
+        this.setFlowid(flowid);
+        this.setVehicle(new VehicleDTO(frameNo,engineNo,licenceTypeCode));
+    }
+
 
     /***
      * 车辆信息
@@ -34,11 +46,13 @@ public class DmvehicleInfoRequst extends PingAnBaseRequest {
          * 车架号
          * m
          */
+        @CheckNotEmpty(fieldName = "车架号", message = "车架号不能为空")
         private String frameNo;
         /**
          * 发动机号
          * m
          */
+        @CheckNotEmpty(fieldName = "发动机号", message = "发动机号不能为空")
         private String engineNo;
         /**
          * 号牌种类
@@ -46,5 +60,27 @@ public class DmvehicleInfoRequst extends PingAnBaseRequest {
          * 02小型汽车,具体枚举参考编码定义10.9
          */
         private String licenceTypeCode;
+
+        public VehicleDTO(String frameNo, String engineNo, String licenceTypeCode) {
+            this.setFrameNo(frameNo);
+            this.setEngineNo(engineNo);
+            this.setLicenceTypeCode(licenceTypeCode);
+        }
+    }
+
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        if(this.getFlowid()==null || "".equals(this.getFlowid())){
+            throw new FieldEmptyException("3.1返回的流程id不能为空!!!");
+        }
+        try {
+            Validator.validate(this);
+        }catch (Exception e){
+            throw new FieldEmptyException(e.getMessage());
+        }
     }
 }

+ 29 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/DocumentStatusListRequest.java

@@ -1,8 +1,14 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  *  @version
  *  @author: hxl
@@ -30,4 +36,27 @@ public class DocumentStatusListRequest extends PingAnBaseRequest{
      * RSA秘钥找平安获取
      */
     private String  signature;
+
+    public DocumentStatusListRequest(String subOrderNo, PingAnConfigureParameters parameters) {
+        List<String> list=new ArrayList<String>();
+        list.add(subOrderNo);
+        this.setUserId(parameters.getUserId());
+        this.setDocumentNoList(list.toArray(new String[list.size()]));
+    }
+
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        if(this.getDocumentNoList()==null || this.getDocumentNoList().length==0){
+            throw new FieldEmptyException("投保单号集合不能为空!!!");
+        }else if(this.getDocumentNoList().length>2){
+            throw new FieldEmptyException("投保单号集合上限两条!!!");
+        }
+        if(this.getSignature()==null || "".equals(this.getSignature())){
+            throw new FieldEmptyException("密钥不能为空!!!");
+        }
+    }
 }

+ 10 - 11
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/IndexRequest.java

@@ -1,6 +1,8 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
 import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -12,17 +14,6 @@ import java.io.Serializable;
 /**
  * @version
  * @description: 标的检查 3.1  接口入参    userId 必传属性M
- * flowid    C 条件出现  返回多标的时传入。其余情况为出参返回
- *
- *   0-[成功]
- *      * 1-上年在平安有投保记录[成功]
- *      * 2-商交均未到期,不满足提前投保天数
- *      * 3-未查到当前城市
- *      * 4-未开通当前渠道机构
- *      * 5-好伙伴账号校验不通过(不存在or账号绑定的相关字段已失效)
- *      * 6-该车牌对应多个标的,需要进行确认
- *      * 7-北京地区兼业代理投保且为非金融业务,并未维护兼业代理从业人员信息,请到PMS维护
- *      *  M 必然返回
  * @author: wenks
  * @date: 2024/3/21 8:57
  **/
@@ -123,4 +114,12 @@ public class IndexRequest extends PingAnBaseRequest {
 
     }
 
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+
+    }
 }

+ 3 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/PingAnBaseRequest.java

@@ -23,5 +23,8 @@ public class PingAnBaseRequest implements Serializable {
      * 流程ID
      */
     private String flowid;
+    //验证入参参数
+    public void validate() {
 
+    }
 }

+ 37 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/PolicyPdfRequest.java

@@ -1,9 +1,15 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+import com.ydtech.modules.order.entity.vo.bohai.BoHaiQuoteAccidentVo;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  *  @version
@@ -43,6 +49,14 @@ public class PolicyPdfRequest extends PingAnBaseRequest{
      */
     private VehicleDTO vehicle;
 
+    public PolicyPdfRequest(PingAnConfigureParameters parameters, BaseQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo,String checkNo,String licenseNo,String frameNo) {
+          this.setUserId(parameters.getUserId());
+          this.setDocumentNo(quoteVo.getOrderNo());
+          this.setCheckNo(checkNo);
+          this.setCheckNo(checkNo);
+          this.setVehicle(new VehicleDTO(licenseNo,frameNo));
+    }
+
     /***
      * 车辆信息
      */
@@ -58,6 +72,29 @@ public class PolicyPdfRequest extends PingAnBaseRequest{
          */
         private String frameNo;
 
+        public VehicleDTO(String licenseNo, String frameNo) {
+            this.licenseNo = licenseNo;
+            this.frameNo = frameNo;
+        }
     }
 
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        if(this.getDocumentNo()==null || "".equals(this.getDocumentNo())){
+            throw new FieldEmptyException("投保单号不能为空!!!");
+        }
+        if(this.getCheckNo()==null || "".equals(this.getCheckNo())){
+            throw new FieldEmptyException("完整的车主证件号不能为空!!!");
+        }
+        if(this.getSignature()==null || "".equals(this.getSignature())){
+            throw new FieldEmptyException("密钥不能为空!!!");
+        }
+        if(this.getVehicle()==null || this.getVehicle().getLicenseNo() ==null || "".equals(this.getVehicle().getLicenseNo())){
+            throw new FieldEmptyException("车牌号码不能为空!!!");
+        }
+    }
 }

+ 58 - 1
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/QuoteRequest.java

@@ -1,5 +1,12 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.response.SearchPAVehicleListResponse;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.CheckNotEmpty;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validator;
+import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -23,10 +30,12 @@ public class QuoteRequest extends PingAnBaseRequest {
      * true,false
      * M
      */
+    @CheckNotEmpty(fieldName = "是否投保商业险",message = "是否投保商业险不能为空")
     private boolean applyBiz;
     /***
      * 商业险信息
      */
+    @CheckNotEmpty(fieldName = "商业险信息")
     private BizQuoteDTO bizQuote;
     /***
      * 是否允许商业险重复投保标志(true:允许商业险重复投保 false:默认不允许商业险重复投保)
@@ -362,6 +371,7 @@ public class QuoteRequest extends PingAnBaseRequest {
      *
      * m
      */
+    @CheckNotEmpty(fieldName = "是否投保交强险", message = "是否投保交强险不能为空")
     private String applyForce;
     /***
      * 交强险信息
@@ -392,6 +402,7 @@ public class QuoteRequest extends PingAnBaseRequest {
      * true,false
      * M
      */
+    @CheckNotEmpty(fieldName = "是否通融报价", message = "是否通融报价不能为空")
     private String accommodationFlag;
     /***
      * 通融紧急程度
@@ -418,20 +429,24 @@ public class QuoteRequest extends PingAnBaseRequest {
      * true,false
      * M
      */
+    @CheckNotEmpty(fieldName = "是否投保财意险", message = "是否投保财意险不能为空")
     private String applyUnAuto;
     /***
      * 是否投保小微险
      * true,false
      * M
      */
+    @CheckNotEmpty(fieldName = "是否投保小微险", message = "是否投保小微险不能为空")
     private String applyXiaoWei;
     /***
      * 财意险列表
      */
+    @CheckNotEmpty(fieldName = "财意险列表")
     private List<UnAutoListInfoDTO> unAutoListInfo=new ArrayList<UnAutoListInfoDTO>();
     /***
      * 小微险列表
      */
+    @CheckNotEmpty(fieldName = "小微险列表")
     private List<UnAutoListInfoDTO> xiaoWeiListInfo=new ArrayList<UnAutoListInfoDTO>();
     /***
      * 非车代理人编码
@@ -706,6 +721,7 @@ public class QuoteRequest extends PingAnBaseRequest {
      *  新增加设备损失险设备信息列表
      *
      */
+    @CheckNotEmpty(fieldName = "新增加设备损失险设备信息列表")
     private List<Amount10XNYDeviceListDTO> amount10XNYDeviceList=new ArrayList<Amount10XNYDeviceListDTO>();
     /***
      *  投保附加自用充电桩损失保险
@@ -718,6 +734,23 @@ public class QuoteRequest extends PingAnBaseRequest {
      * 【自用充电桩设备信息列表,最多3个桩】
      */
     private List<Amount23XNYChargingPostListDTO> amount23XNYChargingPostList=new ArrayList<Amount23XNYChargingPostListDTO>();
+    //todo
+    public QuoteRequest(PingAnConfigureParameters parameters, BaseQuoteInfoVo quoteInfo, SearchPAVehicleListResponse.ModelsDto modelsDto, String flowid,String applyBiz,BizQuoteDTO bizQuote,String applyForce,String accommodationFlag,String applyUnAuto,String applyXiaoWei,List<UnAutoListInfoDTO> unAutoListInfo,List<UnAutoListInfoDTO> xiaoWeiListInfo,List<Amount22XNYChargingPostListDTO> amount22XNYChargingPostList, List<Amount23XNYChargingPostListDTO> amount23XNYChargingPostList) {
+        this.setUserId(parameters.getUserId());
+        this.setFlowid(flowid);
+        this.setApplyBiz(Boolean.parseBoolean(applyBiz));
+        this.bizQuote=bizQuote;
+        this.setApplyForce(applyForce);
+        this.setAccommodationFlag(accommodationFlag);
+        this.setApplyUnAuto(applyUnAuto);
+        this.setApplyXiaoWei(applyXiaoWei);
+        // 财意险列表
+        // 小微险列表
+        this.setUnAutoListInfo(unAutoListInfo);
+        this.setXiaoWeiListInfo(xiaoWeiListInfo);
+        this.setAmount22XNYChargingPostList(amount22XNYChargingPostList);
+        this.setAmount23XNYChargingPostList(amount23XNYChargingPostList);
+    }
 
     /***
      * 商业险信息
@@ -731,6 +764,7 @@ public class QuoteRequest extends PingAnBaseRequest {
          * yyyy-mm-dd hh:mm:ss
          * M
          */
+        @CheckNotEmpty(fieldName = "商业险起保日期", message = "商业险起保日期不能为空")
         private String beginDate;
         /***
          * 商业险短期单止期
@@ -745,6 +779,12 @@ public class QuoteRequest extends PingAnBaseRequest {
          */
         private String loanVehicleFlag;
 
+        public BizQuoteDTO() {
+        }
+
+        public BizQuoteDTO(String beginDate) {
+            this.beginDate = beginDate;
+        }
     }
     /***
      * 交强险信息
@@ -827,16 +867,19 @@ public class QuoteRequest extends PingAnBaseRequest {
          * 产品编码
          * M
          */
+        @CheckNotEmpty(fieldName = "产品编码", message = "产品编码不能为空")
         private String productCode;
         /***
          * 套餐编码
          * M
          */
+        @CheckNotEmpty(fieldName = "套餐编码", message = "套餐编码不能为空")
         private String packageCode;
         /***
          * 购买份数
          * M
          */
+        @CheckNotEmpty(fieldName = "购买份数", message = "购买份数不能为空")
         private String sellListSize;
 
 
@@ -986,5 +1029,19 @@ public class QuoteRequest extends PingAnBaseRequest {
 
     }
 
-
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        if(this.getFlowid()==null || "".equals(this.getFlowid())){
+            throw new FieldEmptyException("3.1返回的流程id不能为空!!!");
+        }
+        try {
+            Validator.validate(this);
+        }catch (Exception e){
+            throw new FieldEmptyException(e.getMessage());
+        }
+    }
 }

+ 26 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/RenewalConfirmRequest.java

@@ -1,5 +1,8 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -26,4 +29,27 @@ public class RenewalConfirmRequest extends PingAnBaseRequest {
      * RSA秘钥找平安获取
      */
     private String signature;
+
+    public RenewalConfirmRequest(PingAnConfigureParameters parameters, String flowid, String checkNo) {
+        this.setUserId(parameters.getUserId());
+        this.setFlowid(flowid);
+        this.setCheckNo(checkNo);
+    }
+
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        if(this.getFlowid()==null || "".equals(this.getFlowid())){
+            throw new FieldEmptyException("3.1返回的流程id不能为空!!!");
+        }
+        if(this.getCheckNo()==null || "".equals(this.getCheckNo())){
+            throw new FieldEmptyException("车主证件后6位不能为空!!!");
+        }
+        if(this.getSignature()==null || "".equals(this.getSignature())){
+            throw new FieldEmptyException("密钥不能为空!!!");
+        }
+    }
 }

+ 24 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/RepealDocumentRequest.java

@@ -1,5 +1,7 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -16,6 +18,7 @@ import lombok.EqualsAndHashCode;
 public class RepealDocumentRequest extends PingAnBaseRequest{
 
     /***
+     * 文件类型
      * 1-撤销投保单,2-撤销通知单,3-撤销投保预确认码,4-撤销平台交易号
      *
      * 上海地区(1和2二选一):1)先撤销通知单再撤销投保预确认;2)先撤销平台交易号再撤销投保预确认
@@ -33,4 +36,25 @@ public class RepealDocumentRequest extends PingAnBaseRequest{
      * C
      */
     private String departmentCode;
+
+    public RepealDocumentRequest(String subOrderNo, String uerId,String departmentCode,String documentType) {
+        this.setUserId(uerId);
+        this.setDocumentType(documentType);
+        this.setDocumentNo(subOrderNo);
+        this.setDepartmentCode(departmentCode);
+    }
+
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        if(this.getDocumentType()==null || "".equals(this.getDocumentType())){
+            throw new FieldEmptyException("文件类型不能为空!!!");
+        }
+        if(this.getDocumentNo()==null || "".equals(this.getDocumentNo())){
+            throw new FieldEmptyException("通知单号或者投保单号或者平台交易号不能为空!!!");
+        }
+    }
 }

+ 34 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/ScanCodeURLRequest.java

@@ -1,5 +1,9 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.CheckNotEmpty;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validator;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -21,11 +25,21 @@ public class ScanCodeURLRequest extends PingAnBaseRequest{
     /***
      * 投保单号集合
      */
+    @CheckNotEmpty(fieldName = "投保单号集合")
     private ArrayList<DocumentDTO> documentList=new ArrayList<DocumentDTO>();
     /***
      * 数据来源  68
      */
     private String dataSource;
+
+    public ScanCodeURLRequest(String applyno,String documentType,String dataSource) {
+        ArrayList<ScanCodeURLRequest.DocumentDTO> documentList=new ArrayList<ScanCodeURLRequest.DocumentDTO>();
+        ScanCodeURLRequest.DocumentDTO  dto=new  ScanCodeURLRequest.DocumentDTO(applyno,documentType);
+        documentList.add(dto);
+        this.setDocumentList(documentList);
+        this.setDataSource(dataSource);
+    }
+
     /***
      *投保单号信息
      *
@@ -38,11 +52,31 @@ public class ScanCodeURLRequest extends PingAnBaseRequest{
          *投保单号
          * M
          */
+        @CheckNotEmpty(fieldName = "投保单号", message = "投保单号不能为空")
         private String documentNo;
         /***
          *单证类型(01投保单02保单03批改申请单04批单05赔案号06报案号07通知单号)
          * M
          */
+        @CheckNotEmpty(fieldName = "单证类型", message = "单证类型不能为空")
         private String documentType;
+
+        public DocumentDTO(String applyno,String documentType) {
+            this.setDocumentNo(applyno);
+            this.setDocumentType(documentType);
+        }
+    }
+
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        try {
+            Validator.validate(this);
+        }catch (Exception e){
+            throw new FieldEmptyException(e.getMessage());
+        }
     }
 }

+ 21 - 1
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/SearchPAVehicleListRequest.java

@@ -1,6 +1,8 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -30,8 +32,26 @@ public class SearchPAVehicleListRequest extends PingAnBaseRequest {
     public SearchPAVehicleListRequest(String userId, String flowid, String keyword) {
         this.setUserId(userId);
         this.setFlowid(flowid);
-
         this.keyword = keyword;
     }
 
+
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        if(this.getFlowid()==null || "".equals(this.getFlowid())){
+            throw new FieldEmptyException("3.1返回的流程id不能为空!!!");
+        }
+        if(this.getKeyword()==null || "".equals(this.getKeyword())){
+            throw new FieldEmptyException("关键字不能为空!!!");
+        }
+        if(this.getSignature()==null || "".equals(this.getSignature())){
+            throw new FieldEmptyException("签名加密不能为空!!!");
+        }
+    }
+
+
 }

+ 24 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/ServiceContractRequest.java

@@ -1,11 +1,14 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
 import lombok.Data;
 /**
  *  @version
  *  @author: hxl
  *  @Date: 2024/3/27 11:47
  *  @Description:  服务类特约检索   5.2   接口入参
+ *  无userid和流程id
  */
 @Data
 public class ServiceContractRequest extends PingAnBaseRequest {
@@ -26,10 +29,31 @@ public class ServiceContractRequest extends PingAnBaseRequest {
      * c
      */
     private String useAttribute;
+
+    public ServiceContractRequest(String departmentCode) {
+        this.setDepartmentCode(departmentCode);
+    }
     /***
      * 深圳地区传入流程号
      * c
      */
    // private String flowid;
 
+    /**
+    * @Description  机构编码(账号或机构编码二选一,建议传递机构编码)
+    * @Author  hxl
+    * @Date   2024/4/1 9:05
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if((this.getInputBy()!=null && !"".equals(this.getInputBy())) || (this.getDepartmentCode()!=null && !"".equals(this.getDepartmentCode()))  ){
+            throw new FieldEmptyException("账号或机构编码不能为空(账号或机构编码二选一建议传递机构编码)!!!");
+        }
+    }
+
 }

+ 75 - 1
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/SubmitApplyRequest.java

@@ -1,11 +1,21 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
+import com.ydtech.modules.order.entity.api.pingan.utils.NetworkUtils;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.CheckNotEmpty;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validator;
+import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
+
 /**
  *  @version
  *  @author: hxl
@@ -26,6 +36,7 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
      * M
      *
      */
+    @CheckNotEmpty(fieldName = "是否核保", message = "是否核保不能为空")
     private String isApply;
     /***
      * 商业险保单格式
@@ -95,14 +106,17 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
     /***
      *  被保人信息
      */
+    @CheckNotEmpty(fieldName = "被保人信息")
     private InsuredDTO insured;
     /***
      * 投保人信息
      */
+    @CheckNotEmpty(fieldName = "投保人信息")
     private ApplicantDTO applicant;
     /***
      * 收单信息
      */
+    @CheckNotEmpty(fieldName = "收单信息")
     private AddressDTO address;
     /***
      *  【不传则取会用默认特约】
@@ -315,6 +329,25 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
      * 文件集合
      */
     private List<DocListDTO> docList;
+    //todo
+    public SubmitApplyRequest(PingAnConfigureParameters parameters, BaseQuoteInfoVo quoteInfo, String flowid,String isApply) {
+
+        this.setUserId(parameters.getUserId());
+        this.setFlowid(flowid);
+        this.setIsApply(isApply);
+        Map<String, String> map = NetworkUtils.printNetworkInfo();
+        this.setIp(map.get("ip"));
+        this.setMacAddress(map.get("mac"));
+        // 车主
+        CustomerInfoVo ownerInfo = quoteInfo.getOwnerInfo();
+        this.register=new SubmitApplyRequest.RegisterDTO(ownerInfo);
+        // 投保人信息
+        CustomerInfoVo policyHolderInfo = quoteInfo.getPolicyHolderInfo();
+        this.applicant=new SubmitApplyRequest.ApplicantDTO(policyHolderInfo);
+        // 被保人信息
+        CustomerInfoVo insuredPersonInfo = quoteInfo.getInsuredPersonInfo();
+        this.insured=new SubmitApplyRequest.InsuredDTO(insuredPersonInfo);
+    }
 
     /***
      * 车主信息
@@ -347,6 +380,11 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
          */
         private String addressCode;
 
+        public RegisterDTO(CustomerInfoVo ownerInfo) {
+            this.mobile=ownerInfo.getMobile();
+            this.address=ownerInfo.getAddr();
+            // this.addressCode=addressCode;
+        }
     }
 
     /***
@@ -361,6 +399,7 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
          * M
          * 浙江、大连必传
          */
+        @CheckNotEmpty(fieldName = "手机或者家庭电话", message = "手机或者家庭电话不能为空")
         private String mobile;
         /***
          * 被保人证件有效期开始日期
@@ -382,8 +421,16 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
          *
          * 浙江、大连必传
          */
+        @CheckNotEmpty(fieldName = "地址", message = "地址不能为空")
         private String address;
 
+        public InsuredDTO(CustomerInfoVo insuredPersonInfo) {
+            this.certificateIssueDate = insuredPersonInfo.getIdentifyValidDate();
+            this.certificateValidDate = insuredPersonInfo.getIdentifyValidEndDate();
+            this.mobile = insuredPersonInfo.getMobile();
+            this.address = insuredPersonInfo.getAddr();
+        }
+
     }
 
     /***
@@ -403,6 +450,7 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
          * 投保人名称
          * m
          */
+        @CheckNotEmpty(fieldName = "投保人名称", message = "投保人名称不能为空")
         private String name;
         /***
          * 证件类型
@@ -421,12 +469,14 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
          * 传组织机构代码证、营业执照时,会从国家代码中心检查
          * M
          */
+        @CheckNotEmpty(fieldName = "证件类型", message = "证件类型不能为空")
         private String idType;
         /***
          * 证件号码
          * M
          *
          */
+        @CheckNotEmpty(fieldName = "证件号码", message = "证件号码不能为空")
         private String idNo;
         /***
          * 投保人证件有效期开始日期
@@ -460,6 +510,7 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
          *
          * 江苏、苏州、无锡,并且投保人个团标志为个人时
          */
+        @CheckNotEmpty(fieldName = "手机或者家庭电话", message = "手机或者家庭电话不能为空")
         private String mobile;
         /***
          * 电子邮箱
@@ -507,6 +558,7 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
          *
          * 浙江、大连必传
          */
+        @CheckNotEmpty(fieldName = "地址", message = "地址不能为空")
         private String address;
         /***
          * 联系人证件类型
@@ -539,6 +591,13 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
          * 同applicant.phoneHolderName
          */
         private String phoneHolderCertificateNo;
+
+        public ApplicantDTO(CustomerInfoVo policyHolderInfo) {
+            //this.personnelType = personnelType;
+            this.name = policyHolderInfo.getName();
+            this.certificateIssueDate = policyHolderInfo.getIdentifyValidDate();
+            this.certificateValidDate = policyHolderInfo.getIdentifyValidEndDate();
+        }
     }
     /***
      * 收单信息
@@ -553,6 +612,7 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
          * (0-配送只会在后台记录配送信息,不会做系统自动配送)
          * m
          */
+        @CheckNotEmpty(fieldName = "保单领取方式", message = "保单领取方式不能为空")
         private String receiveMode;
         /***
          * 收件详细地址
@@ -676,6 +736,20 @@ public class SubmitApplyRequest extends PingAnBaseRequest {
          */
         private String developmentStage;
     }
-
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        if(this.getFlowid()==null || "".equals(this.getFlowid())){
+            throw new FieldEmptyException("3.1返回的流程id不能为空!!!");
+        }
+        try {
+            Validator.validate(this);
+        }catch (Exception e){
+            throw new FieldEmptyException(e.getMessage());
+        }
+    }
 
 }

+ 29 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/UnAutoProductDetailRequest.java

@@ -1,5 +1,11 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.CheckNotEmpty;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validator;
+import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
+import com.ydtech.modules.order.entity.vo.bohai.ProductDetailsQueryVo;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 /**
@@ -19,16 +25,39 @@ public class UnAutoProductDetailRequest extends PingAnBaseRequest {
      * 产品编码
      * M
      */
+    @CheckNotEmpty(fieldName = "产品编码", message = "产品编码不能为空")
     private String productCode;
     /***
      * 套餐编码
      * M
      */
+    @CheckNotEmpty(fieldName = "套餐编码", message = "套餐编码不能为空")
     private String packageCode;
     /***
      * 版本号
      * M
      */
+    @CheckNotEmpty(fieldName = "版本号", message = "版本号不能为空")
     private String version;
 
+    public UnAutoProductDetailRequest(PingAnConfigureParameters parameters, ProductDetailsQueryVo productDetailsQueryVo) {
+        this.setUserId(parameters.getUserId());
+        this.setProductCode(productDetailsQueryVo.getProductCode());
+        this.setPackageCode(productDetailsQueryVo.getPackageCode());
+        this.setVersion(productDetailsQueryVo.getVersion());
+    }
+
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        try {
+            Validator.validate(this);
+        }catch (Exception e){
+            throw new FieldEmptyException(e.getMessage());
+        }
+    }
+
 }

+ 31 - 1
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/UnAutoProductListRequest.java

@@ -1,11 +1,17 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.CheckNotEmpty;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validator;
+import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
+import com.ydtech.modules.order.entity.vo.bohai.ProductQueryVo;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
 /**
- * @description: 获取财意险险种套餐列表 接口入参
+ * @description:  4.4 获取财意险险种套餐列表 接口入参
  *  userId	M
  * 必传	合作伙伴操作用户ID,用来记录合作伙伴操作人身份
  *
@@ -22,6 +28,7 @@ public class UnAutoProductListRequest extends PingAnBaseRequest {
      * 02-非营业
      * M
      */
+    @CheckNotEmpty(fieldName = "车辆使用性质代码", message = "车辆使用性质代码不能为空")
     private String useAttribute;
     /***
      * 所属性质(01:机关,02:企业,03:私人)
@@ -29,11 +36,13 @@ public class UnAutoProductListRequest extends PingAnBaseRequest {
      * 车辆使用性质为01:营业时,所属性质不可以选择01:机关
      * m
      */
+    @CheckNotEmpty(fieldName = "所属性质", message = "所属性质不能为空")
     private String ownAttribute;
     /***
      * 座位数
      * M
      */
+    @CheckNotEmpty(fieldName = "座位数", message = "座位数不能为空")
     private String seats;
     /***
      * 平安好伙伴外网录单账号
@@ -59,4 +68,25 @@ public class UnAutoProductListRequest extends PingAnBaseRequest {
      */
     private String tonNumber;
 
+    public UnAutoProductListRequest(PingAnConfigureParameters parameters, ProductQueryVo productQueryVo) {
+        this.setUserId(parameters.getUserId());
+        this.setUseAttribute(productQueryVo.getCarnature());
+        this.setOwnAttribute(productQueryVo.getCarnature());
+        this.setSeats(productQueryVo.getSeatCount());
+        this.setTonNumber(productQueryVo.getLimitLoad());
+    }
+
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        if(this.getUserId()==null || "".equals(this.getUserId())){
+            throw new FieldEmptyException("合作伙伴操作用户ID-UserId不能为空!!!");
+        }
+        try {
+            Validator.validate(this);
+        }catch (Exception e){
+            throw new FieldEmptyException(e.getMessage());
+        }
+    }
+
 }

+ 40 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/request/UploadFilesRequest.java

@@ -1,5 +1,9 @@
 package com.ydtech.modules.order.entity.api.pingan.request;
 
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.CheckNotEmpty;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.FieldEmptyException;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validate;
+import com.ydtech.modules.order.entity.api.pingan.utils.checkNull.Validator;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -21,8 +25,13 @@ public class UploadFilesRequest extends PingAnBaseRequest{
     /***
      * 文件集合
      */
+    @CheckNotEmpty(fieldName = "docList")
     private List<DocListDTO> docList=new ArrayList<DocListDTO>();
 
+    public UploadFilesRequest(List<DocListDTO> list) {
+        this.setDocList(list);
+    }
+
 
     /***
      *  文件信息
@@ -37,26 +46,31 @@ public class UploadFilesRequest extends PingAnBaseRequest{
          * {client_id}-{YYYYMMDDHHMISS}-{UUID}
          * m
          */
+        @CheckNotEmpty(fieldName = "上传至iobs的文件id", message = "上传至iobs的文件id不能为空")
         private String docId;
         /***
          * 文件大类编码
          * m
          */
+        @CheckNotEmpty(fieldName = "文件大类编码", message = "文件大类编码不能为空")
         private String documentClass;
         /***
          * 文件小类编码
          * m
          */
+        @CheckNotEmpty(fieldName = "文件小类编码", message = "文件小类编码不能为空")
         private String documentType;
         /***
          * 文件名称(不包含后缀,文件大类-文件小类+该小类的第几个文件)
          * m
          */
+        @CheckNotEmpty(fieldName = "文件名称(不包含后缀,文件大类-文件小类+该小类的第几个文件)", message = "文件名称(不包含后缀,文件大类-文件小类+该小类的第几个文件)不能为空")
         private String documentName;
         /***
          * 文件格式(不带”.”)
          * m
          */
+        @CheckNotEmpty(fieldName = "文件格式(不带”.”)", message = "文件格式(不带”.”)不能为空")
         private String documentFormat;
         /***
          * 文件大小(可不传)
@@ -67,6 +81,7 @@ public class UploadFilesRequest extends PingAnBaseRequest{
          * 投保单号
          * m
          */
+        @CheckNotEmpty(fieldName = "投保单号", message = "投保单号不能为空")
         private String applyPolicyNo;
         /***
          * 关联投保保单号
@@ -82,6 +97,31 @@ public class UploadFilesRequest extends PingAnBaseRequest{
          * 数据来源 openApi
          *  m
          */
+        @CheckNotEmpty(fieldName = "数据来源", message = "数据来源不能为空")
         private String dataSource;
+
+
+        public DocListDTO(String docId, String documentClass, String documentType, String documentName, String documentFormat, String documentSize, String applyPolicyNo, String relationApplyPolicyNo, String userId, String dataSource) {
+            this.docId = docId;
+            this.documentClass = documentClass;
+            this.documentType = documentType;
+            this.documentName = documentName;
+            this.documentFormat = documentFormat;
+            this.documentSize = documentSize;
+            this.applyPolicyNo = applyPolicyNo;
+            this.relationApplyPolicyNo = relationApplyPolicyNo;
+            this.userId = userId;
+            this.dataSource = dataSource;
+        }
+    }
+
+    @Validate
+    public void validate() {
+        // 执行验证逻辑
+        try {
+            Validator.validate(this);
+        }catch (Exception e){
+            throw new FieldEmptyException(e.getMessage());
+        }
     }
 }

+ 10 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/response/IndexResponse.java

@@ -14,6 +14,16 @@ import java.util.List;
  *  @author: hxl
  *  @Date: 2024/3/26 11:42
  *  @Description:  标的检查 3.1  接口出参
+ *  resultMessage	O	后台接口执行信息
+ * resultCode	M	0-[成功]
+ * 1-上年在平安有投保记录[成功]
+ * 2-商交均未到期,不满足提前投保天数
+ * 3-未查到当前城市
+ * 4-未开通当前渠道机构
+ * 5-好伙伴账号校验不通过(不存在or账号绑定的相关字段已失效)
+ * 6-该车牌对应多个标的,需要进行确认
+ * 7-北京地区兼业代理投保且为非金融业务,并未维护兼业代理从业人员信息,请到PMS维护
+ * flowid	M	流程ID
  */
 @AllArgsConstructor
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/pingan/response/QuoteResponse.java

@@ -1483,7 +1483,7 @@ public class QuoteResponse extends PingAnBaseResponse {
         /***
          *  风险因子列表
          */
-        private List<RateListDTO> rateListDTOS;
+        private List<RateListDTO> rateList;
         /***
          *  产品相关次数
          */

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/pingan/response/RenewalConfirmResponse.java

@@ -12,7 +12,7 @@ import java.util.List;
  * @description: 续保确认 4.1 出参参数
  * resultCode 返回值
  * 0-[成功]
- * 1-车主证件校验不通过
+ * 1-车主证件校验不通过      使用接口3.1出参flowid   index接口返回1时调用
  * 2-不支持的投保范围(例如:上年非9座及9座以下客车)
  * 3-系统异常
  * @author: wenks

+ 5 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/response/SearchPAVehicleListResponse.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.order.entity.api.pingan.response;
 
 import com.ydtech.modules.order.entity.filter.CarModelsFilter;
+import com.ydtech.modules.order.entity.vo.CoreModelsVo;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -117,6 +118,10 @@ public class SearchPAVehicleListResponse extends PingAnBaseResponse {
         public String getPurchasePrice() {
             return this.price;
         }
+
+        public CoreModelsVo toCoreModelsVo() {
+          return  new CoreModelsVo(this.paModelCode, this.modelName, this.seats, this.marketDate, null,this.exhaustMeasure, this.price);
+        }
     }
 
 }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/pingan/response/UnAutoProductListResponse.java

@@ -8,7 +8,7 @@ import java.util.List;
  *  @version
  *  @author: hxl
  *  @Date: 2024/3/27 9:41
- *  @Description:   获取财意险险种套餐列表 接口出参
+ *  @Description:   4.4  获取财意险险种套餐列表 接口出参
  *  resultCode	M	后台接口执行编码
  *  0-[成功]
  *  1-异常

+ 36 - 67
src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/Base64Convert.java

@@ -1,67 +1,36 @@
-//package com.ydtech.modules.order.entity.api.pingan.utils;
-//
-//import sun.misc.BASE64Decoder;
-//import sun.misc.BASE64Encoder;
-//
-//import java.io.*;
-///**
-// *  @version
-// *  @author: hxl
-// *  @Date: 2024/3/27 17:22
-// *  @Description:  base64字符串处理工具类
-// */
-//public class Base64Convert {
-//    /**
-//     * 流转换为字符串
-//     *
-//     * @param in
-//     * @return
-//     * @throws IOException
-//     */
-//    public static String ioToBase64(InputStream in) throws IOException {
-//        String strBase64 = null;
-//        try {
-//            // in.available()返回文件的字节长度
-//            byte[] bytes = new byte[in.available()];
-//            // 将文件中的内容读入到数组中
-//            in.read(bytes);
-//            strBase64 = new BASE64Encoder().encode(bytes);      //将字节流数组转换为字符串
-//        } finally {
-//            if (in != null) {
-//                in.close();
-//            }
-//        }
-//
-//        return strBase64;
-//    }
-//
-//    /**
-//     * 流转换为字符串
-//     *
-//     * @param bytes
-//     * @return
-//     * @throws IOException
-//     */
-//    public static String byteToBase64(byte[] bytes)  {
-//        String strBase64 = null;
-//            // in.available()返回文件的字节长度
-//            strBase64 = new BASE64Encoder().encode(bytes);      //将字节流数组转换为字符串
-//        return strBase64;
-//    }
-//
-//
-//
-//
-//    /**
-//     * 将base64 转为字节
-//     *
-//     * @param strBase64
-//     * @return
-//     * @throws IOException
-//     */
-//    public static byte[] base64ToByte(String strBase64) throws IOException {
-//        // 解码,然后将字节转换为文件
-//        byte[] bytes = new BASE64Decoder().decodeBuffer(strBase64);   //将字符串转换为byte数组
-//        return bytes;
-//    }
-//}
+package com.ydtech.modules.order.entity.api.pingan.utils;
+
+import org.apache.commons.codec.binary.Base64;
+
+/**
+ *  @version  将字节流转换为Base64字符串。
+ *  解决使用jdk的base64转码打包错误的问题
+ *  处理平安保单文件加密预览
+ *  @author: hxl
+ *  @Date: 2024/4/2 14:32
+ *  @Description:
+ */
+public class Base64Convert {
+
+    /**
+     * 将字节流转换为Base64字符串。
+     * @param data 字节流数据
+     * @return Base64编码后的字符串
+     */
+    public static String byteToBase64(byte[] data) {
+        return Base64.encodeBase64String(data);
+    }
+
+    /**
+    * @Description 将base64为字符串转为字节数组
+    * @Author  hxl
+    * @Date   2024/4/2 16:28
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public static byte[] encodeToString(String base64Str) {
+        return Base64.decodeBase64(base64Str);
+    }
+}

+ 67 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/NetworkUtils.java

@@ -0,0 +1,67 @@
+package com.ydtech.modules.order.entity.api.pingan.utils;
+
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.util.Enumeration;
+import java.util.Formatter;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+  *  @version  获取本地ip和mac地址
+  *  @author: hxl
+  *  @Date: 2024/4/1 17:39
+  *  @Description:
+  */
+public class NetworkUtils {
+
+
+
+    public static Map<String,String> printNetworkInfo() {
+        Map<String,String> map=new HashMap<>();
+        try {
+            // 获取所有网络接口
+            Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
+            while (interfaces.hasMoreElements()) {
+                NetworkInterface networkInterface = interfaces.nextElement();
+                // 确保网络接口已经启用
+                if (networkInterface.isUp()) {
+                    // 获取与此网络接口绑定的InetAddress
+                    Enumeration<InetAddress> addresses = networkInterface.getInetAddresses();
+                    while (addresses.hasMoreElements()) {
+                        InetAddress inetAddress = addresses.nextElement();
+                        // 确保不是loopback地址
+                        if (!inetAddress.isLoopbackAddress()) {
+                            // 获取IP地址
+                            String ipAddress = inetAddress.getHostAddress();
+                            // 获取MAC地址
+                            byte[] mac = networkInterface.getHardwareAddress();
+                            String macAddress = mac != null ? bytesToHex(mac) : "00:00:00:00:00:00";
+                            map.put("ip",ipAddress);
+                            map.put("mac",macAddress);
+
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return map;
+    }
+ 
+    private static String bytesToHex(byte[] bytes) {
+        Formatter formatter = new Formatter();
+        for (byte b : bytes) {
+            formatter.format("%02X:", b);
+        }
+        String result = formatter.toString();
+        formatter.close();
+        // 移除最后一个冒号
+        return result.length() > 0 ? result.substring(0, result.length() - 1) : result;
+    }
+ 
+    public static void main(String[] args) {
+        printNetworkInfo();
+    }
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 134
src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/PDFUtil.java


+ 30 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/PinAnEnumUtils.java

@@ -0,0 +1,30 @@
+package com.ydtech.modules.order.entity.api.pingan.utils;
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/29 16:29
+ *  @Description:  通过枚举获取对应的值
+ */
+public class PinAnEnumUtils {
+    /**
+    * @Description  通过枚举类和枚举code获取枚举的值
+    * @Author  hxl
+    * @Date   2024/3/29 16:31
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public static String getEnumValueByCode(Class<? extends Enum<?>> clazz, String code) {
+        for (Enum<?> enumConstant : clazz.getEnumConstants()) {
+            try {
+                if (code.equals(String.valueOf(clazz.getMethod("getCode").invoke(enumConstant)))) {
+                    return String.valueOf(clazz.getMethod("getMsg").invoke(enumConstant));
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return "";
+    }
+}

+ 26 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/UUIDUtils.java

@@ -0,0 +1,26 @@
+package com.ydtech.modules.order.entity.api.pingan.utils;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.UUID;
+
+/**
+ *  @version   生成文件上传的唯一id
+ *  @author: hxl
+ *  @Date: 2024/4/1 17:21
+ *  @Description:
+ */
+public class UUIDUtils {
+
+    public static synchronized  String getOrderNum(String clentId) {
+        //时间(精确到毫秒)
+        DateTimeFormatter ofPattern = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
+        String localDate = LocalDateTime.now().format(ofPattern);
+        //uuid
+        String uuid = UUID.randomUUID().toString().replace("-", "");
+        String orderNum = clentId+"-"+localDate +"-"+ uuid;
+        return orderNum;
+    }
+
+
+}

+ 14 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/checkNull/CheckNotEmpty.java

@@ -0,0 +1,14 @@
+package com.ydtech.modules.order.entity.api.pingan.utils.checkNull;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface CheckNotEmpty {
+    String fieldName() default "";
+    String message() default "";
+}
+

+ 13 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/checkNull/FieldEmptyException.java

@@ -0,0 +1,13 @@
+package com.ydtech.modules.order.entity.api.pingan.utils.checkNull;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/29 14:34
+ *  @Description:  非空判断的异常类
+ */
+public class FieldEmptyException extends RuntimeException {
+    public FieldEmptyException(String message) {
+        super(message);
+    }
+}

+ 16 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/checkNull/Validate.java

@@ -0,0 +1,16 @@
+package com.ydtech.modules.order.entity.api.pingan.utils.checkNull;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/29 14:32
+ *  @Description:  是否判断非空的注解
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Validate {
+}

+ 69 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/checkNull/Validator.java

@@ -0,0 +1,69 @@
+package com.ydtech.modules.order.entity.api.pingan.utils.checkNull;
+
+import java.lang.reflect.Field;
+import java.util.List;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/29 14:37
+ *  @Description:  通过注解判断是否为空
+ */
+public class Validator {
+    /**
+    * @Description  注解验证非空
+    * @Author  hxl
+    * @Date   2024/3/29 14:37
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public static void validate(Object obj) throws IllegalAccessException {
+        Field[] fields = obj.getClass().getDeclaredFields();
+        for (Field field : fields) {
+            if (field.isAnnotationPresent(CheckNotEmpty.class)) {
+                field.setAccessible(true);
+                Object fieldValue = field.get(obj);
+                if (fieldValue == null || isEmptyList(fieldValue)) {
+                    CheckNotEmpty annotation = field.getAnnotation(CheckNotEmpty.class);
+                    String fieldName = annotation.fieldName();
+                    String message = annotation.message();
+                    if (message.isEmpty()) {
+                        message = fieldName + " 不能为空";
+                    }
+                    throw new FieldEmptyException(message);
+                } else if (fieldValue instanceof List) {
+                    List<?> listValue = (List<?>) fieldValue;
+                    if (listValue.isEmpty()) {
+                        CheckNotEmpty annotation = field.getAnnotation(CheckNotEmpty.class);
+                        String fieldName = annotation.fieldName();
+                        String message = annotation.message();
+                        if (message.isEmpty()) {
+                            message = "集合中的" + fieldName + " 不能为空";
+                        }
+                        throw new FieldEmptyException(message);
+                    } else {
+                        for (Object item : listValue) {
+                            validate(item);
+                        }
+                    }
+                } else {
+                    validate(fieldValue);
+                }
+            }
+        }
+    }
+    /**
+    * @Description  判断对象是否为集合
+    * @Author  hxl
+    * @Date   2024/3/29 14:36
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    private static boolean isEmptyList(Object obj) {
+        return obj instanceof List && ((List<?>) obj).isEmpty();
+    }
+}

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

@@ -34,4 +34,16 @@ public class CoreModelsVo {
     @ApiModelProperty(value = "新车购置价")
     private String purchasePrice;
 
+    public CoreModelsVo() {
+    }
+
+    public CoreModelsVo(String modelCode, String modelName, String seatCount, String carYear, String power, String enginedesc, String purchasePrice) {
+        this.modelCode = modelCode;
+        this.modelName = modelName;
+        this.seatCount = seatCount;
+        this.carYear = carYear;
+        this.power = power;
+        this.enginedesc = enginedesc;
+        this.purchasePrice = purchasePrice;
+    }
 }

+ 84 - 36
src/main/java/com/ydtech/modules/order/entity/vo/FeeOrderNewVo.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.order.entity.vo;
 
 
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -9,44 +10,91 @@ 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;
 
+
+    @ApiModelProperty("入口费用")
+    private List<EntranceFee> entranceFee;
+
+    @ApiModelProperty("出口费用")
+    private List<ExportFee> exportFee;
+
+    @ApiModelProperty("部门管理费用")
+    private List<DeptManagerFee> deptManagerFee;
+
+    /**
+     * 入口费用
+     */
+    @ApiModel(description = "入口费用")
+    @Data
+    public static class EntranceFee {
+        @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;
+    }
+
+    /**
+     * 出口费用
+     */
+    @ApiModel(description = "出口费用")
+    @Data
+    public static class ExportFee {
+        @ApiModelProperty("险种")
+        private String insuranceType;
+        @ApiModelProperty("总比例")
+        private BigDecimal totalProportion;
+        @ApiModelProperty("总费用")
+        private BigDecimal totalAmount;
+        @ApiModelProperty("手续费比例")
+        private BigDecimal superviseCosts;
+        @ApiModelProperty("手续费")
+        private BigDecimal superviseCostsPremiums;
+        @ApiModelProperty("跟单比例")
+        private BigDecimal otherCostsProportion;
+        @ApiModelProperty("跟单费")
+        private BigDecimal otherCostsPremiums;
+    }
+
+    @ApiModel(description = "部门管理费用")
+    @Data
+    public static class DeptManagerFee {
+        @ApiModelProperty("险种")
+        private String insuranceType;
+        @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;
+    }
 }

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

@@ -353,7 +353,7 @@ public class OrderVo implements Serializable {
     /**
      * 费用信息
      */
-    private List<FeeOrderNewVo> feeOrderNewVoList;
+    private FeeOrderNewVo feeOrderNewVo;
 
     /**
      * 分销明细

+ 56 - 0
src/main/java/com/ydtech/modules/order/entity/vo/pingan/PingAnQuoteVo.java

@@ -0,0 +1,56 @@
+package com.ydtech.modules.order.entity.vo.pingan;
+
+import com.ydtech.modules.order.entity.api.pingan.request.QuoteRequest;
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+@ApiModel(value = "平安报价实体")
+public class PingAnQuoteVo<T> extends BaseQuoteVo<T> {
+
+    @ApiModelProperty("是否通融报价")
+    //add by hxl  2024-04-03
+    private String accommodationFlag;
+
+    @ApiModelProperty("是否投保财意险")
+    //add by hxl  2024-04-03
+    private String applyUnAuto;
+
+    @ApiModelProperty("是否投保小微险")
+    //add by hxl  2024-04-03
+    private String applyXiaoWei;
+    /***
+     * 财意险列表
+     */
+    @ApiModelProperty("财意险列表")
+    //add by hxl  2024-04-03
+    private List<QuoteRequest.UnAutoListInfoDTO> unAutoListInfo=new ArrayList<QuoteRequest.UnAutoListInfoDTO>();
+    /***
+     * 小微险列表
+     */
+    @ApiModelProperty("小微险列表")
+    //add by hxl  2024-04-03
+    private List<QuoteRequest.UnAutoListInfoDTO> xiaoWeiListInfo=new ArrayList<QuoteRequest.UnAutoListInfoDTO>();
+
+    /***
+     *  投保附加自用充电桩损失保险
+     * 【自用充电桩设备信息列表,最多3个桩】
+     */
+    @ApiModelProperty("投保附加自用充电桩损失保险")
+    //add by hxl  2024-04-03
+    private List<QuoteRequest.Amount22XNYChargingPostListDTO> amount22XNYChargingPostList=new ArrayList<QuoteRequest.Amount22XNYChargingPostListDTO>();
+
+    /***
+     *  投保附加自用充电桩损失保险
+     * 【自用充电桩设备信息列表,最多3个桩】
+     */
+    @ApiModelProperty("投保附加自用充电桩损失保险")
+    //add by hxl  2024-04-03
+    private List<QuoteRequest.Amount23XNYChargingPostListDTO> amount23XNYChargingPostList=new ArrayList<QuoteRequest.Amount23XNYChargingPostListDTO>();
+
+}

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

@@ -13,7 +13,6 @@ import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.bohai.BoHaiQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.bohai.ProductDetailsQueryVo;
 import com.ydtech.modules.order.entity.vo.bohai.ProductQueryVo;
-import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 
 import java.util.List;
 
@@ -101,4 +100,16 @@ public interface BoHaiOrderApiService {
      */
     String policyResultCallback(PolicyResultCallbackRequest policyResultCallbackRequest)  throws Exception;
 
+
+     /**
+     * @Description 更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/4/2 11:31
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void getOrderDetailNew(String subOrderNo) throws Exception;
+
 }

+ 99 - 10
src/main/java/com/ydtech/modules/order/service/PingAnOrderApiService.java

@@ -2,15 +2,32 @@ package com.ydtech.modules.order.service;
 
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.entity.api.pingan.response.UnAutoProductDetailResponse;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.bohai.BoHaiQuoteAccidentVo;
+import com.ydtech.modules.order.entity.vo.bohai.ProductDetailsQueryVo;
+import com.ydtech.modules.order.entity.vo.bohai.ProductQueryVo;
+import com.ydtech.modules.order.entity.vo.pingan.PingAnQuoteVo;
 
 import java.util.List;
+import java.util.Map;
 
 public interface PingAnOrderApiService {
 
+    /**
+     * 获取财意险险种套餐列表
+     *
+     * @param productQueryVo
+     */
+    HttpResult<Map<String,Object>> productQuery(ProductQueryVo productQueryVo) throws Exception;
+
+    /**
+     * 获取财意险险种套餐责任信息
+     *
+     * @param productDetailsQueryVo
+     */
+    HttpResult<List<UnAutoProductDetailResponse.UnAutoProductDetailsDTO>> productDetailsQuery(ProductDetailsQueryVo productDetailsQueryVo) throws Exception;
     /**
      * 报价
      *
@@ -18,40 +35,112 @@ public interface PingAnOrderApiService {
      * @param quoteVo
      * @return
      */
-    HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfo, BaseQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo) throws Exception;
+    HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfo, PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo) throws Exception;
 
     /**
      * 提交影像
      * @param companyId 子订单号
      * @return
      */
-    HttpResult<Object> submitImage(String companyId);
+    HttpResult<Object> submitImage(String companyId) throws Exception;
 
     /**
      * 提交核保
-     * @param companyId 子订单号
+     * @param quoteInfo 子订单号
      * @return
      */
-    HttpResult<Object> audit(String companyId);
+    HttpResult<Object> audit(BaseQuoteInfoVo quoteInfo)  throws Exception;
 
     /**
      * 电子保单
      * @param companyId 子订单号
      * @return
      */
-    HttpResult<CrawlerPolicyPrintVo> getPolicyPrint(String companyId);
+    HttpResult<CrawlerPolicyPrintVo> getPolicyPrint(String companyId) throws Exception;
 
     /**
      * 订单状态查询
-     * @param companyId 子订单号
+     * @param subOrderNo 子订单号
      * @return
      */
-    HttpResult<Object> getOrderDetail(String companyId);
+    HttpResult<Object> getOrderDetail(String subOrderNo);
 
     /**
      * 核保状态查询
-     * @param companyId
+     * @param subOrderNo
      * @return
      */
-    HttpResult<Object> auditStatusQuery(String companyId);
+    HttpResult<Object> auditStatusQuery(String subOrderNo);
+
+
+
+    /**
+    * @Description   更新承保状态和支付时间
+    * @Author  hxl
+    * @Date   2024/4/1 14:07
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    public void getOrderDetailNew(String subOrderNo);
+
+    /**
+    * @Description 获取交管车辆验证码
+    * @Author  hxl
+    * @Date   2024/4/1 16:04
+    * @Param  
+    * @Return      
+    * @Exception   
+    * 
+    */
+    HttpResult<Object> getDmvehicleInfo(PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo,BaseQuoteInfoVo quoteInfo);
+
+
+    /**
+     * @Description 续保接口
+     * @Author  hxl
+     * @Date   2024/4/1 16:04
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    HttpResult<Object> renewalConfirm(PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo,BaseQuoteInfoVo quoteInfo);
+
+
+    /**
+    * @Description  服务类特约检索
+    * @Author  hxl
+    * @Date   2024/4/1 16:29
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    HttpResult<Object> queryServiceContract(String companyId);
+
+
+    /**
+     * @Description 单证状态查询
+     * @Author  hxl
+     * @Date   2024/4/1 16:29
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    HttpResult<Object> getDocumentStatusList(PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo);
+
+
+    /**
+     * @Description 撤销单证
+     * @Author  hxl
+     * @Date   2024/4/1 16:29
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    HttpResult<Object> repealDocument(PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo);
 }

+ 9 - 0
src/main/java/com/ydtech/modules/order/service/YongAnOrderService.java

@@ -17,4 +17,13 @@ public interface YongAnOrderService extends BaseOrderService<Object> {
 
     String updatePolicy(Map<String, String> paramMap);
 
+    /**
+     *  @version  更新更薄状态和支付时间
+     *  @author: hxl
+     *  @Date: 2024/4/2 12:49
+     *  @Description:
+     */
+    public void getOrderDetailNew(String subOrderNo);
+
+
 }

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

@@ -30,6 +30,7 @@ import com.ydtech.modules.order.service.BoHaiOrderApiService;
 import com.ydtech.modules.order.service.InsAreaCompanyService;
 import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.order.service.InsTaskImagesService;
+import com.ydtech.modules.order.utils.StringSubStringUtils;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.utils.CalculateUtils;
@@ -38,9 +39,7 @@ import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.util.ObjectUtils;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 
@@ -108,13 +107,50 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
         GenerateOrderNoResponse generateOrderNoResponse = boHaiRequestApiComponent.generateOrderNo(generateOrderNoRequest,
                 parameters.getSysSourceCode());
         String orderNo = generateOrderNoResponse.getData().getOrderNo();
-
-        // 2 车型查询接口
         CarInfoVo carInfo = quoteInfoVo.getCarInfo();
         VehicleTypeQueryRequest vehicleTypeQueryRequest = new VehicleTypeQueryRequest(parameters, carInfo.getModelcname(), orderNo);
-        VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO =
-                boHaiRequestApiComponent.vehicleTypeQuery(vehicleTypeQueryRequest, parameters.getSysSourceCode(), carInfo);
+        //add by hxl   2024-04-03   调用车辆型号查询
+        // 调用 车辆查询和车辆确认接口
+        VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO=new VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO();
+        Map<String,Object> map= getVehicleConfirmationResponse(quoteInfoVo, parameters, carInfo, orderNo,vehicleTypeQueryRequest);
+        //调用车型号查询可能会出现多条数据,导致车辆确认报错  ESB车型及纯风险保费查询服务返回错误信息_选择车辆的行业车型编码(BBWABBUA0005)在平台不存在!请使用正确的行业车型编码(BBWABBUB0007)"
+        //通过报错信息截取出正确的行业车型编
+        vehicleModelsDTO = (VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO) map.get("vehicleModelsDTO");
+        VehicleConfirmationResponse vehicleConfirmationResponse= (VehicleConfirmationResponse) map.get("vehicleConfirmationResponse");
+        if (ResponseCode.R_Z00004.getCode().equals(vehicleConfirmationResponse.getResponseCode())) {
+            String responseMsg = vehicleConfirmationResponse.getResponseMsg();
+            if(responseMsg.contains("行业车型编码")){
+                String modelCode = StringSubStringUtils.extractLastParenthesesContent(responseMsg);
+                //清空车辆型号  添加行业车型编码确定唯一车型
+                vehicleTypeQueryRequest.setVehicleBrandModelKey(null);
+                vehicleTypeQueryRequest.setModelCode(modelCode);
+                // 重新调用 车辆查询和车辆确认接口
+                Map<String,Object> map_two= getVehicleConfirmationResponse(quoteInfoVo, parameters, carInfo, orderNo,vehicleTypeQueryRequest);
+                vehicleModelsDTO = (VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO) map_two.get("vehicleModelsDTO");
+                vehicleConfirmationResponse= (VehicleConfirmationResponse) map_two.get("vehicleConfirmationResponse");
+            }
+        }
 
+        // 车辆实际价值
+        String currentValue = vehicleConfirmationResponse.getData().getVehicleModels().get(0).getCurrentValue();
+
+        // 4. 报价接口
+        QuotationRequest quotationRequest = new QuotationRequest(parameters, quoteInfoVo.getRiskList(), quoteInfoVo.getKindList(),
+                currentValue, orderNo, carInfo, quoteVo.getAccidentalDrivingVo());
+        QuotationResponse response = boHaiRequestApiComponent.quotation(quotationRequest, parameters.getSysSourceCode());
+        List<BoHaiQuoteAccidentVo> accidentalDrivingVo = quoteVo.getAccidentalDrivingVo();
+
+        return getQuoteRespVo(response, quoteInfoVo, vehicleModelsDTO, ptlAgreementAttribution, orderNo, accidentalDrivingVo);
+    }
+    /**
+     *  @version 调用车型查询和车辆确认
+     *  @author: hxl
+     *  @Date: 2024/4/3 16:03
+     *  @Description:
+     */
+    public  Map<String,Object>  getVehicleConfirmationResponse(BaseQuoteInfoVo quoteInfoVo, BoHaiConfigureParameters parameters,CarInfoVo carInfo,String orderNo,VehicleTypeQueryRequest vehicleTypeQueryRequest) throws Exception {
+        // 2 车型查询接口
+        VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO = boHaiRequestApiComponent.vehicleTypeQuery(vehicleTypeQueryRequest, parameters.getSysSourceCode(), carInfo);
         // 3 车辆确认接口
         // 车主信息
         CustomerInfoVo ownerInfo = quoteInfoVo.getOwnerInfo();
@@ -130,17 +166,13 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
                 orderNo, ownerInfoArea, insuredPersonArea, policyHolderArea);
         VehicleConfirmationResponse vehicleConfirmationResponse = boHaiRequestApiComponent.vehicleConfirmation(vehicleConfirmationReqeust
                 , parameters.getSysSourceCode());
-        // 车辆实际价值
-        String currentValue = vehicleConfirmationResponse.getData().getVehicleModels().get(0).getCurrentValue();
+        Map<String,Object> map=new HashMap<>();
+        map.put("vehicleModelsDTO",vehicleModelsDTO);
+        map.put("vehicleConfirmationResponse",vehicleConfirmationResponse);
+        return map;
+    }
 
-        // 4. 报价接口
-        QuotationRequest quotationRequest = new QuotationRequest(parameters, quoteInfoVo.getRiskList(), quoteInfoVo.getKindList(),
-                currentValue, orderNo, carInfo, quoteVo.getAccidentalDrivingVo());
-        QuotationResponse response = boHaiRequestApiComponent.quotation(quotationRequest, parameters.getSysSourceCode());
-        List<BoHaiQuoteAccidentVo> accidentalDrivingVo = quoteVo.getAccidentalDrivingVo();
 
-        return getQuoteRespVo(response, quoteInfoVo, vehicleModelsDTO, ptlAgreementAttribution, orderNo, accidentalDrivingVo);
-    }
 
     @Override
     public HttpResult<Object> submitImage(String subOrderNo) throws Exception {
@@ -506,6 +538,33 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
         quoteRespVo.setCompanyId(orderId);
         return HttpResult.ok("报价成功", quoteRespVo);
     }
+    /**
+    * @Description  更新承保状态和支付时间
+    * @Author  hxl
+    * @Date   2024/4/2 11:29
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public void getOrderDetailNew(String subOrderNo) throws Exception {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
+        List<StatusDocumentsResponse.DataDTO.DocumentListDTO> documentList = getDocumentListDTO(insAreaCompany);
+        List<StatusDocumentsResponse.DataDTO.DocumentListDTO> documentListDTOS =
+                documentList.stream().filter(x -> ResultCode.RC_B5.getCode().equals(x.getStatus())).collect(Collectors.toList());
 
+        if (documentListDTOS.size() == documentList.size()) {
+            for (StatusDocumentsResponse.DataDTO.DocumentListDTO documentListDTO : documentListDTOS) {
+                if (InsuranceType.IT_0.getCode().equals(documentListDTO.getInsuranceType())) {
+                    insAreaCompany.setSypolicyno(documentListDTO.getPolicyNo());
+                } else if (InsuranceType.IT_1.getCode().equals(documentListDTO.getInsuranceType())) {
+                    insAreaCompany.setJqpolicyno(documentListDTO.getPolicyNo());
+                }
+            }
 
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+            insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+        }
+    }
 }

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

@@ -611,8 +611,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<FeeOrderNewVo> feeOrderNewVoList = feeRuleSchemeService.newConvertOrderFeeVoData(insFeeOrderNew);
+//            orderAndAreaCompany.setFeeOrderNewVoList(feeOrderNewVoList);
+            FeeOrderNewVo  feeOrderNewVo =   feeRuleSchemeService.newConvertOrderFeeVoData(insFeeOrderNew);
+            orderAndAreaCompany.setFeeOrderNewVo(feeOrderNewVo);
             List<DistributionLevelVo> distributionLevelVoList = feeRuleSchemeService.converDistrbutionData(insFeeOrderNew);
             orderAndAreaCompany.setDistributionLevelVoList(distributionLevelVoList);
         }

+ 731 - 32
src/main/java/com/ydtech/modules/order/service/impl/PingAnOrderApiServiceImpl.java

@@ -1,30 +1,60 @@
 package com.ydtech.modules.order.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.ydtech.config.properties.PingAnApiConfigurationProperties;
+import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
 import com.ydtech.core.page.HttpResult;
-import com.ydtech.modules.ins.model.vo.CarInfoVo;
-import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.ins.model.pingan.respose.PingAnQuoteRespVo;
+import com.ydtech.modules.ins.model.vo.*;
 import com.ydtech.modules.order.components.ConfigureParametersComponents;
 import com.ydtech.modules.order.components.pingan.PinganRequestApiComponents;
-import com.ydtech.modules.order.entity.api.pingan.request.CarConfirmRequest;
-import com.ydtech.modules.order.entity.api.pingan.request.IndexRequest;
-import com.ydtech.modules.order.entity.api.pingan.request.SearchPAVehicleListRequest;
-import com.ydtech.modules.order.entity.api.pingan.response.CarConfirmResponse;
-import com.ydtech.modules.order.entity.api.pingan.response.IndexResponse;
-import com.ydtech.modules.order.entity.api.pingan.response.SearchPAVehicleListResponse;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.TaxArrears;
+import com.ydtech.modules.order.entity.api.pingan.constants.accept.AcceptResponseStatusCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.documentStatusList.DocumentStatusListResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.index.IndexResposeCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.policyPdf.PolicyPdfResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.scanCodeURL.ScanCodeURLResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.unAutoProductDetail.UnAutoProductDetailResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.constants.unAutoProductList.UnAutoProductListResponseCodeEnum;
+import com.ydtech.modules.order.entity.api.pingan.request.*;
+import com.ydtech.modules.order.entity.api.pingan.response.*;
+import com.ydtech.modules.order.entity.api.pingan.utils.PDFUtil;
+import com.ydtech.modules.order.entity.api.pingan.utils.PinAnEnumUtils;
+import com.ydtech.modules.order.entity.api.pingan.utils.UUIDUtils;
 import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
+import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+import com.ydtech.modules.order.entity.vo.InsOrdersEditingVo;
 import com.ydtech.modules.order.entity.vo.bohai.BoHaiQuoteAccidentVo;
+import com.ydtech.modules.order.entity.vo.bohai.ProductDetailsQueryVo;
+import com.ydtech.modules.order.entity.vo.bohai.ProductQueryVo;
+import com.ydtech.modules.order.entity.vo.pingan.PingAnQuoteVo;
+import com.ydtech.modules.order.service.InsAreaCompanyService;
+import com.ydtech.modules.order.service.InsOrdersService;
+import com.ydtech.modules.order.service.InsTaskImagesService;
 import com.ydtech.modules.order.service.PingAnOrderApiService;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
+import com.ydtech.utils.CalculateUtils;
+import com.ydtech.utils.StringUtils;
 import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
+import org.springframework.util.ObjectUtils;
 
-import java.util.List;
-
+import java.io.File;
+import java.time.LocalDateTime;
+import java.util.*;
 
+/**
+ *  @version  平安接口相关api
+ *  @author: hxl
+ *  @Date: 2024/4/1 15:19
+ *  @Description:
+ */
 @Service
 @RequiredArgsConstructor
 public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
@@ -35,9 +65,90 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
 
     private final ConfigureParametersComponents configureParametersComponents;
 
+    private final InsAreaCompanyService insAreaCompanyService;
+
+    private final InsTaskImagesService insTaskImagesService;
+
+    private final InsOrdersService  insOrdersService;
 
+
+    private final PingAnApiConfigurationProperties properties;
+    /**
+    * @Description  获取财意险险种套餐列表  调用 4.4
+    * @Author  hxl
+    * @Date   2024/4/1 14:33
+    * @Param  
+    * @Return      
+    * @Exception   
+    * 
+    */
     @Override
-    public HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfo, BaseQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo) throws Exception {
+    public HttpResult<Map<String,Object>> productQuery(ProductQueryVo productQueryVo) throws Exception {
+        // 账号信息
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(productQueryVo.getAgreementId());
+        // 通过 协议id获取配置实体
+        PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                ptlAgreementAttribution);
+
+
+        UnAutoProductListRequest unAutoProductListRequest = new UnAutoProductListRequest(parameters,productQueryVo);
+        UnAutoProductListResponse unAutoProductListResponse=null;
+        try{
+            unAutoProductListResponse= pinganRequestApiComponents.getUnAutoProductList(unAutoProductListRequest);
+        }catch (Exception e){
+            throw  new SystemException(e.getMessage());
+        }
+        Map<String,Object> map=new HashMap<>();
+        if(unAutoProductListResponse!=null && UnAutoProductListResponseCodeEnum.UN_AUTO_PRODUCT_LIST_CODE_MSG_0.getCode().equals(unAutoProductListResponse.getResultCode())){
+            List<UnAutoProductListResponse.UnAutoListInfoDTO> unAutoListInfo = unAutoProductListResponse.getUnAutoListInfo();
+            List<UnAutoProductListResponse.UnAutoListInfoDTO> xiaoWeiListInfo = unAutoProductListResponse.getXiaoWeiListInfo();
+            map.put("unAutoListInfo",unAutoListInfo);
+            map.put("xiaoWeiListInfo",xiaoWeiListInfo);
+            return HttpResult.ok(map);
+        }
+        return HttpResult.error("接口失败");
+    }
+    /**
+    * @Description  获取财意险险种套餐责任信息 调用4.5
+    * @Author  hxl
+    * @Date   2024/4/1 14:33
+    * @Param  
+    * @Return      
+    * @Exception   
+    * 
+    */
+    @Override
+    public HttpResult<List<UnAutoProductDetailResponse.UnAutoProductDetailsDTO>> productDetailsQuery(ProductDetailsQueryVo productDetailsQueryVo) throws Exception {
+        // 账号信息
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(productDetailsQueryVo.getAgreementId());
+        // 通过 协议id获取配置实体
+        PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                ptlAgreementAttribution);
+
+        UnAutoProductDetailRequest unAutoProductDetailRequest = new UnAutoProductDetailRequest(parameters,productDetailsQueryVo);
+        UnAutoProductDetailResponse unAutoProductDetailResponse=null;
+        try{
+            unAutoProductDetailResponse= pinganRequestApiComponents.getUnAutoProductDetail(unAutoProductDetailRequest);
+        }catch (Exception e){
+            throw  new SystemException(e.getMessage());
+        }
+        if(unAutoProductDetailResponse!=null && UnAutoProductDetailResponseCodeEnum.UN_AUTO_PRODUCT_DETAIL_CODE_MSG_0.getCode().equals(unAutoProductDetailResponse.getResultCode())){
+            List<UnAutoProductDetailResponse.UnAutoProductDetailsDTO> unAutoProductDetailsDTOList = unAutoProductDetailResponse.getUnAutoProductDetailsDTOList();
+            return HttpResult.ok(unAutoProductDetailsDTOList);
+        }
+        return HttpResult.error("接口失败");
+    }
+     /**
+     * @Description   报价   调用  3.1  4.1 、001、5.1
+     * @Author  hxl
+     * @Date   2024/3/29 14:01
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    @Override
+    public HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfo, PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo) throws Exception {
         // 协议id获取配置实体
         String agreementId = quoteVo.getAgreementId();
         // 账号信息
@@ -48,49 +159,637 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
         // 车型查询
         CarInfoVo carInfo = quoteInfo.getCarInfo();
 
-        // 1. 标的信息
-        IndexRequest indexRequest = new IndexRequest(parameters, carInfo);
-        IndexResponse indexResponse = pinganRequestApiComponents.index(indexRequest);
-        String flowid = indexResponse.getFlowid();
 
+         try {
+             // 1. 标的信息
+             IndexRequest indexRequest = new IndexRequest(parameters, carInfo);
+             IndexResponse indexResponse = pinganRequestApiComponents.index(indexRequest);
+             // 此处返回的  flowid  4.1.续保确认  4.2.车辆信息确认  001 平安车型搜索接口  需要使用
+             String flowid = indexResponse.getFlowid();
 
-        // 2. 车型查询
-        SearchPAVehicleListRequest searchPAVehicleListRequest = new SearchPAVehicleListRequest(parameters.getUserId(),
-                carInfo.getModelcname(), flowid);
-        SearchPAVehicleListResponse.ModelsDto modelsDto = pinganRequestApiComponents.searchPAVehicle(searchPAVehicleListRequest, carInfo);
+             // 2. 车型查询
+             SearchPAVehicleListRequest searchPAVehicleListRequest = new SearchPAVehicleListRequest(parameters.getUserId(),
+                     carInfo.getModelcname(), flowid);
+             SearchPAVehicleListResponse searchPAVehicleListResponse = pinganRequestApiComponents.searchPAVehicleList(searchPAVehicleListRequest);
+             SearchPAVehicleListResponse.ModelsDto modelsDto = pinganRequestApiComponents.searchPAVehicle(searchPAVehicleListResponse, carInfo);
 
-        // 2. 车辆信息确认
-        CarConfirmRequest carConfirmRequest = new CarConfirmRequest(parameters, quoteInfo, modelsDto);
-        CarConfirmResponse carConfirmResponse = pinganRequestApiComponents.carConfirm(carConfirmRequest);
+             // 3. 车辆信息确认
+             CarConfirmRequest carConfirmRequest = new CarConfirmRequest(parameters, quoteInfo, modelsDto,flowid);
+             CarConfirmResponse carConfirmResponse = pinganRequestApiComponents.carConfirm(carConfirmRequest);
 
+             //4.报价  使用车辆确认返回的流程id
+             CarConfirmResponse.BizQuoteDTO bizQuote = carConfirmResponse.getBizQuote();
+             QuoteRequest.BizQuoteDTO bizQuoteDTO = new QuoteRequest.BizQuoteDTO(bizQuote.getBeginDate());
 
+             QuoteRequest quoteRequest = new QuoteRequest(parameters, quoteInfo,  modelsDto, carConfirmResponse.getFlowid(),carConfirmResponse.getIsBizElectronicPolicy(),bizQuoteDTO,carConfirmResponse.getIsForceElectronicPolicy(),quoteVo.getAccommodationFlag(), quoteVo.getApplyUnAuto(),quoteVo.getApplyXiaoWei(),quoteVo.getUnAutoListInfo(),quoteVo.getXiaoWeiListInfo(),quoteVo.getAmount22XNYChargingPostList(), quoteVo.getAmount23XNYChargingPostList());
+             QuoteResponse quoteResponse=null;
+             try{
+                 quoteResponse= pinganRequestApiComponents.quote(quoteRequest);
+             }catch (Exception e){
+                 throw  new SystemException(e.getMessage());
+             }
+             if(quoteResponse!=null){
+                 //5.组装返回的报价信息
+                 return getQuoteRespVo(quoteResponse, quoteInfo, ptlAgreementAttribution, modelsDto);
+             }
+         }catch (Exception e){
+             throw new SystemException(e.getMessage());
+         }
         return null;
     }
 
-    @Override
-    public HttpResult<Object> submitImage(String companyId) {
-        return null;
+    public HttpResult<QuoteRespVo> getQuoteRespVo(QuoteResponse response,
+                                                  BaseQuoteInfoVo yaQuoteInfoVo,
+                                                  PtlAgreementAttribution ptlAgreementAttribution,
+                                                  SearchPAVehicleListResponse.ModelsDto modelsDto) {
+
+        PingAnQuoteRespVo quoteRespVo = new PingAnQuoteRespVo();
+        // 交强险保费信息
+        QuoteResponse.ForceQuoteResultDTO forceQuoteResult = response.getForceQuoteResult();
+        //交强险保费
+        double jqPremium =0;
+        //车船税
+        double sumPayTax=0;
+        if (!ObjectUtils.isEmpty(forceQuoteResult)) {
+            //交+车船税总计
+            double totalPremium =Double.parseDouble(forceQuoteResult.getTotalPremium()==null?"0":forceQuoteResult.getTotalPremium()) ;
+            jqPremium = Double.parseDouble(forceQuoteResult.getForcePremium() == null ? "0" : forceQuoteResult.getForcePremium());
+            sumPayTax = Double.parseDouble(forceQuoteResult.getTaxPremium() == null ? "0" : forceQuoteResult.getTaxPremium());
+            quoteRespVo.setCiSumPermium(totalPremium);
+            quoteRespVo.setJqPremium(jqPremium);
+            //交强保单号
+            quoteRespVo.setJqApplyNo(forceQuoteResult.getQueryRequestCode());
+        }
+        QuoteResponse.QuoteDTO forceQuote = response.getForceQuote();
+        // 交强
+        quoteRespVo.setStartDateJq(forceQuote.getBeginDate());
+        quoteRespVo.setEndDateJq(forceQuote.getEndDate());
+        // 商业险
+        QuoteResponse.BizQuoteResultDTO bizQuoteResult = response.getBizQuoteResult();
+        //商业险险种
+        List<QuoteKindRespVo> kindList1 = new ArrayList<>();
+        //商业险保费
+        double syPremium =0;
+        if (!ObjectUtils.isEmpty(bizQuoteResult)) {
+            syPremium =Double.parseDouble(bizQuoteResult.getPremiumTotal()==null?"0":bizQuoteResult.getPremiumTotal()) ;;
+            //商业险保费
+            quoteRespVo.setSyPremium(syPremium);
+            //商业险保单号
+            quoteRespVo.setSyApplyNo(bizQuoteResult.getQueryRequestCode());
+            QuoteResponse.QuoteDTO bizQuote = response.getBizQuote();
+            // 交强
+            quoteRespVo.setStartDateJq(forceQuote.getBeginDate());
+            quoteRespVo.setEndDateJq(forceQuote.getEndDate());
+            // 商业 起保开始和结束时间
+            quoteRespVo.setStartDateSy(bizQuote.getBeginDate());
+            quoteRespVo.setEndDateSy(bizQuote.getEndDate());
+
+            // 商业险险种
+            List<QuoteResponse.ClauseCaseListDTO> clauseCaseList = bizQuoteResult.getClauseCaseList();
+            QuoteKindRespVo kind;
+            for (QuoteResponse.ClauseCaseListDTO  clauseCaseListDTO: clauseCaseList) {
+                kind = new QuoteKindRespVo();
+                kind.setKindCode(clauseCaseListDTO.getProductCode());
+                kind.setKindName(clauseCaseListDTO.getProductName());
+                double amount = Double.parseDouble(clauseCaseListDTO.getAmount() == null ? "0" : clauseCaseListDTO.getAmount());
+                kind.setAmount(amount);
+                double count = Double.parseDouble(clauseCaseListDTO.getCount() == null ? "0" : clauseCaseListDTO.getCount());
+                kind.setUnitAmount(count);
+                //保费
+                kind.setCoveragePremium(amount*count);
+                kindList1.add(kind);
+            }
+            quoteRespVo.setKindList(kindList1);
+        }
+
+        // 财意险保费
+        QuoteResponse.AhsUpcActualPremiumDTO ahsUpcActualPremium = response.getAhsUpcActualPremium();
+        // 小微险保费
+        QuoteResponse.XwActualPremiumDTO xwActualPremium = response.getXwActualPremium();
+         //小微险保费
+        quoteRespVo.setAhsUpcActualPremium(ahsUpcActualPremium);
+
+        quoteRespVo.setXwActualPremium(xwActualPremium);
+
+        List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
+        // 非车险
+        double  jyPremium=0;
+        if (!ObjectUtils.isEmpty(ahsUpcActualPremium)) {
+            //   财意险总保费
+            double ahsUpcTotalPremium =Double.parseDouble(ahsUpcActualPremium.getAhsUpcTotalPremium()==null?"0":ahsUpcActualPremium.getAhsUpcTotalPremium()) ;;
+            jyPremium += ahsUpcTotalPremium;
+        }
+        if (!ObjectUtils.isEmpty(xwActualPremium)) {
+            double xwPremium =Double.parseDouble(xwActualPremium.getXwPremium()==null?"0":xwActualPremium.getXwPremium());
+            jyPremium += xwPremium;
+        }
+        //  报价险种放入保费
+        List<QuoteRiskRespVo> riskList1 = QuoteRiskRespVo.toQuoteRiskRespVoList(riskList, jqPremium, syPremium);
+
+        quoteRespVo.setRiskList(riskList1);
+        quoteRespVo.setJqPremium(jqPremium);
+        quoteRespVo.setSyPremium(syPremium);
+        quoteRespVo.setTaxAmount(sumPayTax);
+        quoteRespVo.setJyPremium(jyPremium);
+        //交强险和车船税合计
+        quoteRespVo.setCiSumPermium(CalculateUtils.add(jqPremium, sumPayTax));
+        //保费合计
+        quoteRespVo.setSumPermium(CalculateUtils.add(jqPremium, syPremium, sumPayTax, jyPremium));
+        quoteRespVo.setTotalAdjustRate(0);
+        //订单号
+        quoteRespVo.setOrderno(yaQuoteInfoVo.getOrderNo());
+        quoteRespVo.setCoreModels(modelsDto.toCoreModelsVo());
+        String orderId=yaQuoteInfoVo.getOrderNo();
+        return responseOrder(response, quoteRespVo, ptlAgreementAttribution,orderId);
     }
 
+    public HttpResult<QuoteRespVo> responseOrder(QuoteResponse response,
+                                                 QuoteRespVo quoteRespVo,
+                                                 PtlAgreementAttribution ptlAgreementAttribution,
+                                                 String orderId) {
+        // 保存订单信息
+        InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
+
+        //平安业务id
+        String flowid = response.getFlowid();
+        insAreaCompany.setReptxt(JSON.parseObject(JSON.toJSONString(response)));
+        insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
+        insAreaCompany.setInsOrderNo(flowid);
+        Map<String,Object> map=new HashMap<>();
+        QuoteResponse.AhsUpcActualPremiumDTO ahsUpcActualPremium = response.getAhsUpcActualPremium();
+        // 小微险保费
+        QuoteResponse.XwActualPremiumDTO xwActualPremium = response.getXwActualPremium();
+        map.put("xwActualPremium",xwActualPremium);
+        map.put("ahsUpcActualPremium",ahsUpcActualPremium);
+        // 驾意险 ???????
+       // insAreaCompany.setAccidentInfo(JSON.parseArray(JSON.toJSONString(map)));
+        // 车船税
+        QuoteResponse.ForceQuoteResultDTO.TaxDTO tax = response.getForceQuoteResult().getTax();
+        TaxArrears taxArrears = new TaxArrears("往年欠税", Double.parseDouble(tax.getLastYearPay()),
+                Double.parseDouble(tax.getDelayPayMoney()));
+        List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
+        insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
+        insAreaCompanyService.insertCompanyAndOrders(insAreaCompany);
+        quoteRespVo.setCompanyId(orderId);
+        return HttpResult.ok("报价成功", quoteRespVo);
+    }
+    /**
+    * @Description   上传影像  上传文件  调用93
+    * @Author  hxl
+    * @Date   2024/4/1 11:11
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
     @Override
-    public HttpResult<Object> audit(String companyId) {
-        return null;
+    public HttpResult<Object> submitImage(String subOrderNo) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
+        // 账号信息
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+        // 通过 协议id获取配置实体
+        PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                ptlAgreementAttribution);
+
+        List<InsTaskImagesBase64> insTaskImagesBase64s = insTaskImagesService.findByOrderNo(insAreaCompany.getOrderno(),
+                insAreaCompany.getId(), true);
+        if (insTaskImagesBase64s.isEmpty()) {
+            return HttpResult.error("影像集合为空");
+        }else{
+            List<UploadFilesRequest.DocListDTO> list=new ArrayList<>();
+            for (InsTaskImagesBase64 insTaskImagesBase64 : insTaskImagesBase64s) {
+                String docId= UUIDUtils.getOrderNum(properties.getClientId());
+                UploadFilesRequest.DocListDTO docListDTO = new UploadFilesRequest.DocListDTO(docId, "submitImage", insTaskImagesBase64.getImageType(), "submitImage" + insTaskImagesBase64.getImageType() + docId, insTaskImagesBase64.getFileName().split(".")[1],
+                        null, subOrderNo, null, parameters.getUserId(), "openApi");
+            }
+            //调用文件上传
+            UploadFilesRequest  uploadRequest=new UploadFilesRequest(list);
+
+            UploadFilesResponse uploadFilesResponse=null;
+            try{
+                uploadFilesResponse= pinganRequestApiComponents.uploadFiles(uploadRequest);
+            }catch (Exception e){
+                throw  new SystemException(e.getMessage());
+            }
+            if(uploadFilesResponse!=null){
+                return HttpResult.ok(uploadFilesResponse.getResultCode());
+            }
+            return HttpResult.error("上传影像接口失败");
+        }
+    }
+    /**
+    * @Description  提交核保     6.1  接口入参
+    * @Author  hxl
+    * @Date   2024/4/1 11:12
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public HttpResult<Object> audit(BaseQuoteInfoVo quoteInfo) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(quoteInfo.getOrderNo());
+        // 账号信息
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+        // 通过 协议id获取配置实体
+        PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                ptlAgreementAttribution);
+        //此处的流程id必须传入   获取报价流程的返回的流程id
+        String flowid=insAreaCompany.getInsOrderNo();
+        //调用6.1 补充信息并核保
+        SubmitApplyRequest submitApplyRequest = new SubmitApplyRequest(parameters, quoteInfo,flowid,"true");
+        SubmitApplyResponse submitApplyResponse=null;
+        try{
+            submitApplyResponse= pinganRequestApiComponents.submitApply(submitApplyRequest);
+        }catch (Exception e){
+              throw  new SystemException(e.getMessage());
+        }
+         if(submitApplyResponse!=null){
+             return HttpResult.ok(submitApplyResponse.getResultCode());
+         }
+        return HttpResult.error("提交核保接口失败");
     }
+    /**
+    * @Description  获取保单pdf地址  调用 002
+    * @Author  hxl
+    * @Date   2024/4/1 11:27
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public HttpResult<CrawlerPolicyPrintVo> getPolicyPrint(String subOrderNo) {
+          InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
+        // 账号信息
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+        // 通过 协议id获取配置实体
+        PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                ptlAgreementAttribution);
+        BaseQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo=new BaseQuoteVo<>();
 
+        //通过订单号查询车辆信息和车主信息
+        InsOrdersEditingVo insOrders = insOrdersService.revise(subOrderNo);
+        //车主信息
+        CustomerInfoVo ownerInfo = insOrders.getOwnerinfo().toJavaObject(CustomerInfoVo.class);
+        CarInfoVo carInfoVo = insOrders.getCarinfo().toJavaObject(CarInfoVo.class);
+        //调用  电子保单pdf  001
+        PolicyPdfRequest policyPdfRequest = new PolicyPdfRequest(parameters,quoteVo,ownerInfo.getIdentifyNumber(),carInfoVo.getLicenseNo(),carInfoVo.getFrameNo());
+        PolicyPdfResponse policyPdfResponse=null;
+        try{
+            policyPdfResponse= pinganRequestApiComponents.getPolicyPdf(policyPdfRequest);
+        }catch (Exception e){
+            throw  new SystemException(e.getMessage());
+        }
+        if(policyPdfResponse!=null){
+            if(PolicyPdfResponseCodeEnum.POLICY_PDF_CODE_MSG_0.getCode().equals(policyPdfResponse.getResultCode())){
+                CrawlerPolicyPrintVo crawlerPolicyPrintVo =new CrawlerPolicyPrintVo();
+                String policyPdfBase64Str = policyPdfResponse.getPolicyPdf();
+                //存储系统临时文件
+                String tempDir = System.getProperty("java.io.tmpdir");
+                StringBuffer filePath = new StringBuffer();
+                filePath.append(tempDir).append(File.separator).append(System.currentTimeMillis()).append(File.separator).append("source.pdf");
+                String  targertPath=filePath.toString();
+                try{
+                    PDFUtil.decryptFileByPassword(policyPdfBase64Str,targertPath,properties.getSelfPrivateKey());
+                    if(Boolean.parseBoolean(policyPdfResponse.getPolicyPdf())){
+                        crawlerPolicyPrintVo.setJqxPolicyUrl(targertPath);
+                    }else{
+                        crawlerPolicyPrintVo.setSyxPolicyUrl(targertPath);
+                    }
+                    return HttpResult.ok(crawlerPolicyPrintVo);
+                }catch (Exception e){
+                    return HttpResult.error("文件解密失败!!!");
+                }
+            }else{
+                return HttpResult.error(PinAnEnumUtils.getEnumValueByCode(PolicyPdfResponseCodeEnum.class,policyPdfResponse.getResultCode()));
+            }
+        }
+        return HttpResult.error("获取保单地址失败");
+    }
+    /**
+    * @Description   订单状态查询   调用承保接口 8.2
+    * @Author  hxl
+    * @Date   2024/4/1 11:30
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
     @Override
-    public HttpResult<CrawlerPolicyPrintVo> getPolicyPrint(String companyId) {
-        return null;
+    public HttpResult<Object> getOrderDetail(String subOrderNo) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
+        //调用承保接口
+        String applyno = !StringUtils.isEmpty(insAreaCompany.getJqapplyno()) ? insAreaCompany.getJqapplyno() :
+                insAreaCompany.getSyapplyno();
+        AcceptRequest acceptRequest = new AcceptRequest(applyno);
+        AcceptResponse acceptResponse=null;
+        try{
+            acceptResponse= pinganRequestApiComponents.accept(acceptRequest);
+        }catch (Exception e){
+            throw  new SystemException(e.getMessage());
+        }
+        if(acceptResponse!=null){
+            String status = acceptResponse.getDocumentList().get(0).getStatus();
+            if("0".equals(acceptResponse.getResultCode())){
+                //处理未承保状态的数据
+                if(AcceptResponseStatusCodeEnum.ACCEPT_CODE_STATUS_B3.equals(status)){
+                    if(insAreaCompany.getPayDate()==null){
+                        insAreaCompany.setPayDate(LocalDateTime.now());
+                    }
+                    insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+                    insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+                    return HttpResult.ok("承保成功");
+                }else{
+                    return HttpResult.ok(PinAnEnumUtils.getEnumValueByCode(AcceptResponseStatusCodeEnum.class,status));
+                }
+            }
+
+        }
+        return HttpResult.ok("承保失败");
     }
+    /**
+    * @Description  核保状态查询   查询未缴费的状态订单通过调用支付的接口获取支付的链接信息 单证状态查询  9.1、  7.8
+    * @Author  hxl
+    * @Date   2024/4/1 11:31
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public HttpResult<Object> auditStatusQuery(String subOrderNo) {
 
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
+        //调用单证查询接口
+        String applyno = !StringUtils.isEmpty(insAreaCompany.getJqapplyno()) ? insAreaCompany.getJqapplyno() :
+                insAreaCompany.getSyapplyno();
+        // 账号信息
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+        // 通过 协议id获取配置实体
+        PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                ptlAgreementAttribution);
+        DocumentStatusListRequest   documentStatusListRequest=new DocumentStatusListRequest(subOrderNo,parameters);
+        DocumentStatusListResponse documentStatusListResponse=null;
+        try{
+            documentStatusListResponse= pinganRequestApiComponents.getDocumentStatusList(documentStatusListRequest);
+        }catch (Exception e){
+            throw  new SystemException(e.getMessage());
+        }
+        if(documentStatusListResponse!=null) {
+            String status = documentStatusListResponse.getDocumentList().get(0).getStatus();
+            if(DocumentStatusListResponseCodeEnum.DOCUMENTSTATUSLIST_CODE_MSG_0.getCode().equals(documentStatusListResponse.getResultCode())){
+                //处理待缴费状态
+                if(AcceptResponseStatusCodeEnum.ACCEPT_CODE_STATUS_B2.equals(status)){
+                    // 获取支付的链接     单证类型(01投保单02保单03批改申请单04批单05赔案号06报案号07通知单号)
+                    ScanCodeURLRequest scanCodeURLRequest = new ScanCodeURLRequest(applyno,"02","68");
+                    ScanCodeURLResponse scanCodeURLResponse=null;
+                    try{
+                        scanCodeURLResponse= pinganRequestApiComponents.getScanCodeURL(scanCodeURLRequest);
+                    }catch (Exception e){
+                        throw  new SystemException(e.getMessage());
+                    }
+                    String payUrl = "";
+                    //成功将支付的url链接赋值
+                    if(scanCodeURLResponse!=null &&  ScanCodeURLResponseCodeEnum.SCAN_CODE_URL_CODE_MSG_Y.getCode().equals(scanCodeURLResponse.getResultCode())){
+                        payUrl=scanCodeURLResponse.getScanCodeURLList().get(0).getScanCodeURL();
+                    }else{
+                        return HttpResult.error("二维码支付接口报错");
+                    }
+                    insAreaCompany.setPaymentLink(payUrl);
+                    insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+                    return HttpResult.ok("人工核保成功");
+                }else{
+                    return HttpResult.ok(PinAnEnumUtils.getEnumValueByCode(DocumentStatusListResponseCodeEnum.class,status));
+                }
+            }
+        }
+        return HttpResult.error("人工核保失败");
+    }
+    /**
+     * @Description  更新订单状态和支付时间
+     * @Author  xingming
+     * @Date   2024/3/28 17:17
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
     @Override
-    public HttpResult<Object> getOrderDetail(String companyId) {
-        return null;
+    public void getOrderDetailNew(String subOrderNo) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
+        //调用承保接口
+        String applyno = !StringUtils.isEmpty(insAreaCompany.getJqapplyno()) ? insAreaCompany.getJqapplyno() :
+                insAreaCompany.getSyapplyno();
+        AcceptRequest acceptRequest = new AcceptRequest(applyno);
+        AcceptResponse acceptResponse=null;
+        try{
+            acceptResponse= pinganRequestApiComponents.accept(acceptRequest);
+        }catch (Exception e){
+            throw  new SystemException(e.getMessage());
+        }
+        if(acceptResponse!=null){
+            String status = acceptResponse.getDocumentList().get(0).getStatus();
+            if("0".equals(acceptResponse.getResultCode())){
+                //处理未承保状态的数据
+                if(AcceptResponseStatusCodeEnum.ACCEPT_CODE_STATUS_B3.equals(status)){
+                    if(insAreaCompany.getPayDate()==null){
+                        insAreaCompany.setPayDate(LocalDateTime.now());
+                    }
+                    insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+                    insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+                }
+            }
+
+        }
     }
+    /**
+    * @Description   交管车辆验证码   4.3
+    * @Author  hxl
+    * @Date   2024/4/1 16:05
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public HttpResult<Object> getDmvehicleInfo(PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo,BaseQuoteInfoVo quoteInfo) {
+        // 协议id获取配置实体
+        String agreementId = quoteVo.getAgreementId();
+        // 账号信息
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(agreementId);
+        // 通过 协议id获取配置实体
+        PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                ptlAgreementAttribution);
+        try{
+            // 1. 标的信息
+            IndexRequest indexRequest = new IndexRequest(parameters, quoteInfo.getCarInfo());
+            IndexResponse indexResponse = pinganRequestApiComponents.index(indexRequest);
+            if(indexResponse!=null && IndexResposeCodeEnum.INDEX_CODE_MSG_0.getCode().equals(indexResponse.getResultCode())){
+                //调用 交管车辆验证码   4.3  传入标的接口返回的流程id
+                DmvehicleInfoRequst dmvehicleInfoRequst = new DmvehicleInfoRequst(parameters,indexResponse.getFlowid(),quoteInfo.getCarInfo().getFrameNo(),quoteInfo.getCarInfo().getEngineNo(),null);
+                DmvehicleInfoResponse dmvehicleInfoResponse=null;
+                try{
+                    dmvehicleInfoResponse= pinganRequestApiComponents.getDmvehicleInfo(dmvehicleInfoRequst);
+                }catch (Exception e){
+                    throw  new SystemException(e.getMessage());
+                }
+                if(dmvehicleInfoResponse!=null){
+                    return HttpResult.ok(dmvehicleInfoResponse.getResultCode());
+                }
+            }else{
+                return HttpResult.ok(PinAnEnumUtils.getEnumValueByCode(IndexResposeCodeEnum.class,indexResponse.getResultCode()));
+            }
+
+        }catch (Exception e){
+            return HttpResult.error(e.getMessage());
+        }
+        return HttpResult.error("获取交管车辆验证码失败");
+    }
+    /**
+    * @Description 续保确认  4.1  需要先调用3.1返回流程id
+    * @Author  hxl
+    * @Date   2024/4/1 16:23
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public HttpResult<Object> renewalConfirm(PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo, BaseQuoteInfoVo quoteInfo) {
+        // 协议id获取配置实体
+        String agreementId = quoteVo.getAgreementId();
+        // 账号信息
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(agreementId);
+        // 通过 协议id获取配置实体
+        PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                ptlAgreementAttribution);
+        try{
+            // 1. 标的信息
+            IndexRequest indexRequest = new IndexRequest(parameters, quoteInfo.getCarInfo());
+            IndexResponse indexResponse = pinganRequestApiComponents.index(indexRequest);
+            if(indexResponse!=null && IndexResposeCodeEnum.INDEX_CODE_MSG_0.getCode().equals(indexResponse.getResultCode())){
+                //调用 续保确认   4.1 传入标的接口返回的流程id     车主身份证号后6为
+                String identifyNumber = quoteInfo.getOwnerInfo().getIdentifyNumber();
+                RenewalConfirmRequest renewalConfirmRequest = new RenewalConfirmRequest(parameters,indexResponse.getFlowid(),identifyNumber.substring(identifyNumber.length() - 6));
+                RenewalConfirmResponse renewalConfirmResponse=null;
+                try{
+                    renewalConfirmResponse= pinganRequestApiComponents.renewalConfirm(renewalConfirmRequest);
+                }catch (Exception e){
+                    throw  new SystemException(e.getMessage());
+                }
+                if(renewalConfirmResponse!=null){
+                    return HttpResult.ok(renewalConfirmResponse.getResultCode());
+                }
+            }else{
+                return HttpResult.ok(PinAnEnumUtils.getEnumValueByCode(IndexResposeCodeEnum.class,indexResponse.getResultCode()));
+            }
 
+        }catch (Exception e){
+            return HttpResult.error(e.getMessage());
+        }
+        return HttpResult.error("续保确认失败");
+    }
+    /**
+    * @Description  服务类特约检索  5.2
+    * @Author  hxl
+    * @Date   2024/4/1 16:30
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
     @Override
-    public HttpResult<Object> auditStatusQuery(String companyId) {
+    public HttpResult<Object> queryServiceContract(String companyId) {
+        try{
+            //调用
+            ServiceContractRequest serviceContractRequest = new ServiceContractRequest(companyId);
+            ServiceContractResponse serviceContractResponse=null;
+            try{
+                serviceContractResponse= pinganRequestApiComponents.queryServiceContract(serviceContractRequest);
+            }catch (Exception e){
+                throw  new SystemException(e.getMessage());
+            }
+            if(serviceContractResponse!=null) {
+                return HttpResult.ok(serviceContractResponse.getResultCode());
+            }
+        }catch (Exception e){
+            return HttpResult.error(e.getMessage());
+        }
         return null;
     }
+    /**
+    * @Description  单证状态查询  9.1
+    * @Author  hxl
+    * @Date   2024/4/1 16:31
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public HttpResult<Object> getDocumentStatusList(PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo) {
+
+        try{
+            //调用
+            // 协议id获取配置实体
+            String agreementId = quoteVo.getAgreementId();
+            // 账号信息
+            PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(agreementId);
+            // 通过 协议id获取配置实体
+            PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                    ptlAgreementAttribution);
+            DocumentStatusListRequest   documentStatusListRequest=new DocumentStatusListRequest(quoteVo.getOrderNo(),parameters);
+            DocumentStatusListResponse documentStatusListResponse=null;
+            try{
+                documentStatusListResponse= pinganRequestApiComponents.getDocumentStatusList(documentStatusListRequest);
+            }catch (Exception e){
+                throw  new SystemException(e.getMessage());
+            }
+            if(documentStatusListResponse!=null) {
+                return HttpResult.ok(documentStatusListResponse.getResultCode());
+            }
+        }catch (Exception e){
+            return HttpResult.error(e.getMessage());
+        }
+
+       return HttpResult.error("单证状态查询失败");
+    }
+    /**
+    * @Description  撤销单证  9.2
+    * @Author  hxl
+    * @Date   2024/4/1 16:31
+    * @Param
+    * @Return
+    * @Exception
+    *
+    */
+    @Override
+    public HttpResult<Object> repealDocument(PingAnQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo) {
+        try{
+            //调用
+            // 协议id获取配置实体
+            String agreementId = quoteVo.getAgreementId();
+            // 账号信息
+            PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(agreementId);
+            // 通过 协议id获取配置实体
+            PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                    ptlAgreementAttribution);
+            RepealDocumentRequest   repealDocumentRequest=new RepealDocumentRequest(quoteVo.getOrderNo(),parameters.getUserId(),parameters.getCityCode(),"2");
+            RepealDocumentResponse repealDocumentResponse=null;
+            try{
+                repealDocumentResponse= pinganRequestApiComponents.repealDocument(repealDocumentRequest);
+            }catch (Exception e){
+                throw  new SystemException(e.getMessage());
+            }
+            if(repealDocumentResponse!=null) {
+                return HttpResult.ok(repealDocumentResponse.getResultCode());
+            }
+        }catch (Exception e){
+            return HttpResult.error(e.getMessage());
+        }
 
+        return HttpResult.error("撤销单证失败");
+    }
 
 }

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

@@ -42,6 +42,7 @@ import org.springframework.util.StringUtils;
 
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
 import java.util.*;
 
 @Slf4j
@@ -1178,5 +1179,14 @@ public class YongAnOrderServiceImpl implements YongAnOrderService {
         return HttpResult.ok("success", quoteRespVo);
     }
 
+    @Override
+    public void getOrderDetailNew(String subOrderNo) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
+        insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());//7 已承保
+       if(insAreaCompany.getPayDate()==null){
+                        insAreaCompany.setPayDate(LocalDateTime.now());
+       }
+        insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
 
+    }
 }

+ 23 - 0
src/main/java/com/ydtech/modules/order/utils/StringSubStringUtils.java

@@ -0,0 +1,23 @@
+package com.ydtech.modules.order.utils;
+/**
+ *  @version  截取字符串括号的内容用于渤海提取错误信息中的内容
+ *  @author: hxl
+ *  @Date: 2024/4/3 16:17
+ *  @Description:
+ */
+public class StringSubStringUtils {
+    public static void main(String[] args) {
+        String input = "ESB车型及纯风险保费查询服务返回错误信息_选择车辆的行业车型编码(BBWABBUA0005)在平台不存在!请使用正确的行业车型编码(BBWABBUB0007)";
+        String result = extractLastParenthesesContent(input);
+        System.out.println(result);
+    }
+
+    public static String extractLastParenthesesContent(String str) {
+        int startIndex = str.lastIndexOf("(");
+        int endIndex = str.lastIndexOf(")");
+        if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) {
+            return str.substring(startIndex + 1, endIndex);
+        }
+        return "";
+    }
+}

+ 12 - 0
src/main/java/com/ydtech/modules/protocols/entity/po/InsFeeOrderNew.java

@@ -324,14 +324,26 @@ public class InsFeeOrderNew {
     @TableField(value = "first_level_user_id")
     private String firstLevelUserId;
 
+    @ApiModelProperty(value = "一级分销用户信息")
+    @TableField(exist = false)
+    private String firstLevelUserInfo;
+
     @ApiModelProperty(value = "二级分销用户id")
     @TableField(value = "two_level_user_id")
     private String twoLevelUserId;
 
+    @ApiModelProperty(value = "二级分销用户信息")
+    @TableField(exist = false)
+    private String twoLevelUserInfo;
+
     @ApiModelProperty(value = "三级分销用户id")
     @TableField(value = "three_level_user_id")
     private String threeLevelUserId;
 
+    @ApiModelProperty(value = "三级分销用户信息")
+    @TableField(exist = false)
+    private String threeLevelUserInfo;
+
     @ApiModelProperty(value = "分销等级")
     @TableField(value = "distribution_status")
     private String distributionStatus;

+ 5 - 0
src/main/java/com/ydtech/modules/protocols/service/impl/PtlAgreementProductCostsNewServiceImpl.java

@@ -283,6 +283,11 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
         PtlAgreementProductCostsNew ptlAgreementProductCostsNew = new PtlAgreementProductCostsNew();
         BeanUtils.copyProperties(agreementProductCosts, ptlAgreementProductCostsNew);
         ptlAgreementProductCostsNew.setId(null);
+        //设置默认优先级为1
+        if(ptlAgreementProductCostsNew.getPriorityLevel() == null)
+        {
+            ptlAgreementProductCostsNew.setPriorityLevel(1);
+        }
         ptlAgreementProductCostsNew.blank();
         int insert = baseMapper.insert(ptlAgreementProductCostsNew);
 

+ 9 - 1
src/main/java/com/ydtech/modules/ser/service/impl/SerAnnualAuditOrderServiceImpl.java

@@ -3,10 +3,13 @@ package com.ydtech.modules.ser.service.impl;
 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.constants.enums.dict.ser.AnnualAuditOrderEnum;
+import com.ydtech.constants.enums.dict.ser.OderStateEnum;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.PageRequest;
 import com.ydtech.modules.ser.dao.SerAnnualAuditOrderMapper;
 import com.ydtech.modules.ser.model.SerAnnualAuditOrder;
+import com.ydtech.modules.ser.model.po.RescueOrder;
 import com.ydtech.modules.ser.model.vo.SerAnnualAuditOrderQueryVo;
 import com.ydtech.modules.ser.service.SerAnnualAuditOrderService;
 import com.ydtech.utils.idgen.IdGenerate;
@@ -41,7 +44,7 @@ public class SerAnnualAuditOrderServiceImpl implements SerAnnualAuditOrderServic
         serAnnualAuditOrder.setCreateTime(date);
         serAnnualAuditOrder.setTestPriceNotIncluded(150.00);
         serAnnualAuditOrder.setServicePrice(150.00);
-        serAnnualAuditOrder.setOrderStatus("待支付");
+        serAnnualAuditOrder.setOrderStatus(AnnualAuditOrderEnum.UNPAID.getCode());
         serAnnualAuditOrderMapper.insert(serAnnualAuditOrder);
         return HttpResult.ok("订单生成成功", serAnnualAuditOrder);
     }
@@ -69,6 +72,11 @@ public class SerAnnualAuditOrderServiceImpl implements SerAnnualAuditOrderServic
         if (serAnnualAuditOrderQueryVo.getDetailAddress() != null && !"".equals(serAnnualAuditOrderQueryVo.getDetailAddress())) {
             queryWrapper.like(SerAnnualAuditOrder::getDetailAddress, serAnnualAuditOrderQueryVo.getDetailAddress());
         }
+        //订单状态
+        if (serAnnualAuditOrderQueryVo.getOrderStatus() != null && !"".equals(serAnnualAuditOrderQueryVo.getOrderStatus())) {
+            AnnualAuditOrderEnum annualAuditOrderEnum = AnnualAuditOrderEnum.getAnnualAuditOrderEnum(serAnnualAuditOrderQueryVo.getOrderStatus());
+            queryWrapper.eq(SerAnnualAuditOrder::getOrderStatus, annualAuditOrderEnum != null ? annualAuditOrderEnum.getDesc() : null);
+        }
         Page pageData = serAnnualAuditOrderMapper.selectPage(page, queryWrapper);
 
         return pageData;

+ 18 - 1
src/main/java/com/ydtech/modules/xxl/factory/QueryStatusFactory.java

@@ -22,36 +22,42 @@ public class QueryStatusFactory {
 
     public static BaseQueryStatusService getQueryStatusService(HashMap map, String companyId) {
         if (companyId.startsWith("AICS1000000")) {
+            //永诚财险
             return new YongChengQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (YongchengRequestApiComponents) map.get("yongchengRequestApiComponents"),
                     (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"),
                     (DaJiaOrderService) map.get("daJiaOrderService"));
         } else if (companyId.startsWith("XDCX1000000")){
+            //国任财险
             return new GuoRenQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (GuorenRequestApiComponent) map.get("guorenRequestApiComponent"),
                     (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"),
                     (HuaTaiOrderApiService) map.get("huaTaiOrderApiService"));
         } else if(companyId.startsWith("ZMBX1000000")){
+            //中煤财险
             return new ZhongMeiQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (ZhongmeiRequestApiComponents) map.get("zhongmeiRequestApiComponents"),
                     (PtlAgreementAttributionService) map.get("ptlAgreementAttributionService"),
                     (ZhongMeiOrderApiService) map.get("zhongMeiOrderApiService"));
         } else if(companyId.startsWith("ZKIC1000000")){
+            //紫金财险
             return new ZijinQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (ZijinRequestApiComponents) map.get("zijinRequestApiComponents"),
@@ -59,12 +65,23 @@ public class QueryStatusFactory {
                     (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 InsCrawlerQueryStatusService(
                     (ConfigureParametersComponents) map.get("configureParametersComponents"),
                     (PtlCrawlerApiService) map.get("ptlCrawlerApiService"),
                     (InsCrawlerOrderComponents) map.get("insCrawlerOrderComponents"),
                     (InsCrawlerOrderService) map.get("insCrawlerOrderService"));
-        } else {
+        } else if(companyId.startsWith("BPIC1000000")){
+            //渤海
+            return new BoHaiQueryStatusService((BoHaiOrderApiService) map.get("boHaiOrderApiService"));
+        } else if(companyId.startsWith("PAIC1000000")){
+            //平安
+            return new PingAnQueryStatusService((PingAnOrderApiService) map.get("pingAnOrderApiService"));
+        } else if(companyId.startsWith("YAIC1000000")){
+            //永安
+            return new YongAnQueryStatusService((YongAnOrderService) map.get("yongAnOrderService"));
+        }else{
             return null;
         }
     }

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

@@ -8,5 +8,5 @@ import org.springframework.stereotype.Service;
 public interface BaseQueryStatusService {
     QueryStatusResult queryStatus(InsAreaCompany insAreaCompany);
 
-    void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany);
+    void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) throws Exception;
 }

+ 47 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/BoHaiQueryStatusService.java

@@ -0,0 +1,47 @@
+package com.ydtech.modules.xxl.service.impl;
+
+import com.ydtech.modules.order.service.BoHaiOrderApiService;
+import com.ydtech.modules.xxl.model.InsAreaCompany;
+import com.ydtech.modules.xxl.model.QueryStatusResult;
+import com.ydtech.modules.xxl.service.BaseQueryStatusService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+ *  @version  渤海财险
+ *  @author: hxl
+ *  @Date: 2024/4/2 11:28
+ *  @Description:
+ */
+@Service
+@RequiredArgsConstructor
+public class  BoHaiQueryStatusService implements BaseQueryStatusService {
+
+    private final BoHaiOrderApiService boHaiOrderApiService;
+
+
+
+    /**
+     *
+     * @param insAreaCompany 业务订单
+     * @return
+     */
+    @Override
+    public QueryStatusResult queryStatus(InsAreaCompany insAreaCompany) {
+
+        return null;
+    }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) throws Exception {
+        boHaiOrderApiService.getOrderDetailNew(insAreaCompany.getId());
+    }
+}

+ 45 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/PingAnQueryStatusService.java

@@ -0,0 +1,45 @@
+package com.ydtech.modules.xxl.service.impl;
+
+import com.ydtech.modules.order.service.PingAnOrderApiService;
+import com.ydtech.modules.xxl.model.InsAreaCompany;
+import com.ydtech.modules.xxl.model.QueryStatusResult;
+import com.ydtech.modules.xxl.service.BaseQueryStatusService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/28 11:33
+ *  @Description:  平安财险
+ */
+@Service
+@RequiredArgsConstructor
+public class PingAnQueryStatusService implements BaseQueryStatusService {
+
+    private final PingAnOrderApiService pingAnOrderApiService;
+
+    /**
+     *
+     * @param insAreaCompany 业务订单
+     * @return
+     */
+    @Override
+    public QueryStatusResult queryStatus(InsAreaCompany insAreaCompany) {
+
+        return null;
+    }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        pingAnOrderApiService.getOrderDetailNew(insAreaCompany.getId());
+    }
+}

+ 46 - 0
src/main/java/com/ydtech/modules/xxl/service/impl/YongAnQueryStatusService.java

@@ -0,0 +1,46 @@
+package com.ydtech.modules.xxl.service.impl;
+
+import com.ydtech.modules.order.service.YongAnOrderService;
+import com.ydtech.modules.xxl.model.InsAreaCompany;
+import com.ydtech.modules.xxl.model.QueryStatusResult;
+import com.ydtech.modules.xxl.service.BaseQueryStatusService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/3/28 11:33
+ *  @Description:  永安财险
+ */
+@Service
+@RequiredArgsConstructor
+public class YongAnQueryStatusService implements BaseQueryStatusService {
+
+    private final YongAnOrderService yongAnOrderService;
+
+
+
+    /**
+     *
+     * @param insAreaCompany 业务订单
+     * @return
+     */
+    @Override
+    public QueryStatusResult queryStatus(InsAreaCompany insAreaCompany) {
+        return null;
+    }
+
+    /**
+     * @Description  更新承保状态和支付时间
+     * @Author  hxl
+     * @Date   2024/3/28 17:58
+     * @Param
+     * @Return
+     * @Exception
+     *
+     */
+    public void updateOrderStatusAndPayDate(InsAreaCompany insAreaCompany) {
+        yongAnOrderService.getOrderDetailNew(insAreaCompany.getId());
+    }
+}

+ 2 - 2
src/main/resources/application-pre.yml

@@ -246,7 +246,7 @@ huatai:
   api:
     sourceCode: '016'
 #    baseUrl: https://gears.pc.ehuatai.com:9003/interFaces/common/AutoInsuranceQuotation.do
-    baseUrl: http://172.24.144.220/huatai/interFaces/common/AutoInsuranceQuotation.do
+    baseUrl: http://39.98.238.167/huatai/interFaces/common/AutoInsuranceQuotation.do
     selfPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCYUuKVmeF5N66v6MQmOR8pt4o33yrio/ZrDf2ehk/kHJ2BYdI+xE9dLrZW5dm0y8yPpIHN39JaLuYOlWz5DVsWJTSPj9eaq0hOiY9BGAHJ3yMHdX3wygpcD11BVc5v4wbX/kyAhmatK69sb4zzAtEve1NS/YwZVuGch0CrkGw3YQIDAQAB
     selfPrivateKey: MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJhS4pWZ4Xk3rq/oxCY5Hym3ijffKuKj9msN/Z6GT+QcnYFh0j7ET10utlbl2bTLzI+kgc3f0lou5g6VbPkNWxYlNI+P15qrSE6Jj0EYAcnfIwd1ffDKClwPXUFVzm/jBtf+TICGZq0rr2xvjPMC0S97U1L9jBlW4ZyHQKuQbDdhAgMBAAECgYAktOyXYoK8RFfbWjtSfrdsxScQub3K6foq6C8y8Wj1LpQiJqGUsJfze5tDK5agA/CiuODy7LnzM5QK9aVSCw7k0r8EeGpHcYRdLYZM0vXVFK2gIQctFemK4c6sg5p0Bn1LNRbJG7rgMMEA/OxcF6vyQahhFtPVtAQwc+dT0PV51QJBANd66rfTuxSRvIC/RE4W6iqzed2YZtx+0kd7KiN78Y4X6spposFCH4ALf4jUeRRXZAm+Qu71cq21m2GsQZ8bZdMCQQC096ilZXEjmEuvopQR3JvPbgAF+MtItusyDDsMR1CWwXq9XGMmxi6GhFY7r7C8b40j1IchVAEY5BcwxJwfjql7AkAp5QYZs5reBu/FgGqBXEcvAjIheW4WVLoBl9q7h2+RlujZbexs8rQ5KwMi0VyxLcSPeGR/HU2spHCPbvRbQPJtAkBANK4tIHSnwFz6D6ChRbgyPEDd3YuiXOPNefFpRdQd6L93d9Pl6eKP71v5CTiXYqyczcaz2G4bOrHPp7IMsD0JAkBO/q3ZMT+Nj2jdMn2AR1h+ngn38JnK46PznU0WoRPx72YoWbLxvaGWpu8scZAhpYeq/n+52NHFfu8ayDRNWjP2
     huaTaiPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCYyF2SBNzLOP5N5fFW2T2eQ5+iaI5wVpsedu+UY290TVuG152tkdtSuTXsx+8BKnd79/PF966/2aSP4EUm7vD9kvQUnX2EDUiMooorGvDTRxoHNXFGqOtxdMiUOuqx19HwNb4gOXZ1WdjWJwSmqC6ZP6OgxKIotCHJwe826Q/w8wIDAQAB
@@ -283,7 +283,7 @@ dajia:
 # 渤海财险
 bohai:
   api:
-    url: http://172.24.144.220/bohai/app-intermediary/gatewayFromPlat
+    url: http://39.98.238.167/bohai/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

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

@@ -282,7 +282,7 @@ dajia:
 bohai:
   api:
 #    url: https://esales.bpic.com.cn
-    url: http://172.24.144.220/bohai/app-intermediary/gatewayFromPlat
+    url: http://39.98.238.167/bohai/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

+ 0 - 6
src/main/resources/mapper/modules/admin/SysUserMapper.xml

@@ -263,9 +263,6 @@
         RIGHT JOIN ins_area_company iac ON iac.orderno = io.orderno
         WHERE
         iac.orderstatus in (1,2,3)
-        <if test="quTeamNumDto.deptId != null and quTeamNumDto.deptId != ''">
-            and io.deptid = #{quTeamNumDto.deptId}
-        </if>
         <if test="quTeamNumDto.createTimeStart != null">
             and io.createtime &gt;= #{quTeamNumDto.createTimeStart}
         </if>
@@ -347,9 +344,6 @@
         RIGHT JOIN ins_area_company iac ON iac.orderno = io.orderno
         WHERE
         iac.orderstatus in (1,2,3)
-        <if test="quTeamNumDto.deptId != null and quTeamNumDto.deptId != ''">
-            and io.deptid = #{quTeamNumDto.deptId}
-        </if>
         <if test="quTeamNumDto.createTimeStart != null">
             and io.createtime &gt;= #{quTeamNumDto.createTimeStart}
         </if>

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor