فهرست منبع

1.国任非车险代码

wks 2 سال پیش
والد
کامیت
1c07fdc210

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

@@ -66,8 +66,8 @@ public class NonAutoInsOrderReq {
         req.setOthBusinessNo(carPriceUuid);
         req.setRequestTime(DateUtil.today());
 
-
         List<DataDTO.OrderListDTO> orderList = new ArrayList();
+
         DataDTO.OrderListDTO orderListDto = new DataDTO.OrderListDTO();
 
         /**
@@ -83,11 +83,7 @@ public class NonAutoInsOrderReq {
         insuredListDTO.setInsuredType("1");
         insuredListDTO.setPhoneNo(insuredPerson.getMobile());
         insuredListDTO.setPlanNo("1");
-
-
         insuredList.add(insuredListDTO);
-
-
         /**
          * 车辆信息
          */
@@ -105,10 +101,8 @@ public class NonAutoInsOrderReq {
         objCarListDTO.setPurchasePrice(StringUtils.toInt(vinQ.getPriceShow()));
         objCarListDTO.setSeatNum(StringUtils.toInt(vinQ.getSeatCountBC()));
         objCarListDTO.setToncount(StringUtils.toDouble(vinQ.getTonCount()));
-
         objCarList.add(objCarListDTO);
 
-
         /**
          * 投保人信息
          */
@@ -190,11 +184,7 @@ public class NonAutoInsOrderReq {
         //7:柜台业务
         //8:网上业务 ......
         orderMain.setBusinessSource("2");
-
-
         orderListDto.setInsuredList(insuredList);
-
-
         /**
          * 方案信息
          */
@@ -207,11 +197,8 @@ public class NonAutoInsOrderReq {
         planListDto.setPlanNo("1");
         planListDto.setQuantity("1");
         planListDto.setSocialSecInd("01");
-
-
         planList.add(planListDto);
 
-
         /**
          *  业务员信息
          */
@@ -226,29 +213,19 @@ public class NonAutoInsOrderReq {
         salesmanListDTO.setSerialNo(1);
         salesmanListDTO.setTeamCode("");
         salesmanListDTO.setTeamName("");
-
         salesmanList.add(salesmanListDTO);
 
-
         orderListDto.setInsuredList(insuredList);
         orderListDto.setOrderAppl(orderAppl);
         orderListDto.setOrderMain(orderMain);
         orderListDto.setPlanList(planList);
         orderListDto.setSalesmanList(salesmanList);
         orderListDto.setObjCarList(objCarList);
-
         orderList.add(orderListDto);
-
-
         DataDTO data = new DataDTO();
         data.setOrderList(orderList);
-
         req.setData(data);
-
-
         return req;
-
-
     }
 
     @NoArgsConstructor

+ 132 - 24
src/main/java/com/ydtech/modules/ins/model/guoren/NonAutoInsResp.java

@@ -2,6 +2,8 @@ package com.ydtech.modules.ins.model.guoren;
 
 import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -28,28 +30,34 @@ public class NonAutoInsResp {
 
     @NoArgsConstructor
     @Data
+    @ApiModel("非车险信息")
     public static class DataDTO {
+
         @JsonProperty(value = "goods")
         @JSONField(name = "goods")
         private GoodsDTO goods;
-        @JsonProperty(value = "goodsAgentSalesmanList")
-        @JSONField(name = "goodsAgentSalesmanList")
-        private List<GoodsAgentSalesmanListDTO> goodsAgentSalesmanList;
-        @JsonProperty(value = "goodsSalesInfo")
-        @JSONField(name = "goodsSalesInfo")
-        private GoodsSalesInfoDTO goodsSalesInfo;
-        @JsonProperty(value = "goodsPrpallConfList")
-        @JSONField(name = "goodsPrpallConfList")
-        private List<GoodsPrpallConfListDTO> goodsPrpallConfList;
-        @JsonProperty(value = "goodsIntroduction")
-        @JSONField(name = "goodsIntroduction")
-        private GoodsIntroductionDTO goodsIntroduction;
-        @JsonProperty(value = "channelContactList")
-        @JSONField(name = "channelContactList")
-        private List<ChannelContactListDTO> channelContactList;
+
+//        @JsonProperty(value = "goodsAgentSalesmanList")
+//        @JSONField(name = "goodsAgentSalesmanList")
+//        private List<GoodsAgentSalesmanListDTO> goodsAgentSalesmanList;
+//        @JsonProperty(value = "goodsSalesInfo")
+//        @JSONField(name = "goodsSalesInfo")
+//        private GoodsSalesInfoDTO goodsSalesInfo;
+//        @JsonProperty(value = "goodsPrpallConfList")
+//        @JSONField(name = "goodsPrpallConfList")
+//        private List<GoodsPrpallConfListDTO> goodsPrpallConfList;
+//        @JsonProperty(value = "goodsIntroduction")
+//        @JSONField(name = "goodsIntroduction")
+//        private GoodsIntroductionDTO goodsIntroduction;
+//        @JsonProperty(value = "channelContactList")
+//        @JSONField(name = "channelContactList")
+//        private List<ChannelContactListDTO> channelContactList;
+
+        @ApiModelProperty("产品信息")
         @JsonProperty(value = "prodList")
         @JSONField(name = "prodList")
         private List<ProdListDTO> prodList;
+
         @JsonProperty(value = "checkRepeat")
         @JSONField(name = "checkRepeat")
         private CheckRepeatDTO checkRepeat;
@@ -363,24 +371,31 @@ public class NonAutoInsResp {
             @JsonProperty(value = "id")
             @JSONField(name = "id")
             private Integer id;
+
             @JsonProperty(value = "comCode")
             @JSONField(name = "comCode")
             private String comCode;
+
             @JsonProperty(value = "comName")
             @JSONField(name = "comName")
             private String comName;
+
             @JsonProperty(value = "channelCode")
             @JSONField(name = "channelCode")
             private String channelCode;
+
             @JsonProperty(value = "channelName")
             @JSONField(name = "channelName")
             private String channelName;
+
             @JsonProperty(value = "channelDesc")
             @JSONField(name = "channelDesc")
             private String channelDesc;
+
             @JsonProperty(value = "invalidFlag")
             @JSONField(name = "invalidFlag")
             private Integer invalidFlag;
+
             @JsonProperty(value = "demandNo")
             @JSONField(name = "demandNo")
             private String demandNo;
@@ -388,79 +403,129 @@ public class NonAutoInsResp {
 
         @NoArgsConstructor
         @Data
+        @ApiModel("产品信息")
         public static class ProdListDTO {
+
+            @ApiModelProperty("产品ID")
             @JsonProperty(value = "id")
             @JSONField(name = "id")
             private Integer id;
+
+            @ApiModelProperty("产品代码")
             @JsonProperty(value = "prodCode")
             @JSONField(name = "prodCode")
             private String prodCode;
+
+            @ApiModelProperty("产品中文名称")
             @JsonProperty(value = "prodCName")
             @JSONField(name = "prodCName")
             private String prodCName;
+
+            @ApiModelProperty("产品版本")
             @JsonProperty(value = "prodVersion")
             @JSONField(name = "prodVersion")
             private String prodVersion;
+
+            @ApiModelProperty("赠险产品")
             @JsonProperty(value = "freeInsurance")
             @JSONField(name = "freeInsurance")
             private String freeInsurance;
+
+            @ApiModelProperty("产品分类")
             @JsonProperty(value = "prodCategory")
             @JSONField(name = "prodCategory")
             private String prodCategory;
+
+            @ApiModelProperty("产品类型")
             @JsonProperty(value = "prodType")
             @JSONField(name = "prodType")
             private String prodType;
+
+            @ApiModelProperty("是否标准产品")
             @JsonProperty(value = "standardProdInd")
             @JSONField(name = "standardProdInd")
             private String standardProdInd;
+
+            @ApiModelProperty("广义险种代码")
             @JsonProperty(value = "prodRisk")
             @JSONField(name = "prodRisk")
             private String prodRisk;
+
+            @ApiModelProperty("产品系列")
             @JsonProperty(value = "prodLine")
             @JSONField(name = "prodLine")
             private String prodLine;
+
+            @ApiModelProperty("是否DIY产品")
             @JsonProperty(value = "diyProdInd")
             @JSONField(name = "diyProdInd")
             private String diyProdInd;
+
+            @ApiModelProperty("是否救援")
             @JsonProperty(value = "rescueInd")
             @JSONField(name = "rescueInd")
             private String rescueInd;
+
+            @ApiModelProperty("是否健管")
             @JsonProperty(value = "acciInd")
             @JSONField(name = "acciInd")
             private String acciInd;
+
+            @ApiModelProperty("是否再保")
             @JsonProperty(value = "reinInd")
             @JSONField(name = "reinInd")
             private String reinInd;
+
+            @ApiModelProperty("是否共保")
             @JsonProperty(value = "coinsInd")
             @JSONField(name = "coinsInd")
             private String coinsInd;
+
+            @ApiModelProperty("助记码")
             @JsonProperty(value = "mnemonicCode")
             @JSONField(name = "mnemonicCode")
             private String mnemonicCode;
+
+            @ApiModelProperty("重复投保产品编码")
             @JsonProperty(value = "repeatCode")
             @JSONField(name = "repeatCode")
             private String repeatCode;
+
+            @ApiModelProperty("产品状态")
             @JsonProperty(value = "prodStatus")
             @JSONField(name = "prodStatus")
             private String prodStatus;
+
+            @ApiModelProperty("保费")
             @JsonProperty(value = "premium")
             @JSONField(name = "premium")
             private Integer premium;
+
+            @ApiModelProperty("保额")
             @JsonProperty(value = "amount")
             @JSONField(name = "amount")
             private Integer amount;
+
+            @ApiModelProperty("审核状态")
             @JsonProperty(value = "auditStatus")
             @JSONField(name = "auditStatus")
             private String auditStatus;
+
+            @ApiModelProperty("启用标志")
             @JsonProperty(value = "enableInd")
             @JSONField(name = "enableInd")
             private Integer enableInd;
+
+            @ApiModelProperty("失效标识")
             @JsonProperty(value = "invalidFlag")
             @JSONField(name = "invalidFlag")
             private Integer invalidFlag;
+
+            @ApiModelProperty("险种数据")
             @JsonProperty(value = "prodRiskList")
             @JSONField(name = "prodRiskList")
             private List<ProdRiskListDTO> prodRiskList;
+
             @JsonProperty(value = "technologyInd")
             @JSONField(name = "technologyInd")
             private String technologyInd;
@@ -468,39 +533,52 @@ public class NonAutoInsResp {
             @NoArgsConstructor
             @Data
             public static class ProdRiskListDTO {
+
                 @JsonProperty(value = "id")
                 @JSONField(name = "id")
                 private Integer id;
+
                 @JsonProperty(value = "prodId")
                 @JSONField(name = "prodId")
                 private Integer prodId;
+
                 @JsonProperty(value = "riskCode")
                 @JSONField(name = "riskCode")
                 private String riskCode;
+
                 @JsonProperty(value = "riskName")
                 @JSONField(name = "riskName")
                 private String riskName;
+
                 @JsonProperty(value = "requiredRisk")
                 @JSONField(name = "requiredRisk")
                 private String requiredRisk;
+
                 @JsonProperty(value = "calcType")
                 @JSONField(name = "calcType")
                 private String calcType;
+
                 @JsonProperty(value = "displayNo")
                 @JSONField(name = "displayNo")
                 private Integer displayNo;
+
                 @JsonProperty(value = "invalidFlag")
                 @JSONField(name = "invalidFlag")
                 private Integer invalidFlag;
-                @JsonProperty(value = "prodCvgList")
-                @JSONField(name = "prodCvgList")
-                private List<ProdCvgListDTO> prodCvgList;
-                @JsonProperty(value = "prodEngageList")
-                @JSONField(name = "prodEngageList")
-                private List<ProdEngageListDTO> prodEngageList;
-                @JsonProperty(value = "prodClauseList")
-                @JSONField(name = "prodClauseList")
-                private List<ProdClauseListDTO> prodClauseList;
+
+//                @JsonProperty(value = "prodCvgList")
+//                @JSONField(name = "prodCvgList")
+//                private List<ProdCvgListDTO> prodCvgList;
+//
+//                @JsonProperty(value = "prodEngageList")
+//                @JSONField(name = "prodEngageList")
+//                private List<ProdEngageListDTO> prodEngageList;
+//
+//                @JsonProperty(value = "prodClauseList")
+//                @JSONField(name = "prodClauseList")
+//                private List<ProdClauseListDTO> prodClauseList;
+
+                @ApiModelProperty("产品险别责任表数据传输对象")
                 @JsonProperty(value = "prodCvgLiabList")
                 @JSONField(name = "prodCvgLiabList")
                 private List<ProdCvgLiabListDTO> prodCvgLiabList;
@@ -628,48 +706,78 @@ public class NonAutoInsResp {
                 @NoArgsConstructor
                 @Data
                 public static class ProdCvgLiabListDTO {
+
+                    @ApiModelProperty("险别责任ID")
                     @JsonProperty(value = "id")
                     @JSONField(name = "id")
                     private Integer id;
+
+                    @ApiModelProperty("产品主键ID")
                     @JsonProperty(value = "prodId")
                     @JSONField(name = "prodId")
                     private Integer prodId;
+
+                    @ApiModelProperty("产品险别主键ID")
                     @JsonProperty(value = "prodCvgId")
                     @JSONField(name = "prodCvgId")
                     private Integer prodCvgId;
+
+                    @ApiModelProperty("产品险别主键Code")
                     @JsonProperty(value = "prodCvgCode")
                     @JSONField(name = "prodCvgCode")
                     private String prodCvgCode;
+
+                    @ApiModelProperty("序号")
                     @JsonProperty(value = "serialNo")
                     @JSONField(name = "serialNo")
                     private Integer serialNo;
+
+                    @ApiModelProperty("责任代码")
                     @JsonProperty(value = "liabCode")
                     @JSONField(name = "liabCode")
                     private String liabCode;
+
+                    @ApiModelProperty("责任名称")
                     @JsonProperty(value = "liabName")
                     @JSONField(name = "liabName")
                     private String liabName;
+
+                    @ApiModelProperty("是否必选")
                     @JsonProperty(value = "requiredLiab")
                     @JSONField(name = "requiredLiab")
                     private String requiredLiab;
+
+                    @ApiModelProperty("计入总保额标志")
                     @JsonProperty(value = "liabCalculateInd")
                     @JSONField(name = "liabCalculateInd")
                     private String liabCalculateInd;
+
+                    @ApiModelProperty("币别")
                     @JsonProperty(value = "currency")
                     @JSONField(name = "currency")
                     private String currency;
+
+                    @ApiModelProperty("保费")
                     @JsonProperty(value = "liabPremium")
                     @JSONField(name = "liabPremium")
                     private Integer liabPremium;
+
+                    @ApiModelProperty("保额")
                     @JsonProperty(value = "liabAmount")
                     @JSONField(name = "liabAmount")
                     private Integer liabAmount;
+
+                    @ApiModelProperty("费率")
                     @JsonProperty(value = "liabRate")
                     @JSONField(name = "liabRate")
                     private Integer liabRate;
+
+                    @ApiModelProperty("单位")
                     @JsonProperty(value = "unit")
                     @JSONField(name = "unit")
                     private String unit;
+
+                    @ApiModelProperty("失效标识")
                     @JsonProperty(value = "invalidFlag")
                     @JSONField(name = "invalidFlag")
                     private Integer invalidFlag;

+ 13 - 16
src/main/java/com/ydtech/modules/order/controller/GuoRenOrderApiController.java

@@ -6,21 +6,22 @@ import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.guoren.CarModelResp;
 import com.ydtech.modules.ins.model.guoren.NonAutoInsResp;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.order.entity.api.guoren.constants.GoodsClassifyList;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceList;
 import com.ydtech.modules.order.service.GuorenOrderApiService;
-import com.ydtech.modules.order.service.InsAreaCompanyService;
+import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.BeanUtils;
 import org.springframework.web.bind.annotation.*;
 
-import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 国任财险 API对接
@@ -101,19 +102,15 @@ public class GuoRenOrderApiController {
         return guorenOrderApiService.getPolicyPrintApi(policyPrintVo);
     }
 
-    @ApiOperation(value = "同步非车保险")
+    @ApiOperation(value = "获取非车险列表")
     @PostMapping("/syncNonAutoIns")
-    public HttpResult syncNonAutoIns() {
-        //家用车驾乘意外险-山西版(02746425173001)
-        String goodsCode = "02746425173001";
-        NonAutoInsResp.DataDTO dataDTO = guorenOrderApiService.gainNonAutoInsList(goodsCode);
-        return HttpResult.ok(dataDTO);
-    }
+    public HttpResult<Object> syncNonAutoIns(@RequestSingleParam(value = "goodsCode") String goodsCode) {
+        if (StringUtils.isEmpty(goodsCode)) {
+            return HttpResult.ok(GoodsClassifyList.buildGoodsClassifyDto());
+        }
+        List<NonAutoInsuranceList> nonAutoInsuranceLists = guorenOrderApiService.gainNonAutoInsList(goodsCode);
 
-    @ApiOperation(value = "同步驾意险")
-    @PostMapping("/syncAccidentInsure")
-    public HttpResult syncAccidentInsure(@RequestBody @Valid AccidentalDrivingQueryVo accidentalDrivingVo) {
-        return guorenOrderApiService.syncAccidentInsure(accidentalDrivingVo);
+        return HttpResult.ok(nonAutoInsuranceLists);
     }
 
 

+ 73 - 0
src/main/java/com/ydtech/modules/order/entity/api/guoren/constants/GoodsClassifyList.java

@@ -0,0 +1,73 @@
+package com.ydtech.modules.order.entity.api.guoren.constants;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+@AllArgsConstructor
+@Getter
+public enum GoodsClassifyList {
+
+    G_02746045001001("02746045001001", "国任VIP驾乘-非营运客车"),
+    G_02703014001001("02703014001001", "海陆空安全计划-车主"),
+    G_02746425190001("02746425190001", "国任·驾多保"),
+    G_02746425200001("02746425200001", "百万车家保"),
+    G_02746425138001("02746425138001", "国任至尊保-家庭自用车"),
+    G_02746425141001("02746425141001", "国任至尊保-2吨内小货车"),
+    G_02752010009001("02752010009001", "国任10元保--畅飞中华航意险"),
+    G_02746161001001("02746161001001", "国任VIP驾乘-家庭自用车"),
+    G_G0514("G0514", "交通工具意外险"),
+    G_02746400001001("02746400001001", "国任VIP驾乘-非营业客车B款"),
+    G_02746405001001("02746405001001", "国任VIP驾乘-营业客车"),
+    G_02746413001001("02746413001001", "国任VIP驾乘-10吨内小货车"),
+    G_02746416001001("02746416001001", "国任VIP驾乘-超10吨大货车"),
+    G_02746419001001("02746419001001", "国任VIP驾乘-特种车"),
+    G_02746422001001("02746422001001", "国任VIP驾乘-摩托车"),
+    G_02746425062001("02746425062001", "国任·信任驾"),
+    G_02640000001001("02640000001001", "任康保·国任门诊保"),
+    G_02746425181001("02746425181001", "任易驾Plus"),
+    G_G1165("G1165", "极速保-货驾意"),
+    G_G0513("G0513", "驾乘人员意外险(跟车)"),
+    G_10079000085001("10079000085001", "《国任·合家欢》2023版"),
+    G_G0523("G0523", "个人意外险"),
+    G_G1059("G1059", "网电百万随我行驾乘意外险"),
+    G_G1380("G1380", "驾乘人员意外险(驾驶员)"),
+    G_G1052("G1052", "国任百万任我行出行意外险"),
+    G_G1292("G1292", "随车行李物品损失保险"),
+    G_G0511("G0511", "个人账户资金安全险"),
+    G_10079000091001("10079000091001", "《国任·合家欢》尊享版"),
+    G_10079000097001("10079000097001", "《国任·合家欢》天天版"),
+    G_G0512("G0512", "家财险"),
+    G_G1245("G1245", "国任驾乘人员意外险"),
+    G_02619000002001("02619000002001", "任康保•百万医疗 (0免赔搭售版)"),
+    G_02746425177001("02746425177001", "货车驾乘意外险-山西版"),
+    G_02746425173001("02746425173001", "家用车驾乘意外险-山西版");
+
+    private final String code;
+
+    private final String desc;
+
+
+    public static List<GoodsClassifyDto> buildGoodsClassifyDto() {
+        return Stream.of(GoodsClassifyList.class.getEnumConstants()).map(x -> new GoodsClassifyDto(x.code, x.desc)).collect(Collectors.toList());
+    }
+
+
+    @Data
+    @NoArgsConstructor
+    @AllArgsConstructor
+    public static class GoodsClassifyDto {
+
+        private String goodId;
+
+        private String goodDesc;
+
+    }
+
+}

+ 142 - 0
src/main/java/com/ydtech/modules/order/entity/vo/guoren/NonAutoInsuranceList.java

@@ -0,0 +1,142 @@
+package com.ydtech.modules.order.entity.vo.guoren;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.ins.model.guoren.NonAutoInsResp;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+
+@Data
+@NoArgsConstructor
+@ApiModel("非车险列表返回")
+public class NonAutoInsuranceList{
+
+    @ApiModelProperty("产品ID")
+    @JsonProperty(value = "id")
+    @JSONField(name = "id")
+    private Integer id;
+
+    @ApiModelProperty("产品代码")
+    @JsonProperty(value = "prodCode")
+    @JSONField(name = "prodCode")
+    private String prodCode;
+
+    @ApiModelProperty("产品中文名称")
+    @JsonProperty(value = "prodCName")
+    @JSONField(name = "prodCName")
+    private String prodCName;
+
+    @ApiModelProperty("产品版本")
+    @JsonProperty(value = "prodVersion")
+    @JSONField(name = "prodVersion")
+    private String prodVersion;
+
+    @ApiModelProperty("赠险产品")
+    @JsonProperty(value = "freeInsurance")
+    @JSONField(name = "freeInsurance")
+    private String freeInsurance;
+
+    @ApiModelProperty("产品分类")
+    @JsonProperty(value = "prodCategory")
+    @JSONField(name = "prodCategory")
+    private String prodCategory;
+
+    @ApiModelProperty("产品类型")
+    @JsonProperty(value = "prodType")
+    @JSONField(name = "prodType")
+    private String prodType;
+
+    @ApiModelProperty("是否标准产品")
+    @JsonProperty(value = "standardProdInd")
+    @JSONField(name = "standardProdInd")
+    private String standardProdInd;
+
+    @ApiModelProperty("广义险种代码")
+    @JsonProperty(value = "prodRisk")
+    @JSONField(name = "prodRisk")
+    private String prodRisk;
+
+    @ApiModelProperty("产品系列")
+    @JsonProperty(value = "prodLine")
+    @JSONField(name = "prodLine")
+    private String prodLine;
+
+    @ApiModelProperty("是否DIY产品")
+    @JsonProperty(value = "diyProdInd")
+    @JSONField(name = "diyProdInd")
+    private String diyProdInd;
+
+    @ApiModelProperty("是否救援")
+    @JsonProperty(value = "rescueInd")
+    @JSONField(name = "rescueInd")
+    private String rescueInd;
+
+    @ApiModelProperty("是否健管")
+    @JsonProperty(value = "acciInd")
+    @JSONField(name = "acciInd")
+    private String acciInd;
+
+    @ApiModelProperty("是否再保")
+    @JsonProperty(value = "reinInd")
+    @JSONField(name = "reinInd")
+    private String reinInd;
+
+    @ApiModelProperty("是否共保")
+    @JsonProperty(value = "coinsInd")
+    @JSONField(name = "coinsInd")
+    private String coinsInd;
+
+    @ApiModelProperty("助记码")
+    @JsonProperty(value = "mnemonicCode")
+    @JSONField(name = "mnemonicCode")
+    private String mnemonicCode;
+
+    @ApiModelProperty("重复投保产品编码")
+    @JsonProperty(value = "repeatCode")
+    @JSONField(name = "repeatCode")
+    private String repeatCode;
+
+    @ApiModelProperty("产品状态")
+    @JsonProperty(value = "prodStatus")
+    @JSONField(name = "prodStatus")
+    private String prodStatus;
+
+    @ApiModelProperty("保费")
+    @JsonProperty(value = "premium")
+    @JSONField(name = "premium")
+    private Integer premium;
+
+    @ApiModelProperty("保额")
+    @JsonProperty(value = "amount")
+    @JSONField(name = "amount")
+    private Integer amount;
+
+    @ApiModelProperty("审核状态")
+    @JsonProperty(value = "auditStatus")
+    @JSONField(name = "auditStatus")
+    private String auditStatus;
+
+    @ApiModelProperty("启用标志")
+    @JsonProperty(value = "enableInd")
+    @JSONField(name = "enableInd")
+    private Integer enableInd;
+
+    @ApiModelProperty("失效标识")
+    @JsonProperty(value = "invalidFlag")
+    @JSONField(name = "invalidFlag")
+    private Integer invalidFlag;
+
+    @JsonProperty(value = "technologyInd")
+    @JSONField(name = "technologyInd")
+    private String technologyInd;
+
+    @JsonProperty(value = "prodCvgLiabList")
+    @JSONField(name = "prodCvgLiabList")
+    private List<NonAutoInsResp.DataDTO.ProdListDTO.ProdRiskListDTO.ProdCvgLiabListDTO> prodCvgLiabList;
+
+}

+ 3 - 6
src/main/java/com/ydtech/modules/order/service/GuorenOrderApiService.java

@@ -8,8 +8,10 @@ import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceList;
 
 import javax.servlet.http.HttpServletRequest;
+import java.util.List;
 
 public interface GuorenOrderApiService {
 
@@ -55,12 +57,7 @@ public interface GuorenOrderApiService {
     /**
      * 非车列表
      */
-    NonAutoInsResp.DataDTO gainNonAutoInsList(String goodsCode);
-
-    /**
-     * (驾意险)同步驾意险
-     */
-    HttpResult syncAccidentInsure(AccidentalDrivingQueryVo accidentalDrivingVo);
+    List<NonAutoInsuranceList> gainNonAutoInsList(String goodsCode);
 
     /**
      * 第三方回调通知(支付+承保)

+ 18 - 78
src/main/java/com/ydtech/modules/order/service/impl/GuorenOrderApiServiceImpl.java

@@ -35,6 +35,7 @@ import com.ydtech.modules.order.entity.api.guoren.request.SignatureRequest;
 import com.ydtech.modules.order.entity.api.guoren.response.SignatureResponse;
 import com.ydtech.modules.order.entity.dto.InsUploadImagesDto;
 import com.ydtech.modules.order.entity.vo.*;
+import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceList;
 import com.ydtech.modules.order.service.GuorenOrderApiService;
 import com.ydtech.modules.order.service.InsAreaCompanyService;
 import com.ydtech.modules.order.service.InsOrdersService;
@@ -47,6 +48,7 @@ import org.apache.commons.httpclient.methods.multipart.Part;
 import org.apache.commons.httpclient.methods.multipart.StringPart;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -526,73 +528,6 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
     }
 
 
-    /**
-     * 驾意外险  同步
-     */
-    @Override
-    public HttpResult syncAccidentInsure(AccidentalDrivingQueryVo accidentalDrivingVo) {
-        //家用车驾乘意外险-山西版(02746425173001)
-        String goodsCode = "02746425173001";
-        NonAutoInsResp.DataDTO nonAutoIns = gainNonAutoInsList(goodsCode);
-
-        if (null != nonAutoIns) {
-            //清空旧的存入表
-            LambdaQueryWrapper<EsmInsAttachInsure> lqw = new LambdaQueryWrapper<EsmInsAttachInsure>();
-            lqw.eq(EsmInsAttachInsure::getCompanyId, accidentalDrivingVo.getCompanyCode());
-            lqw.eq(EsmInsAttachInsure::getSeating, accidentalDrivingVo.getSeatNum());
-            lqw.select(EsmInsAttachInsure::getId);
-            List<EsmInsAttachInsure> eiaiList = esmInsAttachInsureMapper.selectList(lqw);
-
-            //删除已经存在的数据
-            if (CollUtil.isNotEmpty(eiaiList)) {
-                List<String> ids = new ArrayList<>();
-                eiaiList.forEach(i -> ids.add(i.getId()));
-                LambdaQueryWrapper<EsmInsAttachInsureDetails> lqwDetails = new LambdaQueryWrapper<>();
-                lqwDetails.in(EsmInsAttachInsureDetails::getAttachInsureId, ids);
-                //详情删除
-                esmInsAttachInsureDetailsMapper.delete(lqwDetails);
-                esmInsAttachInsureMapper.deleteBatchIds(ids);
-            }
-
-            List<NonAutoInsResp.DataDTO.ProdListDTO> prodList = nonAutoIns.getProdList();
-
-
-            prodList.forEach(a -> {
-                EsmInsAttachInsure ati = new EsmInsAttachInsure();
-                ati.setCode(a.getProdRisk());
-                ati.setName(a.getProdRisk());
-                ati.setSeating(accidentalDrivingVo.getSeatNum() + "");
-                ati.setCompanyId(accidentalDrivingVo.getCompanyCode());
-                ati.setType(AttachInsureEnum.AI001.getCode());
-                ati.setEnable(WhetherEnum.YES.getCode());
-                ati.setRestrictNum(20);
-                esmInsAttachInsureMapper.insert(ati);
-
-                AtomicInteger total = new AtomicInteger(0);
-                //具体方案信息
-                a.getProdRiskList().get(0).getProdCvgLiabList().forEach(d -> {
-                    EsmInsAttachInsureDetails atiDetails = new EsmInsAttachInsureDetails();
-                    atiDetails.setAttachInsureId(ati.getId());
-                    atiDetails.setName(d.getLiabName());
-                    atiDetails.setCarSum(d.getLiabAmount().toString());
-                    atiDetails.setSeatSum(d.getLiabAmount().toString());
-                    atiDetails.setPremium(d.getLiabPremium().toString());
-                    total.addAndGet(StringUtils.toInt(atiDetails.getPremium()));
-                    esmInsAttachInsureDetailsMapper.insert(atiDetails);
-                });
-
-                ati.setPremium(total.get() + "");
-                esmInsAttachInsureMapper.updateById(ati);
-
-
-            });
-        }
-
-
-        return HttpResult.ok("同步成功");
-    }
-
-
     @Override
     @Transactional
     public HttpResult callBackApi(HttpServletRequest request) {
@@ -959,16 +894,9 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
         boolean boo;
         //构造请求参数
         PremiumReq req = PremiumReq.buildQuoteParam(yaQuoteInfoVo, carPriceResult, vinQ);
-        PremiumResp resp = null;
+        PremiumResp resp;
         StringBuffer flag = new StringBuffer();
-
-        int number = 0;
         for (;;) {
-            // 关闭死循环
-            if (number >= 10) {
-                break;
-            }
-
             resp = guorenRequestApiComponent.request(req, PlatformInterfaceCode.API_IIRBT00004, PremiumResp.class);
             req.getCi().getPrpTmain().setAnswer(null);
             req.getBi().getPrpTmain().setAnswer(null);
@@ -988,7 +916,6 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
             if (!boo) {
                 break;
             }
-            number ++;
         }
 
         resp.getData().setCiStartDate(req.getCi().getPrpTmain().getStartDate());
@@ -1060,7 +987,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
      * @date: 2023年09月18日 0018
      */
     @Override
-    public NonAutoInsResp.DataDTO gainNonAutoInsList(String goodsCode) {
+    public List<NonAutoInsuranceList> gainNonAutoInsList(String goodsCode) {
         Map<String, Object> bodyMap = new HashMap<>();
         Map<String, Object> bodyParamsMap = new HashMap<>();
         bodyParamsMap.put("goodsCode", goodsCode);
@@ -1068,8 +995,21 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
         bodyMap.put("systemCode", "TQDL");
         bodyMap.put("requestTime", Instant.now().getEpochSecond() * 1000);
         NonAutoInsResp resp = guorenRequestApiComponent.request(bodyMap, PlatformInterfaceCode.API_IIIRBT00053, NonAutoInsResp.class);
+
         if (null != resp.getData()) {
-            return resp.getData();
+            NonAutoInsResp.DataDTO data = resp.getData();
+            List<NonAutoInsResp.DataDTO.ProdListDTO> prodList = data.getProdList();
+            List<NonAutoInsuranceList> nonAutoInsuranceLists = new ArrayList<>();
+
+            for (NonAutoInsResp.DataDTO.ProdListDTO prodListDTO : prodList) {
+                NonAutoInsuranceList nonAutoInsuranceList = new NonAutoInsuranceList();
+                BeanUtils.copyProperties(prodListDTO, nonAutoInsuranceList);
+                List<NonAutoInsResp.DataDTO.ProdListDTO.ProdRiskListDTO.ProdCvgLiabListDTO> prodCvgLiabList
+                        = prodListDTO.getProdRiskList().get(0).getProdCvgLiabList();
+                nonAutoInsuranceList.setProdCvgLiabList(prodCvgLiabList);
+                nonAutoInsuranceLists.add(nonAutoInsuranceList);
+            }
+            return nonAutoInsuranceLists;
         }
         return null;
     }

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

@@ -226,13 +226,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         boolean boo = false;
         boolean isBiRepeat = true;
         String vinNo = carInfo.getVinNo();
-        int number = 0;
         while (!boo) {
-            // 关闭死循环
-            if (number >= 10) {
-                break;
-            }
-
             rr = yongchengRequestApiComponents.newPremiumXnyCalculation(m);
             //交强
             m.getRequestLabel().getCondition().getVhl().setCCheckCodeJQ("");
@@ -265,6 +259,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
                 if (!boo) {
                     isBiRepeat = false;
                     InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 商业险日期处理", vinNo);
+                    continue;
                 }
             }
 
@@ -272,10 +267,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
             boo = reinsuranceCodeError(rr, m);
             if (!boo) {
                 InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> {} - 转保处理", vinNo);
-                continue;
             }
 
-            number++;
         }
 
         StringBuffer sb = new StringBuffer();