Browse Source

【阳光】api对接提交

Qchen 1 year ago
parent
commit
cf5ae32506
44 changed files with 3052 additions and 481 deletions
  1. 6 0
      pom.xml
  2. 15 0
      src/main/java/com/ydtech/config/properties/YangGuangApiConfigurationProperties.java
  3. 146 27
      src/main/java/com/ydtech/modules/order/components/yangguang/YangGuangRequestApiComponents.java
  4. 4 4
      src/main/java/com/ydtech/modules/order/constants/InsuranceTypeCorrespondence.java
  5. 2 2
      src/main/java/com/ydtech/modules/order/controller/InsAreaCompanyController.java
  6. 16 11
      src/main/java/com/ydtech/modules/order/controller/QuoteController.java
  7. 65 4
      src/main/java/com/ydtech/modules/order/controller/YangGuangOrderApiController.java
  8. 46 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/ImageTypeEnum.java
  9. 35 17
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/KindListEnum.java
  10. 21 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/RiskCode.java
  11. 7 9
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/YgUseNatureCode.java
  12. 34 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/YgUseNatureCodeMapping.java
  13. 316 220
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangAccuracyCalculateRequest.java
  14. 32 4
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangAutoWriteOffRequest.java
  15. 38 7
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangElecApplicationSignRequest.java
  16. 49 2
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangGetEpolicyPdfUrlRequest.java
  17. 46 11
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangGetNonVehicleProductsRequest.java
  18. 59 13
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangPaymentCallbackRequest.java
  19. 68 12
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangPaymentRequest.java
  20. 46 10
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangProposalStatusQueryRequest.java
  21. 25 7
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangQueryVehicleModelRequest.java
  22. 98 31
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangSubmitRequest.java
  23. 169 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangUpLoadRequest.java
  24. 719 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangAccuracyCalculateResponse.java
  25. 5 5
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangAutoWriteOffResponse.java
  26. 5 5
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangCallbackResponse.java
  27. 2 2
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangElecApplicationSignResponse.java
  28. 2 2
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangGetEpolicyPdfUrlResponse.java
  29. 27 13
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangGetNonVehicleProductsResponse.java
  30. 4 4
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangPaymentResponse.java
  31. 16 16
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangProposalStatusQueryResponse.java
  32. 68 3
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangQueryVehicleModelResponse.java
  33. 17 17
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangSubmitResponse.java
  34. 12 0
      src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangUploadResponse.java
  35. 12 2
      src/main/java/com/ydtech/modules/order/entity/config/YangGuangConfigureParameters.java
  36. 14 0
      src/main/java/com/ydtech/modules/order/entity/vo/yangguang/YgNonVehicleProductsVo.java
  37. 20 0
      src/main/java/com/ydtech/modules/order/entity/vo/yangguang/YgQuoteAccidentVo.java
  38. 1 1
      src/main/java/com/ydtech/modules/order/service/InsuranceCompanyPolymerizationService.java
  39. 65 1
      src/main/java/com/ydtech/modules/order/service/YangGuangOrderApiService.java
  40. 11 0
      src/main/java/com/ydtech/modules/order/service/impl/InsOrderPdfUrlServiceImpl.java
  41. 12 0
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java
  42. 19 1
      src/main/java/com/ydtech/modules/order/service/impl/InsuranceCompanyPolymerizationServiceImpl.java
  43. 673 17
      src/main/java/com/ydtech/modules/order/service/impl/YangGuangOrderApiServiceImpl.java
  44. 5 1
      src/main/resources/application-test.yml

+ 6 - 0
pom.xml

@@ -673,6 +673,12 @@
 
 
 
 
 
 
+        <dependency>
+            <groupId>com.sunecm</groupId>
+            <artifactId>sunecm-url-encode-1</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+
     </dependencies>
     </dependencies>
 
 
 
 

+ 15 - 0
src/main/java/com/ydtech/config/properties/YangGuangApiConfigurationProperties.java

@@ -8,9 +8,24 @@ import org.springframework.stereotype.Component;
 @Component
 @Component
 @ConfigurationProperties(prefix = "yangguang.api")
 @ConfigurationProperties(prefix = "yangguang.api")
 public class YangGuangApiConfigurationProperties {
 public class YangGuangApiConfigurationProperties {
+    // 测试地址
     private String url;
     private String url;
 
 
+    // 测试key
     private String testKey;
     private String testKey;
 
 
+    // 生产key
     private String productKey;
     private String productKey;
+
+    // 支付回调地址
+    private String payCallBack;
+
+    // 影像上传地址
+    private String uploadUrl;
+
+    // 影像上传key
+    private String secret;
+
+    // 获取影像时referer
+    private String referer;
 }
 }

File diff suppressed because it is too large
+ 146 - 27
src/main/java/com/ydtech/modules/order/components/yangguang/YangGuangRequestApiComponents.java


+ 4 - 4
src/main/java/com/ydtech/modules/order/constants/InsuranceTypeCorrespondence.java

@@ -46,11 +46,11 @@ public class InsuranceTypeCorrespondence {
             "030220", "030219", "030235", "030236", "030237", "030238"};
             "030220", "030219", "030235", "030236", "030237", "030238"};
 
 
     //阳光财险
     //阳光财险
-    protected static final String[] YG_CONNECT_INSURANCE_TYPE = {"A", "B", "D3", "D4", "G1", "L", "F", "R", "X", "X1", "Z", "Z2", "Z3", "Q3", "D2", "M", "J1"};
-
+    protected static final String[] YG_CONNECT_INSURANCE_TYPE = {"20A", "20B", "20C1", "20C2", "20FD","20FE","20FF","20FG","20FA","20F7","20FH","20FR","20FQ","20FK","20FL",
+    "20FM","20FN"};
     //阳光财险新能源
     //阳光财险新能源
-    protected static final String[] YG_CONNECT_INSURANCE_TYPE_NEW_EMERGY = {"21A", "21B", "20G1", "21C1", "21C2", "21FK", "21FL", "21FM", "21FN",
-            "21FV", "21FW", "21FX", "21FY", "21FZ", "20F1", "20F2", "20FD", "20FE", "20FF", "20FG", "20F5", "20F6", "20FS", "20FT", "20F7", "20F8", "20FA", "20FB", "20FC", "20FH", "20FQ", "20FR"};
+    protected static final String[] YG_CONNECT_INSURANCE_TYPE_NEW_EMERGY = {"21A", "21B", "21C1", "21C2", "20FD", "20FE", "20FF", "20FG", "20FA",
+            "20F7", "20FH", "20FR", "20FQ", "21FK", "21FL", "21FM", "21FN"};
     // 乘客
     // 乘客
     protected static final String[] PASSENGER = {"D4", "SY_FJ_YBW2"};
     protected static final String[] PASSENGER = {"D4", "SY_FJ_YBW2"};
 
 

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

@@ -49,7 +49,7 @@ public class InsAreaCompanyController {
     @GetMapping("/close/{subOrderNo}")
     @GetMapping("/close/{subOrderNo}")
     @ApiOperation("关闭订单")
     @ApiOperation("关闭订单")
     @Transactional
     @Transactional
-    public HttpResult<String> close(@PathVariable String subOrderNo) {
+    public HttpResult<String> close(@PathVariable String subOrderNo) throws Exception {
         InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
         InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
         if (InsOrderStatusEnum.ACCEPT_INSURANCE.getCode().equals(insAreaCompany.getOrderstatus())) {
         if (InsOrderStatusEnum.ACCEPT_INSURANCE.getCode().equals(insAreaCompany.getOrderstatus())) {
             throw new SystemException("已承保订单不允许关闭");
             throw new SystemException("已承保订单不允许关闭");
@@ -68,7 +68,7 @@ public class InsAreaCompanyController {
 
 
     @GetMapping("/cancelUnderwriting/{subOrderNo}")
     @GetMapping("/cancelUnderwriting/{subOrderNo}")
     @ApiOperation("取消核保")
     @ApiOperation("取消核保")
-    public HttpResult<String> cancelUnderwriting(@PathVariable String subOrderNo) {
+    public HttpResult<String> cancelUnderwriting(@PathVariable String subOrderNo) throws Exception {
         InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
         InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(subOrderNo);
         if (!InsOrderStatusEnum.WAIT_PAY.getCode().equals(insAreaCompany.getOrderstatus())) {
         if (!InsOrderStatusEnum.WAIT_PAY.getCode().equals(insAreaCompany.getOrderstatus())) {
             throw new SystemException("只有[已核保待缴费]状态下允许取消核保");
             throw new SystemException("只有[已核保待缴费]状态下允许取消核保");

+ 16 - 11
src/main/java/com/ydtech/modules/order/controller/QuoteController.java

@@ -1,13 +1,8 @@
 package com.ydtech.modules.order.controller;
 package com.ydtech.modules.order.controller;
 
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.fasterxml.jackson.core.JsonProcessingException;
 import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.aop.request.RequestSingleParam;
-import com.ydtech.constants.enums.InsuranceRisk;
-import com.ydtech.constants.enums.dict.agreement.ProductsType;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.exception.SystemException;
 import com.ydtech.exception.SystemException;
 import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.base.controller.BaseController;
@@ -16,7 +11,6 @@ import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsAreaCompany;
-import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
@@ -25,24 +19,20 @@ import com.ydtech.modules.order.entity.vo.bohai.BoHaiQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.ct.CtQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.ct.CtQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
 import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
 import com.ydtech.modules.order.entity.vo.guoren.GuorenAccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.guoren.GuorenAccidentalDrivingVo;
+import com.ydtech.modules.order.entity.vo.yangguang.YgQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import com.ydtech.modules.order.service.*;
 import com.ydtech.modules.order.service.*;
-import com.ydtech.modules.protocol.constants.TaxSourceStatusConstants;
 import com.ydtech.modules.protocol.dao.PtlTaxSourceNewMapper;
 import com.ydtech.modules.protocol.dao.PtlTaxSourceNewMapper;
 import com.ydtech.modules.protocol.entity.constants.PtlApiType;
 import com.ydtech.modules.protocol.entity.constants.PtlApiType;
-import com.ydtech.modules.protocol.entity.dto.TaxSourceExcludeDto;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
-import com.ydtech.modules.protocol.entity.po.PtlTaxSourceNew;
 import com.ydtech.modules.protocol.entity.vo.PtlAgreementQueryVo;
 import com.ydtech.modules.protocol.entity.vo.PtlAgreementQueryVo;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.protocol.service.PtlAgreementService;
 import com.ydtech.modules.protocol.service.PtlAgreementService;
 import com.ydtech.modules.protocol.service.PtlTaxSourceNewService;
 import com.ydtech.modules.protocol.service.PtlTaxSourceNewService;
 import com.ydtech.modules.protocol.service.impl.TaxSourceExcludeServiceImpl;
 import com.ydtech.modules.protocol.service.impl.TaxSourceExcludeServiceImpl;
-import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
 import org.springframework.util.ObjectUtils;
 import org.springframework.util.ObjectUtils;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -114,6 +104,9 @@ public class QuoteController extends BaseController {
     @Autowired
     @Autowired
     YongAnOrderService yongAnOrderService;
     YongAnOrderService yongAnOrderService;
 
 
+    @Autowired
+    YangGuangOrderApiService yangGuangOrderApiService;
+
     @Autowired
     @Autowired
     PtlAgreementService ptlAgreementService;
     PtlAgreementService ptlAgreementService;
 
 
@@ -239,6 +232,14 @@ public class QuoteController extends BaseController {
 //            quoteVo1.setAccidentalDrivingVo(javaObject);
 //            quoteVo1.setAccidentalDrivingVo(javaObject);
             respVo = chengTaiOrderApiService.quoteApi(quoteInfo, quoteVo1);
             respVo = chengTaiOrderApiService.quoteApi(quoteInfo, quoteVo1);
         }
         }
+        if ("YGBX1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)) {
+            BaseQuoteVo<List<YgQuoteAccidentVo>> quoteVo1 = new BaseQuoteVo<>();
+            JSONArray jsonObject = JSONArray.parseArray(JSONArray.toJSONString(quoteVo.getAccidentalDrivingVo()));
+            List<YgQuoteAccidentVo> javaObject = jsonObject.toJavaList(YgQuoteAccidentVo.class);
+            BeanUtils.copyProperties(quoteVo, quoteVo1);
+            quoteVo1.setAccidentalDrivingVo(javaObject);
+            respVo = yangGuangOrderApiService.quote(quoteInfo, quoteVo1);
+        }
         if("PAIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
         if("PAIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
 //            BaseQuoteVo<AccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
 //            BaseQuoteVo<AccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
 //            JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
 //            JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
@@ -302,6 +303,10 @@ public class QuoteController extends BaseController {
             if(insAreaCompany.getCompanyId().equals("CHAC1000000")){
             if(insAreaCompany.getCompanyId().equals("CHAC1000000")){
                 httpResult = chengTaiOrderApiService.submitImages(companyId);
                 httpResult = chengTaiOrderApiService.submitImages(companyId);
             }
             }
+            //阳光
+            if (insAreaCompany.getCompanyId().equals("YGBX1000000")) {
+                httpResult = yangGuangOrderApiService.upload(companyId);
+            }
         }
         }
 
 
         return httpResult;
         return httpResult;

+ 65 - 4
src/main/java/com/ydtech/modules/order/controller/YangGuangOrderApiController.java

@@ -1,11 +1,19 @@
 package com.ydtech.modules.order.controller;
 package com.ydtech.modules.order.controller;
 
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
+import com.ydtech.modules.order.components.InsOrdersComponents;
+import com.ydtech.modules.order.entity.api.yangguang.response.YangGuangGetNonVehicleProductsResponse;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
-import com.ydtech.modules.order.entity.vo.pingan.PingAnQuoteVo;
+import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+import com.ydtech.modules.order.entity.vo.QuoteAccidentalDrivingVo;
+import com.ydtech.modules.order.entity.vo.yangguang.YgNonVehicleProductsVo;
+import com.ydtech.modules.order.entity.vo.yangguang.YgQuoteAccidentVo;
+import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.order.service.YangGuangOrderApiService;
 import com.ydtech.modules.order.service.YangGuangOrderApiService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
@@ -16,7 +24,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
-import java.util.Map;
+import java.util.List;
 
 
 @Api(tags = "阳光财险 API ")
 @Api(tags = "阳光财险 API ")
 @Slf4j
 @Slf4j
@@ -25,11 +33,64 @@ import java.util.Map;
 @RequiredArgsConstructor
 @RequiredArgsConstructor
 public class YangGuangOrderApiController {
 public class YangGuangOrderApiController {
 
 
+    private final InsOrdersComponents insOrdersComponents;
+
     private final YangGuangOrderApiService yangGuangOrderApiService;
     private final YangGuangOrderApiService yangGuangOrderApiService;
+
+    private final InsOrdersService insOrdersService;
     @QuoteVerification("报价授权")
     @QuoteVerification("报价授权")
     @PostMapping("/quote")
     @PostMapping("/quote")
     @ApiOperation("报价")
     @ApiOperation("报价")
-    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteInfoVo quoteInfoVo) throws Exception {
-        return this.yangGuangOrderApiService.quote(quoteInfoVo);
+    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<QuoteAccidentalDrivingVo> quoteVo) throws Exception {
+        BaseQuoteVo<List<YgQuoteAccidentVo>> baseQuoteVo = insOrdersService.convertDriving(quoteVo);
+        BaseQuoteInfoVo quoteInfo = this.insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo(), quoteVo.getAgreementId(),quoteVo.getKinds());
+        return this.yangGuangOrderApiService.quote(quoteInfo,baseQuoteVo);
+    }
+
+    @QuoteVerification("影像上传")
+    @PostMapping("/upload")
+    @ApiOperation("影像上传")
+    public HttpResult<Object> upload(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
+        return this.yangGuangOrderApiService.upload(companyId);
+    }
+
+
+    @PostMapping("/submit")
+    @ApiOperation("投保单提交")
+    public HttpResult<Object> submit(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
+        return this.yangGuangOrderApiService.submit(companyId);
+    }
+
+    @PostMapping("/paymentCallback")
+    @ApiOperation("支付回调")
+    public HttpResult<Object> paymentCallback(@RequestSingleParam (value = "companyId") String companyId) throws Exception {
+        return this.yangGuangOrderApiService.paymentCallback(companyId);
+    }
+
+    @PostMapping("/getNonVehicleProducts")
+    @ApiOperation("获取非车险方案")
+    public HttpResult<List<YangGuangGetNonVehicleProductsResponse.nonVehicleProducts>> getNonVehicleProducts(@RequestBody YgNonVehicleProductsVo ygNonVehicleProductsVo) throws Exception {
+        return this.yangGuangOrderApiService.getNonVehicleProducts(ygNonVehicleProductsVo);
+    }
+
+    @PostMapping("/proposalStatusQuery")
+    @ApiOperation("投保单状态查询")
+    public HttpResult<Object> proposalStatusQuery(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
+        return this.yangGuangOrderApiService.proposalStatusQuery(companyId);
+    }
+
+    @PostMapping("/getEpolicyPDFURL")
+    @ApiOperation("获取电子保单")
+    public HttpResult getEpolicyPDFURL(@RequestBody PolicyPrintVo policyPrintVo) throws JsonProcessingException {
+        return this.yangGuangOrderApiService.getEpolicyPDFURL(policyPrintVo);
     }
     }
+
+    @PostMapping("/autoWriteOff")
+    @ApiOperation("投保单撤销")
+    public boolean autoWriteOff(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
+        return this.yangGuangOrderApiService.autoWriteOff(companyId);
+    }
+
+
+
 }
 }

+ 46 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/ImageTypeEnum.java

@@ -0,0 +1,46 @@
+package com.ydtech.modules.order.entity.api.yangguang.constants;
+
+import com.ydtech.constants.InsuranceImageEnum;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum ImageTypeEnum {
+    ITE_02("02","新车购置发票",new String[]{
+            InsuranceImageEnum.GX00.getCode()
+    }),
+    ITE_07("07","验车照、验车单",new String[]{
+            InsuranceImageEnum.C0500.getCode(),
+            InsuranceImageEnum.C0501.getCode(),
+            InsuranceImageEnum.C0502.getCode(),
+            InsuranceImageEnum.C0503.getCode(),
+            InsuranceImageEnum.C0504.getCode(),
+            InsuranceImageEnum.C0505.getCode(),
+            InsuranceImageEnum.C0506.getCode(),
+            InsuranceImageEnum.C0507.getCode(),
+            InsuranceImageEnum.C0508.getCode(),
+            InsuranceImageEnum.C0509.getCode(),
+           InsuranceImageEnum.C0510.getCode()
+    }),
+    ITE_12("12","身份证",new String[]{
+            InsuranceImageEnum.C02.getCode(),
+            InsuranceImageEnum.D02.getCode(),
+            InsuranceImageEnum.C03.getCode(),
+            InsuranceImageEnum.D03.getCode(),
+            InsuranceImageEnum.C04.getCode(),
+            InsuranceImageEnum.D04.getCode()
+    }),
+
+    ITE_14("14","行驶证",new String[]{
+            InsuranceImageEnum.C01.getCode(),
+            InsuranceImageEnum.D01.getCode()
+    });
+
+    private final String code;
+
+    private final String desc;
+
+    private final String[] imagesType;
+
+}

+ 35 - 17
src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/KindListEnum.java

@@ -7,23 +7,41 @@ import lombok.Getter;
 @Getter
 @Getter
 @AllArgsConstructor
 @AllArgsConstructor
 public enum KindListEnum {
 public enum KindListEnum {
-    KIND_LIST_1("A", "车辆损失险","主险。默认车辆实际价值,浮动不超过实际价值的30%"),
-    KIND_LIST_2("B", "商业第三者责任险","主险。固定值:5万/10万/15万/20万/30万/50万/100万/150万/200万/300万/500万"),
-    KIND_LIST_3("D3", "司机座位责任险","主险。总保额=单位保额数"),
-    KIND_LIST_4("D4", "乘客座位责任险","主险。总保额=单位保额数*座位数"),
-    KIND_LIST_5("G1", "机动车抢盗险","主险。默认车辆实际价值"),
-    KIND_LIST_6("L", "车身划痕损失险","附加险。固定值:2000 5000 10000 20000"),
-    KIND_LIST_7("F", "玻璃单独破碎险","附加险。不必录入保额,需录入玻璃种类。"),
-    KIND_LIST_8("R", "精神损害抚慰金责任险","附加险。不超过100万。部分机构不承保,联调时确认。"),
-    KIND_LIST_9("X", "新增加设备损失险","附加险。等于新增设备实际价值。部分机构不承保,联调时确认。"),
-    KIND_LIST_10("X1", "发动机涉水损失险","附加险。不必录入保额"),
-    KIND_LIST_11("Z", "自燃损失险","附加险。不必录入保额"),
-    KIND_LIST_12("Z2", "修理期间费用补偿险","附加险。不必录入保额"),
-    KIND_LIST_13("Z3", "机动车损失保险无法找到第三方特约险","附加险。不必录入保额"),
-    KIND_LIST_14("Q3", "指定修理厂险","附加险。不必录入保额,需录入专修费率"),
-    KIND_LIST_15("D2", "车上车上货物责任险货物责任","附加险。家庭自用车不能承保此险种"),
-    KIND_LIST_16("M", "不计免赔","附加险。投保不计免赔时,返回该险种"),
-    KIND_LIST_17("J1", "机动车第三者责任保险法定节假日限额翻倍险","附加险,保额同三者,车主性质为个人的家庭自用客车且投保了三者险可投保");
+    KIND_LIST_20A("20A", "车辆损失险","主险。默认车辆实际价值,浮动不超过实际价值的30%"),
+    KIND_LIST_20B("20B", "商业第三者责任险","主险。固定值:5万/10万/15万/20万/30万/50万/100万/150万/200万/300万/500万"),
+    KIND_LIST_20C1("20C1", "司机座位责任险","主险。总保额=单位保额数"),
+    KIND_LIST_20C2("20C2", "乘客座位责任险","主险。总保额=单位保额数*座位数"),
+    KIND_LIST_20F6("20FD", "车损险事故免赔率特约条款 (2020条款)","附加险,绝对免赔率在5%、10%、15%、20%,(主险:20A);传值:0.05,0.1,0.15,0.2"),
+    KIND_LIST_20FE("20FE", "三者险事故免赔率特约条款 (2020条款)","附加险,绝对免赔率在5%、10%、15%、20%(主险:20B);传值:0.05,0.1,0.15,0.2"),
+    KIND_LIST_20FF("20FF", "司机车上人员事故免赔率特约条款 (2020条款)","附加险,绝对免赔率在5%、10%、15%、20%(主险:20C1);传值:0.05,0.1,0.15,0.2"),
+    KIND_LIST_20FG("20FG", "乘客车上人员事故免赔率特约条款 (2020条款)","附加险,绝对免赔率在5%、10%、15%、20%(主险:20C1);传值:0.05,0.1,0.15,0.2"),
+    KIND_LIST_20FA("20FA", "机动车第三者责任保险法定节假日限额翻倍险(2020条款)","附加险,保额同三者,车主性质为个人的家庭自用客车且投保了三者险可投保"),
+    KIND_LIST_20F7("20F7", "车身划痕损失险","附加险。固定值:2000 5000 10000 20000"),
+    KIND_LIST_20FH("20FH", "附加三者医保外医疗费用责任险(2020条款)","附加险,固定值:大于5000,且是1000的整数被,最高限额10000000(非新能源)"),
+    KIND_LIST_20FR("20FR", "附加乘客车上人员医保外医疗费用责任险(2020条款)","附加险,固定值:大于5000,且是1000的整数被,最高限额10000000(非新能源)"),
+    KIND_LIST_20FQ("20FQ", "附加司机车上人员医保外医疗费用责任险(2020条款)","附加险,固定值:大于5000,且是1000的整数被,最高限额10000000(非新能源)" +
+            "(主险:20C1);传值:0.05,0.1,0.15,0.2"),
+    KIND_LIST_20FK("20FK", "附加道路救援服务特约条款(2020条款)","附加险;服务次数:2,7,12,17,22"),
+
+    KIND_LIST_20FL("20FL", "附加车辆安全检测特约条款(2020条款)","附加险;服务次数:1,2,3,5"),
+    KIND_LIST_20FM("20FM", "附加代为驾驶服务特约条款(2020条款)",""),
+    KIND_LIST_20FN("20FN", "附加代为送检服务特约条款(2020条款)","附加险;服务次数1"),
+
+    KIND_LIST_21A("21A","新能源汽车损失保险(2021专属条款)","主险,默认车辆实际价值,浮动不超过实际价值的30%,,可选免赔额:0,300,500,1000,2000"),
+
+    KIND_LIST_21B("21B","新能源汽车第三者责任保险(2021专属条款)","主险,三者险保额为10万、15万、20万、30万、50万、100万,超过100万的校验“保额/限额”必须为50万的整数倍。"),
+
+    KIND_LIST_21C1("21C1","新能源汽车驾驶员车上人员责任保险(2021专属条款)","主险,总保额=单位保额数"),
+
+    KIND_LIST_21C2("21C2","新能源汽车乘客车上人员责任保险(2021专属条款)","主险,总保额=单位保额数*座位数"),
+
+    KIND_LIST_21FK("21FK", "附加道路救援服务特约条款(2020条款)","附加险;服务次数:2,7,12,17,22"),
+
+    KIND_LIST_21FL("21FL", "附加车辆安全检测特约条款(2020条款)","附加险;服务次数:1,2,3,5"),
+    KIND_LIST_21FM("21FM", "附加代为驾驶服务特约条款(2020条款)",""),
+    KIND_LIST_21FN("21FN", "附加代为送检服务特约条款(2020条款)","附加险;服务次数1");
+
+
 
 
 
 
     private final String code;
     private final String code;

+ 21 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/RiskCode.java

@@ -0,0 +1,21 @@
+package com.ydtech.modules.order.entity.api.yangguang.constants;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum RiskCode {
+
+    RC_0590("0507", "交强险"),
+
+    RC_050A("0528", "商业险");
+
+    public static final String TRAFFIC_CODE = "0507";
+
+    public static final String BUSINESS_CODE = "0528";
+
+    private final String code;
+
+    private final String desc;
+}

+ 7 - 9
src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/UseNatureCode.java → src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/YgUseNatureCode.java

@@ -5,7 +5,7 @@ import lombok.Getter;
 
 
 @Getter
 @Getter
 @AllArgsConstructor
 @AllArgsConstructor
-public enum UseNatureCode {
+public enum YgUseNatureCode {
     UNC_01("8D", "非营业个人"),
     UNC_01("8D", "非营业个人"),
     UNC_02("8A", "家庭自用"),
     UNC_02("8A", "家庭自用"),
     UNC_03("8B", "非营业企业"),
     UNC_03("8B", "非营业企业"),
@@ -14,17 +14,15 @@ public enum UseNatureCode {
     UNC_06("8G", "教练"),
     UNC_06("8G", "教练"),
     UNC_07("9B", "营业城市公交"),
     UNC_07("9B", "营业城市公交"),
     UNC_08("9C", "营业公路客运"),
     UNC_08("9C", "营业公路客运"),
-    UNC_09("9C", "营业公路客运"),
+    UNC_09("9D", "营业货运"),
+    UNC_10("9E", "营业旅游客运"),
+    UNC_11("9F", "营业出租"),
+    UNC_12("9J", "营业"),
 
 
-    UNC_10("9D", "营业货运"),
-    UNC_11("9E", "营业旅游客运"),
-    UNC_12("9F", "营业出租"),
+    UNC_13("9G", "营业租赁"),
 
 
-    UNC_13("9J", "营业"),
+    UNC_14("9H", "预约出租客运");
 
 
-    UNC_14("9G", "营业租赁"),
-
-    UNC_15("9H", "预约出租客运");
 
 
 
 
     private final String code;
     private final String code;

+ 34 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/constants/YgUseNatureCodeMapping.java

@@ -0,0 +1,34 @@
+package com.ydtech.modules.order.entity.api.yangguang.constants;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum YgUseNatureCodeMapping {
+    UM_01("01", "营业出租租赁", YgUseNatureCode.UNC_14.getCode()),
+    UM_02("02", "营业城市公交", YgUseNatureCode.UNC_07.getCode()),
+    UM_03("03", "营业公路客运", YgUseNatureCode.UNC_08.getCode()),
+    UM_04("04", "营业货运",  YgUseNatureCode.UNC_10.getCode()),
+    UM_05("05", "家庭自用",  YgUseNatureCode.UNC_02.getCode()),
+    UM_06("06", "非营业机关", YgUseNatureCode.UNC_05.getCode()),
+    UM_07("07", "非营业企业", YgUseNatureCode.UNC_03.getCode()),
+    UM_08("08", "非营业货运", YgUseNatureCode.UNC_01.getCode());
+
+    private final String code;
+
+    private final String desc;
+
+    private final String useNatureCode;
+
+    public static final String TITLE = "UM_";
+
+    public static String getYgUseNatureCode(String code) {
+       for (YgUseNatureCodeMapping item : YgUseNatureCodeMapping.values()){
+           if (item.getCode().equals(code)){
+               return item.getUseNatureCode();
+           }
+       }
+       return null;
+    }
+}

File diff suppressed because it is too large
+ 316 - 220
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangAccuracyCalculateRequest.java


+ 32 - 4
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangAutoWriteOffRequest.java

@@ -1,30 +1,58 @@
 package com.ydtech.modules.order.entity.api.yangguang.request;
 package com.ydtech.modules.order.entity.api.yangguang.request;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 @NoArgsConstructor
 @NoArgsConstructor
 @Data
 @Data
 public class YangGuangAutoWriteOffRequest extends YangGuangBaseRequest{
 public class YangGuangAutoWriteOffRequest extends YangGuangBaseRequest{
+    /**
+     * 请求时间
+     */
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
 
 
+    /**
+     * 请求编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
+    /**
+     * 出单机构
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
     /**
     /**
      * 投保单号
      * 投保单号
      */
      */
-    @JsonProperty("ProposalNo")
+    @JSONField(name = "ProposalNo")
     private String ProposalNo;
     private String ProposalNo;
 
 
     /**
     /**
      * 线上线下标识:C-线上、B-线下,空值默认线下
      * 线上线下标识:C-线上、B-线下,空值默认线下
      */
      */
-    @JsonProperty("OnLineFlag")
+    @JSONField(name = "OnLineFlag")
     private String OnLineFlag;
     private String OnLineFlag;
 
 
     /**
     /**
      * 当是线上业务的时候,项目品牌必传
      * 当是线上业务的时候,项目品牌必传
      */
      */
-    @JsonProperty("ProjectBrand")
+    @JSONField(name = "ProjectBrand")
     private String ProjectBrand;
     private String ProjectBrand;
+
+    public YangGuangAutoWriteOffRequest(YangGuangConfigureParameters ygConfigureParameters,String proposalNo) {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestNo = "autoWriteOff";
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.ProposalNo = proposalNo;
+    }
 }
 }

+ 38 - 7
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangElecApplicationSignRequest.java

@@ -1,49 +1,80 @@
 package com.ydtech.modules.order.entity.api.yangguang.request;
 package com.ydtech.modules.order.entity.api.yangguang.request;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
 @Data
 @Data
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 @NoArgsConstructor
 @NoArgsConstructor
 public class YangGuangElecApplicationSignRequest extends YangGuangBaseRequest {
 public class YangGuangElecApplicationSignRequest extends YangGuangBaseRequest {
+    /**
+     * 请求时间
+     */
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
 
 
+    /**
+     * 请求编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
+    /**
+     * 出单机构
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
     /**
     /**
      * 商业险投保单号
      * 商业险投保单号
      */
      */
-    @JsonProperty("BiProposalNo")
+    @JSONField(name = "BiProposalNo")
     private String BiProposalNo;
     private String BiProposalNo;
 
 
     /**
     /**
      * 交强险投保单号
      * 交强险投保单号
      */
      */
-    @JsonProperty("CiProposalNo")
+    @JSONField(name = "CiProposalNo")
     private String CiProposalNo;
     private String CiProposalNo;
 
 
     /**
     /**
      * 是否发送电子投保单签名短
      * 是否发送电子投保单签名短
      * 信(1:是;0:否)
      * 信(1:是;0:否)
      */
      */
-    @JsonProperty("SendMsgFlag")
+    @JSONField(name = "SendMsgFlag")
     private String SendMsgFlag;
     private String SendMsgFlag;
 
 
     /**
     /**
      * 手机号
      * 手机号
      */
      */
-    @JsonProperty("Mobile")
+    @JSONField(name = "Mobile")
     private String Mobile;
     private String Mobile;
 
 
     /**
     /**
      * 线上线下标识:C-线上、B-线下,空值默认线下
      * 线上线下标识:C-线上、B-线下,空值默认线下
      */
      */
-    @JsonProperty("OnLineFlag")
+    @JSONField(name = "OnLineFlag")
     private String OnLineFlag;
     private String OnLineFlag;
 
 
     /**
     /**
      * 当是线上业务的时候,项目品牌必传
      * 当是线上业务的时候,项目品牌必传
      */
      */
-    @JsonProperty("ProjectBrand")
+    @JSONField(name = "ProjectBrand")
     private String ProjectBrand;
     private String ProjectBrand;
+
+    public YangGuangElecApplicationSignRequest(YangGuangConfigureParameters ygConfigureParameters, String ciProposalNo, String biProposalNo, String mobile) {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestNo = "proposalStatusQuery";
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.BiProposalNo = biProposalNo;
+        this.CiProposalNo = ciProposalNo;
+        this.Mobile = mobile;
+        this.SendMsgFlag = "0";
+    }
 }
 }

+ 49 - 2
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangGetEpolicyPdfUrlRequest.java

@@ -1,19 +1,66 @@
 package com.ydtech.modules.order.entity.api.yangguang.request;
 package com.ydtech.modules.order.entity.api.yangguang.request;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
 @Data
 @Data
 @NoArgsConstructor
 @NoArgsConstructor
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 public class YangGuangGetEpolicyPdfUrlRequest extends YangGuangBaseRequest {
 public class YangGuangGetEpolicyPdfUrlRequest extends YangGuangBaseRequest {
+    /**
+     * 请求时间
+     */
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
+
+    /**
+     * 请求编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
+    /**
+     * 出单机构
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
+    /**
+     * 归属业务员
+     */
+    @JSONField(name = "HandlerCode")
+    private String HandlerCode;
+    /**
+     *  服务区域代码(车商代码)
+     */
+    @JSONField(name = "ServiceArea")
+    private String ServiceArea;
 
 
+    /**
+     *  代理机构,出单机构存在多代理时需传入
+     */
+    @JSONField(name = "AgentCode")
+    private String AgentCode;
     /**
     /**
      * 保单号
      * 保单号
      */
      */
-    @JsonProperty("PolicyNo")
+    @JSONField(name = "PolicyNo")
     private String PolicyNo;
     private String PolicyNo;
 
 
+    public YangGuangGetEpolicyPdfUrlRequest(YangGuangConfigureParameters ygConfigureParameters, String busNo) {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestNo = "getEpolicyPDFURL";
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.AgentCode = ygConfigureParameters.getAgentCode();
+        this.ServiceArea = ygConfigureParameters.getServiceArea();
+        this.HandlerCode = ygConfigureParameters.getHandlerCode();
+        this.PolicyNo = busNo;
+    }
+
 }
 }

+ 46 - 11
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangGetNonVehicleProductsRequest.java

@@ -1,77 +1,112 @@
 package com.ydtech.modules.order.entity.api.yangguang.request;
 package com.ydtech.modules.order.entity.api.yangguang.request;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.api.yangguang.constants.YgUseNatureCodeMapping;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
+import java.time.format.DateTimeFormatter;
+
 @Data
 @Data
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 @NoArgsConstructor
 @NoArgsConstructor
 public class YangGuangGetNonVehicleProductsRequest extends YangGuangBaseRequest {
 public class YangGuangGetNonVehicleProductsRequest extends YangGuangBaseRequest {
+    /**
+     *  机构代码
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
+
 
 
     /**
     /**
      *  归属业务员代码
      *  归属业务员代码
      */
      */
-    @JsonProperty("HandlerCode")
+    @JSONField(name = "HandlerCode")
     private String HandlerCode;
     private String HandlerCode;
 
 
+    /**
+     *  接口编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
 
 
     /**
     /**
      *  服务区代码
      *  服务区代码
      */
      */
-    @JsonProperty("ServiceArea")
+    @JSONField(name = "ServiceArea")
     private String ServiceArea;
     private String ServiceArea;
 
 
 
 
     /**
     /**
      *  代理机构代码
      *  代理机构代码
      */
      */
-    @JsonProperty("AgentCode")
+    @JSONField(name = "AgentCode")
     private String AgentCode;
     private String AgentCode;
 
 
 
 
     /**
     /**
      *  车辆使用性质代码 非营业货车8D 营业货车9D
      *  车辆使用性质代码 非营业货车8D 营业货车9D
      */
      */
-    @JsonProperty("UseNatureCode")
+    @JSONField(name = "UseNatureCode")
     private String UseNatureCode;
     private String UseNatureCode;
 
 
     /**
     /**
      *  座位数
      *  座位数
      */
      */
-    @JsonProperty("Seatcount")
+    @JSONField(name = "Seatcount")
     private String Seatcount;
     private String Seatcount;
 
 
     /**
     /**
      *  车辆种类代码
      *  车辆种类代码
      */
      */
-    @JsonProperty("VehicleType")
+    @JSONField(name = "VehicleType")
     private String VehicleType;
     private String VehicleType;
 
 
     /**
     /**
      *  车辆类型 货车为H开头座位数(货车必传)
      *  车辆类型 货车为H开头座位数(货车必传)
      */
      */
-    @JsonProperty("LicenseCategory")
+    @JSONField(name = "LicenseCategory")
     private String LicenseCategory;
     private String LicenseCategory;
 
 
     /**
     /**
      *  吨位数座位数(货车必传)
      *  吨位数座位数(货车必传)
      */
      */
-    @JsonProperty("Toncount")
+    @JSONField(name = "Toncount")
     private String Toncount;
     private String Toncount;
 
 
     /**
     /**
      *  线上线下标识:C-线上、B-线下,空值默认线下
      *  线上线下标识:C-线上、B-线下,空值默认线下
      */
      */
-    @JsonProperty("OnLineFlag")
+    @JSONField(name = "OnLineFlag")
     private String OnLineFlag;
     private String OnLineFlag;
 
 
     /**
     /**
      *  当是线上业务的时候,项目品牌必传
      *  当是线上业务的时候,项目品牌必传
      */
      */
-    @JsonProperty("ProjectBrand")
+    @JSONField(name = "ProjectBrand")
     private String ProjectBrand;
     private String ProjectBrand;
 
 
 
 
+    public YangGuangGetNonVehicleProductsRequest(String seatcount, InsOrders insOrders, YangGuangConfigureParameters ygConfigureParameters) {
+        String json = insOrders.getCarinfo().toJSONString();
+        JSONObject jsonObject = JSONObject.parseObject(json);
+        String useNatureCode = jsonObject.getString("vehicleUse");
+        this.RequestNo = "getNonVehicleProducts";
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.HandlerCode = ygConfigureParameters.getHandlerCode();
+        this.AgentCode = ygConfigureParameters.getAgentCode();
+        this.ServiceArea = ygConfigureParameters.getServiceArea();
+        this.Seatcount = seatcount;
+        if (useNatureCode != null) {
+            this.UseNatureCode = YgUseNatureCodeMapping.getYgUseNatureCode(useNatureCode);
+        }
+        this.VehicleType = jsonObject.getString("cimodelclass");
+        this.LicenseCategory = jsonObject.getString("cartype");
+        this.Toncount = jsonObject.getString("seatCount");
+    }
 }
 }

+ 59 - 13
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangPaymentCallbackRequest.java

@@ -1,79 +1,125 @@
 package com.ydtech.modules.order.entity.api.yangguang.request;
 package com.ydtech.modules.order.entity.api.yangguang.request;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 @NoArgsConstructor
 @NoArgsConstructor
 @Data
 @Data
 public class YangGuangPaymentCallbackRequest extends YangGuangBaseRequest{
 public class YangGuangPaymentCallbackRequest extends YangGuangBaseRequest{
+    /**
+     * 请求时间
+     */
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
+
+    /**
+     * 请求编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
+    /**
+     * 出单机构
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
     /**
     /**
      * 交易流水号
      * 交易流水号
      */
      */
-    @JsonProperty("InfotransNo")
+    @JSONField(name = "InfotransNo")
     private String InfotransNo;
     private String InfotransNo;
 
 
     /**
     /**
      *  商业险投保单号
      *  商业险投保单号
-     * 时间格式 yyyy-MM-dd HH:mm:ss
      */
      */
-    @JsonProperty("BiProposalNo")
+    @JSONField(name = "BiProposalNo")
     private String BiProposalNo;
     private String BiProposalNo;
 
 
     /**
     /**
      *  交强险投保单号
      *  交强险投保单号
      */
      */
-    @JsonProperty("CiProposalNo")
+    @JSONField(name = "CiProposalNo")
     private String CiProposalNo;
     private String CiProposalNo;
 
 
     /**
     /**
      *  支付金额(单位:元)
      *  支付金额(单位:元)
      */
      */
-    @JsonProperty("PayAmount")
+    @JSONField(name = "PayAmount")
     private String PayAmount;
     private String PayAmount;
 
 
     /**
     /**
      *  支付状态 0成功 1失败
      *  支付状态 0成功 1失败
      */
      */
-    @JsonProperty("PayStatus")
+    @JSONField(name = "PayStatus")
     private String PayStatus;
     private String PayStatus;
 
 
     /**
     /**
      *  支付状态描述
      *  支付状态描述
      */
      */
-    @JsonProperty("PayResult")
+    @JSONField(name = "PayResult")
     private String PayResult;
     private String PayResult;
 
 
     /**
     /**
      *  承保状态 0成功 1失败
      *  承保状态 0成功 1失败
      */
      */
-    @JsonProperty("PrpallStatus")
+    @JSONField(name = "PrpallStatus")
     private String PrpallStatus;
     private String PrpallStatus;
 
 
     /**
     /**
      *  承保状态描述
      *  承保状态描述
      */
      */
-    @JsonProperty("PrpallResult")
+    @JSONField(name = "PrpallResult")
     private String PrpallResult;
     private String PrpallResult;
 
 
     /**
     /**
      *  商业险保单号
      *  商业险保单号
      */
      */
-    @JsonProperty("BiPolicyNo")
+    @JSONField(name = "BiPolicyNo")
     private String BiPolicyNo;
     private String BiPolicyNo;
 
 
     /**
     /**
      *  交强险保单号
      *  交强险保单号
      */
      */
-    @JsonProperty("CiPolicyNo")
+    @JSONField(name = "CiPolicyNo")
     private String CiPolicyNo;
     private String CiPolicyNo;
 
 
     /**
     /**
      * 非车险保单号
      * 非车险保单号
      */
      */
-    @JsonProperty("FCPolicyNo")
+    @JSONField(name = "FCPolicyNo")
     private String FCPolicyNo;
     private String FCPolicyNo;
 
 
+    public YangGuangPaymentCallbackRequest(InsAreaCompany insAreaCompany, InsOrders insOrders, YangGuangConfigureParameters yangGuangConfigureParameters) {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestNo = "paymentCallback";
+        this.ComCode = yangGuangConfigureParameters.getComCode();
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.InfotransNo = insAreaCompany.getInsOrderNo();
+        if (insAreaCompany.getJqapplyno() != null) {
+            this.CiProposalNo = insAreaCompany.getJqapplyno();
+        }
+        if (insAreaCompany.getSyapplyno() != null) {
+            this.BiProposalNo = insAreaCompany.getSyapplyno();
+        }
+        this.PayAmount = insAreaCompany.getSumpremium().toString();
+        if (insAreaCompany.getOrderstatus().equals("3")) {
+            this.PayStatus = "0";
+            this.PrpallStatus = "0";
+            this.BiPolicyNo = insAreaCompany.getSypolicyno();
+            this.CiPolicyNo = insAreaCompany.getJqpolicyno();
+        } else {
+            this.PayStatus = "1";
+            this.PrpallStatus = "1";
+        }
+    }
+
 }
 }

+ 68 - 12
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangPaymentRequest.java

@@ -1,62 +1,118 @@
 package com.ydtech.modules.order.entity.api.yangguang.request;
 package com.ydtech.modules.order.entity.api.yangguang.request;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.alibaba.fastjson.annotation.JSONField;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.api.yangguang.response.YangGuangSubmitResponse;
 import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
-import java.util.Date;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 
 
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 @NoArgsConstructor
 @NoArgsConstructor
 @Data
 @Data
 public class YangGuangPaymentRequest extends YangGuangBaseRequest{
 public class YangGuangPaymentRequest extends YangGuangBaseRequest{
+    /**
+     * 请求时间
+     */
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
+
+    /**
+     * 请求编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
+    /**
+     * 出单机构
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
     /**
     /**
      * 交易流水号
      * 交易流水号
      */
      */
-    @JsonProperty("InfotransNo")
+    @JSONField(name = "InfotransNo")
     private String InfotransNo;
     private String InfotransNo;
 
 
     /**
     /**
      *  投保人名称
      *  投保人名称
      */
      */
-    @JsonProperty("AppliName")
+    @JSONField(name = "AppliName")
     private String AppliName;
     private String AppliName;
 
 
     /**
     /**
      *  支付金额(单位:元)
      *  支付金额(单位:元)
      */
      */
-    @JsonProperty("OrderAmount")
+    @JSONField(name = "OrderAmount")
     private String OrderAmount;
     private String OrderAmount;
 
 
     /**
     /**
      *  服务器接收保单生效通知结果地址
      *  服务器接收保单生效通知结果地址
      */
      */
-    @JsonProperty("BackUrl")
+    @JSONField(name = "BackUrl")
     private String BackUrl;
     private String BackUrl;
 
 
+    /**
+     *  商业险投保单号
+     */
+    @JSONField(name = "BiProposalNo")
+    private String BiProposalNo;
+
+    /**
+     *  交强险投保单号
+     */
+    @JSONField(name = "CiProposalNo")
+    private String CiProposalNo;
+
     /**
     /**
      *  是否发送电子投保单签名短信(1:是;0:否)
      *  是否发送电子投保单签名短信(1:是;0:否)
      */
      */
-    @JsonProperty("SendMsgFlag")
+    @JSONField(name = "SendMsgFlag")
     private String SendMsgFlag;
     private String SendMsgFlag;
 
 
     /**
     /**
      *  手机号
      *  手机号
      */
      */
-    @JsonProperty("Mobile")
+    @JSONField(name = "Mobile")
     private String Mobile;
     private String Mobile;
 
 
-    public YangGuangPaymentRequest(InsAreaCompany insAreaCompany, InsOrders insOrders) {
-        this.InfotransNo = getInfotransNo();;
+    public YangGuangPaymentRequest(InsAreaCompany insAreaCompany, InsOrders insOrders, String url, YangGuangSubmitResponse response, YangGuangConfigureParameters ygConfigureParameters) {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestNo = "payment";
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.InfotransNo = insAreaCompany.getInsOrderNo();;
         this.AppliName = insOrders.getInsuredname();
         this.AppliName = insOrders.getInsuredname();
         this.OrderAmount = insAreaCompany.getSumpremium().toString();
         this.OrderAmount = insAreaCompany.getSumpremium().toString();
-        this.BackUrl = getBackUrl();
+        this.BackUrl = url;
         this.SendMsgFlag = "0";
         this.SendMsgFlag = "0";
         this.Mobile = getMobile();
         this.Mobile = getMobile();
+        if (response != null) {
+            if (response.getCiProposalNo() != null) {
+                String CiProposalNo = response.getCiProposalNo();
+                this.CiProposalNo = CiProposalNo;
+            }
+            if (response.getBiProposalNo() != null) {
+                String BiProposalNo = response.getBiProposalNo();
+                this.BiProposalNo = BiProposalNo;
+            }
+        }
+//        if (CiProposalNo != null) {
+//
+//        }
+        if (insAreaCompany.getJqapplyno() != null) {
+            this.CiProposalNo = insAreaCompany.getJqapplyno();
+        }
+//        if (BiProposalNo != null) {
+//            this.BiProposalNo = BiProposalNo;
+//        }
+        if (insAreaCompany.getSyapplyno() != null) {
+            this.BiProposalNo = insAreaCompany.getSyapplyno();
+        }
     }
     }
 }
 }

+ 46 - 10
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangProposalStatusQueryRequest.java

@@ -1,11 +1,15 @@
 package com.ydtech.modules.order.entity.api.yangguang.request;
 package com.ydtech.modules.order.entity.api.yangguang.request;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import lombok.AllArgsConstructor;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
 /**
 /**
  *  投保单状态查询
  *  投保单状态查询
  */
  */
@@ -13,53 +17,85 @@ import lombok.NoArgsConstructor;
 @NoArgsConstructor
 @NoArgsConstructor
 @Data
 @Data
 public class YangGuangProposalStatusQueryRequest extends YangGuangBaseRequest {
 public class YangGuangProposalStatusQueryRequest extends YangGuangBaseRequest {
+    /**
+     * 请求时间
+     */
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
+
+    /**
+     * 请求编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
 
 
+    /**
+     * 出单机构
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
     /**
     /**
      *  商业险投保单号
      *  商业险投保单号
      */
      */
-    @JsonProperty("BiProposalNo")
+    @JSONField(name = "BiProposalNo")
     private String BiProposalNo;
     private String BiProposalNo;
 
 
     /**
     /**
      *  交强险投保单号
      *  交强险投保单号
      */
      */
-    @JsonProperty("CiProposalNo")
+    @JSONField(name = "CiProposalNo")
     private String CiProposalNo;
     private String CiProposalNo;
 
 
     /**
     /**
      *  归属业务员 非必填,目前只有烽火台会传
      *  归属业务员 非必填,目前只有烽火台会传
      */
      */
-    @JsonProperty("HandlerCode")
+    @JSONField(name = "HandlerCode")
     private String HandlerCode;
     private String HandlerCode;
 
 
     /**
     /**
      *  服务区域代码(车商代码)
      *  服务区域代码(车商代码)
      */
      */
-    @JsonProperty("ServiceArea")
+    @JSONField(name = "ServiceArea")
     private String ServiceArea;
     private String ServiceArea;
 
 
     /**
     /**
      *  代理机构,出单机构存在多代理时需传入
      *  代理机构,出单机构存在多代理时需传入
      */
      */
-    @JsonProperty("AgentCode")
+    @JSONField(name = "AgentCode")
     private String AgentCode;
     private String AgentCode;
 
 
     /**
     /**
      *  提核标志(1:提核;0不提核)
      *  提核标志(1:提核;0不提核)
      */
      */
-    @JsonProperty("submitUnderFlag")
+    @JSONField(name = "submitUnderFlag")
     private String submitUnderFlag;
     private String submitUnderFlag;
 
 
     /**
     /**
      *  线上线下标识:C-线上、B-线下,空值默认线下
      *  线上线下标识:C-线上、B-线下,空值默认线下
      */
      */
-    @JsonProperty("OnLineFlag")
+    @JSONField(name = "OnLineFlag")
     private String OnLineFlag;
     private String OnLineFlag;
 
 
     /**
     /**
      *  当是线上业务的时候,项目品牌必传
      *  当是线上业务的时候,项目品牌必传
      */
      */
-    @JsonProperty("ProjectBrand")
+    @JSONField(name = "ProjectBrand")
     private String ProjectBrand;
     private String ProjectBrand;
 
 
+    public YangGuangProposalStatusQueryRequest(InsAreaCompany insAreaCompany, YangGuangConfigureParameters yangGuangConfigureParameters) {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestNo = "proposalStatusQuery";
+        this.ComCode = yangGuangConfigureParameters.getComCode();
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.AgentCode = yangGuangConfigureParameters.getAgentCode();
+        this.ServiceArea = yangGuangConfigureParameters.getServiceArea();
+        if (insAreaCompany.getJqapplyno() != null && !"".equals(insAreaCompany.getJqapplyno())) {
+            this.CiProposalNo = insAreaCompany.getJqapplyno();
+        }
+        if (insAreaCompany.getSyapplyno() != null && !"".equals(insAreaCompany.getSyapplyno())){
+            this.BiProposalNo = insAreaCompany.getSyapplyno();
+        }
+
+    }
+
 }
 }

+ 25 - 7
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangQueryVehicleModelRequest.java

@@ -1,14 +1,14 @@
 package com.ydtech.modules.order.entity.api.yangguang.request;
 package com.ydtech.modules.order.entity.api.yangguang.request;
 
 
+import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
-import okhttp3.*;
 
 
-import java.io.IOException;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatter;
 
 
@@ -18,60 +18,78 @@ import java.time.format.DateTimeFormatter;
 @Data
 @Data
 public class YangGuangQueryVehicleModelRequest extends YangGuangBaseRequest{
 public class YangGuangQueryVehicleModelRequest extends YangGuangBaseRequest{
 
 
+    @JsonProperty("RequestDate")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JSONField(name = "RequestDate")
     private String RequestDate;
     private String RequestDate;
 
 
+    @JsonProperty("ComCode")
+    @JSONField(name = "ComCode")
     private String ComCode;
     private String ComCode;
 
 
+    @JsonProperty("RequestNo")
+    @JSONField(name = "RequestNo")
     private String RequestNo;
     private String RequestNo;
     /**
     /**
      * 页码
      * 页码
      */
      */
     @JsonProperty("PageNo")
     @JsonProperty("PageNo")
+    @JSONField(name = "PageNo")
     private String PageNo = "1";
     private String PageNo = "1";
 
 
+    /**
+     *  车牌号
+     */
+    @JsonProperty("LicenseNo")
+    @JSONField(name = "LicenseNo")
+    private String LicenseNo;
+
     /**
     /**
         */
         */
     @JsonProperty("ModelName")
     @JsonProperty("ModelName")
+    @JSONField(name = "ModelName")
     private String ModelName;
     private String ModelName;
 
 
     /**
     /**
      * 是否新车 0新车/1非新车
      * 是否新车 0新车/1非新车
      */
      */
     @JsonProperty("IsNewCar")
     @JsonProperty("IsNewCar")
-
+    @JSONField(name = "IsNewCar")
     private String IsNewCar;
     private String IsNewCar;
 
 
     /**
     /**
      * 车辆识别代码
      * 车辆识别代码
      */
      */
     @JsonProperty("VinNo")
     @JsonProperty("VinNo")
+    @JSONField(name = "VinNo")
     private String VinNo;
     private String VinNo;
 
 
     /**
     /**
      * 发动机号
      * 发动机号
      */
      */
     @JsonProperty("EngineNo")
     @JsonProperty("EngineNo")
+    @JSONField(name = "EngineNo")
     private String EngineNo;
     private String EngineNo;
 
 
     /**
     /**
      * 业务员
      * 业务员
      */
      */
     @JsonProperty("HandlerCode")
     @JsonProperty("HandlerCode")
+    @JSONField(name = "HandlerCode")
     private String HandlerCode;
     private String HandlerCode;
 
 
-    public YangGuangQueryVehicleModelRequest(CarInfoVo carInfo){
+    public YangGuangQueryVehicleModelRequest(CarInfoVo carInfo, YangGuangConfigureParameters ygConfigureParameters){
         this.RequestNo = "ccsiQueryVehicleModel";
         this.RequestNo = "ccsiQueryVehicleModel";
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         this.RequestDate = LocalDateTime.now().format(formatter);
         this.RequestDate = LocalDateTime.now().format(formatter);
         this.ModelName = carInfo.getModelcname();
         this.ModelName = carInfo.getModelcname();
-        this.ComCode = "30515708";
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.HandlerCode = ygConfigureParameters.getHandlerCode();
         this.IsNewCar = getIsNewCar();
         this.IsNewCar = getIsNewCar();
+        this.LicenseNo = carInfo.getLicenseNo();
         this.PageNo = "1";
         this.PageNo = "1";
         this.VinNo = carInfo.getFrameNo();
         this.VinNo = carInfo.getFrameNo();
         this.EngineNo = carInfo.getEngineNo();
         this.EngineNo = carInfo.getEngineNo();
-        this.HandlerCode = "30510961";
-
     }
     }
 
 
 
 

+ 98 - 31
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangSubmitRequest.java

@@ -1,12 +1,16 @@
 package com.ydtech.modules.order.entity.api.yangguang.request;
 package com.ydtech.modules.order.entity.api.yangguang.request;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.models.auth.In;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -17,182 +21,245 @@ import java.util.List;
 @Data
 @Data
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 public class YangGuangSubmitRequest extends YangGuangBaseRequest{
 public class YangGuangSubmitRequest extends YangGuangBaseRequest{
+    /**
+     * 请求时间
+     */
+    @JSONField(name = "RequestDate")
+    private String RequestDate;
+
+    /**
+     * 请求编码
+     */
+    @JSONField(name = "RequestNo")
+    private String RequestNo;
+
+    /**
+     * 出单机构
+     */
+    @JSONField(name = "ComCode")
+    private String ComCode;
+
+    /**
+     *  归属业务员
+     */
+    @JSONField(name = "HandlerCode")
+    private String HandlerCode;
+
     /**
     /**
      * 交易流水号
      * 交易流水号
      */
      */
-    @JsonProperty("InfotransNo")
+    @JSONField(name = "InfotransNo")
     private String InfotransNo;
     private String InfotransNo;
 
 
+    /**
+     * 收件人地址
+     */
+    @JSONField(name = "Adress")
+    private String Adress;
+
+    /**
+     * 收件人手机号码
+     */
+    @JSONField(name = "Mobile")
+    private String Mobile;
+
+    /**
+     * 收件人姓名
+     */
+    @JSONField(name = "Name")
+    private String Name;
+
     /**
     /**
      * 投保类型
      * 投保类型
      * 1单商业/2单交强/3交商同保
      * 1单商业/2单交强/3交商同保
      */
      */
-    @JsonProperty("PolicyType")
+    @JSONField(name = "PolicyType")
     private String PolicyType;
     private String PolicyType;
     /**
     /**
      * 电子发票标识(1.电子发票 2.纸质发票)
      * 电子发票标识(1.电子发票 2.纸质发票)
      */
      */
-    @JsonProperty("ElecinvoiceFlag")
+    @JSONField(name = "ElecinvoiceFlag")
     private String ElecinvoiceFlag;
     private String ElecinvoiceFlag;
     /**
     /**
      * 录单设备Ip
      * 录单设备Ip
      */
      */
-    @JsonProperty("RzIp")
+    @JSONField(name = "RzIp")
     private String RzIp;
     private String RzIp;
     /**
     /**
      * 录单设备网卡
      * 录单设备网卡
      */
      */
-    @JsonProperty("Mac")
+    @JSONField(name = "Mac")
     private String Mac;
     private String Mac;
     /**
     /**
      * 录单设备类型(0代表不可移动设备,1代表可移动设备)
      * 录单设备类型(0代表不可移动设备,1代表可移动设备)
      */
      */
-    @JsonProperty("ClientDevice")
+    @JSONField(name = "ClientDevice")
     private String ClientDevice;
     private String ClientDevice;
     /**
     /**
      * 商业险特别约定
      * 商业险特别约定
      */
      */
-    @JsonProperty("biClauseList")
+    @JSONField(name = "biClauseList")
     private List<BiClauseList> biClauseList;
     private List<BiClauseList> biClauseList;
     /**
     /**
      * 交强险险特别约定
      * 交强险险特别约定
      */
      */
-    @JsonProperty("ciClauseList")
+    @JSONField(name = "ciClauseList")
     private List<CiClauseList> ciClauseList;
     private List<CiClauseList> ciClauseList;
     /**
     /**
      *  团车专票信息
      *  团车专票信息
      */
      */
-    @JsonProperty("customerList")
+    @JSONField(name = "customerList")
     private CustomerList customerList;
     private CustomerList customerList;
     /**
     /**
      *  关系人信息
      *  关系人信息
      */
      */
-    @JsonProperty("insuredList")
+    @JSONField(name = "insuredList")
     private List<InsuredList> insuredList;
     private List<InsuredList> insuredList;
 
 
+    public YangGuangSubmitRequest(InsOrders insOrders, InsAreaCompany insAreaCompany,String productId, YangGuangConfigureParameters ygConfigureParameters) {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        this.RequestNo = "submit";
+        this.ComCode = ygConfigureParameters.getComCode();
+        this.HandlerCode = ygConfigureParameters.getHandlerCode();
+        this.RequestDate = LocalDateTime.now().format(formatter);
+        this.InfotransNo = insAreaCompany.getInsOrderNo();
+        if (productId.equals("034001")) {
+            this.PolicyType = "1";
+        } else if (productId.equals("0330")) {
+            this.PolicyType = "2";
+        } else {
+            this.PolicyType = "3";
+        }
+
+    }
+
     /**
     /**
      * 商业险特别约定
      * 商业险特别约定
      */
      */
+    @Data
     public static class BiClauseList implements Serializable {
     public static class BiClauseList implements Serializable {
         /**
         /**
          * 特约编码
          * 特约编码
          */
          */
-        @JsonProperty("ClauseCode")
+        @JSONField(name = "ClauseCode")
         private String ClauseCode;
         private String ClauseCode;
         /**
         /**
          * 特约内容
          * 特约内容
          */
          */
-        @JsonProperty("Clause")
+        @JSONField(name = "Clause")
         private String Clause;
         private String Clause;
         /**
         /**
          * 特约编码名称
          * 特约编码名称
          */
          */
-        @JsonProperty("ClauseName")
+        @JSONField(name = "ClauseName")
         private String ClauseName;
         private String ClauseName;
     }
     }
     /**
     /**
      * 交强险特别约定
      * 交强险特别约定
      */
      */
+    @Data
     public static class CiClauseList implements Serializable {
     public static class CiClauseList implements Serializable {
         /**
         /**
          * 特约编码
          * 特约编码
          */
          */
-        @JsonProperty("ClauseCode")
+        @JSONField(name = "ClauseCode")
         private String ClauseCode;
         private String ClauseCode;
         /**
         /**
          * 特约内容
          * 特约内容
          */
          */
-        @JsonProperty("Clause")
+        @JSONField(name = "Clause")
         private String Clause;
         private String Clause;
         /**
         /**
          * 特约编码名称
          * 特约编码名称
          */
          */
-        @JsonProperty("ClauseName")
+        @JSONField(name = "ClauseName")
         private String ClauseName;
         private String ClauseName;
     }
     }
 
 
+    @Data
     public static class CustomerList implements Serializable {
     public static class CustomerList implements Serializable {
         /**
         /**
          * 投被保人是否一致 0.不一致/1.一致
          * 投被保人是否一致 0.不一致/1.一致
          */
          */
-        @JsonProperty("customerFlag")
+        @JSONField(name = "customerFlag")
         private String customerFlag;
         private String customerFlag;
 
 
         /**
         /**
          * 关系人标志
          * 关系人标志
          * 1.被保险人/2.投保人
          * 1.被保险人/2.投保人
          */
          */
-        @JsonProperty("InsuredFlag")
+        @JSONField(name = "InsuredFlag")
         private String InsuredFlag;
         private String InsuredFlag;
 
 
         /**
         /**
          * 纳税人类型
          * 纳税人类型
          */
          */
-        @JsonProperty("Taxpayertype")
+        @JSONField(name = "Taxpayertype")
         private String Taxpayertype;
         private String Taxpayertype;
 
 
         /**
         /**
          * 是否开增值税发票
          * 是否开增值税发票
          *  0否1是
          *  0否1是
          */
          */
-        @JsonProperty("Vatinvoiceflag")
+        @JSONField(name = "Vatinvoiceflag")
         private String Vatinvoiceflag;
         private String Vatinvoiceflag;
 
 
         /**
         /**
          * 纳税人识别号
          * 纳税人识别号
          */
          */
-        @JsonProperty("Taxpayernumber")
+        @JSONField(name = "Taxpayernumber")
         private String Taxpayernumber;
         private String Taxpayernumber;
         /**
         /**
          * 税务公司登记地址
          * 税务公司登记地址
          */
          */
-        @JsonProperty("Revenueaddress")
+        @JSONField(name = "Revenueaddress")
         private String Revenueaddress;
         private String Revenueaddress;
     }
     }
 
 
+    @Data
     public static class InsuredList implements Serializable {
     public static class InsuredList implements Serializable {
         /**
         /**
          * 关系性质代码
          * 关系性质代码
          * 1个人/2单位(团体)
          * 1个人/2单位(团体)
          */
          */
-        @JsonProperty("InsuredType")
+        @JSONField(name = "InsuredType")
         private String InsuredType;
         private String InsuredType;
 
 
         /**
         /**
          *  关系人标志
          *  关系人标志
          *  1.被保险人/2.投保人
          *  1.被保险人/2.投保人
          */
          */
-        @JsonProperty("InsuredFlag")
+        @JSONField(name = "InsuredFlag")
         private String InsuredFlag;
         private String InsuredFlag;
 
 
         /**
         /**
          * 关系人证件类型
          * 关系人证件类型
          */
          */
-        @JsonProperty("IdentifyType")
+        @JSONField(name = "IdentifyType")
         private String IdentifyType;
         private String IdentifyType;
 
 
         /**
         /**
          * 关系人证件号码
          * 关系人证件号码
          */
          */
-        @JsonProperty("IdentifyNumber")
+        @JSONField(name = "IdentifyNumber")
         private String IdentifyNumber;
         private String IdentifyNumber;
 
 
         /**
         /**
          * 关系人地址
          * 关系人地址
          */
          */
-        @JsonProperty("PostAddress")
+        @JSONField(name = "PostAddress")
         private String PostAddress;
         private String PostAddress;
 
 
         /**
         /**
          * 手机号
          * 手机号
          */
          */
-        @JsonProperty("Mobile")
+        @JSONField(name = "Mobile")
         private String Mobile;
         private String Mobile;
 
 
         /**
         /**
          * 关系人名称
          * 关系人名称
          */
          */
-        @JsonProperty("Name")
+        @JSONField(name = "Name")
         private String Name;
         private String Name;
     }
     }
 }
 }

+ 169 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/request/YangGuangUpLoadRequest.java

@@ -0,0 +1,169 @@
+package com.ydtech.modules.order.entity.api.yangguang.request;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.constants.InsuranceImageEnum;
+import com.ydtech.modules.order.entity.api.yangguang.constants.ImageTypeEnum;
+import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
+import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class YangGuangUpLoadRequest extends YangGuangBaseRequest{
+    @JSONField(name = "Head")
+    private Head Head;
+
+    @JSONField(name = "Body")
+    private Body Body;
+
+    public YangGuangUpLoadRequest (String InfotransNo,InsTaskImagesBase64 insTaskImagesBase64, YangGuangConfigureParameters parameters) {
+        this.Head = new Head();
+        this.Body = new Body(InfotransNo,insTaskImagesBase64, parameters);
+    }
+
+    @Data
+    public static class Head implements Serializable {
+        @JSONField(name = "requestType")
+        private String requestType;
+
+        @JSONField(name = "serviceName")
+        private String serviceName;
+
+        @JSONField(name = "secert")
+        private String secert;
+
+        public Head() {
+            this.requestType = "05";
+            this.serviceName = "apply";
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class Body implements Serializable {
+        @JSONField(name = "imageInfo")
+        private imageInfo imageInfo;
+
+        public Body(String InfotransNo,InsTaskImagesBase64 insTaskImagesBase64, YangGuangConfigureParameters parameters) {
+           this.imageInfo = new imageInfo(InfotransNo, insTaskImagesBase64, parameters);
+        }
+        @Data
+        public static class imageInfo implements Serializable {
+            @JSONField(name = "caseNo")
+            private String caseNo;
+
+            @JSONField(name = "caseNoGL")
+            private String caseNoGL;
+
+            @JSONField(name = "appCode")
+            private String appCode;
+
+            @JSONField(name = "casecarno")
+            private String casecarno;
+
+            @JSONField(name = "ifNationwideQuick")
+            private String ifNationwideQuick;
+
+            @JSONField(name = "caseSource")
+            private String caseSource;
+
+            @JSONField(name = "fileServer")
+            private String fileServer;
+
+            @JSONField(name = "savePath")
+            private String savePath;
+
+            @JSONField(name = "insuranceImageList")
+            private List<insuranceImageList> insuranceImageList;
+
+            public imageInfo(String InfotransNo,InsTaskImagesBase64 insTaskImagesBase64, YangGuangConfigureParameters parameters) {
+                this.caseNo = InfotransNo;
+                this.appCode = "CARAPPLY";
+                this.caseSource = "0";
+                this.fileServer = "0";
+                this.ifNationwideQuick = "0";
+                this.insuranceImageList = Arrays.asList(new insuranceImageList(insTaskImagesBase64,parameters));
+            }
+
+            @NoArgsConstructor
+            @Data
+            public static class insuranceImageList implements Serializable {
+                @JSONField(name = "imageUrl")
+                private String imageUrl;
+
+                @JSONField(name = "imageId")
+                private String imageId;
+
+                @JSONField(name = "imageType")
+                private String imageType;
+
+                @JSONField(name = "videoType")
+                private String videoType;
+
+                @JSONField(name = "referer")
+                private String referer;
+
+                @JSONField(name = "requestMethod")
+                private String requestMethod;
+
+                @JSONField(name = "userNo")
+                private String userNo;
+
+                @JSONField(name = "userAccountName")
+                private String userAccountName;
+
+                @JSONField(name = "attachmentName")
+                private String attachmentName;
+
+                @JSONField(name = "lossName")
+                private String lossName;
+
+                @JSONField(name = "lossType")
+                private String lossType;
+
+                @JSONField(name = "taskNo")
+                private String taskNo;
+
+                @JSONField(name = "exifInfo")
+                private String exifInfo;
+
+                public insuranceImageList(InsTaskImagesBase64 insTaskImagesBase64, YangGuangConfigureParameters parameters) {
+                    String suffix = insTaskImagesBase64.getFileName().substring(insTaskImagesBase64.getFileName().lastIndexOf("."));
+                    this.imageUrl = insTaskImagesBase64.getBase64String();
+                    this.imageType = "01";
+                    this.referer = "SXJZG";
+                    this.userNo = parameters.getHandlerCode();
+                    this.userAccountName = parameters.getHandlerCode();
+                    String imageType = insTaskImagesBase64.getImageType();
+                    InsuranceImageEnum insuranceImageEnum = Enum.valueOf(InsuranceImageEnum.class, imageType);
+                    for (ImageTypeEnum imageTypeEnum : ImageTypeEnum.values()) {
+                        boolean contains = Arrays.asList(imageTypeEnum.getImagesType()).contains(insuranceImageEnum.getCode());
+                        if (contains) {
+                            this.videoType = imageTypeEnum.getCode();
+                            if (InsuranceImageEnum.C01.getCode().equals(this.videoType)
+                                || InsuranceImageEnum.D01.getCode().equals(this.videoType))
+                            {
+                                this.videoType = "14";
+                            } else if (InsuranceImageEnum.C02.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.D02.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.C03.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.D03.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.C04.getCode().equals(this.videoType)
+                                    || InsuranceImageEnum.D04.getCode().equals(this.videoType))
+                            {
+                                this.videoType = "12";
+                            }
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 719 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangAccuracyCalculateResponse.java

@@ -0,0 +1,719 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.modules.ins.model.vo.AccidentResponseVo;
+import com.ydtech.modules.order.entity.vo.yangguang.YgQuoteAccidentVo;
+import com.ydtech.utils.StringUtils;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class YangGuangAccuracyCalculateResponse extends YangGuangBaseResponse{
+    /**
+     *  成功返回信息
+     */
+    @JSONField(name = "ResponseMessage")
+    private String ResponseMessage;
+
+    /**
+     *  失败错误返回信息(成功时为空)
+     */
+    @JSONField(name = "ErrorMessage")
+    private String ErrorMessage;
+
+    /**
+     *  返回码(0-成功,非0-失败)
+     */
+    @JSONField(name = "ErrorCode")
+    private String ErrorCode;
+
+    /**
+     *  返回报文时间
+     *  时间格式 yyyy-MM-dd HH:mm:ss
+     */
+    @JSONField(name = "ResponseDate")
+    private String ResponseDate;
+
+    /**
+     *  交易流水号
+     */
+    @JSONField(name = "InfotransNo")
+    private String InfotransNo;
+
+    /**
+     *  商业险转保校验码
+     */
+    @JSONField(name = "BiCheckCode")
+    private String BiCheckCode;
+
+    /**
+     *  交强险转保校验码
+     */
+    @JSONField(name = "CiCheckCode")
+    private String CiCheckCode;
+
+    /**
+     *  商业险总保额
+     */
+    @JSONField(name = "BiSumAmount")
+    private String BiSumAmount;
+
+    /**
+     *  商业险总折扣系数
+     */
+    @JSONField(name = "BiDiscount")
+    private String BiDiscount;
+
+    /**
+     *  商业险总实缴保费
+     */
+    @JSONField(name = "BiSumPremium")
+    private String BiSumPremium;
+
+    /**
+     *  交强险总保额
+     */
+    @JSONField(name = "CiSumAmount")
+    private String CiSumAmount;
+
+    /**
+     *  交强险总折扣系数
+     */
+    @JSONField(name = "CiDiscount")
+    private String CiDiscount;
+
+    /**
+     * 交强险总实缴保费
+     */
+    @JSONField(name = "CiSumPremium")
+    private String CiSumPremium;
+
+    /**
+     *  车船税当年应缴
+     */
+    @JSONField(name = "TaxActual")
+    private String TaxActual;
+
+    /**
+     *  车船税往年补缴
+     */
+    @JSONField(name = "PayBalanceFee")
+    private String PayBalanceFee;
+
+    /**
+     *  车船税滞纳金
+     */
+    @JSONField(name = "LateFee")
+    private String LateFee;
+
+    /**
+     *  车船税总金额
+     */
+    @JSONField(name = "SumPayTax")
+    private String SumPayTax;
+
+    /**
+     *  商业险投保查询码
+     */
+    @JSONField(name = "BiDemandNo")
+    private String BiDemandNo;
+
+    /**
+     *  交强险投保查询码
+     */
+    @JSONField(name = "CiDemandNo")
+    private String CiDemandNo;
+
+    /**
+     *  新增设备的实际价值
+     */
+    @JSONField(name = "DeviceValue")
+    private String DeviceValue;
+
+    /**
+     *  商业险重复投保提示
+     */
+    @JSONField(name = "RemarkBi")
+    private String RemarkBi;
+
+    /**
+     * 交强险基准保费
+     */
+    @JSONField(name = "CiBasicPremium")
+    private String CiBasicPremium;
+
+    /**
+     *  交强险重复投保弱提示
+     */
+    @JSONField(name = "RemarkCi")
+    private String RemarkCi;
+
+    /**
+     *  商业手续费率(对应全能保商业业务类别2)
+     */
+    @JSONField(name = "disrateBi")
+    private String disrateBi;
+
+    /**
+     *  交强手续费率(对应全能保交强业务类别2)
+     */
+    @JSONField(name = "disrateCi")
+    private String disrateCi;
+
+    /**
+     *  商业险新保续保转保标识
+     * (1新保  2续保  3转保)
+     */
+    @JSONField(name = "newAndRenewalFlagBI")
+    private String newAndRenewalFlagBI;
+
+    /**
+     *  交强险新保续保转保标识
+     * (1新保  2续保  3转保)
+     */
+    @JSONField(name = "newAndRenewalFlagCI")
+    private String newAndRenewalFlagCI;
+
+    /**
+     *  交强起保日期
+     */
+    @JSONField(name = "CiStartDate")
+    private String CiStartDate;
+
+    /**
+     *  交强终保日期
+     */
+    @JSONField(name = "CiEndDate")
+    private String CiEndDate;
+
+    /**
+     *  交强即时生效标识
+     */
+    @JSONField(name = "CiImmediateFlag")
+    private String CiImmediateFlag;
+
+    /**
+     *  商业起保日期
+     */
+    @JSONField(name = "BiStartDate")
+    private String BiStartDate;
+
+    /**
+     *  商业终保日期
+     */
+    @JSONField(name = "BiEndDate")
+    private String BiEndDate;
+
+    /**
+     *  商业即时生效标识
+     */
+    @JSONField(name = "BiImmediateFlag")
+    private String BiImmediateFlag;
+
+    /**
+     *  车辆信息
+     */
+    @JSONField(name = "itemcar")
+    private itemcar itemcar;
+
+    /**
+     *  商业险险别信息
+     */
+    @JSONField(name = "kindList")
+    private List<kindList> kindList;
+
+    /**
+     *  折扣信息
+     */
+    @JSONField(name = "discount")
+    private discount discount;
+
+    @JSONField(name = "PtptNonVehicleProductInformationList")
+    private List<PtptNonVehicleProductInformationList> PtptNonVehicleProductInformationList;
+
+    /**
+     *  车船税
+     */
+    @JSONField(name = "cartax")
+    private cartax cartax;
+
+    /**
+     *  车辆信息部分
+     */
+    @Data
+    public static class itemcar implements Serializable {
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "LicenseNo")
+        private String LicenseNo;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "EngineNo")
+        private String EngineNo;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "VinNo")
+        private String VinNo;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "VehicleCode")
+        private String VehicleCode;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "VehicleName")
+        private String VehicleName;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "ActualValue")
+        private String ActualValue;
+
+    }
+
+    @Data
+    public static class kindList implements Serializable {
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "ModeCode")
+        private String ModeCode;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "KindCode")
+        private String KindCode;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "UnitAmount")
+        private String UnitAmount;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "Amount")
+        private String Amount;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "Quantity")
+        private String Quantity;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "Isdeductibles")
+        private String Isdeductibles;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "KindName")
+        private String KindName;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "ClaimLimitPerPay")
+        private String ClaimLimitPerPay;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "MaxClaimDays")
+        private String MaxClaimDays;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "Rate")
+        private String Rate;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "BasicPremium")
+        private String BasicPremium;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "ActualPremium")
+        private String ActualPremium;
+
+        /**
+         *  返回报文时间
+         *  时间格式 yyyy-MM-dd HH:mm:ss
+         */
+        @JSONField(name = "Deductiblerate")
+        private String Deductiblerate;
+    }
+
+    /**
+     *  折扣信息
+     */
+    @Data
+    public static class discount implements Serializable {
+        /**
+         *  自主系数上限
+         */
+        @JSONField(name = "AdjustrateUpper")
+        private String AdjustrateUpper;
+
+        /**
+         *  自主系数上限
+         */
+        @JSONField(name = "AdjustrateLower")
+        private String AdjustrateLower;
+
+        /**
+         *  实际保费最高
+         */
+        @JSONField(name = "PremiumUpper")
+        private String PremiumUpper;
+
+        /**
+         *  实际保费最低
+         */
+        @JSONField(name = "PremiumLower")
+        private String PremiumLower;
+
+        /**
+         *  自主核保系数(2014版险别返回)
+         */
+        @JSONField(name = "autonomyadjustvalue")
+        private String autonomyadjustvalue;
+
+        /**
+         *  自主渠道系数(2014版险别返回)
+         */
+        @JSONField(name = "channeladjustvalue")
+        private String channeladjustvalue;
+
+        /**
+         *  商业险无赔优系数
+         */
+        @JSONField(name = "BiDamagedFactorGrade")
+        private String BiDamagedFactorGrade;
+
+        /**
+         *  商业险无赔优浮动原因(2014版险别返回)
+         */
+        @JSONField(name = "BiDamagedFactorReason")
+        private String BiDamagedFactorReason;
+
+        /**
+         *  交强险无赔优系数
+         */
+        @JSONField(name = "CiDamagedFactorGrade")
+        private String CiDamagedFactorGrade;
+
+        /**
+         *  交强险无赔优原因
+         */
+        @JSONField(name = "CiDamagedFactorReason")
+        private String CiDamagedFactorReason;
+
+        /**
+         *  交强险不浮动原因代码
+         */
+        @JSONField(name = "RateFloatFlag")
+        private String RateFloatFlag;
+
+        /**
+         *  商业险连续承保年数(2020版险别返回)
+         */
+        @JSONField(name = "insureYears")
+        private String insureYears;
+
+        /**
+         *  商业险连续承保期间出险次数(2020版险别返回)
+         */
+        @JSONField(name = "claimTimes")
+        private String claimTimes;
+
+        /**
+         *  商业险无赔优系数级别(2020版险别返回)
+         */
+        @JSONField(name = "claimAdjustLevel")
+        private String claimAdjustLevel;
+
+        /**
+         *  商业险实际自主定价系数(2020版险别返回)
+         */
+        @JSONField(name = "actualautoundwrtfactor")
+        private String actualautoundwrtfactor;
+
+        /**
+         *  交强合并打分值
+         */
+        @JSONField(name = "markingnobcCI")
+        private String markingnobcCI;
+
+        /**
+         *  商业合并打分值
+         */
+        @JSONField(name = "markingnobcBI")
+        private String markingnobcBI;
+
+        /**
+         *  交强终极赔付率打分
+         */
+        @JSONField(name = "finalmarkingnoCi")
+        private String finalmarkingnoCi;
+
+        /**
+         *  终极赔付率合并打分
+         */
+        @JSONField(name = "finalmarkingnobc")
+        private String finalmarkingnobc;
+
+        /**
+         *  商业终极赔付率打分
+         */
+        @JSONField(name = "finalmarkingnoBi")
+        private String finalmarkingnoBi;
+
+        /**
+         *  交强上张保单是否本地承保标志 1是 0否
+         */
+        @JSONField(name = "islastlocality_Ci")
+        private String islastlocality_Ci;
+
+        /**
+         *  商业上张保单是否本地承保标志 1是 0否
+         */
+        @JSONField(name = "islastlocality_Bi")
+        private String islastlocality_Bi;
+    }
+    @Data
+    public static class PtptNonVehicleProductInformationList implements Serializable {
+        /**
+         *  驾意险产品代码
+         */
+        @JSONField(name = "ProductCode")
+        private String ProductCode;
+
+
+        /**
+         *  驾意险产品代码
+         */
+        @JSONField(name = "ProductName")
+        private String ProductName;
+
+        /**
+         *  驾意险保费
+         */
+        @JSONField(name = "ProductPremium")
+        private String ProductPremium;
+
+        /**
+         *  驾意险投保份数
+         */
+        @JSONField(name = "QuantityCasualty")
+        private String QuantityCasualty;
+
+        public static AccidentResponseVo toAccidentResponseVo(String actualPremium, YgQuoteAccidentVo ygQuoteAccidentVo) {
+            AccidentResponseVo accidentResponseVo = new AccidentResponseVo();
+            accidentResponseVo.setProjectCode(ygQuoteAccidentVo.getProductCode());
+            accidentResponseVo.setProjectName(ygQuoteAccidentVo.getProductName());
+            accidentResponseVo.setQuantity(ygQuoteAccidentVo.getQuantityCasualty());
+            accidentResponseVo.setPremium(ygQuoteAccidentVo.getPremium());
+            return accidentResponseVo;
+        }
+
+        public static List<AccidentResponseVo> toAccidentResponseVoList(List<PtptNonVehicleProductInformationList> ptptNonVehicleProductInformationList, List<YgQuoteAccidentVo> accidentVoList) {
+            Map<String,PtptNonVehicleProductInformationList> map = new HashMap<>();
+            ptptNonVehicleProductInformationList.forEach(x -> map.put(x.getProductCode(), x));
+            return accidentVoList.stream().map(x -> {
+                PtptNonVehicleProductInformationList ptptNonVehicleProductInformationList1 = map.get(x.getProductCode());
+                return toAccidentResponseVo(ptptNonVehicleProductInformationList1.getProductPremium(),x);
+            }).collect(Collectors.toList());
+        }
+
+        public static BigDecimal sumPremium(List<PtptNonVehicleProductInformationList> ptptNonVehicleProductInformationLists) {
+            BigDecimal bigDecimal = new BigDecimal(0);
+            for (YangGuangAccuracyCalculateResponse.PtptNonVehicleProductInformationList ptptNonVehicleProductInformationList : ptptNonVehicleProductInformationLists) {
+                bigDecimal = bigDecimal.add(new BigDecimal(ptptNonVehicleProductInformationList.getProductPremium()));
+            }
+            return bigDecimal;
+        }
+
+    }
+    /**
+     *  车船税部分
+     */
+    @Data
+    public static class cartax implements Serializable {
+        /**
+         *  当年应缴车船税
+         */
+        @JSONField(name = "taxactual")
+        private String taxactual;
+
+        /**
+         *  往年补缴车船税
+         */
+        @JSONField(name = "previouspay")
+        private String previouspay;
+
+        /**
+         *  滞纳金
+         */
+        @JSONField(name = "latefee")
+        private String latefee;
+
+        /**
+         *  合计金额
+         */
+        @JSONField(name = "sumpaytax")
+        private String sumpaytax;
+
+        /**
+         *  纳税人证件号码
+         */
+        @JSONField(name = "identifyNumber")
+        private String identifyNumber;
+
+        /**
+         *  纳税人名称
+         */
+        @JSONField(name = "taxpayername")
+        private String taxpayername;
+
+        /**
+         *  税务机关代码
+         */
+        @JSONField(name = "taxcomcode")
+        private String taxcomcode;
+
+        /**
+         *  税务机关名称
+         */
+        @JSONField(name = "taxcomname")
+        private String taxcomname;
+
+        /**
+         *  减税、完税凭证号码
+         */
+        @JSONField(name = "paidfreecertificate")
+        private String paidfreecertificate;
+
+        /**
+         *  减免税原因代码
+         */
+        @JSONField(name = "relifreason")
+        private String relifreason;
+
+        /**
+         *  减免税方案代码
+         */
+        @JSONField(name = "baseTaxation")
+        private String baseTaxation;
+
+        /**
+         *  税款所属期始
+         */
+        @JSONField(name = "paystartdate")
+        private String paystartdate;
+
+        /**
+         *  税款所属期止
+         */
+        @JSONField(name = "payenddate")
+        private String payenddate;
+
+        /**
+         *  纳税人识别号
+         */
+        @JSONField(name = "taxpayeridentifier")
+        private String taxpayeridentifier;
+
+        /**
+         *  减免金额
+         */
+        @JSONField(name = "taxrelief")
+        private String taxrelief;
+
+        /**
+         *  纳税类型
+         */
+        @JSONField(name = "taxrelifflag")
+        private String taxrelifflag;
+
+        /**
+         *  完税凭证填发日期
+         */
+        @JSONField(name = "taxdocumentdate")
+        private String taxdocumentdate;
+
+        /**
+         *  开具完税凭证地区代码
+         */
+        @JSONField(name = "taxpaidareacode")
+        private String taxpaidareacode;
+
+        /**
+         *  减免比例
+         */
+        @JSONField(name = "freerate")
+        private String freerate;
+
+        /**
+         *  纳税人证件类型
+         */
+        @JSONField(name = "identifyType")
+        private String identifyType;
+
+        public String getPreviousPay() {
+            return StringUtils.isEmpty(previouspay) ? "0" : previouspay;
+        }
+
+        public String getLateFee() {
+            return StringUtils.isEmpty(latefee) ? "0" : latefee;
+        }
+    }
+
+
+}

+ 5 - 5
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangAutoWriteOffResponse.java

@@ -1,6 +1,6 @@
 package com.ydtech.modules.order.entity.api.yangguang.response;
 package com.ydtech.modules.order.entity.api.yangguang.response;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
@@ -12,25 +12,25 @@ public class YangGuangAutoWriteOffResponse extends YangGuangBaseResponse {
     /**
     /**
      *  成功返回信息
      *  成功返回信息
      */
      */
-    @JsonProperty("ResponseMessage")
+    @JSONField(name = "ResponseMessage")
     private String ResponseMessage;
     private String ResponseMessage;
 
 
     /**
     /**
      *  失败错误返回信息(成功时为空)
      *  失败错误返回信息(成功时为空)
      */
      */
-    @JsonProperty("ErrorMessage")
+    @JSONField(name = "ErrorMessage")
     private String ErrorMessage;
     private String ErrorMessage;
 
 
     /**
     /**
      *  返回码(0-成功,非0-失败)
      *  返回码(0-成功,非0-失败)
      */
      */
-    @JsonProperty("ErrorCode")
+    @JSONField(name = "ErrorCode")
     private String ErrorCode;
     private String ErrorCode;
 
 
     /**
     /**
      *  返回报文时间
      *  返回报文时间
      *  时间格式 yyyy-MM-dd HH:mm:ss
      *  时间格式 yyyy-MM-dd HH:mm:ss
      */
      */
-    @JsonProperty("ResponseDate")
+    @JSONField(name = "ResponseDate")
     private String ResponseDate;
     private String ResponseDate;
 }
 }

+ 5 - 5
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangCallbackResponse.java

@@ -1,6 +1,6 @@
 package com.ydtech.modules.order.entity.api.yangguang.response;
 package com.ydtech.modules.order.entity.api.yangguang.response;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
@@ -12,25 +12,25 @@ public class YangGuangCallbackResponse extends YangGuangBaseResponse {
     /**
     /**
      *  成功返回信息
      *  成功返回信息
      */
      */
-    @JsonProperty("ResponseMessage")
+    @JSONField(name = "ResponseMessage")
     private String ResponseMessage;
     private String ResponseMessage;
 
 
     /**
     /**
      *  失败错误返回信息(成功时为空)
      *  失败错误返回信息(成功时为空)
      */
      */
-    @JsonProperty("ErrorMessage")
+    @JSONField(name = "ErrorMessage")
     private String ErrorMessage;
     private String ErrorMessage;
 
 
     /**
     /**
      *  返回码(0-成功,非0-失败)
      *  返回码(0-成功,非0-失败)
      */
      */
-    @JsonProperty("ErrorCode")
+    @JSONField(name = "ErrorCode")
     private String ErrorCode;
     private String ErrorCode;
 
 
     /**
     /**
      *  返回报文时间
      *  返回报文时间
      *  时间格式 yyyy-MM-dd HH:mm:ss
      *  时间格式 yyyy-MM-dd HH:mm:ss
      */
      */
-    @JsonProperty("ResponseDate")
+    @JSONField(name = "ResponseDate")
     private String ResponseDate;
     private String ResponseDate;
 }
 }

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangElecApplicationSignResponse.java

@@ -1,6 +1,6 @@
 package com.ydtech.modules.order.entity.api.yangguang.response;
 package com.ydtech.modules.order.entity.api.yangguang.response;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
@@ -12,6 +12,6 @@ public class YangGuangElecApplicationSignResponse extends YangGuangBaseResponse
     /**
     /**
      *  电子投保单签署 URL
      *  电子投保单签署 URL
      */
      */
-    @JsonProperty("SignURL")
+    @JSONField(name = "SignURL")
     private String SignURL;
     private String SignURL;
 }
 }

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangGetEpolicyPdfUrlResponse.java

@@ -1,6 +1,6 @@
 package com.ydtech.modules.order.entity.api.yangguang.response;
 package com.ydtech.modules.order.entity.api.yangguang.response;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
@@ -12,6 +12,6 @@ public class YangGuangGetEpolicyPdfUrlResponse extends YangGuangBaseResponse {
     /**
     /**
      *  电子保单PDF地址
      *  电子保单PDF地址
      */
      */
-    @JsonProperty("EPolicyPDFURL")
+    @JSONField(name = "EPolicyPDFURL")
     private String EPolicyPDFURL;
     private String EPolicyPDFURL;
 }
 }

+ 27 - 13
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangGetNonVehicleProductsResponse.java

@@ -1,5 +1,6 @@
 package com.ydtech.modules.order.entity.api.yangguang.response;
 package com.ydtech.modules.order.entity.api.yangguang.response;
 
 
+import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
@@ -12,73 +13,86 @@ import java.util.List;
 @Data
 @Data
 @EqualsAndHashCode(callSuper = true)
 @EqualsAndHashCode(callSuper = true)
 public class YangGuangGetNonVehicleProductsResponse extends YangGuangBaseResponse{
 public class YangGuangGetNonVehicleProductsResponse extends YangGuangBaseResponse{
+    @JsonProperty("ResponseMessage")
+    private String ResponseMessage;
+
+    @JsonProperty("ErrorMessage")
+    private String ErrorMessage;
+
+    @JsonProperty("ErrorCode")
+    private String ErrorCode;
+
+    @JsonProperty("ResponseDate")
+    private String ResponseDate;
     /**
     /**
      *  产品信息部分
      *  产品信息部分
      */
      */
-    @JsonProperty("nonVehicleProducts")
-    private List<NonVehicleProducts> nonVehicleProducts;
+    @JSONField(name = "nonVehicleProducts")
+    private List<nonVehicleProducts> nonVehicleProducts;
 
 
-    public static class NonVehicleProducts implements Serializable {
+    @Data
+    public static class nonVehicleProducts implements Serializable {
         /**
         /**
          *  产品代码
          *  产品代码
          */
          */
-        @JsonProperty("productCode")
+        @JSONField(name = "productCode")
         private String productCode;
         private String productCode;
 
 
         /**
         /**
          * 产品名称
          * 产品名称
          */
          */
-        @JsonProperty("productName")
+        @JSONField(name = "productName")
         private String productName;
         private String productName;
 
 
         /**
         /**
          *  每份保费
          *  每份保费
          */
          */
-        @JsonProperty("premium")
+        @JSONField(name = "premium")
         private String premium;
         private String premium;
 
 
         /**
         /**
          *  最小投保年龄
          *  最小投保年龄
          */
          */
-        @JsonProperty("minInsuredAge")
+        @JSONField(name = "minInsuredAge")
         private String minInsuredAge;
         private String minInsuredAge;
 
 
         /**
         /**
          *  最大投保年龄
          *  最大投保年龄
          */
          */
-        @JsonProperty("maxInsuredAge")
+        @JSONField(name = "maxInsuredAge")
         private String maxInsuredAge;
         private String maxInsuredAge;
 
 
         /**
         /**
          *  最大可购买份数
          *  最大可购买份数
          */
          */
-        @JsonProperty("maxPurchaseNumber")
+        @JSONField(name = "maxPurchaseNumber")
         private String maxPurchaseNumber;
         private String maxPurchaseNumber;
 
 
 
 
         /**
         /**
          *  是否是合并报价产品,1-是;0-不是
          *  是否是合并报价产品,1-是;0-不是
          */
          */
-        @JsonProperty("unionFlag")
+        @JSONField(name = "unionFlag")
         private String unionFlag;
         private String unionFlag;
 
 
         /**
         /**
          * 保障范围(集合)
          * 保障范围(集合)
          */
          */
-        @JsonProperty("productDetails")
+        @JSONField(name = "productDetails")
         private List<ProductDetails> productDetails;
         private List<ProductDetails> productDetails;
 
 
+        @Data
         public static class ProductDetails implements Serializable {
         public static class ProductDetails implements Serializable {
             /**
             /**
              *  保障项目
              *  保障项目
              */
              */
-            @JsonProperty("coverage")
+            @JSONField(name = "coverage")
             private String coverage;
             private String coverage;
 
 
             /**
             /**
              *  单份保额
              *  单份保额
              */
              */
-            @JsonProperty("sumInsured")
+            @JSONField(name = "sumInsured")
             private String sumInsured;
             private String sumInsured;
         }
         }
     }
     }

+ 4 - 4
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangPaymentResponse.java

@@ -1,6 +1,6 @@
 package com.ydtech.modules.order.entity.api.yangguang.response;
 package com.ydtech.modules.order.entity.api.yangguang.response;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
@@ -12,18 +12,18 @@ public class YangGuangPaymentResponse extends YangGuangBaseResponse{
     /**
     /**
      *  0-线上支付收银台连接   1-电子签名短信连接
      *  0-线上支付收银台连接   1-电子签名短信连接
      */
      */
-    @JsonProperty("Flag")
+    @JSONField(name = "Flag")
     private String Flag;
     private String Flag;
 
 
     /**
     /**
      *  支付地址,可以跳转到阳光保险收银台 或 车商渠道必须返回电子签名
      *  支付地址,可以跳转到阳光保险收银台 或 车商渠道必须返回电子签名
      */
      */
-    @JsonProperty("PayUrl")
+    @JSONField(name = "PayUrl")
     private String PayUrl;
     private String PayUrl;
 
 
     /**
     /**
      *  支付地址,可以跳转到阳光保险收银台 或 车商渠道必须返回电子签名
      *  支付地址,可以跳转到阳光保险收银台 或 车商渠道必须返回电子签名
      */
      */
-    @JsonProperty("SignURL")
+    @JSONField(name = "SignURL")
     private String SignURL;
     private String SignURL;
 }
 }

+ 16 - 16
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangProposalStatusQueryResponse.java

@@ -1,6 +1,6 @@
 package com.ydtech.modules.order.entity.api.yangguang.response;
 package com.ydtech.modules.order.entity.api.yangguang.response;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
@@ -12,91 +12,91 @@ public class YangGuangProposalStatusQueryResponse extends YangGuangBaseResponse
     /**
     /**
      *  商业险投保单号
      *  商业险投保单号
      */
      */
-    @JsonProperty("BiProposalNo")
+    @JSONField(name = "BiProposalNo")
     private String BiProposalNo;
     private String BiProposalNo;
 
 
     /**
     /**
      *  交强险投保单号
      *  交强险投保单号
      */
      */
-    @JsonProperty("CiProposalNo")
+    @JSONField(name = "CiProposalNo")
     private String CiProposalNo;
     private String CiProposalNo;
 
 
     /**
     /**
      *  商业险核保结果
      *  商业险核保结果
      */
      */
-    @JsonProperty("BiUnderWriteFlag")
+    @JSONField(name = "BiUnderWriteFlag")
     private String BiUnderWriteFlag;
     private String BiUnderWriteFlag;
 
 
     /**
     /**
      *  交强险核保结果
      *  交强险核保结果
      */
      */
-    @JsonProperty("CiUnderWriteFlag")
+    @JSONField(name = "CiUnderWriteFlag")
     private String CiUnderWriteFlag;
     private String CiUnderWriteFlag;
 
 
     /**
     /**
      *  商业险核保信息
      *  商业险核保信息
      */
      */
-    @JsonProperty("BiUnderWriteMsg")
+    @JSONField(name = "BiUnderWriteMsg")
     private String BiUnderWriteMsg;
     private String BiUnderWriteMsg;
 
 
     /**
     /**
      *  交强险核保信息
      *  交强险核保信息
      */
      */
-    @JsonProperty("CiUnderWriteMsg")
+    @JSONField(name = "CiUnderWriteMsg")
     private String CiUnderWriteMsg;
     private String CiUnderWriteMsg;
 
 
     /**
     /**
      *  商业险保单号
      *  商业险保单号
      */
      */
-    @JsonProperty("BiPolicyNo")
+    @JSONField(name = "BiPolicyNo")
     private String BiPolicyNo;
     private String BiPolicyNo;
 
 
     /**
     /**
      *  交强险保单号
      *  交强险保单号
      */
      */
-    @JsonProperty("CiPolicyNo")
+    @JSONField(name = "CiPolicyNo")
     private String CiPolicyNo;
     private String CiPolicyNo;
 
 
     /**
     /**
      *  商业险核保时间
      *  商业险核保时间
      */
      */
-    @JsonProperty("BiUnderWriteDate")
+    @JSONField(name = "BiUnderWriteDate")
     private String BiUnderWriteDate;
     private String BiUnderWriteDate;
 
 
     /**
     /**
      *  交强险核保时间
      *  交强险核保时间
      */
      */
-    @JsonProperty("CiUnderWriteDate")
+    @JSONField(name = "CiUnderWriteDate")
     private String CiUnderWriteDate;
     private String CiUnderWriteDate;
 
 
     /**
     /**
      *  商业险承保时间
      *  商业险承保时间
      */
      */
-    @JsonProperty("BiPolicyIssueDate")
+    @JSONField(name = "BiPolicyIssueDate")
     private String BiPolicyIssueDate;
     private String BiPolicyIssueDate;
 
 
     /**
     /**
      *  交强险承保时间
      *  交强险承保时间
      */
      */
-    @JsonProperty("CiPolicyIssueDate")
+    @JSONField(name = "CiPolicyIssueDate")
     private String CiPolicyIssueDate;
     private String CiPolicyIssueDate;
 
 
     /**
     /**
      *  商业险电子签名状态(0-未签署;1-已签署;2-无需签署)
      *  商业险电子签名状态(0-未签署;1-已签署;2-无需签署)
      */
      */
-    @JsonProperty("BiSignStatus")
+    @JSONField(name = "BiSignStatus")
     private String BiSignStatus;
     private String BiSignStatus;
 
 
     /**
     /**
      *  交强险电子签名状态(0-未签署;1-已签署;2-无需签署)
      *  交强险电子签名状态(0-未签署;1-已签署;2-无需签署)
      */
      */
-    @JsonProperty("CiSignStatus")
+    @JSONField(name = "CiSignStatus")
     private String CiSignStatus;
     private String CiSignStatus;
 
 
     /**
     /**
      *  非车险保单号
      *  非车险保单号
      */
      */
-    @JsonProperty("FCPolicyNo")
+    @JSONField(name = "FCPolicyNo")
     private String FCPolicyNo;
     private String FCPolicyNo;
 
 
 
 

+ 68 - 3
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangQueryVehicleModelResponse.java

@@ -1,11 +1,15 @@
 package com.ydtech.modules.order.entity.api.yangguang.response;
 package com.ydtech.modules.order.entity.api.yangguang.response;
 
 
+import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.order.entity.filter.CarModelsFilter;
+import com.ydtech.modules.order.entity.vo.CoreModelsVo;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
+import java.util.List;
 
 
 @Data
 @Data
 @NoArgsConstructor
 @NoArgsConstructor
@@ -16,40 +20,47 @@ public class YangGuangQueryVehicleModelResponse extends YangGuangBaseResponse {
      *  交易流水号
      *  交易流水号
      */
      */
     @JsonProperty("InfotransNo")
     @JsonProperty("InfotransNo")
+    @JSONField(name = "InfotransNo")
     private String InfotransNo;
     private String InfotransNo;
 
 
     /**
     /**
      *  查询到总数
      *  查询到总数
      */
      */
     @JsonProperty("DataCounut")
     @JsonProperty("DataCounut")
+    @JSONField(name = "DataCounut")
     private String DataCounut;
     private String DataCounut;
 
 
     /**
     /**
      *  车辆信息部分
      *  车辆信息部分
      */
      */
-    @JsonProperty("carModelList")
-    private CarModelList carModelList;
+    @JsonProperty("carmodellist")
+    @JSONField(name = "carmodellist")
+    private List<carmodellist> carmodellist;
 
 
     /**
     /**
      *  商业险续保信息部分
      *  商业险续保信息部分
      */
      */
     @JsonProperty("RenewalPolicyBi")
     @JsonProperty("RenewalPolicyBi")
+    @JSONField(name = "renewalpolicybi")
     private RenewalPolicyBi renewalpolicybi;
     private RenewalPolicyBi renewalpolicybi;
 
 
     /**
     /**
      *  交强险续保信息部分
      *  交强险续保信息部分
      */
      */
     @JsonProperty("RenewalPolicyCi")
     @JsonProperty("RenewalPolicyCi")
+    @JSONField(name = "renewalpolicyci")
     private RenewalPolicyCi renewalpolicyci;
     private RenewalPolicyCi renewalpolicyci;
 
 
     /**
     /**
      *  车辆信息部分
      *  车辆信息部分
      */
      */
-    public static class CarModelList implements Serializable {
+    @Data
+    public static class carmodellist implements CarModelsFilter {
         /**
         /**
          *  精友车型名称
          *  精友车型名称
          */
          */
         @JsonProperty("ModelName")
         @JsonProperty("ModelName")
+        @JSONField(name = "ModelName")
         private String ModelName;
         private String ModelName;
 
 
         /**
         /**
@@ -57,196 +68,250 @@ public class YangGuangQueryVehicleModelResponse extends YangGuangBaseResponse {
          * 轿车类/越野类等
          * 轿车类/越野类等
          */
          */
         @JsonProperty("CarKind")
         @JsonProperty("CarKind")
+        @JSONField(name = "CarKind")
         private String CarKind;
         private String CarKind;
 
 
         /**
         /**
          *  产地 A进口/B国产
          *  产地 A进口/B国产
          */
          */
         @JsonProperty("CarStyle")
         @JsonProperty("CarStyle")
+        @JSONField(name = "CarStyle")
         private String CarStyle;
         private String CarStyle;
 
 
         /**
         /**
          *  上市时间
          *  上市时间
          */
          */
         @JsonProperty("CarYear")
         @JsonProperty("CarYear")
+        @JSONField(name = "CarYear")
         private String CarYear;
         private String CarYear;
 
 
         /**
         /**
          *  整备质量
          *  整备质量
          */
          */
         @JsonProperty("Completekerbmass")
         @JsonProperty("Completekerbmass")
+        @JSONField(name = "Completekerbmass")
         private String Completekerbmass;
         private String Completekerbmass;
 
 
         /**
         /**
          *  排量 单位L
          *  排量 单位L
          */
          */
         @JsonProperty("Exhaustscale")
         @JsonProperty("Exhaustscale")
+        @JSONField(name = "Exhaustscale")
         private String Exhaustscale;
         private String Exhaustscale;
 
 
         /**
         /**
          *  出厂公司
          *  出厂公司
          */
          */
         @JsonProperty("Factory")
         @JsonProperty("Factory")
+        @JSONField(name = "Factory")
         private String Factory;
         private String Factory;
 
 
         /**
         /**
          *  精友车型编码
          *  精友车型编码
          */
          */
         @JsonProperty("ModelCode")
         @JsonProperty("ModelCode")
+        @JSONField(name = "ModelCode")
         private String ModelCode;
         private String ModelCode;
 
 
         /**
         /**
          *  返回车型ID号
          *  返回车型ID号
          */
          */
         @JsonProperty("Modelinfoid")
         @JsonProperty("Modelinfoid")
+        @JSONField(name = "Modelinfoid")
         private String Modelinfoid;
         private String Modelinfoid;
 
 
         /**
         /**
          *  新车购置价
          *  新车购置价
          */
          */
         @JsonProperty("Purchaseprice")
         @JsonProperty("Purchaseprice")
+        @JSONField(name = "Purchaseprice")
         private String Purchaseprice;
         private String Purchaseprice;
 
 
         /**
         /**
          *  交强险续保信息部分
          *  交强险续保信息部分
          */
          */
         @JsonProperty("RenewalPolicyCi")
         @JsonProperty("RenewalPolicyCi")
+        @JSONField(name = "renewalpolicyci")
         private String renewalpolicyci;
         private String renewalpolicyci;
 
 
         /**
         /**
          *  备注
          *  备注
          */
          */
         @JsonProperty("Remark")
         @JsonProperty("Remark")
+        @JSONField(name = "Remark")
         private String Remark;
         private String Remark;
 
 
         /**
         /**
          *  座位数
          *  座位数
          */
          */
         @JsonProperty("Seatcount")
         @JsonProperty("Seatcount")
+        @JSONField(name = "Seatcount")
         private String Seatcount;
         private String Seatcount;
 
 
         /**
         /**
          *  吨位数(T)
          *  吨位数(T)
          */
          */
         @JsonProperty("Toncount")
         @JsonProperty("Toncount")
+        @JSONField(name = "Toncount")
         private String Toncount;
         private String Toncount;
 
 
         /**
         /**
          *  档位描述
          *  档位描述
          */
          */
         @JsonProperty("Transmissionype")
         @JsonProperty("Transmissionype")
+        @JSONField(name = "Transmissionype")
         private String Transmissionype;
         private String Transmissionype;
 
 
         /**
         /**
          *  行业车型编码
          *  行业车型编码
          */
          */
         @JsonProperty("VehicleCode")
         @JsonProperty("VehicleCode")
+        @JSONField(name = "VehicleCode")
         private String VehicleCode;
         private String VehicleCode;
 
 
         /**
         /**
          *  行业车型名称
          *  行业车型名称
          */
          */
         @JsonProperty("VehicleName")
         @JsonProperty("VehicleName")
+        @JSONField(name = "VehicleName")
         private String VehicleName;
         private String VehicleName;
 
 
         /**
         /**
          *  功率(KW)(选择性接收)
          *  功率(KW)(选择性接收)
          */
          */
         @JsonProperty("powerscale")
         @JsonProperty("powerscale")
+        @JSONField(name = "powerscale")
         private String powerscale;
         private String powerscale;
 
 
         /**
         /**
          *  能源种类
          *  能源种类
          */
          */
         @JsonProperty("fuelType")
         @JsonProperty("fuelType")
+        @JSONField(name = "fuelType")
         private String fuelType;
         private String fuelType;
 
 
         /**
         /**
          *  北京交强交管能源种类
          *  北京交强交管能源种类
          */
          */
         @JsonProperty("fueltypeBJCI")
         @JsonProperty("fueltypeBJCI")
+        @JSONField(name = "fueltypeBJCI")
         private String fueltypeBJCI;
         private String fueltypeBJCI;
 
 
         /**
         /**
          *  精友返回能源类型字段
          *  精友返回能源类型字段
          */
          */
         @JsonProperty("powertypeCode")
         @JsonProperty("powertypeCode")
+        @JSONField(name = "powertypeCode")
         private String powertypeCode;
         private String powertypeCode;
 
 
         /**
         /**
          *  精友是否认定新能源车字段
          *  精友是否认定新能源车字段
          */
          */
         @JsonProperty("thirdpartyNewenergyflag")
         @JsonProperty("thirdpartyNewenergyflag")
+        @JSONField(name = "thirdpartyNewenergyflag")
         private String thirdpartyNewenergyflag;
         private String thirdpartyNewenergyflag;
+
+        @Override
+        public String getCarYear() {
+            return CarYear;
+        }
+
+        @Override
+        public String getPurchasePrice() {
+            return Purchaseprice;
+        }
+        public CoreModelsVo toCoreModelsVo() {
+            CoreModelsVo coreModelsVo = new CoreModelsVo();
+            coreModelsVo.setModelCode(this.ModelCode);
+            coreModelsVo.setModelName(this.ModelName);
+            coreModelsVo.setCarYear(this.CarYear);
+            coreModelsVo.setPower(this.powerscale);
+            coreModelsVo.setEnginedesc(this.Exhaustscale);
+            coreModelsVo.setPurchasePrice(this.Purchaseprice);
+            coreModelsVo.setSeatCount(this.Seatcount);
+            return coreModelsVo;
+        }
     }
     }
 
 
     /**
     /**
      *  商业险续保信息部分
      *  商业险续保信息部分
      */
      */
+    @Data
     public static class RenewalPolicyBi implements Serializable {
     public static class RenewalPolicyBi implements Serializable {
         /**
         /**
          *  保单即时生效标志(0-否;1-是)
          *  保单即时生效标志(0-否;1-是)
          */
          */
         @JsonProperty("ImmevalidFlag")
         @JsonProperty("ImmevalidFlag")
+        @JSONField(name = "ImmevalidFlag")
         private String ImmevalidFlag;
         private String ImmevalidFlag;
 
 
         /**
         /**
          *  即时生效起保时间(yyyy-MM-dd HH:mm:ss)
          *  即时生效起保时间(yyyy-MM-dd HH:mm:ss)
          */
          */
         @JsonProperty("ImmevalidStartDate")
         @JsonProperty("ImmevalidStartDate")
+        @JSONField(name = "ImmevalidStartDate")
         private String ImmevalidStartDate;
         private String ImmevalidStartDate;
 
 
         /**
         /**
          *  即时生效终保时间(yyyy-MM-dd HH:mm:ss)
          *  即时生效终保时间(yyyy-MM-dd HH:mm:ss)
          */
          */
         @JsonProperty("InnevalidEndDate")
         @JsonProperty("InnevalidEndDate")
+        @JSONField(name = "InnevalidEndDate")
         private String InnevalidEndDate;
         private String InnevalidEndDate;
 
 
         /**
         /**
          *  起保日期(yyyy-MM-dd HH:mm:ss)
          *  起保日期(yyyy-MM-dd HH:mm:ss)
          */
          */
         @JsonProperty("StartDate")
         @JsonProperty("StartDate")
+        @JSONField(name = "StartDate")
         private String StartDate;
         private String StartDate;
 
 
         /**
         /**
          *  终保日期(yyyy-MM-dd HH:mm:ss)
          *  终保日期(yyyy-MM-dd HH:mm:ss)
          */
          */
         @JsonProperty("EndDate")
         @JsonProperty("EndDate")
+        @JSONField(name = "EndDate")
         private String EndDate;
         private String EndDate;
     }
     }
 
 
     /**
     /**
      *  交强险续保信息部分
      *  交强险续保信息部分
      */
      */
+    @Data
     public static class RenewalPolicyCi implements Serializable {
     public static class RenewalPolicyCi implements Serializable {
         /**
         /**
          *  保单即时生效标志(0-否;1-是)
          *  保单即时生效标志(0-否;1-是)
          */
          */
         @JsonProperty("ImmevalidFlag")
         @JsonProperty("ImmevalidFlag")
+        @JSONField(name = "ImmevalidFlag")
         private String ImmevalidFlag;
         private String ImmevalidFlag;
 
 
         /**
         /**
          *  即时生效起保时间(yyyy-MM-dd HH:mm:ss)
          *  即时生效起保时间(yyyy-MM-dd HH:mm:ss)
          */
          */
         @JsonProperty("ImmevalidStartDate")
         @JsonProperty("ImmevalidStartDate")
+        @JSONField(name = "ImmevalidStartDate")
         private String ImmevalidStartDate;
         private String ImmevalidStartDate;
 
 
         /**
         /**
          *  即时生效终保时间(yyyy-MM-dd HH:mm:ss)
          *  即时生效终保时间(yyyy-MM-dd HH:mm:ss)
          */
          */
         @JsonProperty("InnevalidEndDate")
         @JsonProperty("InnevalidEndDate")
+        @JSONField(name = "InnevalidEndDate")
         private String InnevalidEndDate;
         private String InnevalidEndDate;
 
 
         /**
         /**
          *  起保日期(yyyy-MM-dd HH:mm:ss)
          *  起保日期(yyyy-MM-dd HH:mm:ss)
          */
          */
         @JsonProperty("StartDate")
         @JsonProperty("StartDate")
+        @JSONField(name = "StartDate")
         private String StartDate;
         private String StartDate;
 
 
         /**
         /**
          *  终保日期(yyyy-MM-dd HH:mm:ss)
          *  终保日期(yyyy-MM-dd HH:mm:ss)
          */
          */
         @JsonProperty("EndDate")
         @JsonProperty("EndDate")
+        @JSONField(name = "EndDate")
         private String EndDate;
         private String EndDate;
 
 
     }
     }

+ 17 - 17
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangSubmitResponse.java

@@ -1,6 +1,6 @@
 package com.ydtech.modules.order.entity.api.yangguang.response;
 package com.ydtech.modules.order.entity.api.yangguang.response;
 
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.alibaba.fastjson.annotation.JSONField;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
@@ -19,7 +19,7 @@ public class YangGuangSubmitResponse extends YangGuangBaseResponse {
      * 3	转人工核保	转人工判断由阳光规则系统处理
      * 3	转人工核保	转人工判断由阳光规则系统处理
      * 4	预提核	新增预提核
      * 4	预提核	新增预提核
      */
      */
-    @JsonProperty("BiUnderWriteFlag")
+    @JSONField(name = "BiUnderWriteFlag")
     private String BiUnderWriteFlag;
     private String BiUnderWriteFlag;
 
 
     /**
     /**
@@ -29,92 +29,92 @@ public class YangGuangSubmitResponse extends YangGuangBaseResponse {
      * 3	转人工核保	转人工判断由阳光规则系统处理
      * 3	转人工核保	转人工判断由阳光规则系统处理
      * 4	预提核	新增预提核
      * 4	预提核	新增预提核
      */
      */
-    @JsonProperty("CiUnderWriteFlag")
+    @JSONField(name = "CiUnderWriteFlag")
     private String CiUnderWriteFlag;
     private String CiUnderWriteFlag;
 
 
     /**
     /**
      * 商业险核保信息
      * 商业险核保信息
      */
      */
-    @JsonProperty("BiUnderWriteMsg")
+    @JSONField(name = "BiUnderWriteMsg")
     private String BiUnderWriteMsg;
     private String BiUnderWriteMsg;
 
 
     /**
     /**
      * 交强险核保信息
      * 交强险核保信息
      */
      */
-    @JsonProperty("CiUnderWriteMsg")
+    @JSONField(name = "CiUnderWriteMsg")
     private String CiUnderWriteMsg;
     private String CiUnderWriteMsg;
 
 
     /**
     /**
      * 商业险总实收保费
      * 商业险总实收保费
      */
      */
-    @JsonProperty("BiSumPremium")
+    @JSONField(name = "BiSumPremium")
     private String BiSumPremium;
     private String BiSumPremium;
 
 
     /**
     /**
      * 交强险总实收保费
      * 交强险总实收保费
      */
      */
-    @JsonProperty("CiSumPremium")
+    @JSONField(name = "CiSumPremium")
     private String CiSumPremium;
     private String CiSumPremium;
 
 
     /**
     /**
      * 车船税总金额
      * 车船税总金额
      */
      */
-    @JsonProperty("CarShipTax")
+    @JSONField(name = "CarShipTax")
     private String CarShipTax;
     private String CarShipTax;
 
 
     /**
     /**
      * 交易流水号
      * 交易流水号
      */
      */
-    @JsonProperty("InfotransNo")
+    @JSONField(name = "InfotransNo")
     private String InfotransNo;
     private String InfotransNo;
 
 
     /**
     /**
      * 商业险投保单号
      * 商业险投保单号
      */
      */
-    @JsonProperty("BiProposalNo")
+    @JSONField(name = "BiProposalNo")
     private String BiProposalNo;
     private String BiProposalNo;
 
 
     /**
     /**
      * 交强险投保单号
      * 交强险投保单号
      */
      */
-    @JsonProperty("CiProposalNo")
+    @JSONField(name = "CiProposalNo")
     private String CiProposalNo;
     private String CiProposalNo;
 
 
     /**
     /**
      *(0:无需认证;1:短信认证;2:实名认证)
      *(0:无需认证;1:短信认证;2:实名认证)
      */
      */
-    @JsonProperty("Authenticationstatecode")
+    @JSONField(name = "Authenticationstatecode")
     private String Authenticationstatecode;
     private String Authenticationstatecode;
 
 
     /**
     /**
      * 特别约定
      * 特别约定
      */
      */
-    @JsonProperty("Clause")
+    @JSONField(name = "Clause")
     private List<Clause> Clause;
     private List<Clause> Clause;
 
 
     public static class Clause implements Serializable {
     public static class Clause implements Serializable {
         /**
         /**
          * 特约编码
          * 特约编码
          */
          */
-        @JsonProperty("ClauseCode")
+        @JSONField(name = "ClauseCode")
         private String ClauseCode;
         private String ClauseCode;
 
 
         /**
         /**
          * 特约内容
          * 特约内容
          */
          */
-        @JsonProperty("Clause")
+        @JSONField(name = "Clause")
         private String Clause;
         private String Clause;
 
 
         /**
         /**
          * 特约编码名称
          * 特约编码名称
          */
          */
-        @JsonProperty("ClauseName")
+        @JSONField(name = "ClauseName")
         private String ClauseName;
         private String ClauseName;
 
 
         /**
         /**
          * 险种类型(0507交强;0528商业)
          * 险种类型(0507交强;0528商业)
          */
          */
-        @JsonProperty("riskCode")
+        @JSONField(name = "riskCode")
         private String riskCode;
         private String riskCode;
     }
     }
 }
 }

+ 12 - 0
src/main/java/com/ydtech/modules/order/entity/api/yangguang/response/YangGuangUploadResponse.java

@@ -0,0 +1,12 @@
+package com.ydtech.modules.order.entity.api.yangguang.response;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@NoArgsConstructor
+@Data
+public class YangGuangUploadResponse {
+    private String retFlag;
+
+    private String retMsg;
+}

+ 12 - 2
src/main/java/com/ydtech/modules/order/entity/config/YangGuangConfigureParameters.java

@@ -18,9 +18,19 @@ public class YangGuangConfigureParameters implements ConfigureParameters{
     private String ComCode;
     private String ComCode;
 
 
     /**
     /**
-     * 密钥
+     * 业务员代码
      */
      */
-    private String token;
+    private String HandlerCode;
+
+    /**
+     * 服务区代码
+     */
+    private String ServiceArea;
+
+    /**
+     * 代理机构代码
+     */
+    private String AgentCode;
 
 
 
 
 }
 }

+ 14 - 0
src/main/java/com/ydtech/modules/order/entity/vo/yangguang/YgNonVehicleProductsVo.java

@@ -0,0 +1,14 @@
+package com.ydtech.modules.order.entity.vo.yangguang;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class YgNonVehicleProductsVo implements Serializable {
+    private String agreementId;
+
+    private String seatCount;
+
+    private String companyId;
+}

+ 20 - 0
src/main/java/com/ydtech/modules/order/entity/vo/yangguang/YgQuoteAccidentVo.java

@@ -0,0 +1,20 @@
+package com.ydtech.modules.order.entity.vo.yangguang;
+
+import com.ydtech.modules.order.entity.api.yangguang.response.YangGuangGetNonVehicleProductsResponse;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class YgQuoteAccidentVo extends YangGuangGetNonVehicleProductsResponse.nonVehicleProducts {
+    /**
+     * 非车产品代码
+     */
+    private String ProductCode;
+    /**
+     *  非车产品份数
+     */
+    private String QuantityCasualty;
+}

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

@@ -18,7 +18,7 @@ public interface InsuranceCompanyPolymerizationService {
      * @param insAreaCompany 子订单信息
      * @param insAreaCompany 子订单信息
      * @return 是否成功
      * @return 是否成功
      */
      */
-    boolean cancelOrder(InsAreaCompany insAreaCompany);
+    boolean cancelOrder(InsAreaCompany insAreaCompany) throws Exception;
 
 
     /**
     /**
      * 更新订单状态(待核保状态)
      * 更新订单状态(待核保状态)

+ 65 - 1
src/main/java/com/ydtech/modules/order/service/YangGuangOrderApiService.java

@@ -1,14 +1,78 @@
 package com.ydtech.modules.order.service;
 package com.ydtech.modules.order.service;
 
 
+import com.fasterxml.jackson.core.JsonProcessingException;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.api.yangguang.response.YangGuangGetNonVehicleProductsResponse;
+import com.ydtech.modules.order.entity.dto.ReadPdfUrlListDto;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+import com.ydtech.modules.order.entity.vo.yangguang.YgNonVehicleProductsVo;
+import com.ydtech.modules.order.entity.vo.yangguang.YgQuoteAccidentVo;
+
+import java.util.List;
 
 
 public interface YangGuangOrderApiService {
 public interface YangGuangOrderApiService {
 
 
     /**
     /**
      *  报价接口
      *  报价接口
      */
      */
-    HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfoVo);
+    HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfoVo, BaseQuoteVo<List<YgQuoteAccidentVo>> t) throws JsonProcessingException;
+
+    /**
+     * 影像上传
+     */
+    HttpResult<Object> upload(String companyId) throws Exception;
+
+    /**
+     * 投保单提交
+     */
+    HttpResult<Object> submit(String companyId) throws JsonProcessingException;
+
+    /**
+     *  获取支付链接
+     */
+    InsAreaCompany payment(InsAreaCompany insAreaCompany) throws JsonProcessingException;
+
+    /**
+     * 支付回调
+     */
+    HttpResult<Object> paymentCallback(String companyId) throws JsonProcessingException;
+
+    /**
+     *  获取驾意险
+     */
+    HttpResult<List<YangGuangGetNonVehicleProductsResponse.nonVehicleProducts>> getNonVehicleProducts(YgNonVehicleProductsVo ygNonVehicleProductsVo) throws JsonProcessingException;
+
+    /**
+     *  投保单状态查询
+     */
+    HttpResult<Object> proposalStatusQuery(String companyId) throws JsonProcessingException;
+
+    /**
+     *  获取电子保单下载地址
+     */
+    HttpResult getEpolicyPDFURL(PolicyPrintVo policyPrintVo) throws JsonProcessingException;
+
+    /**
+     *  投保单撤销
+     */
+    boolean autoWriteOff(String companyId) throws Exception;
+
+    /**
+     * 获取保单信息
+     * @param subOrder
+     * @param insOrders
+     * @param flag
+     * @return
+     */
+    ReadPdfUrlListDto getPolicyByCompanyIdPdfList(InsAreaCompany subOrder, InsOrders insOrders, boolean flag);
+
+    /**
+     *  电子投保单签名
+     */
+    HttpResult<Object> elecApplicationSign(String companyId) throws Exception;
 }
 }

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

@@ -79,6 +79,9 @@ public class InsOrderPdfUrlServiceImpl extends ServiceImpl<InsOrderPdfUrlMapper,
     @Autowired
     @Autowired
     private PingAnOrderApiService pingAnOrderApiService;
     private PingAnOrderApiService pingAnOrderApiService;
 
 
+    @Autowired
+    private YangGuangOrderApiService yangGuangOrderApiService;
+
 
 
     /**
     /**
      *  @version
      *  @version
@@ -275,6 +278,14 @@ public class InsOrderPdfUrlServiceImpl extends ServiceImpl<InsOrderPdfUrlMapper,
                 return insCrawlerOrderService.getPolicyByCompanyIdPdfList(subOrder,insOrders,flag);
                 return insCrawlerOrderService.getPolicyByCompanyIdPdfList(subOrder,insOrders,flag);
             }
             }
         }
         }
+        // 阳光财险 YGBX
+        else if (subOrder.getCompanyId().contains(InsuranceEnum.YGBX.getCode())) {
+            if (subOrder.getApiType()!=null && subOrder.getApiType() == 1) {
+                return yangGuangOrderApiService.getPolicyByCompanyIdPdfList(subOrder,insOrders,flag);
+            } else if (subOrder.getApiType() != null && subOrder.getApiType() == 2) {
+                return yangGuangOrderApiService.getPolicyByCompanyIdPdfList(subOrder,insOrders,flag);
+            }
+        }
         //平安财险   上线再调式
         //平安财险   上线再调式
         else if(subOrder.getCompanyId().contains(InsuranceEnum.PAIC.getCode())){
         else if(subOrder.getCompanyId().contains(InsuranceEnum.PAIC.getCode())){
             return pingAnOrderApiService.getPolicyByCompanyIdPdfList(subOrder,insOrders,flag);
             return pingAnOrderApiService.getPolicyByCompanyIdPdfList(subOrder,insOrders,flag);

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

@@ -61,6 +61,8 @@ import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
 import com.ydtech.modules.order.entity.vo.guoren.GuorenAccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.guoren.GuorenAccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.telemarketing.TelemarketingAuditOrderQueryVo;
 import com.ydtech.modules.order.entity.vo.telemarketing.TelemarketingAuditOrderQueryVo;
 import com.ydtech.modules.order.entity.vo.ya.YaExtendInfoDto;
 import com.ydtech.modules.order.entity.vo.ya.YaExtendInfoDto;
+import com.ydtech.modules.order.entity.vo.yangguang.YgNonVehicleProductsVo;
+import com.ydtech.modules.order.entity.vo.yangguang.YgQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import com.ydtech.modules.order.service.*;
 import com.ydtech.modules.order.service.*;
 import com.ydtech.modules.protocol.entity.constants.PtlApiType;
 import com.ydtech.modules.protocol.entity.constants.PtlApiType;
@@ -1893,6 +1895,16 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             jsonObject.put("planCode", accidentObject.getString("riskCode"));
             jsonObject.put("planCode", accidentObject.getString("riskCode"));
             taiPingYangBaseQuoteVo.setAccidentalDrivingVo(jsonObject);
             taiPingYangBaseQuoteVo.setAccidentalDrivingVo(jsonObject);
             return taiPingYangBaseQuoteVo;
             return taiPingYangBaseQuoteVo;
+        } else if (baseQuoteVo.getCompanyId().equals("YGBX1000000")) {
+            //阳光财险
+            BaseQuoteVo<List<YgQuoteAccidentVo>> yangguangBaseQuoteVo = new BaseQuoteVo<>();
+            BeanUtils.copyProperties(baseQuoteVo, yangguangBaseQuoteVo);
+            QuoteAccidentalDrivingVo accidentalDrivingVo = baseQuoteVo.getAccidentalDrivingVo();
+            YgQuoteAccidentVo ygQuoteAccidentVo = new YgQuoteAccidentVo();
+            ygQuoteAccidentVo.setProductCode(accidentalDrivingVo.getProjectCode());
+            ygQuoteAccidentVo.setQuantityCasualty(String.valueOf(accidentalDrivingVo.getQuantity()));
+            yangguangBaseQuoteVo.setAccidentalDrivingVo(Collections.singletonList(ygQuoteAccidentVo));
+            return yangguangBaseQuoteVo;
         }
         }
 
 
         return null;
         return null;

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

@@ -1,5 +1,6 @@
 package com.ydtech.modules.order.service.impl;
 package com.ydtech.modules.order.service.impl;
 
 
+import com.fasterxml.jackson.core.JsonProcessingException;
 import com.ydtech.constants.InsuranceEnum;
 import com.ydtech.constants.InsuranceEnum;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.service.*;
 import com.ydtech.modules.order.service.*;
@@ -34,8 +35,10 @@ public class InsuranceCompanyPolymerizationServiceImpl implements InsuranceCompa
 
 
     private final ChengTaiOrderApiService chengTaiOrderApiService;
     private final ChengTaiOrderApiService chengTaiOrderApiService;
 
 
+    private final YangGuangOrderApiService yangGuangOrderApiService;
+
     @Override
     @Override
-    public boolean cancelOrder(InsAreaCompany insAreaCompany) {
+    public boolean cancelOrder(InsAreaCompany insAreaCompany) throws Exception {
         Integer apiType = insAreaCompany.getApiType();
         Integer apiType = insAreaCompany.getApiType();
 
 
         if (PtlApiType.PTL_API_2.getCode() == apiType) {
         if (PtlApiType.PTL_API_2.getCode() == apiType) {
@@ -66,6 +69,9 @@ public class InsuranceCompanyPolymerizationServiceImpl implements InsuranceCompa
         } else if (InsuranceEnum.ZMBX.getCode().equals(code)) {
         } else if (InsuranceEnum.ZMBX.getCode().equals(code)) {
             return zhongMeiOrderApiService.cancelOrder(insAreaCompany);
             return zhongMeiOrderApiService.cancelOrder(insAreaCompany);
         }
         }
+        else if (InsuranceEnum.YGBX.getCode().equals(code)) {
+            return yangGuangOrderApiService.autoWriteOff(companyId);
+        }
         return false;
         return false;
     }
     }
 
 
@@ -110,6 +116,12 @@ public class InsuranceCompanyPolymerizationServiceImpl implements InsuranceCompa
                 } catch (Exception e) {
                 } catch (Exception e) {
                     throw new RuntimeException(e);
                     throw new RuntimeException(e);
                 }
                 }
+            } else if (InsuranceEnum.YGBX.getCode().equals(code)) {
+                try {
+                    yangGuangOrderApiService.proposalStatusQuery(insAreaCompany.getId());
+                } catch (JsonProcessingException e) {
+                    throw new RuntimeException(e);
+                }
             }
             }
         });
         });
     }
     }
@@ -157,6 +169,12 @@ public class InsuranceCompanyPolymerizationServiceImpl implements InsuranceCompa
                 } catch (Exception e) {
                 } catch (Exception e) {
                     throw new RuntimeException(e);
                     throw new RuntimeException(e);
                 }
                 }
+            } else if (InsuranceEnum.YGBX.getCode().equals(code)) {
+                try {
+                    yangGuangOrderApiService.paymentCallback(insAreaCompany.getId());
+                } catch (JsonProcessingException e) {
+                    throw new RuntimeException(e);
+                }
             }
             }
         });
         });
     }
     }

+ 673 - 17
src/main/java/com/ydtech/modules/order/service/impl/YangGuangOrderApiServiceImpl.java

@@ -1,24 +1,54 @@
 package com.ydtech.modules.order.service.impl;
 package com.ydtech.modules.order.service.impl;
 
 
+import cn.hutool.core.util.ArrayUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.ydtech.config.properties.YangGuangApiConfigurationProperties;
+import com.ydtech.constants.enums.InsuranceOrderPdf;
+import com.ydtech.constants.enums.InsuranceRisk;
+import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.HttpResult;
-import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.ins.model.vo.*;
 import com.ydtech.modules.order.components.ConfigureParametersComponents;
 import com.ydtech.modules.order.components.ConfigureParametersComponents;
+import com.ydtech.modules.order.components.InsImagesUploadCacheComponents;
 import com.ydtech.modules.order.components.yangguang.YangGuangRequestApiComponents;
 import com.ydtech.modules.order.components.yangguang.YangGuangRequestApiComponents;
-import com.ydtech.modules.order.entity.api.yangguang.request.YangGuangQueryVehicleModelRequest;
-import com.ydtech.modules.order.entity.api.yangguang.response.YangGuangQueryVehicleModelResponse;
+import com.ydtech.modules.order.constants.InsuranceTypeCorrespondence;
+import com.ydtech.modules.order.constants.UnderwritingStatus;
+import com.ydtech.modules.order.entity.*;
+import com.ydtech.modules.order.entity.api.yangguang.request.*;
+import com.ydtech.modules.order.entity.api.yangguang.response.*;
+import com.ydtech.modules.order.entity.api.zijin.constants.enums.BusType;
 import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
 import com.ydtech.modules.order.entity.config.YangGuangConfigureParameters;
+import com.ydtech.modules.order.entity.dto.ReadPdfUrlListDto;
+import com.ydtech.modules.order.entity.filter.CarModelsFilterUtils;
+import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
-import com.ydtech.modules.order.service.YangGuangOrderApiService;
+import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+import com.ydtech.modules.order.entity.vo.yangguang.YgNonVehicleProductsVo;
+import com.ydtech.modules.order.entity.vo.yangguang.YgQuoteAccidentVo;
+import com.ydtech.modules.order.service.*;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
+import com.ydtech.modules.protocol.utils.AssertionUtils;
+import com.ydtech.utils.CalculateUtils;
+import com.ydtech.utils.StringUtils;
+import com.ydtech.utils.baidu.FileUtil;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.Date;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
 
 
 @Service
 @Service
 @Slf4j
 @Slf4j
@@ -29,21 +59,647 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
     private final ConfigureParametersComponents configureParametersComponents;
     private final ConfigureParametersComponents configureParametersComponents;
 
 
     private final YangGuangRequestApiComponents yangGuangRequestApiComponents;
     private final YangGuangRequestApiComponents yangGuangRequestApiComponents;
+
+    private final InsOrdersService insOrdersService;
+
+    private final InsAreaCompanyService insAreaCompanyService;
+
+    private final InsSubOrderUpdateDetailService insSubOrderUpdateDetailService;
+
+    private final YangGuangApiConfigurationProperties yangGuangApiConfigurationProperties;
+
+    private final InsTaskImagesService insTaskImagesService;
+
+    private InsImagesUploadCacheComponents insImagesUploadCacheComponents;
+
+
+    @Value("${upload.file.path}")
+    private String uploadFilePath;
+
+    @Value("${upload.file.url}")
+    private String showFileUrl;
+
+    @Value("${api.url}")
+    private String apiUrl;
     @Override
     @Override
-    public HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfoVo) {
+    public HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfoVo, BaseQuoteVo<List<YgQuoteAccidentVo>> quoteVo) throws JsonProcessingException {
         // 通过协议获取配置实体
         // 通过协议获取配置实体
-//        String agreementId = quoteVo.getAgreementId();
-//        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(agreementId);
-//        YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
-//                ptlAgreementAttribution);
-//        HttpHeaders httpHeaders = yangGuangRequestApiComponents.
-//                );
+        String agreementId = quoteVo.getAgreementId();
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(agreementId);
+        YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                ptlAgreementAttribution);
         // 查询车型
         // 查询车型
-        YangGuangQueryVehicleModelRequest yangGuangQueryVehicleModelRequest = new YangGuangQueryVehicleModelRequest(quoteInfoVo.getCarInfo());
+        YangGuangQueryVehicleModelRequest yangGuangQueryVehicleModelRequest = new YangGuangQueryVehicleModelRequest(quoteInfoVo.getCarInfo(), ygConfigureParameters);
+        if (quoteInfoVo.getCarInfo().isNoLicenseFlag()) {
+            yangGuangQueryVehicleModelRequest.setIsNewCar("1");
+        } else {
+            yangGuangQueryVehicleModelRequest.setIsNewCar("0");
+        }
         yangGuangQueryVehicleModelRequest.setIsNewCar("1");
         yangGuangQueryVehicleModelRequest.setIsNewCar("1");
-        System.out.println(yangGuangQueryVehicleModelRequest);
         YangGuangQueryVehicleModelResponse yangGuangQueryVehicleModelResponse = yangGuangRequestApiComponents.queryVehicleModel(yangGuangQueryVehicleModelRequest);
         YangGuangQueryVehicleModelResponse yangGuangQueryVehicleModelResponse = yangGuangRequestApiComponents.queryVehicleModel(yangGuangQueryVehicleModelRequest);
-        System.out.println(yangGuangQueryVehicleModelResponse);
-        return null;
+        List<YangGuangQueryVehicleModelResponse.carmodellist> carModelList = yangGuangQueryVehicleModelResponse.getCarmodellist();
+        //过滤车型
+        YangGuangQueryVehicleModelResponse.carmodellist carModelList1 =
+                new CarModelsFilterUtils<YangGuangQueryVehicleModelResponse.carmodellist>().to(carModelList, quoteInfoVo.getCarInfo());
+
+        String purchasePrice = carModelList1.getPurchasePrice();
+        String seatCount = carModelList1.getSeatcount();
+        CarInfoVo carInfo = quoteInfoVo.getCarInfo();
+        String startDate;
+
+        //计算起保日期
+        List<RiskInfoVo> riskList = quoteInfoVo.getRiskList();
+        if (riskList.size() == 1 && InsuranceRisk.TRAFFIC.getCode().equals(riskList.get(0).getRiskCode())) {
+            startDate = riskList.get(0).getStartDate();
+        } else {
+            startDate =
+                    Objects.requireNonNull(riskList.stream().filter(x -> InsuranceRisk.BUSINESS.getCode().equals(x.getRiskCode())).findFirst().orElse(null)).getStartDate();
+        }
+        // 如果险种为单商或交商 需要报两次价 将第一次报出的车实际价值取到
+        //报价
+        InsOrders insOrders = insOrdersService.getById(quoteInfoVo.getOrderNo());
+
+        YangGuangAccuracyCalculateRequest yangGuangAccuracyCalculateRequest = new YangGuangAccuracyCalculateRequest(quoteInfoVo, purchasePrice, carModelList1, riskList.get(0),startDate,ygConfigureParameters,quoteVo.getAccidentalDrivingVo());
+        yangGuangAccuracyCalculateRequest.setInfotransNo(yangGuangQueryVehicleModelResponse.getInfotransNo());
+        YangGuangAccuracyCalculateResponse yangGuangAccuracyCalculateResponse = yangGuangRequestApiComponents.accuracyCalculaye(yangGuangAccuracyCalculateRequest);
+        if (insOrders.getProductid().equals("034001") || insOrders.getProductid().equals("0330034001")) {
+            if (yangGuangAccuracyCalculateResponse.getErrorCode().equals("0")) {
+                YangGuangAccuracyCalculateResponse.itemcar itemcar = yangGuangAccuracyCalculateResponse.getItemcar();
+                String actualValue = itemcar.getActualValue();
+                YangGuangAccuracyCalculateRequest yangGuangAccuracyCalculateRequest1 = new YangGuangAccuracyCalculateRequest(quoteInfoVo, actualValue, carModelList1, riskList.get(0),startDate,ygConfigureParameters,quoteVo.getAccidentalDrivingVo());
+                yangGuangAccuracyCalculateRequest1.setInfotransNo(yangGuangQueryVehicleModelResponse.getInfotransNo());
+                YangGuangAccuracyCalculateResponse yangGuangAccuracyCalculateResponse1 = yangGuangRequestApiComponents.accuracyCalculaye(yangGuangAccuracyCalculateRequest1);
+                boolean isEnergy = carInfo.isNewEnergy();
+
+                if (!yangGuangAccuracyCalculateResponse1.getErrorCode().equals("0")) {
+                    QuoteRespVo resp  = new QuoteRespVo();
+                    InsOrders order = insOrdersService.getById(quoteInfoVo.getOrderNo());
+                    InsOrderStatusEnum insOrderStatusEnum = InsOrderStatusEnum.QUOTE_FAILED;
+                    if (yangGuangAccuracyCalculateResponse1.getErrorMessage().contains("重复投保")) {
+                        insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
+                    }
+                    insOrdersService.responseFailedOrder(quoteVo,ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse1.getErrorMessage(),insOrderStatusEnum);
+                    throw new SystemException(yangGuangAccuracyCalculateResponse1.getErrorMessage());
+                }
+
+                // 处理数据
+                QuoteRespVo quoteRespVo = getQuoteRespVo(yangGuangAccuracyCalculateResponse1, quoteInfoVo, quoteVo.getAccidentalDrivingVo(), isEnergy);
+
+                // 设置核心报价车型
+                quoteRespVo.setCoreModels(carModelList1.toCoreModelsVo());
+                return responseOrder(yangGuangAccuracyCalculateResponse1, quoteRespVo, ptlAgreementAttribution, quoteInfoVo.getOrderNo(),
+                        quoteVo.getAccidentalDrivingVo());
+            } else {
+                InsOrders order = insOrdersService.getById(quoteInfoVo.getOrderNo());
+                InsOrderStatusEnum insOrderStatusEnum = InsOrderStatusEnum.QUOTE_FAILED;
+                if (yangGuangAccuracyCalculateResponse.getErrorMessage().contains("重复投保")) {
+                    insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
+                }
+                insOrdersService.responseFailedOrder(quoteVo,ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse.getErrorMessage(),insOrderStatusEnum);
+                throw new SystemException(yangGuangAccuracyCalculateResponse.getErrorMessage());
+            }
+        } else {
+            boolean isEnergy = carInfo.isNewEnergy();
+
+            if (!yangGuangAccuracyCalculateResponse.getErrorCode().equals("0")) {
+                QuoteRespVo resp  = new QuoteRespVo();
+                InsOrders order = insOrdersService.getById(quoteInfoVo.getOrderNo());
+                InsOrderStatusEnum insOrderStatusEnum = InsOrderStatusEnum.QUOTE_FAILED;
+                if (yangGuangAccuracyCalculateResponse.getErrorMessage().contains("重复投保")) {
+                    insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
+                }
+                insOrdersService.responseFailedOrder(quoteVo,ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse.getErrorMessage(),insOrderStatusEnum);
+                throw new SystemException(yangGuangAccuracyCalculateResponse.getErrorMessage());
+            }
+            // 处理数据
+            QuoteRespVo quoteRespVo = getQuoteRespVo(yangGuangAccuracyCalculateResponse, quoteInfoVo, quoteVo.getAccidentalDrivingVo(), isEnergy);
+
+            // 设置核心报价车型
+            quoteRespVo.setCoreModels(carModelList1.toCoreModelsVo());
+            return responseOrder(yangGuangAccuracyCalculateResponse, quoteRespVo, ptlAgreementAttribution, quoteInfoVo.getOrderNo(),
+                    quoteVo.getAccidentalDrivingVo());
+        }
+    }
+
+    @Override
+    public HttpResult<Object> upload(String companyId) throws Exception {
+        try {
+            InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+            PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+            YangGuangConfigureParameters parameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                    ptlAgreementAttribution);
+            String InfotransNo = insAreaCompany.getInsOrderNo();
+
+            InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+            List<InsTaskImagesBase64> insTaskImagesBase64s = insTaskImagesService.findByOrderNo(insOrders.getOrderno(),
+                    insAreaCompany.getId(), true);
+            if (insTaskImagesBase64s.isEmpty()) {
+                return HttpResult.ok();
+            }
+            for (InsTaskImagesBase64 insTaskImagesBase64 :insTaskImagesBase64s) {
+                YangGuangUpLoadRequest yangGuangUpLoadRequest = new YangGuangUpLoadRequest(InfotransNo, insTaskImagesBase64, parameters);
+                String yangGuangUpLoadResponse = yangGuangRequestApiComponents.upload(yangGuangUpLoadRequest);
+                log.info("上传影像:{}", yangGuangUpLoadResponse);
+            }
+        insImagesUploadCacheComponents.setUploadImageCache(companyId, insTaskImagesBase64s);
+        return HttpResult.ok();
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public HttpResult<Object> submit(String companyId) throws JsonProcessingException {
+        try{
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+
+        // 通过协议获取配置实体
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+        YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                ptlAgreementAttribution);
+
+        String productid = insOrders.getProductid();
+        // 提交核保
+        YangGuangSubmitRequest yangGuangSubmitRequest = new YangGuangSubmitRequest(insOrders, insAreaCompany, productid, ygConfigureParameters);
+        YangGuangSubmitResponse yangGuangSubmitResponse = yangGuangRequestApiComponents.submit(yangGuangSubmitRequest);
+        if (!yangGuangSubmitResponse.getErrorCode().equals("0")) {
+            return HttpResult.error(yangGuangSubmitResponse.getErrorMessage());
+        }
+        // 核保转人工
+        if (yangGuangSubmitResponse.getCiUnderWriteFlag() != null && !yangGuangSubmitResponse.getCiUnderWriteFlag().equals("1")) {
+            if (yangGuangSubmitResponse.getCiUnderWriteFlag().equals("3")) {
+                insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
+                insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_AUDIT.getCode(),"1");
+                insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
+                String message = yangGuangSubmitResponse.getCiUnderWriteMsg();
+                insAreaCompany.setJqpolicyno(yangGuangSubmitResponse.getCiProposalNo() != null ? yangGuangSubmitResponse.getCiProposalNo() :"");
+                insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, message);
+                return HttpResult.error("自核转人工,原因:" + message);
+            }
+            return HttpResult.error("商业险自核失败,原因:" + yangGuangSubmitResponse.getBiUnderWriteMsg());
+        }
+        if (yangGuangSubmitResponse.getBiUnderWriteFlag() != null && !yangGuangSubmitResponse.getBiUnderWriteFlag().equals("1")) {
+            if (yangGuangSubmitResponse.getBiUnderWriteFlag().equals("3")) {
+                insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
+                insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_AUDIT.getCode(),"1");
+                insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
+                String message = yangGuangSubmitResponse.getBiUnderWriteMsg();
+                insAreaCompany.setSypolicyno(yangGuangSubmitResponse.getBiProposalNo() != null ? yangGuangSubmitResponse.getBiProposalNo() :"");
+                insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, message);
+                return HttpResult.error("自核转人工,原因:" + message);
+            }
+            return HttpResult.error("商业险自核失败,原因:" + yangGuangSubmitResponse.getBiUnderWriteMsg());
+        }
+        // 投保单号
+        insAreaCompany.setJqpolicyno(yangGuangSubmitResponse.getCiProposalNo() != null ? yangGuangSubmitResponse.getCiProposalNo() :"");
+        insAreaCompany.setSypolicyno(yangGuangSubmitResponse.getBiProposalNo() != null ? yangGuangSubmitResponse.getBiProposalNo() :"");
+        insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+
+
+        //获取支付链接
+        YangGuangPaymentRequest yangGuangPaymentRequest = new YangGuangPaymentRequest(insAreaCompany, insOrders,yangGuangApiConfigurationProperties.getPayCallBack(),yangGuangSubmitResponse,ygConfigureParameters);
+        YangGuangPaymentResponse yangGuangPaymentResponse = yangGuangRequestApiComponents.payment(yangGuangPaymentRequest);
+        if (!yangGuangPaymentResponse.getErrorCode().equals("0")) {
+            return HttpResult.error(yangGuangPaymentResponse.getErrorMessage());
+        }
+        insAreaCompany.setPaymentLink(yangGuangPaymentResponse.getPayUrl());
+        insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+        return HttpResult.ok("核保成功");
+    } catch (Exception e) {
+            throw new RuntimeException(e.getMessage());
+        }
+    }
+
+    @Override
+    public InsAreaCompany payment(InsAreaCompany insAreaCompany) {
+        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        try {
+            // 获取协议配置信息
+            YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                    insAreaCompany.getAgreementId());
+            // 支付请求
+            YangGuangPaymentRequest yangGuangPaymentRequest = new YangGuangPaymentRequest(insAreaCompany, insOrders,yangGuangApiConfigurationProperties.getPayCallBack(),null,ygConfigureParameters);
+            YangGuangPaymentResponse yangGuangPaymentResponse = yangGuangRequestApiComponents.payment(yangGuangPaymentRequest);
+            if (yangGuangPaymentResponse.getErrorCode().equals("0")) {
+                insAreaCompany.setPaymentLink(yangGuangPaymentResponse.getPayUrl());
+            } else {
+                log.error("阳光API - 获取支付链接失败" + yangGuangPaymentResponse.getErrorMessage());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new SystemException("获取支付连接失败");
+        }
+        return insAreaCompany;
+    }
+
+    @Override
+    public HttpResult<Object> paymentCallback(String companyId) throws JsonProcessingException {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        AssertionUtils.isEmpty(insAreaCompany,"报价单不存在");
+
+        if (StringUtils.isEmpty(insAreaCompany.getAgreementId())){
+            return HttpResult.error("订单协议ID为空");
+        }
+        YangGuangConfigureParameters yangGuangConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                insAreaCompany.getAgreementId());
+        YangGuangPaymentCallbackRequest yangGuangPaymentCallbackRequest = new YangGuangPaymentCallbackRequest(insAreaCompany, insOrders,yangGuangConfigureParameters);
+        YangGuangCallbackResponse yangGuangPaymentCallbackResponse = yangGuangRequestApiComponents.callback(yangGuangPaymentCallbackRequest);
+        log.info("阳光API - 保单生效通知 - 参数:{},车牌号:{}",JSON.toJSONString(yangGuangPaymentCallbackRequest),insOrders.getLicenseno());
+
+        String oldStatus = insAreaCompany.getOrderstatus();
+        if (yangGuangPaymentCallbackResponse.getErrorCode().equals("0")) {
+            if (insAreaCompany.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
+
+            } else {
+                insAreaCompany = bulidCallBack(insAreaCompany, yangGuangPaymentCallbackResponse);
+            }
+            if (insAreaCompany.getPayDate() == null) {
+                insAreaCompany.setPayDate(LocalDateTime.now());
+            }
+            log.info("变更前订单状态:" + insOrders.getOrderstatus());
+            log.info("变更前子订单状态:" + insAreaCompany.getOrderstatus());
+            log.info("变更后订单状态:" + insOrders.getOrderstatus());
+            insSubOrderUpdateDetailService.insertData(insAreaCompany,oldStatus,insAreaCompany.getOrderstatus(),"1");
+            insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
+            return HttpResult.ok(yangGuangPaymentCallbackResponse);
+        }
+        return HttpResult.error(yangGuangPaymentCallbackResponse.getErrorMessage());
+    }
+    private InsAreaCompany bulidCallBack(InsAreaCompany insAreaCompany, YangGuangCallbackResponse yangGuangPaymentCallbackResponse) {
+        if (yangGuangPaymentCallbackResponse.getErrorCode().equals("0")) {
+            insAreaCompany = buildCallBackStatus(insAreaCompany, yangGuangPaymentCallbackResponse.getErrorCode());
+        } else {
+            insAreaCompany = buildCallBackStatus(insAreaCompany, yangGuangPaymentCallbackResponse.getErrorCode());
+        }
+        return insAreaCompany;
+    }
+
+    private InsAreaCompany buildCallBackStatus(InsAreaCompany iac, String status) {
+        if (status.equals("1")) {
+            iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+            //更新支付连接
+            log.debug("准备进入获取支付连接######################");
+            iac = payment(iac);
+            log.debug("结束 - 准备进入获取支付连接######################");
+        }
+        if (status.equals("0")) {
+            iac.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+        }
+        return iac;
+    }
+
+
+
+    @Override
+    public HttpResult<List<YangGuangGetNonVehicleProductsResponse.nonVehicleProducts>> getNonVehicleProducts(YgNonVehicleProductsVo ygNonVehicleProductsVo) throws JsonProcessingException {
+        YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                ygNonVehicleProductsVo.getAgreementId());
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(ygNonVehicleProductsVo.getCompanyId());
+        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        YangGuangGetNonVehicleProductsRequest yangGuangGetNonVehicleProductsRequest = new YangGuangGetNonVehicleProductsRequest(ygNonVehicleProductsVo.getSeatCount(),insOrders,ygConfigureParameters);
+        YangGuangGetNonVehicleProductsResponse yangGuangGetNonVehicleProductsResponse = yangGuangRequestApiComponents.getNonVehicleProducts(yangGuangGetNonVehicleProductsRequest);
+        if (!yangGuangGetNonVehicleProductsResponse.getErrorCode().equals("0")) {
+            return HttpResult.error(yangGuangGetNonVehicleProductsResponse.getErrorMessage());
+        }
+        return HttpResult.ok(yangGuangGetNonVehicleProductsResponse.getNonVehicleProducts());
+    }
+
+    @Override
+    public HttpResult<Object> proposalStatusQuery(String companyId) throws JsonProcessingException {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        // 通过协议获取配置实体
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+        YangGuangConfigureParameters yangGuangConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                ptlAgreementAttribution);
+        //接参查看订单核保状态
+        YangGuangProposalStatusQueryRequest yangGuangProposalStatusQueryRequest = new YangGuangProposalStatusQueryRequest(insAreaCompany,yangGuangConfigureParameters);
+        YangGuangProposalStatusQueryResponse yangGuangProposalStatusQueryResponse = yangGuangRequestApiComponents.proposalStatusQuery(yangGuangProposalStatusQueryRequest);
+        if (yangGuangProposalStatusQueryResponse.getErrorCode().equals("0")) {
+            if (yangGuangProposalStatusQueryResponse.getBiUnderWriteFlag().equals("3")) {
+                return HttpResult.error("商业险自核失败,原因:" + yangGuangProposalStatusQueryResponse.getBiUnderWriteMsg());
+            }
+            if (yangGuangProposalStatusQueryResponse.getCiUnderWriteFlag().equals("3")) {
+                return HttpResult.error("交强险自核失败,原因:" + yangGuangProposalStatusQueryResponse.getCiUnderWriteMsg());
+            }
+            insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.WAIT_PAY.getCode(), "1");
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+            //更新投保单号和保单号
+            insAreaCompany.setJqpolicyno(yangGuangProposalStatusQueryResponse.getCiPolicyNo());
+            insAreaCompany.setSypolicyno(yangGuangProposalStatusQueryResponse.getBiPolicyNo());
+            insAreaCompany.setJqapplyno(yangGuangProposalStatusQueryResponse.getCiProposalNo());
+            insAreaCompany.setSyapplyno(yangGuangProposalStatusQueryResponse.getBiProposalNo());
+            //支付链接
+            YangGuangPaymentRequest yangGuangPaymentRequest = new YangGuangPaymentRequest(insAreaCompany, insOrders,yangGuangApiConfigurationProperties.getPayCallBack(),null,yangGuangConfigureParameters);
+            YangGuangPaymentResponse yangGuangPaymentResponse = yangGuangRequestApiComponents.payment(yangGuangPaymentRequest);
+            insAreaCompany.setPaymentLink(yangGuangPaymentResponse.getPayUrl());
+            insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+            return HttpResult.ok("核保成功");
+        } else {
+            insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.TO_BACK.getCode(), "1");
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
+            insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, yangGuangProposalStatusQueryResponse.getErrorMessage());
+            return HttpResult.error(yangGuangProposalStatusQueryResponse.getErrorMessage());
+        }
+    }
+
+    @Override
+    public HttpResult getEpolicyPDFURL(PolicyPrintVo policyPrintVo) throws JsonProcessingException {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(policyPrintVo.getCompanyId());
+        if (!InsOrderStatusEnum.ACCEPT_INSURANCE.getCode().equals(insAreaCompany.getOrderstatus())) {
+            throw new SystemException("此订单还未承保");
+        }
+        YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                insAreaCompany.getAgreementId());
+        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        // 车牌号
+        String licensePlate = insOrders.getLicenseno();
+        //被保人信息
+        JSONObject ownerInfo = insOrders.getInsureinfo();
+        CustomerInfoVo customerInfoVo = ownerInfo.toJavaObject(CustomerInfoVo.class);
+        String busNo;
+        BusType busType;
+        String templateName;
+        switch (policyPrintVo.getRiskCode()) {
+            case InsuranceRisk.TRAFFIC_CODE:
+                busNo = insAreaCompany.getJqpolicyno();
+                busType = BusType.BT_1;
+                templateName = "-交强险保单.pdf";
+                break;
+            case InsuranceRisk.BUSINESS_CODE:
+                busNo = insAreaCompany.getSypolicyno();
+                busType = BusType.BT_3;
+                templateName = "-商业险保单.pdf";
+                break;
+            case InsuranceRisk.ACCIDENT_CODE:
+                busNo = policyPrintVo.getPolicyNumber();
+                busType = BusType.BT_4;
+                templateName = busNo + "-非车险保单.pdf";
+                break;
+            default:
+                throw new SystemException("保险编号异常");
+        }
+        YangGuangGetEpolicyPdfUrlRequest yangGuangGetEpolicyPdfUrlRequest = new YangGuangGetEpolicyPdfUrlRequest(ygConfigureParameters, busNo);
+        YangGuangGetEpolicyPdfUrlResponse yangGuangGetEpolicyPdfUrlResponse = yangGuangRequestApiComponents.getEpolicyPDFURL(yangGuangGetEpolicyPdfUrlRequest);
+        if (!yangGuangGetEpolicyPdfUrlResponse.getErrorCode().equals("0")) {
+            return HttpResult.error("电子保单生成失败, 原因:" + yangGuangGetEpolicyPdfUrlResponse.getErrorMessage());
+        }
+        String transferUrl = gainCarInsPolicy(yangGuangGetEpolicyPdfUrlResponse.getEPolicyPDFURL(), licensePlate + templateName, insAreaCompany.getId());
+        return HttpResult.ok("电子保单生成成功", transferUrl);
+    }
+
+    @Override
+    public HttpResult<Object> elecApplicationSign(String companyId) throws JsonProcessingException {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        // 投保人手机号
+        JSONObject applyInfo = insOrders.getApplyinfo();
+        String mobile = applyInfo.getString("mobile");
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+        YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                ptlAgreementAttribution);
+
+        YangGuangElecApplicationSignRequest yangGuangElecApplicationSignRequest =
+                new YangGuangElecApplicationSignRequest(ygConfigureParameters,
+                insAreaCompany.getJqapplyno() != null ? insAreaCompany.getJqapplyno() : "",
+                insAreaCompany.getSyapplyno() != null ? insAreaCompany.getSyapplyno() : "",
+                mobile);
+        YangGuangElecApplicationSignResponse yangGuangElecApplicationSignResponse = yangGuangRequestApiComponents.elecApplicationSign(yangGuangElecApplicationSignRequest);
+        if (yangGuangElecApplicationSignResponse.getErrorCode().equals("1")) {
+            HttpResult.error(yangGuangElecApplicationSignResponse.getErrorMessage());
+        }
+        return HttpResult.ok("保单电子签名生成成功", yangGuangElecApplicationSignResponse.getSignURL());
+    }
+
+    @Override
+    public ReadPdfUrlListDto getPolicyByCompanyIdPdfList(InsAreaCompany insAreaCompany, InsOrders insOrders, boolean flag) {
+        String jqPath =  getPdfUrl(insAreaCompany, insOrders,InsuranceRisk.TRAFFIC_CODE,PolicyPrintVo.PolicyPrintType.PPT_2.getCode(),insAreaCompany.getJqpolicyno(),flag);
+        String syPath = getPdfUrl(insAreaCompany,insOrders,InsuranceRisk.BUSINESS_CODE,PolicyPrintVo.PolicyPrintType.PPT_2.getCode(), insAreaCompany.getSypolicyno(),flag);
+        InsAreaCompanyExternalPolicy insAreaCompanyExternalPolicy =new InsAreaCompanyExternalPolicy(insAreaCompany.getId(),jqPath,syPath,null,null);
+        return new ReadPdfUrlListDto(insAreaCompanyExternalPolicy,insAreaCompany,null);
+    }
+
+    public String getPdfUrl(InsAreaCompany insAreaCompany, InsOrders insOrders,String jqFlag,String jqSignFlag,String policyNo,boolean flag) {
+        if (!InsOrderStatusEnum.ACCEPT_INSURANCE.getCode().equals(insAreaCompany.getOrderstatus())) {
+            throw new SystemException("此订单还未承保");
+        }
+        // 被保人信息
+        String pathPrefix = insAreaCompany.getInscompany()+"-"+insOrders.getLicenseno()+"-"+insAreaCompany.getId() +"-"+policyNo+"-";
+        if(org.apache.commons.lang3.StringUtils.isBlank(policyNo)){
+            return null;
+        }
+        // 1 通过 协议id获取配置实体
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+        YangGuangConfigureParameters parameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                ptlAgreementAttribution);
+        // 车牌号
+        String licensePlate = insOrders.getLicenseno();
+        // 被保人信息
+        String templateName = null;
+        String url = null;
+        try{
+            YangGuangGetEpolicyPdfUrlRequest request = new YangGuangGetEpolicyPdfUrlRequest(parameters,policyNo);
+            YangGuangGetEpolicyPdfUrlResponse response = yangGuangRequestApiComponents.getEpolicyPDFURL(request);
+            switch (jqFlag) {
+                case InsuranceRisk.TRAFFIC_CODE:
+                    templateName = pathPrefix + InsuranceOrderPdf.JQBD.getDesc();
+                    url = response.getEPolicyPDFURL();
+                    break;
+                case InsuranceRisk.BUSINESS_CODE:
+                    templateName = pathPrefix + InsuranceOrderPdf.SYBD.getDesc();
+                    url = response.getEPolicyPDFURL();
+                    break;
+            }
+        } catch (Exception e){
+            throw new SystemException(e.toString());
+        }
+        String transferUrl = gainCarInsPolicyNew(url, templateName, insAreaCompany.getId(),flag);
+        return transferUrl;
+    }
+
+
+
+    @Override
+    public boolean autoWriteOff(String companyId) throws Exception {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+        YangGuangConfigureParameters ygConfigureParameters = configureParametersComponents.toEntity(YangGuangConfigureParameters.class,
+                insAreaCompany.getAgreementId());
+        String productid = insAreaCompany.getProductid();
+        //单交
+        if (productid.equals("0330")) {
+            YangGuangAutoWriteOffRequest yangGuangAutoWriteOffRequest = new YangGuangAutoWriteOffRequest(ygConfigureParameters, insAreaCompany.getJqpolicyno());
+            YangGuangAutoWriteOffResponse yangGuangAutoWriteOffResponse = yangGuangRequestApiComponents.autoWriteOff(yangGuangAutoWriteOffRequest);
+            if (yangGuangAutoWriteOffResponse.getErrorCode().equals("0")) {
+                HttpResult.ok(yangGuangAutoWriteOffResponse);
+            }
+            return false;
+        }
+        // 单商
+        if (productid.equals("034001")) {
+            YangGuangAutoWriteOffRequest yangGuangAutoWriteOffRequest = new YangGuangAutoWriteOffRequest(ygConfigureParameters, insAreaCompany.getSypolicyno());
+            YangGuangAutoWriteOffResponse yangGuangAutoWriteOffResponse = yangGuangRequestApiComponents.autoWriteOff(yangGuangAutoWriteOffRequest);
+            if (yangGuangAutoWriteOffResponse.getErrorCode().equals("0")) {
+                HttpResult.ok(yangGuangAutoWriteOffResponse);
+            }
+            return false;
+        }
+            //交商同保
+        if (insAreaCompany.getJqpolicyno() != null && insAreaCompany.getSypolicyno() != null && !insAreaCompany.getJqpolicyno().equals("") && !insAreaCompany.getSypolicyno().equals("")) {
+            YangGuangAutoWriteOffRequest yangGuangAutoWriteOffRequestJq = new YangGuangAutoWriteOffRequest(ygConfigureParameters, insAreaCompany.getJqpolicyno());
+            YangGuangAutoWriteOffResponse yangGuangAutoWriteOffResponseJq = yangGuangRequestApiComponents.autoWriteOff(yangGuangAutoWriteOffRequestJq);
+            YangGuangAutoWriteOffRequest yangGuangAutoWriteOffRequestSy = new YangGuangAutoWriteOffRequest(ygConfigureParameters, insAreaCompany.getSypolicyno());
+            YangGuangAutoWriteOffResponse yangGuangAutoWriteOffResponseSy = yangGuangRequestApiComponents.autoWriteOff(yangGuangAutoWriteOffRequestSy);
+            if (yangGuangAutoWriteOffResponseJq.getErrorCode().equals("0") && yangGuangAutoWriteOffResponseSy.getErrorCode().equals("0")) {
+                HttpResult.ok("撤单成功");
+            } else {
+                return false;
+            }
+        }
+        return false;
+    }
+
+    public QuoteRespVo getQuoteRespVo (YangGuangAccuracyCalculateResponse yangGuangAccuracyCalculateResponse, BaseQuoteInfoVo yaQuoteInfoVo, List<YgQuoteAccidentVo> accidentalDrivingVo, boolean isEnergy) {
+        double jqPremium = 0;
+        double syPremium = 0;
+        double sumPayTax = 0;
+        double jyPremium = 0;
+        QuoteRespVo quoteRespVo = new QuoteRespVo();
+
+        if (yangGuangAccuracyCalculateResponse.getCiSumPremium() != null) {
+            jqPremium = Double.parseDouble(yangGuangAccuracyCalculateResponse.getCiSumPremium());
+        }
+        if (yangGuangAccuracyCalculateResponse.getBiSumPremium() != null) {
+            syPremium = Double.parseDouble(yangGuangAccuracyCalculateResponse.getBiSumPremium());
+        }
+        if (yangGuangAccuracyCalculateResponse.getSumPayTax() != null) {
+            sumPayTax = Double.parseDouble(yangGuangAccuracyCalculateResponse.getSumPayTax());
+        }
+        // 交强时间
+        if (yangGuangAccuracyCalculateResponse.getCiStartDate() != null && yangGuangAccuracyCalculateResponse.getCiEndDate() != null) {
+            quoteRespVo.setStartDateJq(yangGuangAccuracyCalculateResponse.getCiStartDate());
+            quoteRespVo.setEndDateJq(yangGuangAccuracyCalculateResponse.getCiEndDate());
+        }
+        //商业时间
+        if (yangGuangAccuracyCalculateResponse.getBiStartDate() != null && yangGuangAccuracyCalculateResponse.getBiEndDate() != null) {
+            quoteRespVo.setStartDateSy(yangGuangAccuracyCalculateResponse.getBiStartDate());
+            quoteRespVo.setEndDateSy(yangGuangAccuracyCalculateResponse.getBiEndDate());
+        }
+        YangGuangAccuracyCalculateResponse.discount discount = yangGuangAccuracyCalculateResponse.getDiscount();
+        if (discount != null) {
+            quoteRespVo.setILogPreUdwMess(discount.getFinalmarkingnobc() != null ? discount.getFinalmarkingnobc() : "");
+            quoteRespVo.setJqScore(discount.getMarkingnobcCI() != null ? discount.getMarkingnobcCI() : "");
+            quoteRespVo.setSyScore(discount.getMarkingnobcBI() != null ? discount.getMarkingnobcBI() : "");
+            quoteRespVo.setSyClaims(discount.getClaimTimes() != null ? discount.getClaimTimes() : "");
+            //自主定价系数
+            quoteRespVo.setPricingCoefficient(discount.getActualautoundwrtfactor() != null ? discount.getActualautoundwrtfactor() : "");
+        }
+
+        List<QuoteKindRespVo> kindList1 = new ArrayList<>();
+        List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
+        //  报价险种放入保费
+        List<QuoteRiskRespVo> riskList1 = QuoteRiskRespVo.toQuoteRiskRespVoList(riskList, jqPremium, syPremium);
+
+        QuoteKindRespVo kind;
+
+        List<YangGuangAccuracyCalculateResponse.kindList> itemKindList = yangGuangAccuracyCalculateResponse.getKindList();
+        //商业险险种
+        List<KindInfoVo> kindList = yaQuoteInfoVo.getKindList();
+        for (KindInfoVo kindInfoVo : kindList) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(kindInfoVo.getKindCode());
+            kind.setKindName(kindInfoVo.getKindName());
+            int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), kindInfoVo.getKindCode());
+            YangGuangAccuracyCalculateResponse.kindList itemKind;
+            if (isEnergy) {
+                itemKind = itemKindList.stream().filter(a -> a.getKindCode().equals(InsuranceTypeCorrespondence.getYangGuangConnectInsuranceTypeNewEnergy()[i])).collect(Collectors.toList()).get(0);
+            } else {
+                itemKind = itemKindList.stream().filter(a -> a.getKindCode().equals(InsuranceTypeCorrespondence.getYangGuangConnectInsuranceType()[i])).collect(Collectors.toList()).get(0);
+            }
+
+            kind.setAmount(Double.parseDouble(itemKind.getAmount()));
+            kind.setCoveragePremium(Double.parseDouble(itemKind.getActualPremium()));
+            kind.setUnitAmount(Double.parseDouble(itemKind.getUnitAmount()));
+            if (!ObjectUtils.isEmpty(kindInfoVo.getDeductibleRate())) {
+                kind.setDeductibleRate(Double.parseDouble(kindInfoVo.getDeductibleRate()));
+            }
+            kindList1.add(kind);
+        }
+        // 驾意险
+        List<YangGuangAccuracyCalculateResponse.PtptNonVehicleProductInformationList> notCarList = yangGuangAccuracyCalculateResponse.getPtptNonVehicleProductInformationList();
+
+        if (notCarList != null && !notCarList.isEmpty()) {
+            List<AccidentResponseVo> accidentResponseVos =
+                    YangGuangAccuracyCalculateResponse.PtptNonVehicleProductInformationList.toAccidentResponseVoList(notCarList,accidentalDrivingVo);
+            quoteRespVo.setAccident(accidentResponseVos);
+
+            //驾意险价格
+            BigDecimal bigDecimal = YangGuangAccuracyCalculateResponse.PtptNonVehicleProductInformationList.sumPremium(notCarList);
+            jyPremium = bigDecimal.doubleValue();
+        }
+
+        quoteRespVo.setRiskList(riskList1);
+        quoteRespVo.setKindList(kindList1);
+        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()); //订单号
+        return quoteRespVo;
+    }
+
+    public HttpResult<QuoteRespVo> responseOrder(YangGuangAccuracyCalculateResponse yangGuangAccuracyCalculateResponse,
+                                                 QuoteRespVo quoteRespVo,
+                                                 PtlAgreementAttribution ptlAgreementAttribution,
+                                                 String orderId,
+                                                 List<YgQuoteAccidentVo> accidentalDrivingVo) {
+        //保存订单信息
+        InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
+        //协议id
+        insAreaCompany.setOrderno(orderId);
+        insAreaCompany.setReptxt(JSON.parseObject(JSON.toJSONString(yangGuangAccuracyCalculateResponse)));
+        insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
+        insAreaCompany.setInsOrderNo(yangGuangAccuracyCalculateResponse.getInfotransNo());
+        InsOrders insOrders = insOrdersService.getById(orderId);
+        //车船税
+        if (!insOrders.getProductid().equals("034001") && !insOrders.getProductid().equals("034002")) {
+            YangGuangAccuracyCalculateResponse.cartax cartax= yangGuangAccuracyCalculateResponse.getCartax();
+            TaxArrears taxArrears = new TaxArrears("往年欠税", Double.parseDouble(yangGuangAccuracyCalculateResponse.getPayBalanceFee()),
+                    Double.parseDouble(yangGuangAccuracyCalculateResponse.getLateFee()));
+            List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
+            insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
+        }
+
+
+        List<InsAreaCompanyAccidentalDriving> insAreaCompanyAccidentalDrivings = new ArrayList<>();
+        if (accidentalDrivingVo != null) {
+            accidentalDrivingVo.forEach(accidentalDriving -> {
+                InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = new InsAreaCompanyAccidentalDriving();
+                insAreaCompanyAccidentalDriving.setCompanyId(insAreaCompany.getCompanyId());
+                insAreaCompanyAccidentalDriving.setQuantity(Integer.parseInt(accidentalDriving.getQuantityCasualty()));
+                insAreaCompanyAccidentalDriving.setRideRiskCode(accidentalDriving.getProductCode());
+                insAreaCompanyAccidentalDriving.setRideRiskName(accidentalDriving.getProductName());
+                insAreaCompanyAccidentalDrivings.add(insAreaCompanyAccidentalDriving);
+            });
+
+            insAreaCompanyService.insertCompanyAndOrders(insAreaCompany, insAreaCompanyAccidentalDrivings);
+        } else {
+            insAreaCompanyService.insertCompanyAndOrders(insAreaCompany, new ArrayList<>());
+        }
+        quoteRespVo.setCompanyId(insAreaCompany.getId());
+        return HttpResult.ok("报价成功", quoteRespVo);
+    }
+
+    private String gainCarInsPolicyNew(String url, String fileName, String subOrderId,boolean flag) {
+        String dir = "carInsPolicyNew/" + subOrderId + "/";
+        return FileUtil.netUrlToFileNew(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl,flag);
+    }
+    private String gainCarInsPolicy(String url, String fileName, String licensePlate) {
+        String dir = "carInsPolicy/" + licensePlate + "/";
+        return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);
     }
     }
 }
 }

+ 5 - 1
src/main/resources/application-test.yml

@@ -445,12 +445,16 @@ pingan:
     sk: K9VIM2C6W2YWDWDVK6966F29229dYMDF
     sk: K9VIM2C6W2YWDWDVK6966F29229dYMDF
     signatureUrl: https://test.baoxianzhanggui.com/#/Signature
     signatureUrl: https://test.baoxianzhanggui.com/#/Signature
 
 
-# 阳光财险
+# 阳光财险测试地址
 yangguang:
 yangguang:
   api:
   api:
     testKey: uYPP7AIc3HYsUh8rFn
     testKey: uYPP7AIc3HYsUh8rFn
     url: http://chexiantest.sinosig.com:7002/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
     url: http://chexiantest.sinosig.com:7002/serviceCar/nonstandard.action?sysFlag=CCSI_SXJZG
     productKey: hhSFrKjVGqFGz6GN
     productKey: hhSFrKjVGqFGz6GN
+    payCallBack: https://sxzgkj.baoxianzhanggui.com/web-api/api/yangGuang/callBack
+    uploadUrl: unifiedimage.sinosig.com:8082/AutoImagePlatform/third/upload
+    secret: 6CPxxlHwLLphTR7gVg3hJLsH
+    referer: SXJZG
 
 
 chengtai:
 chengtai:
   api:
   api:

Some files were not shown because too many files changed in this diff