ligang134 пре 2 година
родитељ
комит
47c3530d54
32 измењених фајлова са 7592 додато и 0 уклоњено
  1. 58 0
      src/main/java/com/ydtech/constants/enums/InsurKindGuoRen.java
  2. 204 0
      src/main/java/com/ydtech/modules/ins/controller/InsGuoRenController.java
  3. 73 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/CarModelReq.java
  4. 194 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/CarModelResp.java
  5. 172 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/CarPriceListResp.java
  6. 28 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/CarPriceMuchReq.java
  7. 182 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/CarPriceMuchResp.java
  8. 461 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/CarPriceReq.java
  9. 47 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/CarPriceResp.java
  10. 71 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/ChannelInfoDto.java
  11. 85 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/ChannelInfoResp.java
  12. 82 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/DecisionMakingInitReq.java
  13. 53 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/InsOrderStatusResp.java
  14. 158 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/InsuranceSlipReq.java
  15. 109 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/InsuranceSlipResp.java
  16. 413 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/NonAutoInsOrderReq.java
  17. 491 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/NonAutoInsResp.java
  18. 79 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/PayReq.java
  19. 40 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/PayResp.java
  20. 29 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/PolicyResp.java
  21. 853 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/PremiumReq.java
  22. 597 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/PremiumResp.java
  23. 154 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/RequestDto.java
  24. 43 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/ResponseDto.java
  25. 47 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/SignatureResp.java
  26. 65 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/SubmitAuditReq.java
  27. 34 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/SubmitAuditResp.java
  28. 100 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/VinQueryReq.java
  29. 101 0
      src/main/java/com/ydtech/modules/ins/model/guoRen/VinQueryResp.java
  30. 164 0
      src/main/java/com/ydtech/modules/ins/service/InsGuoRenApiService.java
  31. 2270 0
      src/main/java/com/ydtech/modules/ins/service/impl/InsGuoRenApiServiceImpl.java
  32. 135 0
      src/main/java/com/ydtech/utils/InsUtils.java

+ 58 - 0
src/main/java/com/ydtech/constants/enums/InsurKindGuoRen.java

@@ -0,0 +1,58 @@
+package com.ydtech.constants.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+
+/**
+ * @description: 险种   保险种类   国任
+ * @author: lig
+ * @date: 2023-08-21
+ */
+@Getter
+@AllArgsConstructor
+public enum InsurKindGuoRen {
+
+    B("20B", "机动车第三者责任保险","33"," 1  1"),
+    A("20A", "机动车损失保险","34"," 1  1"),
+    D3("20D3", "机动车车上人员责任保险(驾驶员)","35"," 1  1"),
+    D4("20D4", "机动车车上人员责任保险(乘客)","37"," 1  1"),
+
+    MJ1("20E1", "附加绝对免赔率特约险(机动车损失保险)","39"," 2  0"),
+    MJ2("20E3", "附加绝对免赔率特约险(机动车第三者责任保险)","41"," 2  0"),
+    MJ3("20E4", "附加绝对免赔率特约险(机动车车上人员责任保险(司机))","42"," 2  0"),
+    MJ4("20E5", "附加绝对免赔率特约险(机动车车上人员责任保险(乘客))","43"," 2  0"),
+    BD("20J", "附加法定节假日限额翻倍险","45"," 2  0"),
+    L("20L", "附加车身划痕损失险","47"," 2  0"),
+    SY_FJ_YBW1("20Y", "附加医保外医疗费用责任险-三者险","54"," 2  0"),
+    SY_FJ_YBW3("20Y1", "附加医保外医疗费用责任险-驾驶员","55"," 2  0"),
+    SY_FJ_YBW2("20Y2", "附加医保外医疗费用责任险-乘客","56"," 2  0"),
+
+
+    ;
+
+    public static InsurKindGuoRen matchKey(String key) {
+        InsurKindGuoRen result = null;
+        for (InsurKindGuoRen e : values()) {
+            if (e.getCode() == key) {
+                result = e;
+                break;
+            }
+        }
+        return result;
+    }
+
+
+    @Getter
+    private String code;
+
+    @Getter
+    private String desc;
+    @Getter
+    private String itemKindNo;
+
+    @Getter
+    private String flag;
+
+
+}

+ 204 - 0
src/main/java/com/ydtech/modules/ins/controller/InsGuoRenController.java

@@ -0,0 +1,204 @@
+package com.ydtech.modules.ins.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ydtech.aop.request.RequestSingleParam;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.esm.dao.EsmInsAttachInsureDetailsMapper;
+import com.ydtech.modules.esm.dao.EsmInsAttachInsureMapper;
+import com.ydtech.modules.esm.model.EsmInsAttachInsure;
+import com.ydtech.modules.esm.model.EsmInsAttachInsureDetails;
+import com.ydtech.modules.esm.service.InsTaskImageService;
+import com.ydtech.modules.ins.model.guoRen.ChannelInfoDto;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.ya.CarModel_Req;
+import com.ydtech.modules.ins.model.yc.CallBackRequest;
+import com.ydtech.modules.ins.service.InsAlltrustApiService;
+import com.ydtech.modules.ins.service.InsGuoRenApiService;
+import com.ydtech.modules.order.components.InsOrdersComponents;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.vo.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.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.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 国任财险 API对接
+ *
+ * @author: lig
+ * @date: 2023-08-14
+ */
+@Api(tags = "国任财险API方式对接")
+@RestController
+@RequestMapping("/api/guoRen")
+public class InsGuoRenController {
+
+    private static final Logger log = LoggerFactory.getLogger("guoRen");
+
+    @Resource
+    InsGuoRenApiService insGuoRenApiService;
+
+    @Resource
+    InsAreaCompanyService insAreaCompanyService;
+
+    @ApiOperation(value = "通过渠道编码获取基本信息", notes = "获取出单所需的基本信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "thirdCode", value = "渠道编码", required = true, dataType = "String"),
+    })
+    @GetMapping("/channelInfo/{thirdCode}")
+    public HttpResult channelInfo(@PathVariable String thirdCode) {
+
+        return insGuoRenApiService.gainChannelInfo(thirdCode);
+    }
+
+
+    @ApiOperation(value = "车型查询", notes = "只需要vin码、发动机号、注册日期例:20120512")
+    @PostMapping("/modelQuery")
+    public HttpResult modelQueryAPI(@RequestBody CarInfoVo carInfo) {
+
+        return insGuoRenApiService.modelsQueryApi(carInfo);
+    }
+
+//    @ApiOperation(value = "VIN码查询", notes = "只需要vin码、发动机号")
+//    @PostMapping("/vinQuery")
+//    public HttpResult vinQuery(@RequestBody CarModel_Req carModelReq) {
+//
+//        return insGuoRenApiService.vinQueryApi(carModelReq);
+//    }
+//
+//    @ApiOperation(value = "API方式 - 车价查询")
+//    @PostMapping("/carPrice")
+//    public HttpResult carPrice(@RequestBody BaseQuoteVo<AccidentalDrivingVo> quoteVo) {
+//        return insGuoRenApiService.carPrice(quoteVo);
+//    }
+
+
+    @ApiResponses({
+            @ApiResponse(code = 500, message = "出现异常"),
+            @ApiResponse(code = 101, message = "转保单"),
+            @ApiResponse(code = 200, message = "请求成功")
+    })
+    @ApiOperation(value = "报价")
+    @PostMapping("/quote")
+    public HttpResult quoteApi(@RequestBody BaseQuoteVo<AccidentalDrivingVo> quoteVo) {
+//        BaseQuoteInfoVo quoteInfo = insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo());
+        return insGuoRenApiService.quoteApi(quoteVo);
+    }
+
+    @ApiOperation(value = "影像上传")
+    @PostMapping(value = "/uploadImage")
+    public HttpResult uploadImage(@RequestSingleParam(value = "companyId") String companyId) {
+
+        return insGuoRenApiService.uploadImageApi(companyId);
+    }
+
+    @ApiOperation(value = "支付")
+    @PostMapping(value = "/pay")
+    public HttpResult pay(@RequestSingleParam(value = "companyId") String companyId) {
+
+        return insGuoRenApiService.pay(companyId);
+    }
+
+    @ApiOperation(value = "核保")
+    @PostMapping("/audit")
+//    @MethodLogAnnotation(title = "永诚API方式 - 核保")
+    public HttpResult auditApi(@RequestSingleParam(value = "companyId") String companyId) {
+        return insGuoRenApiService.auditApi(companyId);
+    }
+
+
+    @ApiOperation(value = "更新订单信息")
+    @PostMapping("/updateOrderInfo")
+    public HttpResult updateOrderInfoByIns(@RequestSingleParam(value = "companyId") String companyId) {
+        return insGuoRenApiService.insOrderInfo(companyId);
+    }
+    @ApiOperation(value = "回调通知")
+    @PostMapping(value = "/callBack")
+    public HttpResult callBackApi(HttpServletRequest request) {
+        return insGuoRenApiService.callBackApi(request);
+
+    }
+
+    @ApiOperation(value = "电子保单")
+    @PostMapping("/policyPrint")
+    public HttpResult getPolicyPrintApi(@RequestBody PolicyPrintVo policyPrintVo) {
+//    public HttpResult getPolicyPrintApi(String companyId,String type) {
+        return insGuoRenApiService.getPolicyPrintApi(policyPrintVo);
+    }
+//
+//    /**
+//     * 获得意外险列表
+//     */
+//    @ApiOperation(value = "永诚API方式 -意外险列表")
+//    @PostMapping("/gainAccidentList")
+//    public HttpResult<List<EsmInsAttachInsure>> gainAccidentList(@RequestBody @Valid AccidentalDrivingQueryVo accidentalDrivingVo) {
+//
+//        LambdaQueryWrapper<EsmInsAttachInsure> lqw = new LambdaQueryWrapper<EsmInsAttachInsure>();
+//        lqw.eq(EsmInsAttachInsure::getCompanyId, accidentalDrivingVo.getCompanyCode());
+//        lqw.eq(accidentalDrivingVo.getSeatNum() > 0, EsmInsAttachInsure::getSeating, accidentalDrivingVo.getSeatNum());
+//        List<EsmInsAttachInsure> eiaiList = esmInsAttachInsureMapper.selectList(lqw);
+//        return HttpResult.ok(eiaiList);
+//
+//    }
+//
+    /**
+     * 同步非车保险
+     */
+    @ApiOperation(value = " 同步非车保险")
+    @PostMapping("/syncNonAutoIns")
+    public HttpResult syncNonAutoIns() {
+
+        //家用车驾乘意外险-山西版(02746425173001)
+        String goodsCode = "02746425173001";
+        return HttpResult.ok(insGuoRenApiService.gainNonAutoInsList(goodsCode));
+
+
+    }
+
+
+    /**
+     * 同步驾意险
+     */
+    @ApiOperation(value = "同步驾意险")
+    @PostMapping("/syncAccidentInsure")
+    public HttpResult syncAccidentInsure(@RequestBody @Valid AccidentalDrivingQueryVo accidentalDrivingVo) {
+        return insGuoRenApiService.syncAccidentInsure(accidentalDrivingVo);
+    }
+
+//
+//    /**
+//     * 获取地区 通过身份证地址
+//     */
+//    @ApiOperation(value = "永诚API方式 - 身份证地址获取地区")
+//    @PostMapping("/addressGainArea")
+//    public HttpResult syncAccidentInsure(String address) {
+//        Map<String, String> ownerMap = insYongchengApiService.gainRegionCode(address);
+//
+//        if (null == ownerMap) {
+//            throw new SystemException("地区获取失败,请检查参数是否正确。");
+//
+//        }
+//
+//        return HttpResult.ok(ownerMap);
+//    }
+
+
+
+}

+ 73 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/CarModelReq.java

@@ -0,0 +1,73 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.ya.CarModel_Req;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 3.1车型查询入参
+ */
+@NoArgsConstructor
+@Data
+public class CarModelReq {
+
+
+    @JsonProperty("codeType")
+    private String codeType;
+    @JsonProperty("validStatus")
+    private String validStatus;
+    @JsonProperty("codeMethod")
+    private String codeMethod;
+    @JsonProperty("codeClass")
+    private String codeClass;
+    @JsonProperty("codeValue")
+    private String codeValue;
+    @JsonProperty("fieldext")
+    private String fieldext;
+    @JsonProperty("riskCode")
+    private String riskCode;
+    @JsonProperty("comCode")
+    private String comCode;
+    @JsonProperty("methodCode")
+    private String methodCode;
+    @JsonProperty("reserve1")
+    private String reserve1;
+    @JsonProperty("reserve2")
+    private String reserve2;
+    @JsonProperty("reserve3")
+    private String reserve3;
+    @JsonProperty("startDateBI")
+    private String startDateBI;
+    @JsonProperty("startDateCI")
+    private String startDateCI;
+
+
+    /**
+     *  构造车型请求参数
+     *
+     * @author: lig
+     * @date: 2023年08月14日 0014
+     */
+    @JsonIgnore
+    public static CarModelReq buildCarModelParam(CarInfoVo carInfo){
+
+        CarModelReq carModel = new CarModelReq();
+        carModel.setCodeType("ModelCode");
+        carModel.setCodeMethod("select");
+        carModel.setCodeClass("");
+        carModel.setCodeValue(carInfo.getCiCarName());
+
+        carModel.setComCode("215500A3");
+        carModel.setValidStatus("1");
+        carModel.setRiskCode("0500");
+        carModel.setStartDateBI("2023-08-15");
+        carModel.setStartDateCI("2023-08-15");
+
+        return carModel;
+
+    }
+}

+ 194 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/CarModelResp.java

@@ -0,0 +1,194 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 3.1车型查询 响应
+ */
+@NoArgsConstructor
+@Data
+public class CarModelResp {
+
+
+    @JsonProperty("content")
+    private ContentDTO content;
+    @JsonProperty("msg")
+    private String msg;
+    @JsonProperty("code")
+    private String code;
+    @JsonProperty("codeType")
+    private String codeType;
+    @JsonProperty("codeData")
+    private List<CodeDataDTO> codeData;
+    @JsonProperty("list")
+    private List<?> list;
+
+    @NoArgsConstructor
+    @Data
+    public static class ContentDTO {
+        @JsonProperty("msg")
+        private Object msg;
+        @JsonProperty("code")
+        private Object code;
+        @JsonProperty("message")
+        private Object message;
+        @JsonProperty("messageStr")
+        private Object messageStr;
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class CodeDataDTO {
+        @JsonProperty("codeCode")
+        private String codeCode;
+        @JsonProperty("codeName")
+        private String codeName;
+        @JsonProperty("clausesContent")
+        private String clausesContent;
+        @JsonProperty("vehiclefgwCode")
+        private String vehiclefgwCode;
+        @JsonProperty("hfstarttime")
+        private String hfstarttime;
+        @JsonProperty("hfendtime")
+        private String hfendtime;
+        @JsonProperty("ext")
+        private ExtDTO ext;
+
+        @NoArgsConstructor
+        @Data
+        public static class ExtDTO {
+            @JsonProperty("handlerCode")
+            private Object handlerCode;
+            @JsonProperty("prospectNo")
+            private Object prospectNo;
+            @JsonProperty("inteProspectNo")
+            private Object inteProspectNo;
+            @JsonProperty("comCode")
+            private Object comCode;
+            @JsonProperty("channelType")
+            private Object channelType;
+            @JsonProperty("organizeCode")
+            private Object organizeCode;
+            @JsonProperty("seatCount")
+            private String seatCount;
+            @JsonProperty("rateTypeFlag")
+            private Object rateTypeFlag;
+            @JsonProperty("calculateFlag1")
+            private Object calculateFlag1;
+            @JsonProperty("attachFlag")
+            private Object attachFlag;
+            @JsonProperty("userCode")
+            private Object userCode;
+            @JsonProperty("userName")
+            private Object userName;
+            @JsonProperty("industry")
+            private Object industry;
+            @JsonProperty("sonCodeCode")
+            private Object sonCodeCode;
+            @JsonProperty("sonCodeName")
+            private Object sonCodeName;
+            @JsonProperty("profession")
+            private Object profession;
+            @JsonProperty("power")
+            private String power;
+            @JsonProperty("powerLB")
+            private String powerLB;
+            @JsonProperty("alarmFlag")
+            private Object alarmFlag;
+            @JsonProperty("aliasName")
+            private Object aliasName;
+            @JsonProperty("brandCode")
+            private Object brandCode;
+            @JsonProperty("carbrand")
+            private String carbrand;
+            @JsonProperty("carkind")
+            private String carkind;
+            @JsonProperty("carseriesCode")
+            private Object carseriesCode;
+            @JsonProperty("carSeriesName")
+            private Object carSeriesName;
+            @JsonProperty("carstyle")
+            private String carstyle;
+            @JsonProperty("caryear")
+            private Object caryear;
+            @JsonProperty("coefficient1")
+            private Object coefficient1;
+            @JsonProperty("coefficient2")
+            private Object coefficient2;
+            @JsonProperty("completekerbmass")
+            private Integer completekerbmass;
+            @JsonProperty("completekerbmassMin")
+            private Object completekerbmassMin;
+            @JsonProperty("countryCode")
+            private Object countryCode;
+            @JsonProperty("exhaustScale")
+            private Double exhaustScale;
+            @JsonProperty("exhaustScalelb")
+            private String exhaustScalelb;
+            @JsonProperty("factory")
+            private String factory;
+            @JsonProperty("familyCode")
+            private Object familyCode;
+            @JsonProperty("flag")
+            private Object flag;
+            @JsonProperty("importFlag")
+            private Object importFlag;
+            @JsonProperty("jqxclassName")
+            private Object jqxclassName;
+            @JsonProperty("kindredPrice")
+            private Object kindredPrice;
+            @JsonProperty("kindredPriceTax")
+            private Object kindredPriceTax;
+            @JsonProperty("modelCode")
+            private Object modelCode;
+            @JsonProperty("modelName")
+            private Object modelName;
+            @JsonProperty("newfuelModel")
+            private String newfuelModel;
+            @JsonProperty("purchasePrice")
+            private String purchasePrice;
+            @JsonProperty("purchasePricelb")
+            private Double purchasePricelb;
+            @JsonProperty("purchasePriceother")
+            private Object purchasePriceother;
+            @JsonProperty("purchasePricesz")
+            private Object purchasePricesz;
+            @JsonProperty("remark")
+            private Object remark;
+            @JsonProperty("riskScope")
+            private Object riskScope;
+            @JsonProperty("seatCountlb")
+            private Integer seatCountlb;
+            @JsonProperty("seatMax")
+            private Object seatMax;
+            @JsonProperty("seatMin")
+            private Object seatMin;
+            @JsonProperty("shorthandCode")
+            private Object shorthandCode;
+            @JsonProperty("stopFlag")
+            private Object stopFlag;
+            @JsonProperty("sumTon")
+            private Object sumTon;
+            @JsonProperty("syxClassName")
+            private Object syxClassName;
+            @JsonProperty("tonCount")
+            private String tonCount;
+            @JsonProperty("tonCountlb")
+            private String tonCountlb;
+            @JsonProperty("transMissionType")
+            private Object transMissionType;
+            @JsonProperty("validDate")
+            private Object validDate;
+            @JsonProperty("validStatus")
+            private Object validStatus;
+            @JsonProperty("vehiclealias")
+            private Object vehiclealias;
+            @JsonProperty("vehiclefgwCode")
+            private Object vehiclefgwCode;
+        }
+    }
+}

+ 172 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/CarPriceListResp.java

@@ -0,0 +1,172 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+public class CarPriceListResp {
+
+
+    @JsonProperty("resultCode")
+    private Integer resultCode;
+    @JsonProperty("resultMsg")
+    private String resultMsg;
+    @JsonProperty("data")
+    private DataDTO data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JsonProperty("cars")
+        private List<CarsDTO> cars;
+        @JsonProperty("inputvo")
+        private String inputvo;
+
+        @NoArgsConstructor
+        @Data
+        public static class CarsDTO {
+            @JsonProperty("startDateBI")
+            private String startDateBI;
+            @JsonProperty("currentDate")
+            private String currentDate;
+            @JsonProperty("clauseTypeBI")
+            private String clauseTypeBI;
+            @JsonProperty("businessNatureFlag")
+            private String businessNatureFlag;
+            @JsonProperty("searchSequenceNo")
+            private String searchSequenceNo;
+            @JsonProperty("actualValue")
+            private String actualValue;
+            @JsonProperty("compromisePrice")
+            private String compromisePrice;
+            @JsonProperty("noticeType")
+            private String noticeType;
+            @JsonProperty("countryNature")
+            private String countryNature;
+            @JsonProperty("pureRiskPremiumFlag")
+            private String pureRiskPremiumFlag;
+            @JsonProperty("carName")
+            private String carName;
+            @JsonProperty("pureRiskPremium")
+            private String pureRiskPremium;
+            @JsonProperty("totalVehicleWeight")
+            private String totalVehicleWeight;
+            @JsonProperty("carBrand")
+            private String carBrand;
+            @JsonProperty("derailleurType")
+            private String derailleurType;
+            @JsonProperty("modelName")
+            private String modelName;
+            @JsonProperty("tonCount")
+            private String tonCount;
+            @JsonProperty("modelDesc")
+            private String modelDesc;
+            @JsonProperty("riskFlag")
+            private String riskFlag;
+            @JsonProperty("carSeriesName")
+            private String carSeriesName;
+            @JsonProperty("modelCode")
+            private String modelCode;
+            @JsonProperty("printBrandName")
+            private String printBrandName;
+            @JsonProperty("makeDate")
+            private String makeDate;
+            @JsonProperty("vehicleBrand")
+            private String vehicleBrand;
+            @JsonProperty("licenseCategory")
+            private String licenseCategory;
+            @JsonProperty("licenseNo")
+            private String licenseNo;
+            @JsonProperty("licenseKindCode")
+            private String licenseKindCode;
+            @JsonProperty("frameNo")
+            private String frameNo;
+            @JsonProperty("carOwner")
+            private String carOwner;
+            @JsonProperty("purchasePriceSign")
+            private String purchasePriceSign;
+            @JsonProperty("fuelType")
+            private String fuelType;
+            @JsonProperty("carVhicleModel")
+            private String carVhicleModel;
+            @JsonProperty("modelCodeGX")
+            private String modelCodeGX;
+            @JsonProperty("oldModelCode")
+            private String oldModelCode;
+            @JsonProperty("bjTradeName")
+            private String bjTradeName;
+            @JsonProperty("bjBrand")
+            private String bjBrand;
+            @JsonProperty("bjSeries")
+            private String bjSeries;
+            @JsonProperty("bjCarName")
+            private String bjCarName;
+            @JsonProperty("bjNoticeType")
+            private String bjNoticeType;
+            @JsonProperty("bjCategoryName")
+            private String bjCategoryName;
+            @JsonProperty("bjDeptName")
+            private String bjDeptName;
+            @JsonProperty("bjPureRiskPremium")
+            private String bjPureRiskPremium;
+            @JsonProperty("brandName")
+            private String brandName;
+            @JsonProperty("seatCountLB")
+            private String seatCountLB;
+            @JsonProperty("exhaustScale")
+            private String exhaustScale;
+            @JsonProperty("exhaustScaleLB")
+            private String exhaustScaleLB;
+            @JsonProperty("tonCountLB")
+            private String tonCountLB;
+            @JsonProperty("purchasePriceLB")
+            private String purchasePriceLB;
+            @JsonProperty("purchasePriceOrigin")
+            private String purchasePriceOrigin;
+            @JsonProperty("purchasePriceNoTaxFlag")
+            private String purchasePriceNoTaxFlag;
+            @JsonProperty("completeKerbMassNew")
+            private String completeKerbMassNew;
+            @JsonProperty("aliasName")
+            private String aliasName;
+            @JsonProperty("carYear")
+            private String carYear;
+            @JsonProperty("purchasePriceNotax")
+            private String purchasePriceNotax;
+            @JsonProperty("kindredPriceNotax")
+            private String kindredPriceNotax;
+            @JsonProperty("kindredPrice")
+            private String kindredPrice;
+            @JsonProperty("remark")
+            private String remark;
+            @JsonProperty("alarmFlag")
+            private String alarmFlag;
+            @JsonProperty("carStyle")
+            private String carStyle;
+            @JsonProperty("shTradeName")
+            private String shTradeName;
+            @JsonProperty("shSeries")
+            private String shSeries;
+            @JsonProperty("shCarName")
+            private String shCarName;
+            @JsonProperty("shCategoryName")
+            private String shCategoryName;
+            @JsonProperty("shDeptName")
+            private String shDeptName;
+            @JsonProperty("shPureRiskPremium")
+            private String shPureRiskPremium;
+            @JsonProperty("completeKerbMass")
+            private String completeKerbMass;
+            @JsonProperty("errorCode")
+            private String errorCode;
+            @JsonProperty("errorMessage")
+            private String errorMessage;
+            @JsonProperty("engineNo")
+            private String engineNo;
+        }
+    }
+}

+ 28 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/CarPriceMuchReq.java

@@ -0,0 +1,28 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeId;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ *  车价查询多条  请求
+ *
+ * @author: lig
+ * @date: 2023年10月18日 0018
+ */
+@NoArgsConstructor
+@Data
+public class CarPriceMuchReq {
+
+
+    //车价查询返回inputvo
+    @JSONField(name="uuid")
+    private String uuid;
+
+    @JSONField(name ="carPriceQueryRespVo")
+    private CarPriceMuchResp.DataDTO.CarsDTO carPriceMuchResp;
+
+
+}

+ 182 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/CarPriceMuchResp.java

@@ -0,0 +1,182 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ *  车价 响应  多条
+ *
+ * @author: lig
+ * @date: 2023年10月17日 0017
+ */
+@NoArgsConstructor
+@Data
+public class CarPriceMuchResp {
+    @JsonProperty("resultCode")
+    private Integer resultCode;
+    @JsonProperty("resultMsg")
+    private String resultMsg;
+    @JsonProperty("data")
+    private DataDTO data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JsonProperty("cars")
+        private List<CarsDTO> cars;
+        @JsonProperty("inputvo")
+        private String inputvo;
+
+        @NoArgsConstructor
+        @Data
+        public static class CarsDTO {
+            @JsonProperty("startDateBI")
+            private String startDateBI;
+            @JsonProperty("currentDate")
+            private String currentDate;
+            @JsonProperty("clauseTypeBI")
+            private String clauseTypeBI;
+            @JsonProperty("businessNatureFlag")
+            private String businessNatureFlag;
+            @JsonProperty("searchSequenceNo")
+            private String searchSequenceNo;
+            @JsonProperty("actualValue")
+            private String actualValue;
+            @JsonProperty("compromisePrice")
+            private String compromisePrice;
+            @JsonProperty("noticeType")
+            private String noticeType;
+            @JsonProperty("countryNature")
+            private String countryNature;
+            @JsonProperty("pureRiskPremiumFlag")
+            private String pureRiskPremiumFlag;
+            @JsonProperty("carName")
+            private String carName;
+            @JsonProperty("pureRiskPremium")
+            private String pureRiskPremium;
+            @JsonProperty("totalVehicleWeight")
+            private String totalVehicleWeight;
+            @JsonProperty("carBrand")
+            private String carBrand;
+            @JsonProperty("derailleurType")
+            private String derailleurType;
+            @JsonProperty("modelName")
+            private String modelName;
+            @JsonProperty("tonCount")
+            private String tonCount;
+            @JsonProperty("modelDesc")
+            private String modelDesc;
+            @JsonProperty("riskFlag")
+            private String riskFlag;
+            @JsonProperty("carSeriesName")
+            private String carSeriesName;
+            @JsonProperty("modelCode")
+            private String modelCode;
+            @JsonProperty("printBrandName")
+            private String printBrandName;
+            @JsonProperty("makeDate")
+            private String makeDate;
+            @JsonProperty("vehicleBrand")
+            private String vehicleBrand;
+            @JsonProperty("licenseCategory")
+            private String licenseCategory;
+            @JsonProperty("licenseNo")
+            private String licenseNo;
+            @JsonProperty("licenseKindCode")
+            private String licenseKindCode;
+            @JsonProperty("frameNo")
+            private String frameNo;
+            @JsonProperty("carOwner")
+            private String carOwner;
+            @JsonProperty("purchasePriceSign")
+            private String purchasePriceSign;
+            @JsonProperty("fuelType")
+            private String fuelType;
+            @JsonProperty("carVhicleModel")
+            private String carVhicleModel;
+            @JsonProperty("modelCodeGX")
+            private String modelCodeGX;
+            @JsonProperty("oldModelCode")
+            private String oldModelCode;
+            @JsonProperty("bjTradeName")
+            private String bjTradeName;
+            @JsonProperty("bjBrand")
+            private String bjBrand;
+            @JsonProperty("bjSeries")
+            private String bjSeries;
+            @JsonProperty("bjCarName")
+            private String bjCarName;
+            @JsonProperty("bjNoticeType")
+            private String bjNoticeType;
+            @JsonProperty("bjCategoryName")
+            private String bjCategoryName;
+            @JsonProperty("bjDeptName")
+            private String bjDeptName;
+            @JsonProperty("bjPureRiskPremium")
+            private String bjPureRiskPremium;
+            @JsonProperty("brandName")
+            private String brandName;
+            @JsonProperty("seatCountLB")
+            private String seatCountLB;
+            @JsonProperty("exhaustScale")
+            private String exhaustScale;
+            @JsonProperty("exhaustScaleLB")
+            private String exhaustScaleLB;
+            @JsonProperty("tonCountLB")
+            private String tonCountLB;
+            @JsonProperty("purchasePriceLB")
+            private String purchasePriceLB;
+            @JsonProperty("purchasePriceOrigin")
+            private String purchasePriceOrigin;
+            @JsonProperty("purchasePriceNoTaxFlag")
+            private String purchasePriceNoTaxFlag;
+            @JsonProperty("completeKerbMassNew")
+            private String completeKerbMassNew;
+            @JsonProperty("aliasName")
+            private String aliasName;
+            @JsonProperty("carYear")
+            private String carYear;
+            @JsonProperty("purchasePriceNotax")
+            private String purchasePriceNotax;
+            @JsonProperty("kindredPriceNotax")
+            private String kindredPriceNotax;
+            @JsonProperty("kindredPrice")
+            private String kindredPrice;
+            @JsonProperty("remark")
+            private String remark;
+            @JsonProperty("alarmFlag")
+            private String alarmFlag;
+            @JsonProperty("carStyle")
+            private String carStyle;
+            @JsonProperty("shTradeName")
+            private String shTradeName;
+            @JsonProperty("shSeries")
+            private String shSeries;
+            @JsonProperty("shCarName")
+            private String shCarName;
+            @JsonProperty("shCategoryName")
+            private String shCategoryName;
+            @JsonProperty("shDeptName")
+            private String shDeptName;
+            @JsonProperty("shPureRiskPremium")
+            private String shPureRiskPremium;
+            @JsonProperty("completeKerbMass")
+            private String completeKerbMass;
+            @JsonProperty("errorCode")
+            private String errorCode;
+            @JsonProperty("errorMessage")
+            private String errorMessage;
+            @JsonProperty("engineNo")
+            private String engineNo;
+        }
+    }
+
+
+
+
+
+
+}

+ 461 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/CarPriceReq.java

@@ -0,0 +1,461 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import cn.hutool.core.date.DateUtil;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.constants.enums.InsuranceRisk;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
+import com.ydtech.modules.ins.model.vo.KindInfoVo;
+import com.ydtech.modules.ins.model.vo.RiskInfoVo;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.utils.StringUtils;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+public class CarPriceReq {
+
+
+    @JsonProperty("bc")
+    private BcDTO bc;
+    @JsonProperty("basePartVo")
+    private BasePartVoDTO basePartVo;
+    @JsonProperty("bi")
+    private BiDTO bi;
+    @JsonProperty("ci")
+    private CiDTO ci;
+
+    @NoArgsConstructor
+    @Data
+    public static class BcDTO {
+        @JsonProperty("prpTitemCar")
+        private PrpTitemCarDTO prpTitemCar;
+        @JsonProperty("loginComCode")
+        private String loginComCode;
+        @JsonProperty("prpTmain")
+        private PrpTmainDTO prpTmain;
+        @JsonProperty("feeandDiscountFlag")
+        private String feeandDiscountFlag;
+        @JsonProperty("riskCode")
+        private String riskCode;
+        @JsonProperty("agriFlagBC")
+        private String agriFlagBC;
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTitemCarDTO {
+            @JsonProperty("frameNo")
+            private String frameNo;
+            @JsonProperty("licenseNo")
+            private String licenseNo;
+            @JsonProperty("newEnergyFlag")
+            private String newEnergyFlag;
+            @JsonProperty("exhaustScalelb")
+            private String exhaustScalelb;
+            @JsonProperty("tonCount")
+            private String tonCount;
+            @JsonProperty("newCarFlag")
+            private String newCarFlag;
+            @JsonProperty("licenseKindCode")
+            private String licenseKindCode;
+            @JsonProperty("purchasePrice")
+            private String purchasePrice;
+            @JsonProperty("clauseType")
+            private String clauseType;
+            @JsonProperty("vinNo")
+            private String vinNo;
+            @JsonProperty("vehicleBrand")
+            private String vehicleBrand;
+            @JsonProperty("carOwner")
+            private String carOwner;
+            @JsonProperty("modelCode")
+            private String modelCode;
+            @JsonProperty("exhaustScale")
+            private String exhaustScale;
+            @JsonProperty("completeKerbMass")
+            private String completeKerbMass;
+            @JsonProperty("loanVehicleFlag")
+            private String loanVehicleFlag;
+            @JsonProperty("chgOwnerFlag")
+            private String chgOwnerFlag;
+            @JsonProperty("carOwnerIdentifyNumber")
+            private String carOwnerIdentifyNumber;
+            @JsonProperty("productType")
+            private String productType;
+            @JsonProperty("brandCode")
+            private String brandCode;
+            @JsonProperty("chgOwnerDate")
+            private String chgOwnerDate;
+            @JsonProperty("clauseTypeSystem")
+            private String clauseTypeSystem;
+            @JsonProperty("engineNo")
+            private String engineNo;
+            @JsonProperty("brandName")
+            private String brandName;
+            @JsonProperty("certifiCateDate")
+            private String certifiCateDate;
+            @JsonProperty("useNatureCode")
+            private String useNatureCode;
+            @JsonProperty("enrollDate")
+            private String enrollDate;
+            @JsonProperty("seatCount")
+            private String seatCount;
+            @JsonProperty("carOwnerIdentifyType")
+            private String carOwnerIdentifyType;
+            @JsonProperty("carOwnerNature")
+            private String carOwnerNature;
+            @JsonProperty("modelName")
+            private String modelName;
+            @JsonProperty("fuelType")
+            private String fuelType;
+            @JsonProperty("termsSystem")
+            private String termsSystem;
+            @JsonProperty("tonCountlb")
+            private String tonCountlb;
+            @JsonProperty("newFuelModel")
+            private String newFuelModel;
+            @JsonProperty("vinClick")
+            private String vinClick;
+            @JsonProperty("maincarKindCode")
+            private String maincarKindCode;
+
+            //车主证件有效期起期
+//            @JsonProperty("IDValidStartDate")
+            @JSONField(name = "IDValidStartDate")
+            private String IDValidStartDate;
+            //车主证件有效期止期
+            @JsonProperty("idValidDate")
+            private String idValidDate;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTmainDTO {
+            //代理人代码
+            @JsonProperty("agentCode")
+            private String agentCode;
+            //代理协议
+            @JsonProperty("agreementNo")
+            private String agreementNo;
+            @JsonProperty("unitmainTenanceType2Name")
+            private String unitmainTenanceType2Name;
+            @JsonProperty("channeltypeone")
+            private String channeltypeone;
+            @JsonProperty("argueSolution")
+            private String argueSolution;
+            @JsonProperty("handler1Name")
+            private String handler1Name;
+            @JsonProperty("channeltypetwo")
+            private String channeltypetwo;
+            @JsonProperty("agentName")
+            private String agentName;
+            @JsonProperty("unitMaintenanceName")
+            private String unitMaintenanceName;
+            @JsonProperty("businessNature")
+            private String businessNature;
+            @JsonProperty("activityPlan")
+            private String activityPlan;
+            @JsonProperty("signDate")
+            private String signDate;
+            @JsonProperty("handlerCode")
+            private String handlerCode;
+            @JsonProperty("channeltypeoneName")
+            private String channeltypeoneName;
+            @JsonProperty("unitMaintenanceCode")
+            private String unitMaintenanceCode;
+            @JsonProperty("unitmainTenanceType1")
+            private String unitmainTenanceType1;
+            @JsonProperty("unitmainTenanceType2")
+            private String unitmainTenanceType2;
+            @JsonProperty("channeltypetwoName")
+            private String channeltypetwoName;
+            @JsonProperty("handler1Code")
+            private String handler1Code;
+            @JsonProperty("comName")
+            private String comName;
+            @JsonProperty("comCode")
+            private String comCode;
+            @JsonProperty("operateDate")
+            private String operateDate;
+            @JsonProperty("startDate")
+            private String startDate;
+            @JsonProperty("eProposalFlag")
+            private String eProposalFlag;
+            @JsonProperty("business")
+            private String business;
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class BasePartVoDTO {
+
+        /**
+         * 编辑类型
+         *  投保单录入 EditType_ProposalInput
+         * 投保单修改
+         * EditType_ProposalModify
+         */
+        @JsonProperty("editType")
+        private String editType;
+
+        /**
+         * 输入类型
+         * 34-同保
+         *
+         */
+        @JsonProperty("inputType")
+        private String inputType;
+
+        /**
+         * 登录机构
+         *
+         */
+        @JsonProperty("loginComCode")
+        private String loginComCode;
+
+        /**
+         * 登录机构地区编码
+         * 取登录机构前两位
+         *
+         */
+        @JsonProperty("loginComCodeSub")
+        private String loginComCodeSub;
+
+        /**
+         * 险种代码
+         * 0500同保
+         *
+         */
+        @JsonProperty("loginRiskCode")
+        private String loginRiskCode;
+
+        /**
+         * 业务员代码
+         *
+         */
+        @JsonProperty("userCode")
+        private String userCode;
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class BiDTO {
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class CiDTO {
+    }
+
+
+    @JsonIgnore
+    public static CarPriceReq buildCarPriceParam(BaseQuoteInfoVo yaQuoteInfoVo, VinQueryResp.DataDTO vinQ, ChannelInfoDto channelInfo) {
+        CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
+        CustomerInfoVo ownerInfo = yaQuoteInfoVo.getOwnerInfo();
+        List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
+        List<KindInfoVo> kindInfoVList = yaQuoteInfoVo.getKindList();
+        //交强
+        RiskInfoVo ciRiskInfo = (RiskInfoVo) riskList.stream().filter(x -> x.getRiskCode().equals(InsuranceRisk.TRAFFIC.getCode())).findFirst().orElse(null);
+        //商业
+        RiskInfoVo biRiskInfo = (RiskInfoVo) riskList.stream().filter(x -> x.getRiskCode().equals(InsuranceRisk.BUSINESS.getCode())).findFirst().orElse(null);
+
+//        riskList.stream().forEach(a ->{
+//            if(a.getRiskCode().equals("0507")){
+//                ciRiskInfo = a;
+//            }
+//        });
+
+
+        CarPriceReq req = new CarPriceReq();
+
+        BcDTO bc = new BcDTO();
+        bc.setLoginComCode(channelInfo.getComCode());
+
+
+        /**
+         *  主信息====================
+         */
+        BcDTO.PrpTmainDTO prpTmain = new BcDTO.PrpTmainDTO();
+        //机构代码
+        prpTmain.setComCode(channelInfo.getComCode());
+        prpTmain.setArgueSolution("1");
+
+
+        prpTmain.setUnitMaintenanceName(channelInfo.getUnitMaintenanceName());
+        prpTmain.setBusinessNature("2");
+        //渠道标志(我司提供)
+        prpTmain.setActivityPlan("TQDL");
+        //签单时间	signDate	字符串	Y	默认为投保当天
+        prpTmain.setSignDate(DateUtil.today());
+        prpTmain.setHandlerCode(channelInfo.getHandlerCode());
+        prpTmain.setChanneltypeoneName(channelInfo.getChannelTypeOneName());
+        prpTmain.setUnitMaintenanceCode(channelInfo.getUnitMaintenanceCode());
+        prpTmain.setUnitmainTenanceType1(channelInfo.getUnitmainTenanceType1());
+        prpTmain.setUnitmainTenanceType2(channelInfo.getUnitmainTenanceType2());
+        prpTmain.setChanneltypetwoName(channelInfo.getChannelTypeTwoName());
+        prpTmain.setHandler1Code(channelInfo.getHandlerCode());
+        prpTmain.setComName(channelInfo.getComName());
+        prpTmain.setComCode(channelInfo.getComCode());
+        prpTmain.setOperateDate(DateUtil.today());
+        //起保日期      商业险起保日期,如果单交强,传交强起保日期
+        prpTmain.setStartDate(biRiskInfo == null ? ciRiskInfo.getStartDate() : biRiskInfo.getStartDate());
+        prpTmain.setEProposalFlag("1");
+        //购车发票日期
+        prpTmain.setBusiness(carInfo.getIssueDate());
+
+
+        prpTmain.setAgentName(channelInfo.getAgentName());
+        prpTmain.setChanneltypetwoName(channelInfo.getChannelTypeTwoName());
+        prpTmain.setChanneltypeoneName(channelInfo.getChannelTypeOneName());
+        //代理人
+        prpTmain.setAgentCode(channelInfo.getAgentCode());
+        prpTmain.setAgreementNo(channelInfo.getAgreementNo());
+        prpTmain.setUnitmainTenanceType2Name(channelInfo.getUnitmainTenanceType2Name());
+        prpTmain.setChanneltypeone(channelInfo.getChannelTypeOne());
+        prpTmain.setHandler1Name(channelInfo.getHandler1Name());
+        prpTmain.setChanneltypetwo(channelInfo.getChannelTypeTwo());
+
+
+
+        /**
+         *  车辆信息====================
+         */
+        BcDTO.PrpTitemCarDTO prpTitemCar = new BcDTO.PrpTitemCarDTO();
+        prpTitemCar.setFrameNo(carInfo.getFrameNo());
+        prpTitemCar.setLicenseNo(carInfo.getLicenseNo());
+        prpTitemCar.setNewEnergyFlag("0");
+        //类比排量
+        prpTitemCar.setExhaustScalelb(vinQ.getExHaustScale());
+        //排量
+        prpTitemCar.setExhaustScale(vinQ.getExHaustScale());
+//        prpTitemCar.setTonCount(carInfo.getLimitLoad());
+        prpTitemCar.setTonCount(vinQ.getTonCount());
+        //新车标识	newCarFlag	字符串	新车传空,非新车-1
+        prpTitemCar.setNewCarFlag(StringUtils.isEmpty(carInfo.getLicenseNo()) ? "" : "-1");
+        prpTitemCar.setLicenseKindCode("02");
+        prpTitemCar.setPurchasePrice(vinQ.getPurchasePriceSZ());
+        prpTitemCar.setClauseType("F54");
+        prpTitemCar.setVinNo(carInfo.getVinNo());
+        prpTitemCar.setVehicleBrand(vinQ.getBrandNameBC());
+//        prpTitemCar.setVehicleBrand(carInfo.getCarBrand());
+
+        prpTitemCar.setCompleteKerbMass(vinQ.getCompleteKerbMass());
+        prpTitemCar.setLoanVehicleFlag("0");
+        prpTitemCar.setChgOwnerFlag(carInfo.isTransferFlag() ? "1" : "0");
+        prpTitemCar.setProductType("0101");
+        prpTitemCar.setClauseTypeSystem("04");
+        prpTitemCar.setEngineNo(carInfo.getEngineNo());
+        prpTitemCar.setBrandName(vinQ.getBrandNameBC());
+        prpTitemCar.setCertifiCateDate(carInfo.getIssueDate());
+        //使用性质  8A	家庭自用
+        prpTitemCar.setUseNatureCode("8A");
+        //初登日期
+        prpTitemCar.setEnrollDate(carInfo.getIssueDate());
+        //核定载客数
+        prpTitemCar.setSeatCount(carInfo.getSeatCount());
+        prpTitemCar.setFuelType("0");
+        prpTitemCar.setTermsSystem("04");
+        prpTitemCar.setTonCountlb(vinQ.getTonCount());
+//        prpTitemCar.setTonCountlb("0");
+        prpTitemCar.setVinClick("0");
+        prpTitemCar.setMaincarKindCode("A");
+
+        //过户日期
+        prpTitemCar.setChgOwnerDate(carInfo.getTransferDate());
+
+
+        /**
+         * vin car
+         */
+        prpTitemCar.setBrandCode(vinQ.getBrandCode());
+        prpTitemCar.setModelCode(vinQ.getModelCodeBC());
+        prpTitemCar.setModelName(vinQ.getBrandNameBC());
+        prpTitemCar.setNewFuelModel(vinQ.getNewFuelModel());
+
+
+        /**
+         * 车主信息
+         */
+        prpTitemCar.setCarOwner(ownerInfo.getName());
+        prpTitemCar.setCarOwnerIdentifyNumber(ownerInfo.getIdentifyNumber());
+        prpTitemCar.setCarOwnerIdentifyType("01");
+        //车主客户性质	carOwnerNature	字符串	Y	1:机关 2:企业 0:个人
+        prpTitemCar.setCarOwnerNature("0");
+        prpTitemCar.setIDValidStartDate(ownerInfo.getIdentifyValidDate());
+        prpTitemCar.setIdValidDate(ownerInfo.getIdentifyValidEndDate());
+
+
+        /**
+         *  整合
+         */
+        bc.setPrpTmain(prpTmain);
+        bc.setPrpTitemCar(prpTitemCar);
+        //登录机构
+        bc.setLoginComCode(channelInfo.getComCode());
+
+        //保费计算折扣    0是第一次计算保费,1是价费联动,2是批折扣,默认0
+        bc.setFeeandDiscountFlag("0");
+
+        //险种信息  0500-车险 摩托车、拖拉机的商业险-0521
+        bc.setRiskCode("0500");
+
+        //是否涉及农险业务  默认0
+        bc.setAgriFlagBC("0");
+
+
+
+        BasePartVoDTO basePartVo = new BasePartVoDTO();
+        basePartVo.setEditType("EditType_ProposalInput");
+        basePartVo.setInputType("34");
+        basePartVo.setLoginComCode(channelInfo.getComCode());
+        basePartVo.setLoginComCodeSub(channelInfo.getComCode().substring(0,2));
+//        basePartVo.setLoginRiskCode("0500");
+        basePartVo.setUserCode(channelInfo.getAgentCode());
+
+
+
+
+        req.setBi(new BiDTO());
+        req.setCi(new CiDTO());
+
+        req.setBc(bc);
+        req.setBasePartVo(basePartVo);
+        return req;
+
+    }
+
+
+//    private static BcDTO.PrpTmainDTO buildPrpTmain(){
+//        BcDTO.PrpTmainDTO tmain = new BcDTO.PrpTmainDTO();
+//        tmain.setUnitmainTenanceType2Name();
+//        "unitmainTenanceType2Name":"直通网销",
+//                "channeltypeone":"60",
+//                "argueSolution":"1",
+//                "handler1Name":"徐丽",
+//                "channeltypetwo":"0201",
+//                "agentName":"徐丽",
+//                "unitMaintenanceName":"南京测试标准件",
+//                "businessNature":"0",
+//                "activityPlan":"IXX",
+//                "signDate":"2022-06-17",
+//                "handlerCode":"S0300042",
+//                "channeltypeoneName":"行销",
+//                "unitMaintenanceCode":"0315G022105203121",
+//                "unitmainTenanceType1":"G",
+//                "unitmainTenanceType2":"06",
+//                "channeltypetwoName":"行销传统",
+//                "handler1Code":"S0300042",
+//                "comName":"江苏南京溧水支公司个客综合",
+//                "comCode":"031514A3",
+//                "operateDate":"2022-06-17",
+//                "startDate":"2022-06-18",
+//                "eProposalFlag":"1",
+//                "business":"2020-06-18"
+//    }
+}

+ 47 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/CarPriceResp.java

@@ -0,0 +1,47 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+/**
+ *  车价 响应  单条
+ *
+ * @author: lig
+ * @date: 2023年10月17日 0017
+ */
+@NoArgsConstructor
+@Data
+public class CarPriceResp {
+
+
+    @JsonProperty("resultCode")
+    private Integer resultCode;
+    @JsonProperty("resultMsg")
+    private String resultMsg;
+    @JsonProperty("data")
+    private DataDTO data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JsonProperty("basepureriskpremium")
+        private String basepureriskpremium;
+        @JsonProperty("modelCode")
+        private String modelCode;
+        @JsonProperty("inputvo")
+        private String inputvo;
+        @JsonProperty("actualValue")
+        private Double actualValue;
+        @JsonProperty("noticeType")
+        private String noticeType;
+        @JsonProperty("derailleurType")
+        private String derailleurType;
+        @JsonProperty("carCountryNature")
+        private String carCountryNature;
+
+
+
+    }
+}

+ 71 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/ChannelInfoDto.java

@@ -0,0 +1,71 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ydtech.modules.order.entity.config.ConfigureParameters;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 渠道信息 获取配置的信息
+ */
+@NoArgsConstructor
+@Data
+public class ChannelInfoDto implements ConfigureParameters {
+
+
+    @JSONField(name = "areaCode")
+    private String areaCode;
+    @JSONField(name = "areaName")
+    private String areaName;
+
+    @JSONField(name = "comName")
+    private String comName;
+    @JSONField(name = "businessNature")
+    private String businessNature;
+    @JSONField(name = "comCode")
+    private String comCode;
+
+    //userCode
+    @JSONField(name = "handlerCode")
+    private String handlerCode;
+    @JSONField(name = "agentCode")
+    private String agentCode;
+    @JSONField(name = "agreementNo")
+    private String agreementNo;
+    @JSONField(name = "unitMaintenanceCode")
+    private String unitMaintenanceCode;
+    @JSONField(name = "unitmainTenanceType1")
+    private String unitmainTenanceType1;
+    @JSONField(name = "unitmainTenanceType2")
+    private String unitmainTenanceType2;
+    @JSONField(name = "unitMaintenanceName")
+    private String unitMaintenanceName;
+    @JSONField(name = "unitmainTenanceType1Name")
+    private String unitmainTenanceType1Name;
+    @JSONField(name = "unitmainTenanceType2Name")
+    private String unitmainTenanceType2Name;
+    @JSONField(name = "channelTypeOne")
+    private String channelTypeOne;
+    @JSONField(name = "channelTypeOneName")
+    private String channelTypeOneName;
+    @JSONField(name = "channelTypeTwo")
+    private String channelTypeTwo;
+    @JSONField(name = "channelTypeTwoName")
+    private String channelTypeTwoName;
+    @JSONField(name = "upDateTime")
+    private String upDateTime;
+    @JSONField(name = "handler1Name")
+    private String handler1Name;
+    @JSONField(name = "agentName")
+    private String agentName;
+    @JSONField(name = "deGentType")
+    private String deGentType;
+    @JSONField(name = "saleGentType")
+    private String saleGentType;
+    //归属业务员名称
+    private String handlerName;
+
+
+}

+ 85 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/ChannelInfoResp.java

@@ -0,0 +1,85 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.order.entity.config.ConfigureParameters;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 渠道信息 响应
+ */
+@NoArgsConstructor
+@Data
+public class ChannelInfoResp {
+
+
+    @JSONField(name="resultCode")
+    private Integer resultCode;
+    @JSONField(name="data")
+    private List<DataDTO> data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO implements ConfigureParameters{
+        @JSONField(name="prptmain")
+        private PrptmainDTO prptmain;
+        @JSONField(name="areaCode")
+        private String areaCode;
+        @JSONField(name="areaName")
+        private String areaName;
+
+        @NoArgsConstructor
+        @Data
+        public static class PrptmainDTO  {
+            @JSONField(name="comName")
+            private String comName;
+            @JSONField(name="businessNature")
+            private String businessNature;
+            @JSONField(name="comCode")
+            private String comCode;
+
+            //userCode
+            @JSONField(name="handlerCode")
+            private String handlerCode;
+            @JSONField(name="agentCode")
+            private String agentCode;
+            @JSONField(name="agreementNo")
+            private String agreementNo;
+            @JSONField(name="unitMaintenanceCode")
+            private String unitMaintenanceCode;
+            @JSONField(name="unitmainTenanceType1")
+            private String unitmainTenanceType1;
+            @JSONField(name="unitmainTenanceType2")
+            private String unitmainTenanceType2;
+            @JSONField(name="unitMaintenanceName")
+            private String unitMaintenanceName;
+            @JSONField(name="unitmainTenanceType1Name")
+            private String unitmainTenanceType1Name;
+            @JSONField(name="unitmainTenanceType2Name")
+            private String unitmainTenanceType2Name;
+            @JSONField(name="channelTypeOne")
+            private String channelTypeOne;
+            @JSONField(name="channelTypeOneName")
+            private String channelTypeOneName;
+            @JSONField(name="channelTypeTwo")
+            private String channelTypeTwo;
+            @JSONField(name="channelTypeTwoName")
+            private String channelTypeTwoName;
+            @JSONField(name="upDateTime")
+            private String upDateTime;
+            @JSONField(name="handler1Name")
+            private String handler1Name;
+            @JSONField(name="agentName")
+            private String agentName;
+            @JSONField(name="deGentType")
+            private String deGentType;
+            @JSONField(name="saleGentType")
+            private String saleGentType;
+            //归属业务员名称
+            private String handlerName;
+        }
+    }
+}

+ 82 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/DecisionMakingInitReq.java

@@ -0,0 +1,82 @@
+//package com.ydtech.modules.ins.model.guoRen;
+//
+//import com.alibaba.fastjson.annotation.JSONField;
+//import com.fasterxml.jackson.annotation.JsonIgnore;
+//import com.fasterxml.jackson.annotation.JsonProperty;
+//import lombok.Data;
+//import lombok.NoArgsConstructor;
+//
+///**
+// * 决策单元 入参
+// */
+//@NoArgsConstructor
+//@Data
+//public class DecisionMakingInitReq {
+//
+//    @JSONField(name="codeType")
+//    private String codeType;
+//    @JSONField(name="validStatus")
+//    private String validStatus;
+//    @JSONField(name="codeMethod")
+//    private String codeMethod;
+//    @JSONField(name="codeClass")
+//    private String codeClass;
+//    @JSONField(name="codeValue")
+//    private String codeValue;
+//    @JSONField(name="fieldext")
+//    private String fieldext;
+//    @JSONField(name="codeCode")
+//    private String codeCode;
+//    @JSONField(name="codeCName")
+//    private String codeCName;
+//    @JSONField(name="riskCode")
+//    private String riskCode;
+//    @JSONField(name="comCode")
+//    private String comCode;
+//    @JSONField(name="userCode")
+//    private String userCode;
+//    @JSONField(name="upperCode")
+//    private String upperCode;
+//    @JSONField(name="methodCode")
+//    private String methodCode;
+//    @JSONField(name="reserve1")
+//    private String reserve1;
+//    @JSONField(name="reserve2")
+//    private String reserve2;
+//    @JSONField(name="reserve3")
+//    private String reserve3;
+//    @JSONField(name="reserve4")
+//    private String reserve4;
+//    @JSONField(name="startDateBI")
+//    private String startDateBI;
+//    @JSONField(name="startDateCI")
+//    private String startDateCI;
+//    @JSONField(name="agentCode")
+//    private String agentCode;
+//
+//
+//    @JsonIgnore
+//    public static DecisionMakingInitReq buildParam(ChannelInfoResp channelInfo) {
+//
+//        DecisionMakingInitReq req = new DecisionMakingInitReq();
+//        req.setCodeType("PrpdunitMain");
+//        req.setValidStatus("");
+//        req.setCodeMethod("select");
+//        req.setCodeClass("codeClass");
+//        req.setCodeValue("");
+//        req.setFieldext("");
+//        req.setCodeCName(channelInfo.getData().get(0).getPrptmain().getHandler1Name());
+//        req.setRiskCode("0500");
+//        req.setComCode(channelInfo.getData().get(0).getPrptmain().getComCode());
+//        req.setUserCode(channelInfo.getData().get(0).getPrptmain().getU);
+//
+//
+//
+//        vinReq.setComCode(channelInfo.getData().get(0).getPrptmain().getComCode());
+//        vinReq.setUserCode(channelInfo.getData().get(0).getPrptmain().getHandlerCode());
+//
+//
+//        return vinReq;
+//
+//    }
+//}

+ 53 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/InsOrderStatusResp.java

@@ -0,0 +1,53 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 投保单状态查询 出参
+ */
+@NoArgsConstructor
+@Data
+public class InsOrderStatusResp {
+
+    @JSONField(name="resultCode")
+    private Integer resultCode;
+    @JSONField(name="resultMsg")
+    private String resultMsg;
+    @JSONField(name="data")
+    private List<DataDTO> data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+
+        /**
+         * 投保单号
+         */
+        @JSONField(name="proposalNo")
+        private String proposalNo;
+
+        /**
+         * 保单号
+         */
+        @JSONField(name="policyNo")
+        private String policyNo;
+
+        /**
+         * 核保状态
+         * (0初始值/1通过/2不通过/3 无需核保 /9待核保/)
+         */
+        @JSONField(name="underwriteFlag")
+        private String underwriteFlag;
+
+        /**
+         * 其他状态
+         * 0是正常,2是删除
+         */
+        @JSONField(name="othFlag")
+        private String othFlag;
+    }
+}

+ 158 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/InsuranceSlipReq.java

@@ -0,0 +1,158 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 投保单保存 入参
+ */
+@NoArgsConstructor
+@Data
+public class InsuranceSlipReq {
+
+
+    @JSONField(name="uuid")
+    private String uuid;
+    @JSONField(name="prpTinsured")
+    private PrpTinsuredDTO prpTinsured;
+    @JSONField(name="biPrptenages")
+    private List<?> biPrptenages;
+    @JSONField(name="ciPrptenages")
+    private List<CiPrptenagesDTO> ciPrptenages;
+
+
+    /**
+     *  构造请求参数
+     */
+    @JsonIgnore
+    public static InsuranceSlipReq buildParam(BaseQuoteInfoVo yaQuoteInfoVo,String carPriceNum){
+
+        //投保人
+        CustomerInfoVo policyHolderInfo = yaQuoteInfoVo.getPolicyHolderInfo();
+        //被保人
+        CustomerInfoVo insuredPersonInfo = yaQuoteInfoVo.getInsuredPersonInfo();
+
+        InsuranceSlipReq req = new InsuranceSlipReq();
+
+        req.setUuid(carPriceNum);
+
+        PrpTinsuredDTO prpTinsured = new PrpTinsuredDTO();
+        /**
+         *  投保人信息
+         */
+        prpTinsured.setAppliName(policyHolderInfo.getName());
+        //投保人性质	appliInsuredNature	字符串	Y	3自然人,4法人
+        prpTinsured.setAppliInsuredNature("3");
+        prpTinsured.setAppliIdentifyType("01");
+        prpTinsured.setAppliIdentifyNumber(policyHolderInfo.getIdentifyNumber());
+        prpTinsured.setAppliMobile(policyHolderInfo.getMobile());
+        prpTinsured.setAppliAddress(policyHolderInfo.getAddr());
+        prpTinsured.setAppliPostCode("");
+        prpTinsured.setAppliIDValidStartDate(policyHolderInfo.getIdentifyValidDate());
+        prpTinsured.setAppliIDValidDate(policyHolderInfo.getIdentifyValidEndDate());
+        prpTinsured.setAppliValidDateLongFlag("1");
+        prpTinsured.setAppliNationality("中国");
+
+
+
+        /**
+         *  被保人信息
+         */
+        prpTinsured.setInsuredName(insuredPersonInfo.getName());
+        //投保人性质	appliInsuredNature	字符串	Y	3自然人,4法人
+        prpTinsured.setInsuredInsuredNature("3");
+        prpTinsured.setInsuredIdentifyType("01");
+        prpTinsured.setInsuredIdentifyNumber(insuredPersonInfo.getIdentifyNumber());
+        prpTinsured.setInsuredMobile(insuredPersonInfo.getMobile());
+        prpTinsured.setInsuredAddress(insuredPersonInfo.getAddr());
+        prpTinsured.setInsuredPostCode("");
+        prpTinsured.setInsuredIDValidStartDate(insuredPersonInfo.getIdentifyValidDate());
+        prpTinsured.setInsuredIDValidDate(insuredPersonInfo.getIdentifyValidEndDate());
+        prpTinsured.setInsuredValidDateLongFlag("1");
+        prpTinsured.setInsuredNationality("中国");
+
+
+
+
+
+        req.setPrpTinsured(prpTinsured);
+        req.setBiPrptenages(null);
+        req.setCiPrptenages(null);
+        return req;
+
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class PrpTinsuredDTO {
+        @JSONField(name="appliName")
+        private String appliName;
+        @JSONField(name="appliInsuredNature")
+        private String appliInsuredNature;
+        @JSONField(name="appliIdentifyType")
+        private String appliIdentifyType;
+        @JSONField(name="appliIdentifyNumber")
+        private String appliIdentifyNumber;
+        @JSONField(name="appliMobile")
+        private String appliMobile;
+        @JSONField(name="appliAddress")
+        private String appliAddress;
+        @JSONField(name="appliPostCode")
+        private String appliPostCode;
+        @JSONField(name="insuredName")
+        private String insuredName;
+        @JSONField(name="insuredInsuredNature")
+        private String insuredInsuredNature;
+        @JSONField(name="insuredMobile")
+        private String insuredMobile;
+        @JSONField(name="insuredIdentifyType")
+        private String insuredIdentifyType;
+        @JSONField(name="insuredIdentifyNumber")
+        private String insuredIdentifyNumber;
+        @JSONField(name="insuredAddress")
+        private String insuredAddress;
+        @JSONField(name="insuredPostCode")
+        private String insuredPostCode;
+        @JSONField(name="appliIDValidStartDate")
+        private String appliIDValidStartDate;
+        @JSONField(name="appliIDValidDate")
+        private String appliIDValidDate;
+        @JSONField(name="appliValidDateLongFlag")
+        private String appliValidDateLongFlag;
+        @JSONField(name="appliNationality")
+        private String appliNationality;
+        @JSONField(name="insuredIDValidStartDate")
+        private String insuredIDValidStartDate;
+        @JSONField(name="insuredValidDateLongFlag")
+        private String insuredValidDateLongFlag;
+        @JSONField(name="insuredNationality")
+        private String insuredNationality;
+        @JSONField(name="insuredIDValidDate")
+        private String insuredIDValidDate;
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class CiPrptenagesDTO {
+        @JSONField(name="serialNo")
+        private Integer serialNo;
+        @JSONField(name="clauseCode")
+        private String clauseCode;
+        @JSONField(name="clauses")
+        private String clauses;
+        @JSONField(name="clausesContext")
+        private String clausesContext;
+        @JSONField(name="flag")
+        private String flag;
+        @JSONField(name="select")
+        private Boolean select;
+    }
+}

+ 109 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/InsuranceSlipResp.java

@@ -0,0 +1,109 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 投保单保存 出参
+ */
+@NoArgsConstructor
+@Data
+public class InsuranceSlipResp {
+
+
+    @JSONField(name="resultCode")
+    private Integer resultCode;
+    @JSONField(name="resultMsg")
+    private String resultMsg;
+    @JSONField(name="data")
+    private DataDTO data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JSONField(name="itemVOList")
+        private List<ItemVOListDTO> itemVOList;
+        @JSONField(name="prpTitemCarVo")
+        private PrpTitemCarVoDTO prpTitemCarVo;
+        @JSONField(name="proposalNoDetailVo")
+        private ProposalNoDetailVoDTO proposalNoDetailVo;
+        @JSONField(name="minsuredVo")
+        private MinsuredVoDTO minsuredVo;
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTitemCarVoDTO {
+            @JSONField(name="licenseNo")
+            private String licenseNo;
+            @JSONField(name="frameNo")
+            private String frameNo;
+            @JSONField(name="engineNo")
+            private String engineNo;
+            @JSONField(name="brandName")
+            private String brandName;
+            @JSONField(name="enrollDate")
+            private String enrollDate;
+            @JSONField(name="chgOwnerFlag")
+            private String chgOwnerFlag;
+            @JSONField(name="carOwner")
+            private String carOwner;
+            @JSONField(name="carOwnerIdentifyType")
+            private String carOwnerIdentifyType;
+            @JSONField(name="carOwnerIdentifyNumber")
+            private String carOwnerIdentifyNumber;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ProposalNoDetailVoDTO {
+            @JSONField(name="proposalNoBI")
+            private String proposalNoBI;
+            @JSONField(name="proposalNoCI")
+            private String proposalNoCI;
+            @JSONField(name="companyName")
+            private String companyName;
+            @JSONField(name="orderNo")
+            private String orderNo;
+            @JSONField(name="sumPremium")
+            private Double sumPremium;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class MinsuredVoDTO {
+            @JSONField(name="appliName")
+            private String appliName;
+            @JSONField(name="appliIdentifyType")
+            private String appliIdentifyType;
+            @JSONField(name="appliIdentifyNumber")
+            private String appliIdentifyNumber;
+            @JSONField(name="appliMobile")
+            private String appliMobile;
+            @JSONField(name="insuredName")
+            private String insuredName;
+            @JSONField(name="insuredMobile")
+            private String insuredMobile;
+            @JSONField(name="insuredIdentifyType")
+            private String insuredIdentifyType;
+            @JSONField(name="insuredIdentifyNumber")
+            private String insuredIdentifyNumber;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ItemVOListDTO {
+            @JSONField(name="kindCode")
+            private String kindCode;
+            @JSONField(name="noTaxPremium")
+            private Double noTaxPremium;
+            @JSONField(name="premium")
+            private Double premium;
+            @JSONField(name="taxFee")
+            private Double taxFee;
+        }
+    }
+}

+ 413 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/NonAutoInsOrderReq.java

@@ -0,0 +1,413 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import cn.hutool.core.date.DateUtil;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.ydtech.constants.enums.InsuranceRisk;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
+import com.ydtech.modules.ins.model.vo.KindInfoVo;
+import com.ydtech.modules.ins.model.vo.RiskInfoVo;
+import com.ydtech.modules.ins.model.yc.ruote.Applicant;
+import com.ydtech.modules.ins.model.yc.ruote.Insured;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+import com.ydtech.utils.StringUtils;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * 非车保险订单 入参
+ */
+@NoArgsConstructor
+@Data
+public class NonAutoInsOrderReq {
+
+
+    @JSONField(name = "channelCode")
+    private String channelCode;
+    @JSONField(name = "data")
+    private DataDTO data;
+    @JSONField(name = "othBusinessNo")
+    private String othBusinessNo;
+    @JSONField(name = "requestTime")
+    private String requestTime;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JSONField(name = "orderList")
+        private List<OrderListDTO> orderList;
+
+        @NoArgsConstructor
+        @Data
+        public static class OrderListDTO {
+            @JSONField(name = "insuredList")
+            private List<InsuredListDTO> insuredList;
+            @JSONField(name = "objCarList")
+            private List<ObjCarListDTO> objCarList;
+            @JSONField(name = "orderAppl")
+            private OrderApplDTO orderAppl;
+            @JSONField(name = "orderMain")
+            private OrderMainDTO orderMain;
+            @JSONField(name = "planList")
+            private List<PlanListDTO> planList;
+            @JSONField(name = "salesmanList")
+            private List<SalesmanListDTO> salesmanList;
+
+            @NoArgsConstructor
+            @Data
+            public static class OrderApplDTO {
+                @JSONField(name = "applName")
+                private String applName;
+                @JSONField(name = "applType")
+                private String applType;
+                @JSONField(name = "certfNo")
+                private String certfNo;
+                @JSONField(name = "certfType")
+                private String certfType;
+                @JSONField(name = "contactName")
+                private String contactName;
+                @JSONField(name = "phoneNo")
+                private String phoneNo;
+            }
+
+            @NoArgsConstructor
+            @Data
+            public static class OrderMainDTO {
+                @JSONField(name = "amount")
+                private Integer amount;
+                @JSONField(name = "endDate")
+                private String endDate;
+                @JSONField(name = "goodsCode")
+                private String goodsCode;
+                @JSONField(name = "operatorCode")
+                private String operatorCode;
+                @JSONField(name = "othOrderNo")
+                private String othOrderNo;
+                @JSONField(name = "premium")
+                private Integer premium;
+                @JSONField(name = "prodCode")
+                private String prodCode;
+                @JSONField(name = "renewalInd")
+                private Integer renewalInd;
+                @JSONField(name = "riskCode")
+                private List<String> riskCode;
+                @JSONField(name = "startDate")
+                private String startDate;
+                @JSONField(name = "uwCount")
+                private Integer uwCount;
+                @JSONField(name = "businessMode")
+                private String businessMode;
+                @JSONField(name = "businessSource")
+                private String businessSource;
+            }
+
+            @NoArgsConstructor
+            @Data
+            public static class InsuredListDTO {
+                @JSONField(name = "certfNo")
+                private String certfNo;
+                @JSONField(name = "certfType")
+                private String certfType;
+                @JSONField(name = "countryName")
+                private String countryName;
+                @JSONField(name = "insuredName")
+                private String insuredName;
+                @JSONField(name = "insuredType")
+                private String insuredType;
+                @JSONField(name = "phoneNo")
+                private String phoneNo;
+                @JSONField(name = "planNo")
+                private String planNo;
+            }
+
+            @NoArgsConstructor
+            @Data
+            public static class ObjCarListDTO {
+                @JSONField(name = "carModels")
+                private String carModels;
+                @JSONField(name = "carType")
+                private String carType;
+                @JSONField(name = "carTypeCode")
+                private String carTypeCode;
+                @JSONField(name = "clnt")
+                private String clnt;
+                @JSONField(name = "frameNo")
+                private String frameNo;
+                @JSONField(name = "licenseNo")
+                private String licenseNo;
+                @JSONField(name = "planNo")
+                private String planNo;
+                @JSONField(name = "purchasePrice")
+                private Integer purchasePrice;
+                @JSONField(name = "seatNum")
+                private Integer seatNum;
+                @JSONField(name = "toncount")
+                private Double toncount;
+            }
+
+            @NoArgsConstructor
+            @Data
+            public static class PlanListDTO {
+                @JSONField(name = "occupationCode")
+                private String occupationCode;
+                @JSONField(name = "occupationGrade")
+                private String occupationGrade;
+                @JSONField(name = "occupationName")
+                private String occupationName;
+                @JSONField(name = "planNo")
+                private String planNo;
+                @JSONField(name = "quantity")
+                private String quantity;
+                @JSONField(name = "socialSecInd")
+                private String socialSecInd;
+            }
+
+            @NoArgsConstructor
+            @Data
+            public static class SalesmanListDTO {
+                @JSONField(name = "agentCode")
+                private String agentCode;
+                @JSONField(name = "companyCode")
+                private String companyCode;
+                @JSONField(name = "salesmanCode")
+                private String salesmanCode;
+                @JSONField(name = "salesmanFlag")
+                private Integer salesmanFlag;
+                @JSONField(name = "salesmanName")
+                private String salesmanName;
+                @JSONField(name = "serialNo")
+                private Integer serialNo;
+                @JSONField(name = "teamCode")
+                private String teamCode;
+                @JSONField(name = "teamName")
+                private String teamName;
+            }
+        }
+    }
+
+
+    /**
+     * 构造报价请求参数
+     */
+    @JsonIgnore
+    public static NonAutoInsOrderReq buildParam(BaseQuoteInfoVo yaQuoteInfoVo, VinQueryResp.DataDTO vinQ, AccidentalDrivingVo accidentalDrivingVo, ChannelInfoDto channelInfo, String carPriceUuid) {
+
+        //车辆信息
+        CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
+        //投保人
+        CustomerInfoVo policyHolder = yaQuoteInfoVo.getPolicyHolderInfo();
+        //被保人
+        CustomerInfoVo insuredPerson = yaQuoteInfoVo.getInsuredPersonInfo();
+
+        List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
+        //交强
+        RiskInfoVo ciRiskInfo = (RiskInfoVo) riskList.stream().filter(x -> x.getRiskCode().equals(InsuranceRisk.TRAFFIC.getCode())).findFirst().orElse(null);
+        //商业
+        RiskInfoVo biRiskInfo = (RiskInfoVo) riskList.stream().filter(x -> x.getRiskCode().equals(InsuranceRisk.BUSINESS.getCode())).findFirst().orElse(null);
+
+
+        NonAutoInsOrderReq req = new NonAutoInsOrderReq();
+        req.setChannelCode("TQDL");
+        //外部订单号	订单号或者uuid   使用的车价查询返回的
+        req.setOthBusinessNo(carPriceUuid);
+        req.setRequestTime(DateUtil.today());
+
+
+        List<DataDTO.OrderListDTO> orderList = new ArrayList();
+        DataDTO.OrderListDTO orderListDto = new DataDTO.OrderListDTO();
+
+        /**
+         * 被保险人信息
+         */
+        List<DataDTO.OrderListDTO.InsuredListDTO> insuredList = new ArrayList<>();
+        DataDTO.OrderListDTO.InsuredListDTO insuredListDTO = new DataDTO.OrderListDTO.InsuredListDTO();
+        insuredListDTO.setCertfNo(insuredPerson.getIdentifyNumber());
+        insuredListDTO.setCertfType("01");
+        insuredListDTO.setCountryName("中国");
+        insuredListDTO.setInsuredName(insuredPerson.getName());
+        //客户类型	insuredType	String	Y	 1-个人,2-企业
+        insuredListDTO.setInsuredType("1");
+        insuredListDTO.setPhoneNo(insuredPerson.getMobile());
+        insuredListDTO.setPlanNo("1");
+
+
+        insuredList.add(insuredListDTO);
+
+
+        /**
+         * 车辆信息
+         */
+        List<DataDTO.OrderListDTO.ObjCarListDTO> objCarList = new ArrayList<>();
+        DataDTO.OrderListDTO.ObjCarListDTO objCarListDTO = new DataDTO.OrderListDTO.ObjCarListDTO();
+        objCarListDTO.setCarModels(vinQ.getBrandNameBC());
+        objCarListDTO.setCarType("0");
+        //车辆性质
+        objCarListDTO.setCarTypeCode("8A");
+        //是否新车  1-是 2-否
+        objCarListDTO.setClnt(StringUtils.isNotEmpty(carInfo.getLicenseNo()) ? "2" : "1");
+        objCarListDTO.setFrameNo(carInfo.getFrameNo());
+        objCarListDTO.setLicenseNo(carInfo.getLicenseNo());
+        objCarListDTO.setPlanNo("1");
+        objCarListDTO.setPurchasePrice(StringUtils.toInt(vinQ.getPriceShow()));
+        objCarListDTO.setSeatNum(StringUtils.toInt(vinQ.getSeatCountBC()));
+        objCarListDTO.setToncount(StringUtils.toDouble(vinQ.getTonCount()));
+
+        objCarList.add(objCarListDTO);
+
+
+        /**
+         * 投保人信息
+         */
+        DataDTO.OrderListDTO.OrderApplDTO orderAppl = new DataDTO.OrderListDTO.OrderApplDTO();
+        orderAppl.setApplName(policyHolder.getName());
+        orderAppl.setApplType("1");
+        orderAppl.setCertfNo(policyHolder.getIdentifyNumber());
+        orderAppl.setCertfType("01");
+        orderAppl.setContactName(policyHolder.getName());
+        orderAppl.setPhoneNo(policyHolder.getMobile());
+
+
+        /**
+         * 订单信息
+         */
+        DataDTO.OrderListDTO.OrderMainDTO orderMain = new DataDTO.OrderListDTO.OrderMainDTO();
+        //( 总保额 = 份数*人数(特殊产品默认人数为1)*每份保额)
+        //@TODO 后续补
+        BigDecimal orderAmount = BigDecimal.ONE;
+        orderMain.setAmount(orderAmount.intValue());
+        orderMain.setPremium(orderAmount.intValue());
+
+        //yyyy-MM-dd hh:mm:ss搭售非车险保险起期规则:
+        //(1)搭售车险是即时生效的,非车险起期为车险起期的第二天0时。
+        //(2)搭售车险非即时生效的,非车险起期从车险保单起期。
+        if (null != ciRiskInfo && null != biRiskInfo) {
+            Date ciStartDate = DateUtil.parse(ciRiskInfo.getStartDate());
+            Date biStartDate = DateUtil.parse(biRiskInfo.getStartDate());
+            int ciBiCompare = DateUtil.compare(ciStartDate, biStartDate);
+            //1、非即时生效
+            if (StringUtils.isEmpty(ciRiskInfo.getInstantFlag()) && StringUtils.isEmpty(biRiskInfo.getInstantFlag())) {
+                if (ciBiCompare == 1) {
+                    //(1)交强起期 > 商业起期,非车起期取商业起期
+                    orderMain.setStartDate(biRiskInfo.getStartDate());
+                    orderMain.setEndDate(biRiskInfo.getEndDate());
+                } else if (ciBiCompare == -1) {
+                    //(2)交强起期 < 商业起期,非车起期取交强起期
+                    orderMain.setStartDate(ciRiskInfo.getStartDate());
+                    orderMain.setEndDate(ciRiskInfo.getEndDate());
+                } else if (ciBiCompare == 0) {
+                    //(3)交强起期 = 商业起期,非车起期任取
+                    orderMain.setStartDate(ciRiskInfo.getStartDate());
+                    orderMain.setEndDate(ciRiskInfo.getEndDate());
+                }
+            } else {
+                //2、即时生效
+                //(1)交强即时起保起期 > 商业起期,非车起期取商业起期(不含小时数据的起期)+1天
+                //(2)交强即时起保起期 > 商业即时起保起期,,非车起期取商业起期(不含小时数据的起期)+1天
+                //(3)交强起期 < 商业即时起保起期,取交强起期,非车起期取交强起期(不含小时数据的起期)+1天
+                //(4)交强即时起保起期 < 商业即时起保起期,取交强起期,非车起期取交强起期(不含小时数据的起期)+1天
+                //(5)交强起期 = 商业起期,非车起保(不含小时数据的起期)+1天期任取
+
+            }
+
+        }
+
+
+        //家用车驾乘意外险-山西版(02746425173001)
+        orderMain.setGoodsCode("02746425173001");
+        orderMain.setOperatorCode(channelInfo.getHandlerCode());
+        //订单号或UUID  不确定参数,暂时使用车价的uuid
+        orderMain.setOthOrderNo(carPriceUuid);
+        orderMain.setProdCode(accidentalDrivingVo.getRideRiskCode());
+        orderMain.setRenewalInd(StringUtils.isEmpty(carInfo.getLicenseNo()) ? 0 : 1);
+        //险种代码   数组
+        List<String> riskCodeList = new ArrayList<>();
+        orderMain.setRiskCode(riskCodeList);
+        orderMain.setUwCount(accidentalDrivingVo.getQuantity());
+        //1:鼓励类  4:其他类  6:网销类
+        orderMain.setBusinessMode("1");
+
+        //0:直接业务
+        //1:个人代理
+        //2:专业代理
+        //3:兼业代理
+        //4:经纪业务—境内经纪
+        //5:经纪业务—境外经纪
+        //6:电销业务
+        //7:柜台业务
+        //8:网上业务 ......
+        orderMain.setBusinessSource("2");
+
+
+        orderListDto.setInsuredList(insuredList);
+
+
+        /**
+         * 方案信息
+         */
+        List<DataDTO.OrderListDTO.PlanListDTO> planList = new ArrayList<>();
+        DataDTO.OrderListDTO.PlanListDTO planListDto = new DataDTO.OrderListDTO.PlanListDTO();
+        //按照示例传的
+        planListDto.setOccupationCode("0500020");
+        planListDto.setOccupationGrade("1");
+        planListDto.setOccupationName("其他");
+        planListDto.setPlanNo("1");
+        planListDto.setQuantity("1");
+        planListDto.setSocialSecInd("01");
+
+
+        planList.add(planListDto);
+
+
+        /**
+         *  业务员信息
+         */
+        List<DataDTO.OrderListDTO.SalesmanListDTO> salesmanList = new ArrayList<>();
+        DataDTO.OrderListDTO.SalesmanListDTO salesmanListDTO = new DataDTO.OrderListDTO.SalesmanListDTO();
+        salesmanListDTO.setAgentCode(channelInfo.getAgentCode());
+        salesmanListDTO.setCompanyCode(channelInfo.getComCode());
+        salesmanListDTO.setSalesmanCode(channelInfo.getHandlerCode());
+        //0-辅合作方,1-主合作方(默认1-主合作方
+        salesmanListDTO.setSalesmanFlag(1);
+        salesmanListDTO.setSalesmanName(channelInfo.getHandlerName());
+        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;
+
+
+    }
+
+
+}

+ 491 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/NonAutoInsResp.java

@@ -0,0 +1,491 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+
+/**
+ *  非车险   入参
+ *
+ * @author: lig
+ * @date: 2023-09-28
+ */
+@NoArgsConstructor
+@Data
+public class NonAutoInsResp {
+
+
+    @JSONField(name="code")
+    private Integer code;
+    @JSONField(name="data")
+    private DataDTO data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JSONField(name="goods")
+        private GoodsDTO goods;
+        @JSONField(name="goodsAgentSalesmanList")
+        private List<GoodsAgentSalesmanListDTO> goodsAgentSalesmanList;
+        @JSONField(name="goodsSalesInfo")
+        private GoodsSalesInfoDTO goodsSalesInfo;
+        @JSONField(name="goodsPrpallConfList")
+        private List<GoodsPrpallConfListDTO> goodsPrpallConfList;
+        @JSONField(name="goodsIntroduction")
+        private GoodsIntroductionDTO goodsIntroduction;
+        @JSONField(name="channelContactList")
+        private List<ChannelContactListDTO> channelContactList;
+        @JSONField(name="prodList")
+        private List<ProdListDTO> prodList;
+        @JSONField(name="checkRepeat")
+        private CheckRepeatDTO checkRepeat;
+        @JSONField(name="checkInsureDef")
+        private CheckInsureDefDTO checkInsureDef;
+
+        @NoArgsConstructor
+        @Data
+        public static class GoodsDTO {
+            @JSONField(name="id")
+            private Integer id;
+            @JSONField(name="goodsCode")
+            private String goodsCode;
+            @JSONField(name="goodsCName")
+            private String goodsCName;
+            @JSONField(name="goodsStatus")
+            private String goodsStatus;
+            @JSONField(name="businessType")
+            private String businessType;
+            @JSONField(name="businessSource")
+            private String businessSource;
+            @JSONField(name="issueWay")
+            private String issueWay;
+            @JSONField(name="underwritingType")
+            private String underwritingType;
+            @JSONField(name="codInd")
+            private String codInd;
+            @JSONField(name="demandNo")
+            private String demandNo;
+            @JSONField(name="backPolicyFlag")
+            private String backPolicyFlag;
+            @JSONField(name="payExpired")
+            private Integer payExpired;
+            @JSONField(name="auditStatus")
+            private String auditStatus;
+            @JSONField(name="enableInd")
+            private Integer enableInd;
+            @JSONField(name="officialInd")
+            private String officialInd;
+            @JSONField(name="printPlatformFlag")
+            private String printPlatformFlag;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class GoodsSalesInfoDTO {
+            @JSONField(name="id")
+            private Integer id;
+            @JSONField(name="goodsId")
+            private Integer goodsId;
+            @JSONField(name="groupFlag")
+            private String groupFlag;
+            @JSONField(name="lossRatio")
+            private Double lossRatio;
+            @JSONField(name="expectedCapacity")
+            private Integer expectedCapacity;
+            @JSONField(name="salesLine")
+            private String salesLine;
+            @JSONField(name="invalidFlag")
+            private Integer invalidFlag;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class GoodsIntroductionDTO {
+            @JSONField(name="id")
+            private Integer id;
+            @JSONField(name="goodsId")
+            private Integer goodsId;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CheckRepeatDTO {
+            @JSONField(name="id")
+            private Integer id;
+            @JSONField(name="chkRepCode")
+            private String chkRepCode;
+            @JSONField(name="chkRepDesc")
+            private String chkRepDesc;
+            @JSONField(name="chkType")
+            private String chkType;
+            @JSONField(name="batchInd")
+            private String batchInd;
+            @JSONField(name="scopeType")
+            private String scopeType;
+            @JSONField(name="cacheType")
+            private String cacheType;
+            @JSONField(name="repeatFlag")
+            private String repeatFlag;
+            @JSONField(name="chlRepeatFlag")
+            private String chlRepeatFlag;
+            @JSONField(name="chlCountLimit")
+            private Integer chlCountLimit;
+            @JSONField(name="enableInd")
+            private Integer enableInd;
+            @JSONField(name="invalidFlag")
+            private Integer invalidFlag;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CheckInsureDefDTO {
+            @JSONField(name="id")
+            private Integer id;
+            @JSONField(name="chkInsureCode")
+            private String chkInsureCode;
+            @JSONField(name="chkInsureDesc")
+            private String chkInsureDesc;
+            @JSONField(name="enableInd")
+            private Integer enableInd;
+            @JSONField(name="invalidFlag")
+            private Integer invalidFlag;
+            @JSONField(name="checkDate")
+            private CheckDateDTO checkDate;
+            @JSONField(name="checkBase")
+            private CheckBaseDTO checkBase;
+
+            @NoArgsConstructor
+            @Data
+            public static class CheckDateDTO {
+                @JSONField(name="id")
+                private Integer id;
+                @JSONField(name="chkDateCode")
+                private String chkDateCode;
+                @JSONField(name="chkDateDesc")
+                private String chkDateDesc;
+                @JSONField(name="chkDateFlag")
+                private String chkDateFlag;
+                @JSONField(name="dateImdFlag")
+                private String dateImdFlag;
+                @JSONField(name="lowerUnit")
+                private String lowerUnit;
+                @JSONField(name="lower")
+                private Integer lower;
+                @JSONField(name="upperUnit")
+                private String upperUnit;
+                @JSONField(name="upper")
+                private Integer upper;
+                @JSONField(name="startDateFormat")
+                private String startDateFormat;
+                @JSONField(name="endDateFormat")
+                private String endDateFormat;
+                @JSONField(name="intervalUnit")
+                private String intervalUnit;
+                @JSONField(name="invalidFlag")
+                private Integer invalidFlag;
+            }
+
+            @NoArgsConstructor
+            @Data
+            public static class CheckBaseDTO {
+                @JSONField(name="id")
+                private Integer id;
+                @JSONField(name="chkBaseCode")
+                private String chkBaseCode;
+                @JSONField(name="chkBaseDesc")
+                private String chkBaseDesc;
+                @JSONField(name="chkPremiumType")
+                private String chkPremiumType;
+                @JSONField(name="invalidFlag")
+                private Integer invalidFlag;
+            }
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class GoodsAgentSalesmanListDTO {
+            @JSONField(name="id")
+            private Integer id;
+            @JSONField(name="goodsId")
+            private Integer goodsId;
+            @JSONField(name="serialNo")
+            private Integer serialNo;
+            @JSONField(name="agentFlag")
+            private String agentFlag;
+            @JSONField(name="businessSource")
+            private String businessSource;
+            @JSONField(name="businessType")
+            private String businessType;
+            @JSONField(name="branchCom")
+            private String branchCom;
+            @JSONField(name="branchComName")
+            private String branchComName;
+            @JSONField(name="comCode")
+            private String comCode;
+            @JSONField(name="comName")
+            private String comName;
+            @JSONField(name="salesmanCode")
+            private String salesmanCode;
+            @JSONField(name="salesmanName")
+            private String salesmanName;
+            @JSONField(name="salesmanPhone")
+            private String salesmanPhone;
+            @JSONField(name="salesFlag")
+            private String salesFlag;
+            @JSONField(name="invalidFlag")
+            private Integer invalidFlag;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class GoodsPrpallConfListDTO {
+            @JSONField(name="id")
+            private Integer id;
+            @JSONField(name="goodsId")
+            private Integer goodsId;
+            @JSONField(name="confType")
+            private String confType;
+            @JSONField(name="codInd")
+            private String codInd;
+            @JSONField(name="underwritingType")
+            private String underwritingType;
+            @JSONField(name="issueWay")
+            private String issueWay;
+            @JSONField(name="officialInd")
+            private String officialInd;
+            @JSONField(name="invalidFlag")
+            private Integer invalidFlag;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ChannelContactListDTO {
+            @JSONField(name="id")
+            private Integer id;
+            @JSONField(name="comCode")
+            private String comCode;
+            @JSONField(name="comName")
+            private String comName;
+            @JSONField(name="channelCode")
+            private String channelCode;
+            @JSONField(name="channelName")
+            private String channelName;
+            @JSONField(name="channelDesc")
+            private String channelDesc;
+            @JSONField(name="invalidFlag")
+            private Integer invalidFlag;
+            @JSONField(name="demandNo")
+            private String demandNo;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ProdListDTO {
+            @JSONField(name="id")
+            private Integer id;
+            @JSONField(name="prodCode")
+            private String prodCode;
+            @JSONField(name="prodCName")
+            private String prodCName;
+            @JSONField(name="prodVersion")
+            private String prodVersion;
+            @JSONField(name="freeInsurance")
+            private String freeInsurance;
+            @JSONField(name="prodCategory")
+            private String prodCategory;
+            @JSONField(name="prodType")
+            private String prodType;
+            @JSONField(name="standardProdInd")
+            private String standardProdInd;
+            @JSONField(name="prodRisk")
+            private String prodRisk;
+            @JSONField(name="prodLine")
+            private String prodLine;
+            @JSONField(name="diyProdInd")
+            private String diyProdInd;
+            @JSONField(name="rescueInd")
+            private String rescueInd;
+            @JSONField(name="acciInd")
+            private String acciInd;
+            @JSONField(name="reinInd")
+            private String reinInd;
+            @JSONField(name="coinsInd")
+            private String coinsInd;
+            @JSONField(name="mnemonicCode")
+            private String mnemonicCode;
+            @JSONField(name="repeatCode")
+            private String repeatCode;
+            @JSONField(name="prodStatus")
+            private String prodStatus;
+            @JSONField(name="premium")
+            private Integer premium;
+            @JSONField(name="amount")
+            private Integer amount;
+            @JSONField(name="auditStatus")
+            private String auditStatus;
+            @JSONField(name="enableInd")
+            private Integer enableInd;
+            @JSONField(name="invalidFlag")
+            private Integer invalidFlag;
+            @JSONField(name="prodRiskList")
+            private List<ProdRiskListDTO> prodRiskList;
+            @JSONField(name="technologyInd")
+            private String technologyInd;
+
+            @NoArgsConstructor
+            @Data
+            public static class ProdRiskListDTO {
+                @JSONField(name="id")
+                private Integer id;
+                @JSONField(name="prodId")
+                private Integer prodId;
+                @JSONField(name="riskCode")
+                private String riskCode;
+                @JSONField(name="riskName")
+                private String riskName;
+                @JSONField(name="requiredRisk")
+                private String requiredRisk;
+                @JSONField(name="calcType")
+                private String calcType;
+                @JSONField(name="displayNo")
+                private Integer displayNo;
+                @JSONField(name="invalidFlag")
+                private Integer invalidFlag;
+                @JSONField(name="prodCvgList")
+                private List<ProdCvgListDTO> prodCvgList;
+                @JSONField(name="prodEngageList")
+                private List<ProdEngageListDTO> prodEngageList;
+                @JSONField(name="prodClauseList")
+                private List<ProdClauseListDTO> prodClauseList;
+                @JSONField(name="prodCvgLiabList")
+                private List<ProdCvgLiabListDTO> prodCvgLiabList;
+
+                @NoArgsConstructor
+                @Data
+                public static class ProdCvgListDTO {
+                    @JSONField(name="id")
+                    private Integer id;
+                    @JSONField(name="prodId")
+                    private Integer prodId;
+                    @JSONField(name="prodRiskId")
+                    private Integer prodRiskId;
+                    @JSONField(name="serialNo")
+                    private Integer serialNo;
+                    @JSONField(name="cvgCode")
+                    private String cvgCode;
+                    @JSONField(name="cvgName")
+                    private String cvgName;
+                    @JSONField(name="cvgFlag")
+                    private String cvgFlag;
+                    @JSONField(name="requiredCvg")
+                    private String requiredCvg;
+                    @JSONField(name="calculateInd")
+                    private String calculateInd;
+                    @JSONField(name="currency")
+                    private String currency;
+                    @JSONField(name="premium")
+                    private Integer premium;
+                    @JSONField(name="amount")
+                    private Integer amount;
+                    @JSONField(name="rate")
+                    private Integer rate;
+                    @JSONField(name="invalidFlag")
+                    private Integer invalidFlag;
+                }
+
+                @NoArgsConstructor
+                @Data
+                public static class ProdEngageListDTO {
+                    @JSONField(name="id")
+                    private Integer id;
+                    @JSONField(name="prodId")
+                    private Integer prodId;
+                    @JSONField(name="prodRiskId")
+                    private Integer prodRiskId;
+                    @JSONField(name="serialNo")
+                    private Integer serialNo;
+                    @JSONField(name="engageCode")
+                    private String engageCode;
+                    @JSONField(name="engageName")
+                    private String engageName;
+                    @JSONField(name="engageContext")
+                    private String engageContext;
+                    @JSONField(name="boldInd")
+                    private String boldInd;
+                    @JSONField(name="invalidFlag")
+                    private Integer invalidFlag;
+                }
+
+                @NoArgsConstructor
+                @Data
+                public static class ProdClauseListDTO {
+                    @JSONField(name="id")
+                    private Integer id;
+                    @JSONField(name="prodId")
+                    private Integer prodId;
+                    @JSONField(name="prodRiskId")
+                    private Integer prodRiskId;
+                    @JSONField(name="prodCvgId")
+                    private Integer prodCvgId;
+                    @JSONField(name="serialNo")
+                    private Integer serialNo;
+                    @JSONField(name="displayNo")
+                    private Integer displayNo;
+                    @JSONField(name="clauseCode")
+                    private String clauseCode;
+                    @JSONField(name="clauseName")
+                    private String clauseName;
+                    @JSONField(name="clauseFileName")
+                    private String clauseFileName;
+                    @JSONField(name="clauseFilePath")
+                    private String clauseFilePath;
+                    @JSONField(name="invalidFlag")
+                    private Integer invalidFlag;
+                    @JSONField(name="cvgCode")
+                    private String cvgCode;
+                }
+
+                @NoArgsConstructor
+                @Data
+                public static class ProdCvgLiabListDTO {
+                    @JSONField(name="id")
+                    private Integer id;
+                    @JSONField(name="prodId")
+                    private Integer prodId;
+                    @JSONField(name="prodCvgId")
+                    private Integer prodCvgId;
+                    @JSONField(name="prodCvgCode")
+                    private String prodCvgCode;
+                    @JSONField(name="serialNo")
+                    private Integer serialNo;
+                    @JSONField(name="liabCode")
+                    private String liabCode;
+                    @JSONField(name="liabName")
+                    private String liabName;
+                    @JSONField(name="requiredLiab")
+                    private String requiredLiab;
+                    @JSONField(name="liabCalculateInd")
+                    private String liabCalculateInd;
+                    @JSONField(name="currency")
+                    private String currency;
+                    @JSONField(name="liabPremium")
+                    private Integer liabPremium;
+                    @JSONField(name="liabAmount")
+                    private Integer liabAmount;
+                    @JSONField(name="liabRate")
+                    private Integer liabRate;
+                    @JSONField(name="unit")
+                    private String unit;
+                    @JSONField(name="invalidFlag")
+                    private Integer invalidFlag;
+                }
+            }
+        }
+    }
+
+
+
+}

+ 79 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/PayReq.java

@@ -0,0 +1,79 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.utils.StringUtils;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ *  支付   入参
+ *
+ * @author: lig
+ * @date: 2023年08月23日 0023
+ */
+@NoArgsConstructor
+@Data
+public class PayReq {
+
+
+    @JSONField(name="proposalNo")
+    private List<String> proposalNo;
+    @JSONField(name="channelFlag")
+    private String channelFlag;
+    @JSONField(name="amount")
+    private Double amount;
+    @JSONField(name="riskType")
+    private String riskType;
+    @JSONField(name="redirectUrl")
+    private String redirectUrl;
+    @JSONField(name="comCode")
+    private String comCode;
+    @JSONField(name="verificationCode")
+    private String verificationCode;
+    @JSONField(name="productCode")
+    private String productCode;
+    @JSONField(name="orderCode")
+    private String orderCode;
+
+    @JsonIgnore
+    public static PayReq buildParam(InsAreaCompany iac, String redirectUrl, ChannelInfoDto channelInfo) {
+
+
+        PayReq req = new PayReq();
+        List<String> proposalNoList = new ArrayList<>();
+        String ciStr = iac.getJqapplyno();
+        String biStr = iac.getSyapplyno();
+        if(StringUtils.isNotEmpty(ciStr)){
+            proposalNoList.add(ciStr);
+        }
+        if(StringUtils.isNotEmpty(biStr)){
+            proposalNoList.add(biStr);
+        }
+        req.setProposalNo(proposalNoList);
+
+        req.setChannelFlag("RBT");
+        //非车险(N);车险(Y);组合险(P)
+        req.setRiskType("Y");
+        req.setRedirectUrl(redirectUrl);
+        req.setComCode(channelInfo.getComCode());
+        req.setVerificationCode("");
+        req.setAmount(iac.getSumpremium().doubleValue());
+        //产品标识  车+意必录:CA
+//        req.setProductCode();
+        //非车订单号     车+意必录
+//        req.setOrderCode();
+
+
+
+        return req;
+
+    }
+
+
+}

+ 40 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/PayResp.java

@@ -0,0 +1,40 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+/**
+ *  支付   出参
+ *
+ * @author: lig
+ * @date: 2023-08-23
+ */
+@NoArgsConstructor
+@Data
+public class PayResp {
+
+
+    @JSONField(name="resultCode")
+    private Integer resultCode;
+    @JSONField(name="resultMsg")
+    private String resultMsg;
+    @JSONField(name="data")
+    private DataDTO data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JSONField(name="orderId")
+        private String orderId;
+        @JSONField(name="payUrl")
+        private String payUrl;
+        @JSONField(name="resultCode")
+        private String resultCode;
+        @JSONField(name="signmsg")
+        private String signmsg;
+        @JSONField(name="basePicture")
+        private String basePicture;
+    }
+}

+ 29 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/PolicyResp.java

@@ -0,0 +1,29 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+
+/**
+ *  保单   出参
+ *
+ * @author: lig
+ * @date: 2023-08-23
+ */
+@NoArgsConstructor
+@Data
+public class PolicyResp {
+
+
+    @JSONField(name="resultCode")
+    private Integer resultCode;
+    @JSONField(name="resultMsg")
+    private String resultMsg;
+    @JSONField(name="data")
+    private String data;
+
+}

+ 853 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/PremiumReq.java

@@ -0,0 +1,853 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateUtil;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.constants.enums.InsurKind;
+import com.ydtech.constants.enums.InsurKindGuoRen;
+import com.ydtech.modules.ins.model.dto.CarInsDateDto;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.vo.KindInfoVo;
+import com.ydtech.modules.ins.model.vo.RiskInfoVo;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.utils.DateTimeUtil;
+import com.ydtech.utils.InsUtils;
+import com.ydtech.utils.StringUtils;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.apache.http.client.utils.DateUtils;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Optional;
+
+
+/**
+ * 报价请求参数
+ */
+@NoArgsConstructor
+@Data
+public class PremiumReq {
+
+
+    @JsonProperty("ci")
+    private CiDTO ci;
+    @JsonProperty("bi")
+    private BiDTO bi;
+    @JsonProperty("actualValue")
+    private String actualValue;
+    @JsonProperty("uuid")
+    private String uuid;
+
+    @NoArgsConstructor
+    @Data
+    public static class CiDTO {
+        @JsonProperty("prpTrenewal")
+        private List<?> prpTrenewal;
+        @JsonProperty("prpTitemCar")
+        private PrpTitemCarDTO prpTitemCar;
+        @JsonProperty("prpTmain")
+        private PrpTmainDTO prpTmain;
+        @JsonProperty("inputRisk")
+        private String inputRisk;
+        @JsonProperty("prptitemkindList")
+        private List<PrptitemkindListDTO> prptitemkindList;
+        @JsonProperty("calculateFlagCI")
+        private String calculateFlagCI;
+        @JsonProperty("ciInsureDemand")
+        private CiInsureDemandDTO ciInsureDemand;
+        @JsonProperty("editType")
+        private String editType;
+        @JsonProperty("prpTmainRate")
+        private PrpTmainRateDTO prpTmainRate;
+        @JsonProperty("prpTcarshipTax")
+        private PrpTcarshipTaxDTO prpTcarshipTax;
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTitemCarDTO {
+            @JsonProperty("clauseTypeSystem")
+            private String clauseTypeSystem;
+            @JsonProperty("clauseType")
+            private String clauseType;
+            @JsonProperty("termsSystem")
+            private String termsSystem;
+            @JsonProperty("carOwner")
+            private String carOwner;
+            @JsonProperty("otherNature")
+            private String otherNature;
+            @JsonProperty("carOwnerIdentifyNumber")
+            private String carOwnerIdentifyNumber;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTmainDTO {
+            @JsonProperty("endDate")
+            private String endDate;
+            @JsonProperty("noCarFlag")
+            private String noCarFlag;
+            @JsonProperty("immeValiFlag")
+            private String immeValiFlag;
+            @JsonProperty("signDate")
+            private String signDate;
+            @JsonProperty("inputDate")
+            private String inputDate;
+            @JsonProperty("endHour")
+            private String endHour;
+            @JsonProperty("immeValidEndDate")
+            private String immeValidEndDate;
+            @JsonProperty("answer")
+            private String answer;
+            @JsonProperty("startHour")
+            private String startHour;
+            @JsonProperty("orderFlag")
+            private String orderFlag;
+            @JsonProperty("immeValidStartDate")
+            private String immeValidStartDate;
+            @JsonProperty("simpleOrderFlag")
+            private String simpleOrderFlag;
+            @JsonProperty("startDate")
+            private String startDate;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CiInsureDemandDTO {
+            @JsonProperty("demandNo")
+            private String demandNo;
+
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTmainRateDTO {
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTcarshipTaxDTO {
+            @JsonProperty("taxRelifFlag")
+            private String taxRelifFlag;
+            @JsonProperty("paidCertificate")
+            private String paidCertificate;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PrptitemkindListDTO {
+            @JsonProperty("amount")
+            private String amount;
+            @JsonProperty("kindCode")
+            private String kindCode;
+            @JsonProperty("flag")
+            private String flag;
+            @JsonProperty("endDate")
+            private String endDate;
+            @JsonProperty("isDeductible")
+            private String isDeductible;
+            @JsonProperty("rate")
+            private String rate;
+            @JsonProperty("deductible")
+            private String deductible;
+            @JsonProperty("kindName")
+            private String kindName;
+            @JsonProperty("taxFee")
+            private String taxFee;
+            @JsonProperty("noTaxPremium")
+            private String noTaxPremium;
+            @JsonProperty("startDate")
+            private String startDate;
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class BiDTO {
+        @JsonProperty("prpTrenewal")
+        private List<?> prpTrenewal;
+        @JsonProperty("prptengageList")
+        private List<?> prptengageList;
+        @JsonProperty("prpTitemCar")
+        private PrpTitemCarDTO prpTitemCar;
+        @JsonProperty("prpTmain")
+        private PrpTmainDTO prpTmain;
+        @JsonProperty("inputRisk")
+        private String inputRisk;
+        @JsonProperty("calculateFlagBI")
+        private String calculateFlagBI;
+        @JsonProperty("prptitemkindList")
+        private List<PrptitemkindListDTO> prptitemkindList;
+        @JsonProperty("ciInsureDemand")
+        private CiInsureDemandDTO ciInsureDemand;
+        @JsonProperty("prpTChargingPostDataList")
+        private List<?> prpTChargingPostDataList;
+        @JsonProperty("ciInsureDemandPay")
+        private List<?> ciInsureDemandPay;
+        @JsonProperty("editType")
+        private String editType;
+        @JsonProperty("ciInsureDemandWarningClaim")
+        private List<?> ciInsureDemandWarningClaim;
+        @JsonProperty("prpTmainRate")
+        private PrpTmainRateDTO prpTmainRate;
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTitemCarDTO {
+
+
+            /**
+             * 商业险体系
+             * 2020综改-04,新能源-05
+             */
+            @JsonProperty("termsSystem")
+            private String termsSystem;
+
+            /**
+             * 条款体系
+             * 商业险家庭自用对应F54,
+             */
+            @JsonProperty("clauseType")
+            private String clauseType;
+
+            /**
+             * 输入标志
+             * 选了对应险种传1,否则传0
+             */
+            @JsonProperty("inputRisk")
+            private String inputRisk;
+
+            /**
+             * 保费计算标志
+             * 选了对应险种传1,否则传0
+             */
+            @JsonProperty("calculateFlagBI")
+            private String calculateFlagBI;
+
+            /**
+             * 理赔对象
+             * 默认传空
+             */
+            @JsonProperty("ciInsureDemandPay")
+            private List ciInsureDemandPay;
+
+            /**
+             * 风险警示信息对象
+             * 默认传空
+             */
+            @JsonProperty("ciInsureDemandWarningClaim")
+            private List ciInsureDemandWarningClaim;
+
+            /**
+             * 续保对象
+             * 默认传空
+             */
+            @JsonProperty("prpTrenewal")
+            private String prpTrenewal;
+
+            /**
+             * 特别约定对象
+             * 默认传空
+             */
+            @JsonProperty("prptengageList")
+            private String prptengageList;
+
+            /**
+             * 费率对象
+             * 默认传空
+             */
+            @JsonProperty("prpTmainRate")
+            private String prpTmainRate;
+
+            /**
+             * 电池类型
+             * 上海必传
+             */
+            @JsonProperty("pureElectricBatteryType")
+            private String pureElectricBatteryType;
+
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTmainDTO {
+            @JsonProperty("endDate")
+            private String endDate;
+            @JsonProperty("noCarFlag")
+            private String noCarFlag;
+            @JsonProperty("immeValiFlag")
+            private String immeValiFlag;
+            @JsonProperty("feeandDiscountFlag")
+            private String feeandDiscountFlag;
+            @JsonProperty("signDate")
+            private String signDate;
+            @JsonProperty("inputDate")
+            private String inputDate;
+            @JsonProperty("expectDiscount")
+            private String expectDiscount;
+            @JsonProperty("endHour")
+            private String endHour;
+            @JsonProperty("immeValidEndDate")
+            private String immeValidEndDate;
+            @JsonProperty("answer")
+            private String answer;
+            @JsonProperty("startHour")
+            private String startHour;
+            @JsonProperty("orderFlag")
+            private String orderFlag;
+            @JsonProperty("immeValidStartDate")
+            private String immeValidStartDate;
+            @JsonProperty("simpleOrderFlag")
+            private String simpleOrderFlag;
+            @JsonProperty("startDate")
+            private String startDate;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CiInsureDemandDTO {
+            @JsonProperty("demandNo")
+            private String demandNo;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTmainRateDTO {
+            @JsonProperty("demandNo")
+            private String demandNo;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PrptitemkindListDTO {
+            @JsonProperty("amount")
+            private String amount;
+            @JsonProperty("kindCode")
+            private String kindCode;
+            @JsonProperty("quantity")
+            private String quantity;
+            @JsonProperty("flag")
+            private String flag;
+            @JsonProperty("endDate")
+            private String endDate;
+            @JsonProperty("mainKindFlag")
+            private String mainKindFlag;
+            @JsonProperty("isDeductible")
+            private String isDeductible;
+            @JsonProperty("rate")
+            private String rate;
+            @JsonProperty("modeCode")
+            private String modeCode;
+            @JsonProperty("deductible")
+            private String deductible;
+            @JsonProperty("kindName")
+            private String kindName;
+            @JsonProperty("checked")
+            private String checked;
+            @JsonProperty("unitAmount")
+            private String unitAmount;
+            @JsonProperty("itemKindNo")
+            private String itemKindNo;
+            @JsonProperty("startDate")
+            private String startDate;
+        }
+    }
+
+
+    /**
+     * 构造保费计算请求参数
+     *
+     * @author: lig
+     * @date: 2023年08月14日 0014
+     */
+    @JsonIgnore
+    public static PremiumReq buildQuoteParam(BaseQuoteInfoVo yaQuoteInfoVo, CarPriceResp.DataDTO carPriceResult, VinQueryResp.DataDTO vinQ) {
+        CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
+        List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
+        List<KindInfoVo> kindInfoVList = yaQuoteInfoVo.getKindList();
+
+        PremiumReq quoteReq = new PremiumReq();
+
+        riskList.stream().forEach(a -> {
+            if (a.getRiskCode().equals("0507")) {
+                CiDTO ciDto = buildCiDto(a);
+                quoteReq.setCi(ciDto);
+            }
+            if (a.getRiskCode().equals("0510")) {
+                BiDTO biDto = buildBiDto(a, kindInfoVList, carPriceResult, vinQ);
+                quoteReq.setBi(biDto);
+            }
+        });
+
+        //未投保交强
+        if (null == quoteReq.getCi()) {
+            CiDTO ciDto = buildCiDto(null);
+            quoteReq.setCi(ciDto);
+        }
+        //未投保商业
+        if (null == quoteReq.getBi()) {
+            BiDTO biDto = buildBiDto(null, null, null, null);
+            quoteReq.setBi(biDto);
+        }
+
+
+//        Optional<RiskInfoVo> ciRiskInfo = riskList.stream().filter(x -> x.getRiskCode().equals("0507")).findFirst();
+//        Optional<RiskInfoVo> biRiskInfo = riskList.stream().filter(x -> x.getRiskCode().equals("0510")).findFirst();
+//
+//        CiDTO ciDto = buildCiDto(ciRiskInfo.get(),kindInfoVList);
+//        BiDTO biDto = buildBiDto(biRiskInfo.get(), kindInfoVList);
+//        quoteReq.setCi(ciDto);
+//        quoteReq.setBi(biDto);
+
+        //车价查询uid
+        quoteReq.setUuid(carPriceResult.getInputvo());
+        //不超过业实际参考价格上下30%
+        quoteReq.setActualValue(StringUtils.toString(carPriceResult.getActualValue()));
+
+        return quoteReq;
+
+    }
+
+
+    /**
+     * 构造 交强险
+     *
+     * @author: lig
+     * @date: 2023-08-15
+     */
+    @JsonIgnore
+    public static CiDTO buildCiDto(RiskInfoVo ciRiskInfo) {
+
+        CiDTO ciDto = new CiDTO();
+        ciDto.setPrpTrenewal(new ArrayList<>());
+        ciDto.setPrpTmainRate(new CiDTO.PrpTmainRateDTO());
+        ciDto.setCalculateFlagCI("");
+        ciDto.setEditType("NEW");
+
+
+        /**
+         * 主信息
+         */
+        CiDTO.PrpTmainDTO ciPrpTmain = new CiDTO.PrpTmainDTO();
+        ciPrpTmain.setInputDate(DateUtil.formatDate(new Date()));
+        ciPrpTmain.setSignDate(DateUtil.formatDate(new Date()));
+        ciPrpTmain.setStartHour("0");
+        ciPrpTmain.setEndHour("24");
+
+
+        /**
+         * 险种列表
+         */
+        List<CiDTO.PrptitemkindListDTO> prptitemkindList = new ArrayList<>();
+
+
+        /**
+         * 车船税
+         */
+        CiDTO.PrpTcarshipTaxDTO prpTcarshipTax = new CiDTO.PrpTcarshipTaxDTO();
+        prpTcarshipTax.setPaidCertificate("");
+
+        //交强起保
+        if (null != ciRiskInfo) {
+            ciDto.setCalculateFlagCI("1");
+            //构造保险日期
+            CarInsDateDto cidd = InsUtils.buildCiInsDate(ciRiskInfo.getStartDate(), ciRiskInfo.getEndDate());
+            ciDto.setInputRisk("1");
+
+            ciPrpTmain.setStartDate(cidd.getStartDate());
+            ciPrpTmain.setEndDate(cidd.getEndDate());
+
+            //转保验证码
+            ciPrpTmain.setAnswer("");
+
+            //即时起保标识	immeValiFlag	字符串	N	即时起保必传1
+            ciPrpTmain.setImmeValiFlag(cidd.isForthwith() ? "1" : "");
+            //即时终保时间	immeValidEndDate	字符串	N	即时起保必传
+            ciPrpTmain.setImmeValidStartDate(cidd.isForthwith() ?cidd.getStartDate():"");
+            //即时终保时间	immeValidEndDate	字符串	N	即时起保必传 (YYYY-MM-DD HH:MM:SS)
+            ciPrpTmain.setImmeValidEndDate(cidd.isForthwith() ?cidd.getEndDate():"");
+
+
+            //非车标识      车+非车必传:1
+            ciPrpTmain.setNoCarFlag("0");
+            //车+非车标识    车加非车必传:N
+//                ciPrpTmain.setOrderFlag("N");
+
+
+            /**
+             * 车辆信息对象
+             */
+            CiDTO.PrpTitemCarDTO ciPrpTitemCar = new CiDTO.PrpTitemCarDTO();
+            ciPrpTitemCar.setClauseType("F40");
+            ciDto.setPrpTitemCar(ciPrpTitemCar);
+
+
+            /**
+             * 平台交互信息
+             */
+            CiDTO.CiInsureDemandDTO ciInsureDemand = new CiDTO.CiInsureDemandDTO();
+            //转保业务必传,传上次保费计算返回对应查询码,否则传空
+            ciInsureDemand.setDemandNo("");
+            ciDto.setCiInsureDemand(ciInsureDemand);
+
+
+            prpTcarshipTax.setTaxRelifFlag("1");
+            ciDto.setPrpTcarshipTax(prpTcarshipTax);
+
+
+            prptitemkindList = buildCiKindList(ciRiskInfo);
+
+
+        } else {
+
+            ciDto.setInputRisk("0");
+            ciPrpTmain.setStartDate("");
+            ciPrpTmain.setEndDate("");
+
+            prpTcarshipTax.setTaxRelifFlag("");
+            ciDto.setPrpTcarshipTax(prpTcarshipTax);
+
+        }
+
+        ciDto.setPrptitemkindList(prptitemkindList);
+
+        ciDto.setPrpTmain(ciPrpTmain);
+
+//        /**
+//         * 特别约定
+//         */
+//        CiDTO.PrptengageListDTO prptengageList = new CiDTO.PrptengageListDTO();
+
+
+        return ciDto;
+    }
+
+
+    /**
+     * 构造 商业险
+     *
+     * @author: lig
+     * @date: 2023-08-15
+     */
+    @JsonIgnore
+    public static BiDTO buildBiDto(RiskInfoVo biRiskInfo, List<KindInfoVo> kindInfoVList, CarPriceResp.DataDTO carPriceResult, VinQueryResp.DataDTO vinQ) {
+
+
+        BiDTO biDto = new BiDTO();
+        biDto.setPrpTmainRate(new BiDTO.PrpTmainRateDTO());
+        biDto.setPrpTChargingPostDataList(new ArrayList<>());
+
+        BiDTO.CiInsureDemandDTO bidtoCiInsureDemandDto = new BiDTO.CiInsureDemandDTO();
+        bidtoCiInsureDemandDto.setDemandNo("");
+        biDto.setCiInsureDemand(bidtoCiInsureDemandDto);
+
+        biDto.setCiInsureDemandPay(new ArrayList<>());
+        biDto.setCiInsureDemandWarningClaim(new ArrayList<>());
+
+        biDto.setPrpTrenewal(new ArrayList<>());
+        biDto.setPrptengageList(new ArrayList<>());
+
+
+        /**
+         * 主信息
+         */
+        BiDTO.PrpTmainDTO biPrpTmain = new BiDTO.PrpTmainDTO();
+        biPrpTmain.setImmeValidEndDate("");
+
+
+
+        /**
+         * 车辆信息对象
+         */
+        BiDTO.PrpTitemCarDTO biPrpTitemCar = new BiDTO.PrpTitemCarDTO();
+
+        biPrpTitemCar.setTermsSystem("04");
+        biPrpTitemCar.setClauseType("F54");
+
+
+        biPrpTitemCar.setCiInsureDemandPay(new ArrayList<>());
+        biPrpTitemCar.setCiInsureDemandWarningClaim(new ArrayList());
+        biPrpTitemCar.setPrpTrenewal("");
+        biPrpTitemCar.setPrptengageList("");
+        biPrpTitemCar.setPrpTmainRate("");
+        biPrpTmain.setStartHour("0");
+        biPrpTmain.setEndHour("24");
+        biPrpTmain.setFeeandDiscountFlag("0");
+        //期望折扣
+        biPrpTmain.setExpectDiscount("");
+
+        //转保验证码
+        biPrpTmain.setAnswer("");
+
+
+        if (null != biRiskInfo) {
+
+            biPrpTmain.setInputDate(DateUtil.formatDate(new Date()));
+            biPrpTmain.setSignDate(DateUtil.formatDate(new Date()));
+
+            CarInsDateDto biCidd = InsUtils.buildBiInsDate(biRiskInfo.getStartDate(), biRiskInfo.getEndDate());
+            biPrpTmain.setStartDate(biCidd.getStartDate());
+            biPrpTmain.setEndDate(biCidd.getEndDate());
+
+
+            //非车标识      车+非车必传:1
+//                ciPrpTmain.setNoCarFlag("1");
+            //车+非车标识    车加非车必传:N
+//                ciPrpTmain.setOrderFlag("N");
+
+
+            List<BiDTO.PrptitemkindListDTO> prptitemkindList = buildBiKindList(kindInfoVList, carPriceResult, biRiskInfo, vinQ);
+            biDto.setPrptitemkindList(prptitemkindList);
+
+
+        } else {
+            biPrpTmain.setStartDate("");
+            biPrpTmain.setEndDate("");
+            biPrpTmain.setNoCarFlag("0");
+            biPrpTmain.setImmeValiFlag("");
+            biPrpTmain.setImmeValidStartDate("");
+
+            biPrpTmain.setInputDate("");
+            biPrpTmain.setSignDate("");
+
+
+            biDto.setPrptitemkindList(new ArrayList<>());
+
+        }
+
+
+        biDto.setPrpTitemCar(biPrpTitemCar);
+        biDto.setPrpTmain(biPrpTmain);
+
+
+        if (CollUtil.isNotEmpty(kindInfoVList)) {
+            biDto.setCalculateFlagBI("1");
+            biDto.setInputRisk("1");
+
+        } else {
+            biDto.setCalculateFlagBI("0");
+            biDto.setInputRisk("0");
+
+        }
+
+
+        return biDto;
+    }
+
+
+    private static List<BiDTO.PrptitemkindListDTO> buildBiKindList(List<KindInfoVo> kindInfoVList, CarPriceResp.DataDTO carPriceResult, RiskInfoVo biRiskInfo, VinQueryResp.DataDTO vinQ) {
+        List<BiDTO.PrptitemkindListDTO> prptitemkindList = new ArrayList<>();
+        kindInfoVList.stream().forEach(k -> {
+            BiDTO.PrptitemkindListDTO prptitemkind = new BiDTO.PrptitemkindListDTO();
+            prptitemkind.setChecked("1");
+            prptitemkind.setModeCode("1");
+            //免赔额
+            prptitemkind.setDeductible("0");
+            //不计免赔
+            prptitemkind.setIsDeductible("0");
+            //座位数/服务次数
+            prptitemkind.setQuantity("");
+            prptitemkind.setRate("0");
+
+            //乘客数
+            BigDecimal passengerNum = BigDecimal.valueOf(StringUtils.toInt(vinQ.getSeatCountBC()) - 1);
+
+            //起保时间
+            prptitemkind.setStartDate(biRiskInfo.getStartDate());
+            prptitemkind.setEndDate(biRiskInfo.getEndDate());
+
+
+            String deductible = "0";
+            if (StringUtils.isNotEmpty(k.getDeductibleRate())) {
+                deductible = BigDecimal.valueOf(StringUtils.toDouble(k.getDeductibleRate())).divide(BigDecimal.valueOf(100)).toString();
+            }
+
+            //第三者责任险
+            if (k.getKindCode().equals(InsurKind.B.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.B.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.B.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.B.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.B.getFlag());
+                prptitemkind.setAmount(StringUtils.toString(k.getAmount()));
+                prptitemkind.setMainKindFlag("M");
+                prptitemkind.setUnitAmount("0");
+
+            }
+            //乘客责任险
+            if (k.getKindCode().equals(InsurKind.D4.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.D4.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.D4.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.D4.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.D4.getFlag());
+                prptitemkind.setMainKindFlag("M");
+                prptitemkind.setQuantity(passengerNum.toString());
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getUnitAmount()));
+                prptitemkind.setAmount(BigDecimal.valueOf(k.getUnitAmount()).multiply(passengerNum).toString());
+
+            }
+            //机动车损失险
+            if (k.getKindCode().equals(InsurKind.A.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.A.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.A.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.A.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.A.getFlag());
+                //车辆折损价
+                prptitemkind.setAmount(StringUtils.toString(carPriceResult.getActualValue()));
+                prptitemkind.setMainKindFlag("");
+                prptitemkind.setUnitAmount("");
+                prptitemkind.setMainKindFlag("M");
+
+            }
+            //司机责任险
+            if (k.getKindCode().equals(InsurKind.D3.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.D3.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.D3.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.D3.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.D3.getFlag());
+                prptitemkind.setMainKindFlag("M");
+                prptitemkind.setQuantity("1");
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getAmount()));
+                prptitemkind.setAmount(StringUtils.toString(k.getAmount()));
+            }
+            //附加绝对免赔率特约条款(车损)
+            if (k.getKindCode().equals(InsurKind.MJ1.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.MJ1.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.MJ1.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.MJ1.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.MJ1.getFlag());
+                prptitemkind.setDeductible(deductible);
+                prptitemkind.setMainKindFlag("S");
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getUnitAmount()));
+                prptitemkind.setAmount(StringUtils.toString(k.getAmount()));
+
+            }
+            //绝对免赔率特约险(三者)
+            if (k.getKindCode().equals(InsurKind.MJ2.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.MJ2.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.MJ2.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.MJ2.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.MJ2.getFlag());
+                prptitemkind.setDeductible(deductible);
+                prptitemkind.setMainKindFlag("S");
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getUnitAmount()));
+                prptitemkind.setAmount(StringUtils.toString(k.getAmount()));
+            }
+            //绝对免赔率特约险(司机)
+            if (k.getKindCode().equals(InsurKind.MJ3.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.MJ3.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.MJ3.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.MJ3.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.MJ3.getFlag());
+                prptitemkind.setDeductible(deductible);
+                prptitemkind.setMainKindFlag("S");
+                prptitemkind.setQuantity("1");
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getUnitAmount()));
+                prptitemkind.setAmount(StringUtils.toString(k.getAmount()));
+            }
+            //绝对免赔率特约险(乘客)
+            if (k.getKindCode().equals(InsurKind.MJ4.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.MJ4.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.MJ4.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.MJ4.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.MJ4.getFlag());
+                prptitemkind.setDeductible(deductible);
+                prptitemkind.setMainKindFlag("S");
+                prptitemkind.setQuantity(StringUtils.toString(StringUtils.toInt(vinQ.getSeatCountBC()) - 1));
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getUnitAmount()));
+                prptitemkind.setAmount(BigDecimal.valueOf(k.getUnitAmount()).multiply(passengerNum).toString());
+            }
+            //车身划痕险
+            if (k.getKindCode().equals(InsurKind.L.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.L.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.L.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.L.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.L.getFlag());
+                prptitemkind.setAmount(StringUtils.toString(k.getAmount()));
+                prptitemkind.setMainKindFlag("S");
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getUnitAmount()));
+            }
+            //附加法定节假日限额翻倍险
+            if (k.getKindCode().equals(InsurKind.BD.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.BD.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.BD.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.BD.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.BD.getFlag());
+                prptitemkind.setMainKindFlag("S");
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getUnitAmount()));
+                prptitemkind.setAmount(StringUtils.toString(k.getAmount()));
+
+
+            }
+            //医保外  三者
+            if (k.getKindCode().equals(InsurKind.SY_FJ_YBW1.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.SY_FJ_YBW1.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.SY_FJ_YBW1.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.SY_FJ_YBW1.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.SY_FJ_YBW1.getFlag());
+//                prptitemkind.setAmount(StringUtils.toString(k.getAmount()));
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getAmount()));
+                prptitemkind.setMainKindFlag("S");
+                prptitemkind.setAmount(StringUtils.toString(k.getAmount()));
+            }
+            //医保外  乘客
+            if (k.getKindCode().equals(InsurKind.SY_FJ_YBW2.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.SY_FJ_YBW2.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.SY_FJ_YBW2.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.SY_FJ_YBW2.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.SY_FJ_YBW2.getFlag());
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getUnitAmount()));
+                prptitemkind.setMainKindFlag("S");
+                prptitemkind.setQuantity(StringUtils.toString(StringUtils.toInt(vinQ.getSeatCountBC()) - 1));
+                prptitemkind.setAmount(BigDecimal.valueOf(k.getUnitAmount()).multiply(passengerNum).toString());
+            }
+            //医保外  司机
+            if (k.getKindCode().equals(InsurKind.SY_FJ_YBW3.getCode())) {
+                prptitemkind.setKindCode(InsurKindGuoRen.SY_FJ_YBW3.getCode());
+                prptitemkind.setKindName(InsurKindGuoRen.SY_FJ_YBW3.getDesc());
+                prptitemkind.setItemKindNo(InsurKindGuoRen.SY_FJ_YBW3.getItemKindNo());
+                prptitemkind.setFlag(InsurKindGuoRen.SY_FJ_YBW3.getFlag());
+                prptitemkind.setAmount(StringUtils.toString(k.getAmount()));
+                prptitemkind.setUnitAmount(StringUtils.toString(k.getAmount()));
+                prptitemkind.setMainKindFlag("S");
+                prptitemkind.setQuantity("1");
+            }
+
+            prptitemkindList.add(prptitemkind);
+        });
+        return prptitemkindList;
+
+    }
+
+    /**
+     * 构造 交强险  具体险种信息
+     *
+     * @author: lig
+     * @date: 2023年08月15日 0015
+     */
+    private static List<CiDTO.PrptitemkindListDTO> buildCiKindList(RiskInfoVo ciRiskInfo) {
+        List<CiDTO.PrptitemkindListDTO> prptitemkindList = new ArrayList<>();
+        CiDTO.PrptitemkindListDTO prptitemkind = new CiDTO.PrptitemkindListDTO();
+
+        prptitemkind.setKindCode("BZ");
+        prptitemkind.setKindName("机动车交通事故责任强制保险");
+        prptitemkind.setStartDate(ciRiskInfo.getStartDate());
+        prptitemkind.setEndDate(ciRiskInfo.getEndDate());
+        prptitemkind.setDeductible("");
+        prptitemkind.setIsDeductible("true");
+        prptitemkind.setRate("");
+        prptitemkind.setAmount(StringUtils.toString(ciRiskInfo.getAmount()));
+        prptitemkind.setNoTaxPremium("");
+        prptitemkind.setTaxFee("");
+        prptitemkind.setFlag("2 03");
+
+        prptitemkindList.add(prptitemkind);
+        return prptitemkindList;
+
+    }
+}
+
+

+ 597 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/PremiumResp.java

@@ -0,0 +1,597 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import net.minidev.json.annotate.JsonIgnore;
+
+import java.util.List;
+
+
+/**
+ * 保费计算  返回
+ */
+@NoArgsConstructor
+@Data
+public class PremiumResp {
+
+
+    @JSONField(name = "resultCode")
+    private Integer resultCode;
+    @JSONField(name = "resultMsg")
+    private String resultMsg;
+    @JSONField(name = "data")
+    private DataDTO data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+
+        @JsonIgnore
+        private String ciStartDate;
+        @JsonIgnore
+        private String ciEndDate;
+        @JsonIgnore
+        private String biStartDate;
+        @JsonIgnore
+        private String biEndDate;
+
+        @JSONField(name = "itemVOList")
+        private List<ItemVOListDTO> itemVOList;
+        @JSONField(name = "carShipTaxRespVO")
+        private CarShipTaxRespVODTO carShipTaxRespVO;
+        @JSONField(name = "sumPremiumBI")
+        private Double sumPremiumBI;
+        @JSONField(name = "sumPremiumCI")
+        private Double sumPremiumCI;
+        @JSONField(name = "sumPayTax")
+        private Integer sumPayTax;
+        @JSONField(name = "biPrptenages")
+        private List<BiPrptenagesDTO> biPrptenages;
+        @JSONField(name = "ciPrptenages")
+        private List<CiPrptenagesDTO> ciPrptenages;
+        @JSONField(name = "comlossCondition")
+        private String comlossCondition;
+        @JSONField(name = "signDiscount")
+        private String signDiscount;
+        @JSONField(name = "sumTopRate")
+        private String sumTopRate;
+        @JSONField(name = "sumLowerRate")
+        private String sumLowerRate;
+        @JSONField(name = "selfAdjustRate")
+        private Double selfAdjustRate;
+        @JSONField(name = "selfChannelRate")
+        private Integer selfChannelRate;
+        @JSONField(name = "noclaimRate")
+        private Integer noclaimRate;
+        @JSONField(name = "addonRate")
+        private Integer addonRate;
+        @JSONField(name = "autoPriceOutputXOMRespVo")
+        private AutoPriceOutputXOMRespVoDTO autoPriceOutputXOMRespVo;
+        @JSONField(name = "biClaimTimes")
+        private Integer biClaimTimes;
+        @JSONField(name = "biClaimAmount")
+        private Integer biClaimAmount;
+        @JSONField(name = "ciClaimTimes")
+        private Integer ciClaimTimes;
+        @JSONField(name = "ciClaimAmount")
+        private Integer ciClaimAmount;
+        @JSONField(name = "lastYearEndDate")
+        private Object lastYearEndDate;
+        @JSONField(name = "prpTChargingPostDataList")
+        private List<?> prpTChargingPostDataList;
+        @JSONField(name = "ciLossCondition")
+        private Integer ciLossCondition;
+        @JSONField(name = "lossFeeSum")
+        private Integer lossFeeSum;
+        @JSONField(name = "birate")
+        private BirateDTO birate;
+        @JSONField(name = "cicheckCode")
+        private String cicheckCode;
+        @JSONField(name = "cidemandNo")
+        private Object cidemandNo;
+        @JSONField(name = "ciprofit")
+        private Integer ciprofit;
+        @JSONField(name = "cirate")
+        private CirateDTO cirate;
+        @JSONField(name = "uuid")
+        private String uuid;
+        @JSONField(name = "bicheckCode")
+        private String bicheckCode;
+        @JSONField(name = "bidemandNo")
+        private Object bidemandNo;
+        @JSONField(name = "bireCoverMsg")
+        private Object bireCoverMsg;
+        @JSONField(name = "biprofit")
+        private Integer biprofit;
+        @JSONField(name = "prpTenGearAllocationFeeList")
+        private List<?> prpTenGearAllocationFeeList;
+        @JSONField(name = "ciInsureDemandPay")
+        private List<CIInsureDemandPayVo> ciInsureDemandPay;
+
+        @NoArgsConstructor
+        @Data
+        public static class CIInsureDemandPayVo {
+            @JSONField(name = "DemandNo")
+            private String DemandNo;
+            @JSONField(name = "SerialNo")
+            private String SerialNo;
+            @JSONField(name = "payCompany")
+            private String payCompany;
+            @JSONField(name = "PolicyNo")
+            private String PolicyNo;
+            @JSONField(name = "KindCode")
+            private String KindCode;
+            @JSONField(name = "PayType")
+            private String PayType;
+            @JSONField(name = "PersonPayType")
+            private String PersonPayType;
+            @JSONField(name = "compensateNo")
+            private String compensateNo;
+            @JSONField(name = "lossTime")
+            private String lossTime;
+            @JSONField(name = "lossFee")
+            private String lossFee;
+            @JSONField(name = "Remark")
+            private String Remark;
+            @JSONField(name = "Flag")
+            private String Flag;
+            @JSONField(name = "endCaseTime")
+            private String endCaseTime;
+            @JSONField(name = "AccidentDeathFlag")
+            private String AccidentDeathFlag;
+            @JSONField(name = "OptionType")
+            private String OptionType;
+            @JSONField(name = "totalAmount")
+            private String totalAmount;
+            @JSONField(name = "claimNotificationNo")
+            private String claimNotificationNo;
+            @JSONField(name = "claimRegistrationNo")
+            private String claimRegistrationNo;
+            @JSONField(name = "caseID")
+            private String caseID;
+            @JSONField(name = "effectiveDate")
+            private String effectiveDate;
+            @JSONField(name = "expireDate")
+            private String expireDate;
+            @JSONField(name = "InsurerArea")
+            private String InsurerArea;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CarShipTaxRespVODTO {
+            @JSONField(name = "riskCode")
+            private String riskCode;
+            @JSONField(name = "taxRelifFlag")
+            private String taxRelifFlag;
+            @JSONField(name = "taxActual")
+            private Integer taxActual;
+            @JSONField(name = "sumPayTax")
+            private Integer sumPayTax;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class AutoPriceOutputXOMRespVoDTO {
+            @JSONField(name = "entireRecommenDiscount")
+            private String entireRecommenDiscount;
+            @JSONField(name = "entireUWritingDiscount")
+            private String entireUWritingDiscount;
+            @JSONField(name = "entireInitialDiscount")
+            private String entireInitialDiscount;
+            @JSONField(name = "comCostPrem")
+            private String comCostPrem;
+            @JSONField(name = "ctpCostPrem")
+            private String ctpCostPrem;
+            @JSONField(name = "billCTPELR")
+            private String billCTPELR;
+            @JSONField(name = "billCOMELR")
+            private String billCOMELR;
+            @JSONField(name = "billELR")
+            private String billELR;
+            @JSONField(name = "sunlightScore")
+            private String sunlightScore;
+            @JSONField(name = "comSunlightScore")
+            private Object comSunlightScore;
+            @JSONField(name = "ctpSunlightScore")
+            private Object ctpSunlightScore;
+            @JSONField(name = "reasonCde")
+            private Object reasonCde;
+            @JSONField(name = "ruleType")
+            private Object ruleType;
+            @JSONField(name = "uwDiscFloor")
+            private Object uwDiscFloor;
+            @JSONField(name = "businessCode")
+            private String businessCode;
+            @JSONField(name = "strComCostPrem2")
+            private String strComCostPrem2;
+            @JSONField(name = "strCtpCostPrem2")
+            private String strCtpCostPrem2;
+            @JSONField(name = "strBillCTPELR2")
+            private String strBillCTPELR2;
+            @JSONField(name = "strBillCOMELR2")
+            private String strBillCOMELR2;
+            @JSONField(name = "strBillELR2")
+            private String strBillELR2;
+            @JSONField(name = "strUwRel")
+            private String strUwRel;
+            @JSONField(name = "strUwRelVersion")
+            private String strUwRelVersion;
+            @JSONField(name = "strTargetLR")
+            private String strTargetLR;
+            @JSONField(name = "uwELRrel2BC")
+            private Object uwELRrel2BC;
+            @JSONField(name = "strUwELRrel")
+            private String strUwELRrel;
+            @JSONField(name = "strUwELR")
+            private String strUwELR;
+            @JSONField(name = "recommenDiscountScore")
+            private String recommenDiscountScore;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class BirateDTO {
+            @JSONField(name = "proposalno")
+            private String proposalno;
+            @JSONField(name = "riskcode")
+            private String riskcode;
+            @JSONField(name = "classcode")
+            private String classcode;
+            @JSONField(name = "coefficient1")
+            private Integer coefficient1;
+            @JSONField(name = "coefficient2")
+            private Integer coefficient2;
+            @JSONField(name = "coefficient3")
+            private Integer coefficient3;
+            @JSONField(name = "coefficient4")
+            private Integer coefficient4;
+            @JSONField(name = "coefficient5")
+            private Integer coefficient5;
+            @JSONField(name = "coefficient6")
+            private Integer coefficient6;
+            @JSONField(name = "coefficient7")
+            private Integer coefficient7;
+            @JSONField(name = "coefficient8")
+            private Integer coefficient8;
+            @JSONField(name = "coefficient9")
+            private Integer coefficient9;
+            @JSONField(name = "coefficient10")
+            private Integer coefficient10;
+            @JSONField(name = "coefficient11")
+            private Integer coefficient11;
+            @JSONField(name = "remark")
+            private String remark;
+            @JSONField(name = "flag")
+            private String flag;
+            @JSONField(name = "businesscategory")
+            private String businesscategory;
+            @JSONField(name = "attribute1")
+            private String attribute1;
+            @JSONField(name = "attribute2")
+            private String attribute2;
+            @JSONField(name = "attribute3")
+            private String attribute3;
+            @JSONField(name = "attribute4")
+            private String attribute4;
+            @JSONField(name = "attribute5")
+            private String attribute5;
+            @JSONField(name = "costratio")
+            private Object costratio;
+            @JSONField(name = "chargedecimal")
+            private Object chargedecimal;
+            @JSONField(name = "billcomtransfeerate")
+            private Integer billcomtransfeerate;
+            @JSONField(name = "billcomallowance")
+            private Integer billcomallowance;
+            @JSONField(name = "billcomacquisitionfeerate")
+            private Integer billcomacquisitionfeerate;
+            @JSONField(name = "billcomotherfeerate")
+            private Integer billcomotherfeerate;
+            @JSONField(name = "totalcost")
+            private Integer totalcost;
+            @JSONField(name = "accruedexpenses")
+            private String accruedexpenses;
+            @JSONField(name = "managelimit")
+            private String managelimit;
+            @JSONField(name = "controllimit")
+            private String controllimit;
+            @JSONField(name = "mutualback")
+            private String mutualback;
+            @JSONField(name = "limitflag")
+            private String limitflag;
+            @JSONField(name = "autoFeeType")
+            private Object autoFeeType;
+            @JSONField(name = "isteamflag")
+            private Object isteamflag;
+            @JSONField(name = "tempLateID")
+            private String tempLateID;
+            @JSONField(name = "tempLateName")
+            private String tempLateName;
+            @JSONField(name = "chargenumber")
+            private String chargenumber;
+            @JSONField(name = "billcomeGroup")
+            private String billcomeGroup;
+            @JSONField(name = "ryblogo")
+            private String ryblogo;
+            @JSONField(name = "respAttrExt1")
+            private String respAttrExt1;
+            @JSONField(name = "respAttrExt2")
+            private String respAttrExt2;
+            @JSONField(name = "respOnlineExt1")
+            private String respOnlineExt1;
+            @JSONField(name = "respOnlineExt2")
+            private String respOnlineExt2;
+            @JSONField(name = "respOnlineExt3")
+            private String respOnlineExt3;
+            @JSONField(name = "respOnlineExt4")
+            private String respOnlineExt4;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CirateDTO {
+            @JSONField(name = "proposalno")
+            private String proposalno;
+            @JSONField(name = "riskcode")
+            private String riskcode;
+            @JSONField(name = "classcode")
+            private String classcode;
+            @JSONField(name = "coefficient1")
+            private Integer coefficient1;
+            @JSONField(name = "coefficient2")
+            private Integer coefficient2;
+            @JSONField(name = "coefficient3")
+            private Integer coefficient3;
+            @JSONField(name = "coefficient4")
+            private Integer coefficient4;
+            @JSONField(name = "coefficient5")
+            private Integer coefficient5;
+            @JSONField(name = "coefficient6")
+            private Integer coefficient6;
+            @JSONField(name = "coefficient7")
+            private Integer coefficient7;
+            @JSONField(name = "coefficient8")
+            private Integer coefficient8;
+            @JSONField(name = "coefficient9")
+            private Integer coefficient9;
+            @JSONField(name = "coefficient10")
+            private Integer coefficient10;
+            @JSONField(name = "coefficient11")
+            private Integer coefficient11;
+            @JSONField(name = "remark")
+            private String remark;
+            @JSONField(name = "flag")
+            private String flag;
+            @JSONField(name = "businesscategory")
+            private String businesscategory;
+            @JSONField(name = "attribute1")
+            private String attribute1;
+            @JSONField(name = "attribute2")
+            private String attribute2;
+            @JSONField(name = "attribute3")
+            private String attribute3;
+            @JSONField(name = "attribute4")
+            private String attribute4;
+            @JSONField(name = "attribute5")
+            private String attribute5;
+            @JSONField(name = "costratio")
+            private Object costratio;
+            @JSONField(name = "chargedecimal")
+            private Object chargedecimal;
+            @JSONField(name = "billcomtransfeerate")
+            private Integer billcomtransfeerate;
+            @JSONField(name = "billcomallowance")
+            private Integer billcomallowance;
+            @JSONField(name = "billcomacquisitionfeerate")
+            private Integer billcomacquisitionfeerate;
+            @JSONField(name = "billcomotherfeerate")
+            private Integer billcomotherfeerate;
+            @JSONField(name = "totalcost")
+            private Integer totalcost;
+            @JSONField(name = "accruedexpenses")
+            private String accruedexpenses;
+            @JSONField(name = "managelimit")
+            private String managelimit;
+            @JSONField(name = "controllimit")
+            private String controllimit;
+            @JSONField(name = "mutualback")
+            private String mutualback;
+            @JSONField(name = "limitflag")
+            private String limitflag;
+            @JSONField(name = "autoFeeType")
+            private Object autoFeeType;
+            @JSONField(name = "isteamflag")
+            private Object isteamflag;
+            @JSONField(name = "tempLateID")
+            private String tempLateID;
+            @JSONField(name = "tempLateName")
+            private String tempLateName;
+            @JSONField(name = "chargenumber")
+            private String chargenumber;
+            @JSONField(name = "billcomeGroup")
+            private String billcomeGroup;
+            @JSONField(name = "ryblogo")
+            private String ryblogo;
+            @JSONField(name = "respAttrExt1")
+            private String respAttrExt1;
+            @JSONField(name = "respAttrExt2")
+            private String respAttrExt2;
+            @JSONField(name = "respOnlineExt1")
+            private String respOnlineExt1;
+            @JSONField(name = "respOnlineExt2")
+            private String respOnlineExt2;
+            @JSONField(name = "respOnlineExt3")
+            private String respOnlineExt3;
+            @JSONField(name = "respOnlineExt4")
+            private String respOnlineExt4;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class ItemVOListDTO {
+            @JSONField(name = "proposalNo")
+            private String proposalNo;
+            @JSONField(name = "riskCode")
+            private String riskCode;
+            @JSONField(name = "itemKindNo")
+            private Integer itemKindNo;
+            @JSONField(name = "familyNo")
+            private Object familyNo;
+            @JSONField(name = "familyName")
+            private String familyName;
+            @JSONField(name = "rationType")
+            private String rationType;
+            @JSONField(name = "kindCode")
+            private String kindCode;
+            @JSONField(name = "kindName")
+            private String kindName;
+            @JSONField(name = "itemNo")
+            private Integer itemNo;
+            @JSONField(name = "itemCode")
+            private String itemCode;
+            @JSONField(name = "itemDetailName")
+            private String itemDetailName;
+            @JSONField(name = "modeCode")
+            private String modeCode;
+            @JSONField(name = "modeName")
+            private String modeName;
+            @JSONField(name = "startDate")
+            private String startDate;
+            @JSONField(name = "startHour")
+            private Integer startHour;
+            @JSONField(name = "endDate")
+            private String endDate;
+            @JSONField(name = "endHour")
+            private Integer endHour;
+            @JSONField(name = "model")
+            private String model;
+            @JSONField(name = "buyDate")
+            private Object buyDate;
+            @JSONField(name = "addressNo")
+            private Object addressNo;
+            @JSONField(name = "calculateFlag")
+            private String calculateFlag;
+            @JSONField(name = "currency")
+            private String currency;
+            @JSONField(name = "unitAmount")
+            private Object unitAmount;
+            @JSONField(name = "quantity")
+            private Object quantity;
+            @JSONField(name = "unit")
+            private String unit;
+            @JSONField(name = "value")
+            private Object value;
+            @JSONField(name = "amount")
+            private Double amount;
+            @JSONField(name = "ratePeriod")
+            private Integer ratePeriod;
+            @JSONField(name = "rate")
+            private Integer rate;
+            @JSONField(name = "shortRateFlag")
+            private String shortRateFlag;
+            @JSONField(name = "shortRate")
+            private Integer shortRate;
+            @JSONField(name = "basePremium")
+            private Integer basePremium;
+            @JSONField(name = "benchMarkPremium")
+            private Double benchMarkPremium;
+            @JSONField(name = "discount")
+            private Integer discount;
+            @JSONField(name = "adjustRate")
+            private Double adjustRate;
+            @JSONField(name = "premium")
+            private Double premium;
+            @JSONField(name = "deductibleRate")
+            private Integer deductibleRate;
+            @JSONField(name = "deductible")
+            private Integer deductible;
+            @JSONField(name = "flag")
+            private String flag;
+            @JSONField(name = "feeStart")
+            private Object feeStart;
+            @JSONField(name = "feeEnd")
+            private Object feeEnd;
+            @JSONField(name = "standardPremuim")
+            private Double standardPremuim;
+            @JSONField(name = "additionalCostRate")
+            private Double additionalCostRate;
+            @JSONField(name = "basePureRiskPremium")
+            private Object basePureRiskPremium;
+            @JSONField(name = "totalLossRate")
+            private Double totalLossRate;
+            @JSONField(name = "channelrate")
+            private Integer channelrate;
+            @JSONField(name = "noTaxPremium")
+            private Double noTaxPremium;
+            @JSONField(name = "taxRate")
+            private Double taxRate;
+            @JSONField(name = "taxFee")
+            private Double taxFee;
+            @JSONField(name = "taxFlag")
+            private String taxFlag;
+            @JSONField(name = "insurePlan")
+            private String insurePlan;
+            @JSONField(name = "itemKind_Flag5")
+            private Object itemkindFlag5;
+            @JSONField(name = "mainKindFlag")
+            private Object mainKindFlag;
+            @JSONField(name = "vipPremium")
+            private Integer vipPremium;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class BiPrptenagesDTO {
+            @JSONField(name = "proposalNo")
+            private Object proposalNo;
+            @JSONField(name = "riskCode")
+            private Object riskCode;
+            @JSONField(name = "serialNo")
+            private Integer serialNo;
+            @JSONField(name = "lineNo")
+            private Object lineNo;
+            @JSONField(name = "clauseCode")
+            private String clauseCode;
+            @JSONField(name = "clauses")
+            private String clauses;
+            @JSONField(name = "titleFlag")
+            private Object titleFlag;
+            @JSONField(name = "clauseName")
+            private Object clauseName;
+            @JSONField(name = "clausesContext")
+            private String clausesContext;
+            @JSONField(name = "flag")
+            private String flag;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CiPrptenagesDTO {
+            @JSONField(name = "proposalNo")
+            private Object proposalNo;
+            @JSONField(name = "riskCode")
+            private Object riskCode;
+            @JSONField(name = "serialNo")
+            private Integer serialNo;
+            @JSONField(name = "lineNo")
+            private Object lineNo;
+            @JSONField(name = "clauseCode")
+            private String clauseCode;
+            @JSONField(name = "clauses")
+            private String clauses;
+            @JSONField(name = "titleFlag")
+            private Object titleFlag;
+            @JSONField(name = "clauseName")
+            private Object clauseName;
+            @JSONField(name = "clausesContext")
+            private String clausesContext;
+            @JSONField(name = "flag")
+            private String flag;
+        }
+    }
+}
+
+

+ 154 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/RequestDto.java

@@ -0,0 +1,154 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import cn.hutool.core.date.DateUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ctc.wstx.util.DataUtil;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
+
+@Data
+public class RequestDto {
+
+//    @JsonProperty("PACKAGE")
+    @JSONField(name="PACKAGE")
+    private RequestPackage rPackage;
+
+    @Data
+    public static class RequestPackage {
+//        @JsonProperty("HEAD")
+        @JSONField(name="HEAD")
+        private RequestHead rHead ;
+
+//        @JsonProperty("BODY")
+        @JSONField(name="BODY")
+        private Object rBody ;
+
+    }
+
+    @Data
+    public static class RequestHead {
+
+        /**
+         * 客户端编码
+         * GBK,UTF-8等
+         */
+        @JSONField(name="CLIENT_ENCODE")
+        private String clientEncode = "UTF-8";
+
+        /**
+         * 渠道编码
+         * 测试环境:jindouyun
+         */
+        @JSONField(name="CHANNEL_CODE")
+        private String channelCode;
+
+        /**
+         * 接口代码
+         * 见具体接口说明
+         */
+        @JSONField(name="INTERFACE_CODE")
+        private String interfaceCode;
+
+        /**
+         * 服务代码
+         * httpJson方式填“GR0002”
+         */
+        @JSONField(name="SERVE_CODE")
+        private String serveCode;
+
+        /**
+         * 业务流水号
+         * 唯一标识;此流水号在客户方必须唯一性
+         */
+        @JSONField(name="BUSINESS_UUID")
+        private String businessUuid;
+
+        /**
+         * 访问账号
+         * 测试环境:guoren_tp_jdy
+         */
+        @JSONField(name="INTERFACE_USER_CODE")
+        private String interfaceUserCode;
+
+        /**
+         * 访问口令
+         * 测试环境:Q31gIrhZgQc=
+         */
+        @JSONField(name="INTERFACE_PWD")
+        private String interfacePwd;
+
+        /**
+         * 请求时间
+         * 格式:yyyy-MM-dd HH:mm:ss:ssss,要求:精确至毫秒
+         */
+        @JSONField(name="REQUEST_TIME")
+        private String requestTime;
+
+        /**
+         * 报文集合元素标志
+         * 报文集合元素名称或名称后缀标识
+         */
+        @JSONField(name="XML_LIST_SUFFIX")
+        private String xmlListSuffix;
+
+        /**
+         * 环境类型
+         * 测试环境填”Y”;生产环境填”N”
+         */
+        @JSONField(name="IFTEST")
+        private String iftest;
+    }
+
+    public static String builRequestDto(Object body,String apiCode){
+        RequestDto dto = new RequestDto();
+        RequestDto.RequestHead rHead = new RequestDto.RequestHead();
+        //=========
+        //===生产
+        //==========
+        rHead.setServeCode("GR0002");
+        rHead.setChannelCode("TQDL");
+        rHead.setInterfaceCode(apiCode);
+        rHead.setInterfaceUserCode("TQDL");
+        rHead.setInterfacePwd("$2a$04$r4neihDJh420OyWEji5w5OMbiyHqYEZHJGLZP0FHFEjXmr7nVW7te");
+        rHead.setBusinessUuid("");
+        rHead.setRequestTime(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss:ssss"));
+//        rHead.setRequestTime("2018-08-17 12:12:12:0005");
+        rHead.setXmlListSuffix("");
+        //测试环境填”Y”;生产环境填”N”
+        rHead.setIftest("N");
+
+
+
+//        rHead.setServeCode("GR0002");
+//        rHead.setChannelCode("jindouyun");
+//        rHead.setInterfaceCode(apiCode);
+//        rHead.setInterfaceUserCode("guoren_tp_jdy");
+//        rHead.setInterfacePwd("Q31gIrhZgQc=");
+//        rHead.setBusinessUuid("");
+//        rHead.setRequestTime(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss:ssss"));
+////        rHead.setRequestTime("2018-08-17 12:12:12:0005");
+//        rHead.setXmlListSuffix("");
+//        //测试环境填”Y”;生产环境填”N”
+//        rHead.setIftest("Y");
+
+
+
+        RequestDto.RequestPackage rpackage = new RequestDto.RequestPackage();
+        rpackage.setRHead(rHead);
+
+        //请求参数
+        rpackage.setRBody(body);
+        dto.setRPackage(rpackage);
+
+        return JSON.toJSONString(dto);
+
+
+
+
+//        return dto;
+    }
+}

+ 43 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/ResponseDto.java

@@ -0,0 +1,43 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.apache.poi.ss.formula.functions.T;
+
+import java.util.List;
+
+@NoArgsConstructor
+@Data
+public class ResponseDto<T> {
+
+
+    @JSONField(name="PLATFORM_STS")
+    private String platformSts;
+    @JSONField(name="PLATFORM_TYPE")
+    private String platformType;
+    @JSONField(name="PLATFORM_CODE")
+    private String platformCode;
+    @JSONField(name="PLATFORM_MSG")
+    private String platformMsg;
+    @JSONField(name="RESPONSE_BODY")
+    private T responseBody;
+
+
+    public static <T> T buildBody(ResponseDto dto,Class<T> classObj) {
+        if(null != dto.getResponseBody()){
+            T s = JSON.parseObject(dto.getResponseBody().toString(), classObj);
+            return s;
+//            dto.setResponseBody(s);
+        }
+        return null;
+    }
+
+//    @NoArgsConstructor
+//    @Data
+//    public static class RESPONSEBODYDTO {
+//        private Object body;
+//    }
+}

+ 47 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/SignatureResp.java

@@ -0,0 +1,47 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+
+/**
+ *  签名  出参
+ *
+ * @author: lig
+ * @date: 2023-10-20
+ */
+@NoArgsConstructor
+@Data
+public class SignatureResp {
+    @JSONField(name="resultCode")
+    private Integer resultCode;
+    @JSONField(name="resultMsg")
+    private String resultMsg;
+    @JSONField(name="data")
+    private DataDTO data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JSONField(name="proposalNo")
+        private List<String> proposalNo;
+        @JSONField(name="downloadUrl")
+        private String downloadUrl;
+        @JSONField(name="elecapplyurl")
+        private String elecapplyurl;
+        @JSONField(name="createtime")
+        private String createtime;
+        @JSONField(name="confirmflag")
+        private String confirmflag;
+        @JSONField(name="updatetime")
+        private String updatetime;
+    }
+
+
+
+
+}

+ 65 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/SubmitAuditReq.java

@@ -0,0 +1,65 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.vo.KindInfoVo;
+import com.ydtech.modules.ins.model.vo.RiskInfoVo;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 提交核保 入参
+ */
+@NoArgsConstructor
+@Data
+public class SubmitAuditReq {
+
+    @JSONField(name="proposalNoSubList")
+    private List<ProposalNoSubListDTO> proposalNoSubList;
+    @JSONField(name="userCode")
+    private String userCode;
+
+    @NoArgsConstructor
+    @Data
+    public static class ProposalNoSubListDTO {
+        @JSONField(name="proposalNoBI")
+        private String proposalNoBI;
+        @JSONField(name="proposalNoCI")
+        private String proposalNoCI;
+    }
+
+
+    /**
+     * 构造报价请求参数
+     *
+     * @author: lig
+     * @date: 2023年08月14日 0014
+     */
+    @JsonIgnore
+    public static SubmitAuditReq buildParam(InsAreaCompany iac, ChannelInfoDto channelInfo) {
+
+        SubmitAuditReq req = new SubmitAuditReq();
+        req.setUserCode(channelInfo.getHandlerCode());
+
+        List<ProposalNoSubListDTO> proposalNoSubList = new ArrayList<>();
+        ProposalNoSubListDTO dto = new ProposalNoSubListDTO();
+        dto.setProposalNoCI(iac.getJqapplyno());
+        dto.setProposalNoBI(iac.getSyapplyno());
+
+        proposalNoSubList.add(dto);
+
+        req.setProposalNoSubList(proposalNoSubList);
+
+        return req;
+
+
+
+    }
+}

+ 34 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/SubmitAuditResp.java

@@ -0,0 +1,34 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 提交核保 出参
+ */
+@NoArgsConstructor
+@Data
+public class SubmitAuditResp {
+
+    @JSONField(name="resultCode")
+    private Integer resultCode;
+    @JSONField(name="resultMsg")
+    private String resultMsg;
+    @JSONField(name="data")
+    private List<DataDTO> data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JSONField(name="message")
+        private String message;
+        @JSONField(name="underWriteFlagCI")
+        private String underWriteFlagCI;
+        @JSONField(name="underWriteFlagBI")
+        private String underWriteFlagBI;
+    }
+}

+ 100 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/VinQueryReq.java

@@ -0,0 +1,100 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeId;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.ya.CarModel_Req;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * vin查询 入参
+ */
+@NoArgsConstructor
+@Data
+public class VinQueryReq {
+
+
+
+    /**
+     * 车架号
+     */
+    @JSONField(name="frameNo")
+    private String frameNo;
+
+    /**
+     * 发动机号
+     */
+    @JSONField(name="engineNo")
+    private String engineNo;
+
+    /**
+     * 车牌
+     */
+    @JSONField(name="licenseNo")
+    private String licenseNo;
+
+    /**
+     * 机构代码
+     */
+    @JSONField(name="comCode")
+    private String comCode;
+
+    /**
+     * 操作人员
+     */
+    @JSONField(name="userCode")
+    private String userCode;
+
+
+
+    /**
+     * 构造VIN请求参数
+     *
+     * @author: lig
+     * @date: 2023年08月14日 0014
+     */
+    @JsonIgnore
+    public static VinQueryReq buildParam(CarModel_Req carModelReq,ChannelInfoResp channelInfo) {
+
+        VinQueryReq vinReq = new VinQueryReq();
+        vinReq.setFrameNo(carModelReq.getFrameNo());
+        vinReq.setEngineNo(carModelReq.getEngineNo());
+        vinReq.setLicenseNo(carModelReq.getLicenseNo());
+
+
+        vinReq.setComCode(channelInfo.getData().get(0).getPrptmain().getComCode());
+        vinReq.setUserCode(channelInfo.getData().get(0).getPrptmain().getHandlerCode());
+//        vinReq.setComCode("160700A8");
+//        vinReq.setUserCode("S1600104");
+
+
+        return vinReq;
+
+    }
+    /**
+     * 构造VIN请求参数
+     *
+     * @author: lig
+     * @date: 2023年08月14日 0014
+     */
+    @JsonIgnore
+    public static VinQueryReq buildParam2(VinQueryReq vinQueryReq,ChannelInfoDto channelInfo) {
+
+        VinQueryReq vinReq = new VinQueryReq();
+        vinReq.setFrameNo(vinQueryReq.getFrameNo());
+        vinReq.setEngineNo(vinQueryReq.getEngineNo());
+        vinReq.setLicenseNo(vinQueryReq.getLicenseNo());
+
+
+
+        vinReq.setComCode(channelInfo.getComCode());
+        vinReq.setUserCode(channelInfo.getHandlerCode());
+
+
+        return vinReq;
+
+    }
+}

+ 101 - 0
src/main/java/com/ydtech/modules/ins/model/guoRen/VinQueryResp.java

@@ -0,0 +1,101 @@
+package com.ydtech.modules.ins.model.guoRen;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * vin查询 出参
+ */
+@NoArgsConstructor
+@Data
+public class VinQueryResp {
+
+
+    @JSONField(name="resultCode")
+    private Integer resultCode;
+    @JSONField(name="resultMsg")
+    private String resultMsg;
+    @JSONField(name="data")
+    private List<DataDTO> data;
+
+    @NoArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JSONField(name="brandNameBC")
+        private String brandNameBC;
+        @JSONField(name="vehicleAlias")
+        private String vehicleAlias;
+        @JSONField(name="importFlag")
+        private String importFlag;
+        @JSONField(name="factory")
+        private String factory;
+        @JSONField(name="jqxClassname")
+        private String jqxClassname;
+        @JSONField(name="syxClassname")
+        private String syxClassname;
+        @JSONField(name="seatCountBC")
+        private String seatCountBC;
+        @JSONField(name="seatMax")
+        private String seatMax;
+        @JSONField(name="seatMin")
+        private String seatMin;
+        @JSONField(name="tonCount")
+        private String tonCount;
+        @JSONField(name="purchasePriceSZ")
+        private String purchasePriceSZ;
+        @JSONField(name="priceShow")
+        private String priceShow;
+        @JSONField(name="carYear")
+        private String carYear;
+        @JSONField(name="exHaustScale")
+        private String exHaustScale;
+        @JSONField(name="newFuelModel")
+        private String newFuelModel;
+        @JSONField(name="completeKerbMass")
+        private String completeKerbMass;
+        @JSONField(name="completeKerbMassMin")
+        private String completeKerbMassMin;
+        @JSONField(name="content")
+        private ContentDTO content;
+        @JSONField(name="brandCode")
+        private String brandCode;
+        @JSONField(name="power")
+        private String power;
+        @JSONField(name="powerLB")
+        private String powerLB;
+        @JSONField(name="fuelType")
+        private String fuelType;
+        @JSONField(name="gearBoxtyPecode")
+        private String gearBoxtyPecode;
+        @JSONField(name="stopFlagCode")
+        private String stopFlagCode;
+        @JSONField(name="riskTypeCode")
+        private String riskTypeCode;
+        @JSONField(name="riskTypeName")
+        private String riskTypeName;
+        @JSONField(name="vehicleClassNewCode")
+        private String vehicleClassNewCode;
+        @JSONField(name="vehicleClassNewName")
+        private String vehicleClassNewName;
+        @JSONField(name="fullweight")
+        private String fullweight;
+        @JSONField(name="absFlag")
+        private String absFlag;
+        @JSONField(name="vehicleSize")
+        private String vehicleSize;
+        @JSONField(name="transmissionttype")
+        private String transmissionttype;
+        @JSONField(name="modelCodeBC")
+        private String modelCodeBC;
+        @JSONField(name="kindred_PRICE_TAX")
+        private String kindredPriceTax;
+
+        @NoArgsConstructor
+        @Data
+        public static class ContentDTO {
+        }
+    }
+}

+ 164 - 0
src/main/java/com/ydtech/modules/ins/service/InsGuoRenApiService.java

@@ -0,0 +1,164 @@
+package com.ydtech.modules.ins.service;
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.ins.model.guoRen.InsuranceSlipResp;
+import com.ydtech.modules.ins.model.guoRen.NonAutoInsResp;
+import com.ydtech.modules.ins.model.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.ya.CarModel_Req;
+import com.ydtech.modules.ins.model.yc.CallBackRequest;
+import com.ydtech.modules.ins.model.yc.modelsQuery.ModelsQueryResponse;
+import com.ydtech.modules.ins.model.yc.pay.response.AccidentResponse;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
+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 org.springframework.web.bind.annotation.RequestBody;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+import java.util.Map;
+
+public interface InsGuoRenApiService {
+
+
+    //=================API 方式=================
+
+    /**
+     * 获取渠道信息
+     */
+    HttpResult gainChannelInfo(String thirdCode);
+
+
+    /**
+     * 1 车型查询接口
+     */
+    HttpResult modelsQueryApi(CarInfoVo carInfo);
+
+//    /**
+//     * VIN码查询
+//     */
+//    HttpResult vinQueryApi(CarModel_Req carModelReq);
+    /**
+     * 车型查询接口
+     */
+    List<ModelsQueryResponse.VehicleInfo> modelsQuery(CarModel_Req carModelReq);
+//    List<CarModelDTO> modelsQuery(CarModel_Req carModelReq);
+
+//    /**
+//     * 车价查询
+//     */
+//    HttpResult carPrice(BaseQuoteVo<AccidentalDrivingVo> quoteVo);
+
+
+    /**
+     * 2 报价
+     */
+    HttpResult quoteApi(BaseQuoteVo<AccidentalDrivingVo> quoteVo);
+//    HttpResult quoteApi(BaseQuoteInfoVo yaQuoteInfoVo);
+//
+
+    /**
+     * 3 核保
+     */
+    HttpResult auditApi(String orderno);
+
+    /**
+     * 保险公司订单信息
+     */
+    HttpResult insOrderInfo(String iacNo);
+
+    /**
+     * 处理核保待缴费的订单
+     */
+    void toBePaidOrderStatus();
+
+    /**
+     * 获取缴费地址
+     */
+    HttpResult pay(String orderno);
+
+    /**
+     * 4 影像上传
+     *
+     * @param
+     * @return
+     */
+    HttpResult uploadImageApi(String quoteOrderNo);
+//    /**
+//     * 影像上传
+//     *
+//     * @param record
+//     * @return
+//     */
+//    HttpResult UploadImageApi(InsTaskImage record);
+
+//    /**
+//     * 4 获取短信验证码
+//     */
+//    HttpResult getMessageApi(String orderno);
+
+
+
+    /**
+     * 非车列表
+     */
+    NonAutoInsResp.DataDTO gainNonAutoInsList(String goodsCode);
+    /**
+     * (驾意险)意健险方案及险种查询接口
+     */
+    public HttpResult gainAccidentList(AccidentalDrivingQueryVo accidentalDrivingVo);
+
+    /**
+     * (驾意险)同步驾意险
+     */
+    HttpResult syncAccidentInsure(AccidentalDrivingQueryVo accidentalDrivingVo);
+
+    /**
+     * (驾意险)意健险方案及险种查询接口
+     *
+     * @param scheme 方案
+     */
+    AccidentResponse gainAccidentInsure(AccidentalDrivingQueryVo accidentalDrivingVo, NonAutoInsResp.DataDTO.ProdListDTO.ProdRiskListDTO scheme);
+
+
+    /**
+     * 第三方回调通知(支付+承保)
+     *
+     * @author: lig
+     * @date: 2023年02月17日 0017
+     */
+    HttpResult callBackApi(HttpServletRequest request);
+
+    /**
+     * 7 电子投保单获取
+     */
+    HttpResult getPolicyPrintApi(PolicyPrintVo policyPrintVo);
+
+
+    /**
+     * 获取地区编码   通过身份证地址
+     *
+     * @author: lig
+     * @date: 2023年04月12日 0012
+     */
+    Map<String, String> gainRegionCode(String address);
+
+
+//
+//    /**
+//     * 4 获取短信验证码
+//     */
+//    HttpResult getMessageApi(String orderno);
+//
+//
+//    /**
+//     * 6 保单信息同步
+//     */
+//    String updatePolicyApi(Map<String, String> paramMap);
+//
+
+
+    //=================API 方式==end===============
+
+}

+ 2270 - 0
src/main/java/com/ydtech/modules/ins/service/impl/InsGuoRenApiServiceImpl.java

@@ -0,0 +1,2270 @@
+package com.ydtech.modules.ins.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.*;
+import com.ydtech.components.InsAlltrustRequestApiComponents;
+import com.ydtech.constants.InsuranceEnum;
+import com.ydtech.constants.enums.*;
+import com.ydtech.constants.enums.dict.AttachInsureEnum;
+import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
+import com.ydtech.constants.enums.dict.WhetherEnum;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.admin.service.SysDeptService;
+import com.ydtech.modules.admin.service.SysUserService;
+import com.ydtech.modules.esm.dao.EsmInsAttachInsureDetailsMapper;
+import com.ydtech.modules.esm.dao.EsmInsAttachInsureMapper;
+import com.ydtech.modules.esm.model.EsmInsAttachInsure;
+import com.ydtech.modules.esm.model.EsmInsAttachInsureDetails;
+import com.ydtech.modules.esm.model.EsmInsCompany;
+import com.ydtech.modules.esm.model.InsTaskImage;
+import com.ydtech.modules.esm.service.*;
+import com.ydtech.modules.ins.dao.InsAlltrustRegionMapper;
+import com.ydtech.modules.ins.model.InsApiLog;
+import com.ydtech.modules.ins.model.guoRen.*;
+import com.ydtech.modules.ins.model.vo.*;
+import com.ydtech.modules.ins.model.ya.CarModel_Req;
+import com.ydtech.modules.ins.model.ya.YaQuoteInfoVo;
+import com.ydtech.modules.ins.model.yc.*;
+import com.ydtech.modules.ins.model.yc.accident.Accident;
+import com.ydtech.modules.ins.model.yc.accident.response.ResponseYwCvrg;
+import com.ydtech.modules.ins.model.yc.audit.Audit;
+import com.ydtech.modules.ins.model.yc.audit.response.AuditResponse;
+import com.ydtech.modules.ins.model.yc.callbackAnOrder.CallbackAnOrder;
+import com.ydtech.modules.ins.model.yc.imageUp.ImageUp;
+import com.ydtech.modules.ins.model.yc.imageUp.response.ImageUpResponse;
+import com.ydtech.modules.ins.model.yc.modelsQuery.ModelsQueryResponse;
+import com.ydtech.modules.ins.model.yc.modelsQuery.ModelsQueryXml;
+import com.ydtech.modules.ins.model.yc.pay.Pay;
+import com.ydtech.modules.ins.model.yc.pay.response.AccidentResponse;
+import com.ydtech.modules.ins.model.yc.pay.response.PayResponse;
+import com.ydtech.modules.ins.model.yc.policy.Policy;
+import com.ydtech.modules.ins.model.yc.policy.response.PolicyResponse;
+import com.ydtech.modules.ins.model.yc.ruote.Applicant;
+import com.ydtech.modules.ins.model.yc.ruote.Insured;
+import com.ydtech.modules.ins.model.yc.ruote.Ruote;
+import com.ydtech.modules.ins.model.yc.ruote.Vhlowner;
+import com.ydtech.modules.ins.model.yc.ruote.response.RuoteResponse;
+import com.ydtech.modules.ins.service.InsApiLogService;
+import com.ydtech.modules.ins.service.InsGuoRenApiService;
+import com.ydtech.modules.ins.service.InsTaskHistoryService;
+import com.ydtech.modules.order.components.ConfigureParametersComponents;
+import com.ydtech.modules.order.components.InsOrdersComponents;
+import com.ydtech.modules.order.dao.InsTaskImagesMapper;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.dto.InsUploadImagesDto;
+import com.ydtech.modules.order.entity.vo.*;
+import com.ydtech.modules.order.service.InsAreaCompanyService;
+import com.ydtech.modules.order.service.InsOrdersService;
+import com.ydtech.modules.order.service.InsTaskImagesService;
+import com.ydtech.modules.protocol.utils.AssertionUtils;
+import com.ydtech.utils.*;
+import com.ydtech.utils.baidu.FileUtil;
+import lombok.Data;
+import net.bytebuddy.implementation.bytecode.Throw;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.multipart.FilePart;
+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.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.nio.charset.Charset;
+import java.text.SimpleDateFormat;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Collectors;
+
+
+@Service
+public class InsGuoRenApiServiceImpl implements InsGuoRenApiService {
+
+
+    private static final Logger log = LoggerFactory.getLogger("guoRen");
+
+    @Value("${guoRen.baseUrl}")
+    private String baseUrl;
+    @Value("${guoRen.uploadUrl}")
+    private String uploadUrl;
+    @Value("${guoRen.redirectUrl}")
+    private String redirectUrl;
+
+
+    @Value("${upload.file.path}")
+    private String uploadFilePath;
+    @Value("${upload.file.url}")
+    private String showFileUrl;
+    @Value("${api.url}")
+    private String apiUrl;
+
+
+    @Autowired
+    private InsAlltrustRequestApiComponents apiComponents;
+
+    @Autowired
+    private InsAlltrustRegionMapper insAlltrustRegionMapper;
+    @Autowired
+    private InsOrdersComponents insOrdersComponents;
+
+
+    private AuthorityDataXml authorityDataXml = null;
+
+
+    private ObjectMapper xmlMapper = null;
+
+
+    @Autowired
+    private YcBuildData ycBuildData;
+    @Autowired
+    private SysUserService sysUserService;
+    @Autowired
+    private SysDeptService sysDeptService;
+    @Autowired
+    private EsmRetailService esmRetailService;
+    @Autowired
+    private EsmAgreementService esmAgreementService;
+    @Autowired
+    private EsmAgreementProdService esmAgreementProdService;
+    //    @Autowired
+//    private EsmUserInternalService esmUserInternalService;
+    @Autowired
+    private InsTaskHistoryService insTaskHistoryService;
+    @Autowired
+    private InsAreaCompanyService insAreaCompanyService;
+    @Autowired
+    private InsOrdersService insOrdersService;
+    //    @Autowired
+//    private InsTaskImageService insTaskImageService;
+    @Autowired
+    private InsTaskImagesService insTaskImageService;
+    @Autowired
+    private EsmInsAttachInsureMapper esmInsAttachInsureMapper;
+    @Autowired
+    private EsmInsAttachInsureDetailsMapper esmInsAttachInsureDetailsMapper;
+    @Autowired
+    private EsmInsCompanyService esmInsCompanyService;
+
+    @Autowired
+    InsApiLogService insApiLogService;
+    @Autowired
+    ConfigureParametersComponents configureParametersComponents;
+    @Autowired
+    InsTaskImagesMapper insTaskImagesMapper;
+
+//    private ChannelInfoResp channelInfo = null;
+
+    private static ChannelInfoDto channelInfo = null;
+
+//    static {
+//        ChannelInfoResp.DataDTO.PrptmainDTO channel = new ChannelInfoResp.DataDTO.PrptmainDTO();
+//        channel.setComCode("160700A8");
+//        //userCode 取这个
+//        channel.setHandlerCode("151315A0");
+//
+//        channelInfo = channel;
+//    }
+
+
+    //
+    //==============================API 方式
+    //
+
+    /**
+     * 获取渠道信息
+     *
+     * @author: lig
+     * @date: 2023年08月25日 0025
+     */
+    @Override
+    public HttpResult gainChannelInfo(String thirdCode) {
+        Map m = new HashMap();
+        m.put("thirdCode", thirdCode);
+
+        String bodyStr = RequestDto.builRequestDto(m, "IIRBT00018");
+        String result = HttpUtil.sendPost(baseUrl, bodyStr);
+
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+        ChannelInfoResp resp = ResponseDto.buildBody(rest, ChannelInfoResp.class);
+//        channelInfo = resp.getData().get(0);
+
+        return HttpResult.ok(resp);
+    }
+
+
+    /**
+     * 1 车型查询接口
+     */
+    @Override
+    public HttpResult modelsQueryApi(CarInfoVo carInfo) {
+
+        CarModelReq carModelReq = CarModelReq.buildCarModelParam(carInfo);
+
+        String bodyStr = RequestDto.builRequestDto(carModelReq, "IIRBT00002");
+        String result = HttpUtil.sendPost(baseUrl, bodyStr);
+
+        CarModelResp rest = JsonUtils.toObject(result, CarModelResp.class);
+
+        return HttpResult.ok(rest);
+    }
+
+
+    @Override
+    public List<ModelsQueryResponse.VehicleInfo> modelsQuery(CarModel_Req carModelReq) {
+
+
+//
+//
+////    public List<CarModelDTO> modelsQuery(CarModel_Req carModelReq) {
+//        // 获取协议配置信息
+//        YcConfigureParameters ycConfigureParameters = gainYcConfigParams(carModelReq.getAgreementId());
+//
+//
+//        ModelsQueryXml m = buildModelsQueryParam(carModelReq, ycConfigureParameters);
+//         ObjectMapper xmlMapper = null;
+//
+//        log.info("===永诚--车型查询接口请求开始===");
+//        InsApiLog apiLog = httpPost(xmlMapper, m, YcBuildData.API_MODEL);
+//        String responseData = apiLog.getResponseData();
+//        log.info("===永诚--车型查询接口请求结束===");
+//        try {
+//            String cleanStr = YcBuildData.cleanResponseStr(responseData);
+//            ModelsQueryResponse rd = xmlMapper.readValue(cleanStr, ModelsQueryResponse.class);
+//            return buildCarModel(rd);
+//        } catch (IOException e) {
+//            throw new RuntimeException(e);
+//        }
+        return null;
+    }
+
+
+    public void gainVehicleModel(YcConfigureParameters ycConfigureParameters, CarInfoVo carInfo) {
+
+        CarModel_Req carModelReq = new CarModel_Req();
+        carModelReq.setFrameNo(carInfo.getFrameNo());
+        carModelReq.setEngineNo(carInfo.getEngineNo());
+        carModelReq.setEnrollDate(carInfo.getRegisterDate().replaceAll("-", ""));
+
+        ModelsQueryXml m = buildModelsQueryParam(carModelReq, ycConfigureParameters);
+        ObjectMapper xmlMapper = null;
+
+        log.info("===永诚--车型查询接口请求开始===");
+        String responseData = httpPost(xmlMapper, m, YcBuildData.API_MODEL);
+//        String responseData = apiLog.getResponseData();
+        log.info("===永诚--车型查询接口请求结束===");
+        try {
+            String cleanStr = YcBuildData.cleanResponseStr(responseData);
+            ModelsQueryResponse rd = xmlMapper.readValue(cleanStr, ModelsQueryResponse.class);
+            List<ModelsQueryResponse.VehicleInfo> vehicleInfoList = buildCarModel(rd);
+
+            long count = vehicleInfoList.stream().filter(x -> x.getModelCode().equals(carInfo.getModelCode())).count();
+
+            if (count < 1) {
+                //匹配车辆信息
+                vehicleInfoList.stream().forEach(a -> {
+                    //购置价匹配
+                    if (a.getVehiclePrice().equals(carInfo.getPurchasePrice())) {
+                        carInfo.setModelCode(a.getVehicleId());
+//                        carInfo.setCiModelCode(a.getModelCode());
+                        carInfo.setCiCarName(a.getVehicleName());
+                        carInfo.setModelcname(a.getVehicleName());
+                    }
+                });
+            }
+
+
+        } catch (IOException e) {
+            throw new SystemException("车型查询接口异常,请联系管理。");
+        }
+
+
+    }
+
+
+//    /**
+//     * 车价查询
+//     */
+//    @Override
+//    public HttpResult carPrice(BaseQuoteVo<AccidentalDrivingVo> quoteVo) {
+//
+//        RequestDto rDto = RequestDto.builRequestDto();
+//        RequestDto.RequestPackage rpackage = rDto.getRPackage();
+//
+//
+//        BaseQuoteInfoVo yaQuoteInfoVo = insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo());
+//
+//////        //构造车型信息   获取保险公司车型信息
+////        gainVehicleModel(ycConfigureParameters, yaQuoteInfoVo.getCarInfo());
+//
+//        CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
+//        VinQueryReq vinQueryReq = new VinQueryReq();
+//        vinQueryReq.setFrameNo(carInfo.getFrameNo());
+//        vinQueryReq.setLicenseNo(carInfo.getLicenseNo());
+//        vinQueryReq.setEngineNo(carInfo.getEngineNo());
+//
+//        //vin码查询车辆信息
+//        VinQueryResp.DataDTO vinQ = vinQuery(vinQueryReq);
+//
+//        //构造请求参数
+//        CarPriceReq req = CarPriceReq.buildCarPriceParam(yaQuoteInfoVo, vinQ, channelInfo);
+//
+//        //请求参数
+//        rpackage.setRBody(req);
+//        rDto.setRPackage(rpackage);
+//
+//        String bodyStr = JSON.toJSONString(rDto);
+//        String result = HttpUtil.sendPost("https://devyun.guorenpcic.com/api/grchannel-interface/httpCurrency/httpJsonCommonEntrance", bodyStr);
+//
+//        CarPriceResp rest = JsonUtils.toObject(result, CarPriceResp.class);
+////        if(null == rest){
+////            //返回多条
+////            CarPriceListResp restList = JsonUtils.toObject(result, CarPriceListResp.class);
+////        }
+//
+////        // 获取协议配置信息
+////        YcConfigureParameters ycConfigureParameters = gainYcConfigParams(quoteVo.getAgreementId());
+//
+//
+//        return HttpResult.ok("车价查询");
+//
+//    }
+
+
+    /**
+     * 2 报价-
+     */
+    @Override
+    public HttpResult quoteApi(BaseQuoteVo<AccidentalDrivingVo> quoteVo) {
+
+        log.debug("--------报价开始,订单号:{},协议号:{}--------------", quoteVo.getOrderNo(), quoteVo.getAgreementId());
+
+
+        // 获取协议配置信息
+        ChannelInfoDto channelInfo = gainChannelConfigInfo(quoteVo.getAgreementId());
+        if (null == channelInfo) return HttpResult.error("请先配置保险公司渠道信息");
+        this.channelInfo = channelInfo;
+
+        BaseQuoteInfoVo yaQuoteInfoVo = insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo());
+        InsOrders order = insOrdersService.getById(yaQuoteInfoVo.getOrderNo());
+        CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
+
+        /**
+         *  1、vin码查询
+         */
+        log.debug("vin码查询开始---");
+        VinQueryReq vinQueryReq = new VinQueryReq();
+        vinQueryReq.setFrameNo(carInfo.getFrameNo());
+        vinQueryReq.setLicenseNo(carInfo.getLicenseNo());
+        vinQueryReq.setEngineNo(carInfo.getEngineNo());
+
+        VinQueryResp.DataDTO vinQ = vinQuery(vinQueryReq);
+        if (null == vinQ) return HttpResult.error("未找到匹配的车辆信息");
+        log.debug("vin码查询通过---");
+
+        /**
+         *  2、车价查询
+         */
+        CarPriceResp.DataDTO carPriceResult = carPriceQuery(yaQuoteInfoVo, vinQ);
+        if (null == carPriceResult) return HttpResult.error("车价获取失败");
+//        String redisNum = buildCarPriceQueryUidNum(order.getOrderno());
+
+        log.debug("车价查询通过");
+
+
+        /**
+         *  3、保费计算
+         */
+        PremiumResp.DataDTO premiumResult = premiumQuery(yaQuoteInfoVo, carPriceResult, vinQ);
+
+
+        if (null == premiumResult) return HttpResult.error("保费计算失败");
+        log.debug("保费计算通过");
+
+        //转保
+
+//
+//        /**
+//         * 创建非车订单
+//         */
+//        nonAutoInsOrder(quoteVo.getAccidentalDrivingVo(), carPriceResult.getInputvo());
+
+        QuoteRespVo quoteRespVo = buildQuoteRespVo(order, premiumResult, yaQuoteInfoVo);
+        //8 生成订单
+        InsAreaCompany iac = response_order(order, quoteRespVo, quoteVo);
+        //生成订单扩展
+        responseOrderExtend(iac, quoteRespVo, premiumResult, carPriceResult.getInputvo());
+        insAreaCompanyService.save(iac);
+
+        quoteRespVo.setCompanyId(iac.getId());
+
+
+//        // 获取协议配置信息
+//        YcConfigureParameters ycConfigureParameters = gainYcConfigParams(quoteVo.getAgreementId());
+
+//        //车价编号临时放入reids
+//        RedisUtils.set(redisNum, carPriceResult.getInputvo(), 43200);
+        log.debug("--------报价结束,车牌:{},vin:{}--------------", carInfo.getLicenseNo(), carInfo.getVinNo());
+
+        return HttpResult.ok("报价成功", quoteRespVo);
+
+    }
+
+
+    /**
+     * 3 核保
+     *
+     * @param quoteOrderNo
+     */
+    @Override
+    @Transactional
+    public HttpResult auditApi(String quoteOrderNo) {
+        log.debug("----------核保开始,订单号:{}---------", quoteOrderNo);
+
+        //子订单
+        InsAreaCompany iac = insAreaCompanyService.getById(quoteOrderNo);
+        AssertionUtils.isEmpty(iac, "订单不存在");
+        if (iac != null) {
+            // 获取协议配置信息
+            ChannelInfoDto channelInfo = gainChannelConfigInfo(iac.getAgreementId());
+            AssertionUtils.isEmpty(channelInfo, "请先配置保险公司渠道信息");
+            this.channelInfo = channelInfo;
+
+        }
+        InsOrders order = insOrdersService.getById(iac.getOrderno());
+
+
+        //核保基本赋值
+        iac.setAudittime(LocalDateTime.now());
+        iac.setAuditid(order.getUserid());
+        iac.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
+
+        BaseQuoteInfoVo yaQuoteInfoVo = insOrdersComponents.getQuoteInfo(order.getOrderno());
+
+        //2、核保
+        SubmitAuditResp auditResp = submitAudit(iac);
+
+        //核保状态 0初始值/1通过/2不通过/3 无需核保 9待核保
+        String statusJq = auditResp.getData().get(0).getUnderWriteFlagCI();
+        String statusSy = auditResp.getData().get(0).getUnderWriteFlagBI();
+        if (StringUtils.isEmpty(statusJq) && StringUtils.isEmpty(statusSy))
+            return HttpResult.error("核保失败:" + auditResp.getData().get(0).getMessage());
+
+        //单交  核保状态 0初始值/1通过/2不通过/3 无需核保 9待核保
+        if (StringUtils.isNotEmpty(statusJq) && StringUtils.isEmpty(statusSy)) {
+            if (statusJq.equals("1") || statusJq.equals("3")) {
+                iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+            } else if (statusJq.equals("2")) {
+                iac.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
+            }
+
+        }
+        //单商
+        if (StringUtils.isEmpty(statusJq) && StringUtils.isNotEmpty(statusSy)) {
+            if (statusSy.equals("1") || statusSy.equals("3")) {
+                iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+            } else if (statusSy.equals("2")) {
+                iac.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
+            }
+
+        }
+        //交商
+        if (StringUtils.isNotEmpty(statusJq) && StringUtils.isNotEmpty(statusSy)) {
+            if (statusJq.equals("2") || statusSy.equals("2")) {
+                iac.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
+            } else if (statusJq.equals("1") && statusSy.equals("1")) {
+                iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+            } else if (statusJq.equals("3") && statusSy.equals("3")) {
+                iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+            }
+
+        }
+
+
+        if (iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_AUDIT.getCode())) {
+            insAreaCompanyService.updateById(iac);
+            return HttpResult.error(auditResp.getData().get(0).getMessage());
+        }
+
+
+        InsUtils.buildOrderStatus(order, iac);
+
+
+        iac.setJqappoint(""); //交强特别约定
+        iac.setSyappoint(""); //商业特别约定
+
+        if (iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
+//            //获取缴费地址
+//            PayResp.DataDTO payResp = pay(iac);
+//            iac.setPaymentLink(payResp.getPayUrl());
+            //获取签名地址
+            SignatureResp.DataDTO signature = signature(iac);
+            if (null == signature) log.error("核保操作:获取签名链接失败");
+            iac.setPaymentLink(signature.getElecapplyurl());
+
+        } else {
+            return HttpResult.error("核保操作失败,状态:" + InsOrderStatusEnum.matchKey(iac.getOrderstatus()).getDesc());
+        }
+        insAreaCompanyService.updateById(iac);
+        insOrdersService.updateByOrderStatus(order.getOrderno(), order.getOrderstatus());
+
+
+        log.debug("----------核保结束,订单号:{}---------", quoteOrderNo);
+
+        return HttpResult.ok();
+    }
+
+
+    /**
+     * 获取保险公司订单信息
+     *
+     * @param quoteOrderNo
+     */
+    @Override
+    @Transactional
+    public HttpResult insOrderInfo(String iacNo) {
+
+        //子订单
+        InsAreaCompany iac = insAreaCompanyService.getById(iacNo);
+        AssertionUtils.isEmpty(iac, "订单不存在");
+        if (iac != null) {
+            // 获取协议配置信息
+            ChannelInfoDto channelInfo = gainChannelConfigInfo(iac.getAgreementId());
+            AssertionUtils.isEmpty(channelInfo, "请先配置保险公司渠道信息");
+            this.channelInfo = channelInfo;
+
+        }
+        InsOrders order = insOrdersService.getById(iac.getOrderno());
+
+        InsOrderStatusResp iosr = insOrderStatus(iac);
+
+        if (null != iosr && CollUtil.isNotEmpty(iosr.getData())) {
+
+            InsOrderStatusResp.DataDTO jqDataDTO = iosr.getData().stream().filter(a -> a.getProposalNo().equals(iac.getJqapplyno())).findFirst().orElse(null);
+            InsOrderStatusResp.DataDTO syDataDTO = iosr.getData().stream().filter(b -> b.getProposalNo().equals(iac.getSyapplyno())).findFirst().orElse(null);
+
+            //待核保订单处理
+            if (iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_AUDIT.getCode())) {
+
+                //单交
+                boolean jqBoo = null != jqDataDTO && null == syDataDTO && jqDataDTO.getUnderwriteFlag().equals("1");
+                //单商
+                boolean syBoo = null != syDataDTO && null == jqDataDTO && syDataDTO.getUnderwriteFlag().equals("1");
+                //交商
+                boolean jqSyBoo = null != syDataDTO && null != jqDataDTO && syDataDTO.getUnderwriteFlag().equals("1") && jqDataDTO.getUnderwriteFlag().equals("1");
+
+                if (jqBoo || syBoo || jqSyBoo) {
+                    iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+                    //更新支付链接
+                    PayResp.DataDTO payResp = pay(iac);
+                    iac.setPaymentLink(payResp.getPayUrl());
+                    insAreaCompanyService.updateById(iac);
+                    return HttpResult.ok();
+                }
+
+
+            }
+
+            boolean updateFlag = false;
+            if (null != jqDataDTO && StringUtils.isNotEmpty(jqDataDTO.getPolicyNo())) {
+                iac.setJqpolicyno(jqDataDTO.getPolicyNo());
+                updateFlag = true;
+            }
+            if (null != syDataDTO && StringUtils.isNotEmpty(syDataDTO.getPolicyNo())) {
+                iac.setSypolicyno(syDataDTO.getPolicyNo());
+                updateFlag = true;
+            }
+            if (updateFlag) {
+                iac.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+                order.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+                insAreaCompanyService.updateById(iac);
+                insOrdersService.updateById(order);
+            }
+        }
+
+
+        return HttpResult.ok();
+    }
+
+    @Override
+    public void toBePaidOrderStatus() {
+
+        log.info("《国任定时任务》---------更新订单状态开始---------------");
+        LambdaQueryWrapper<InsAreaCompany> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(InsAreaCompany::getOrderstatus, InsOrderStatusEnum.WAIT_PAY.getCode());
+        lqw.gt(InsAreaCompany::getAudittime, LocalDate.now().minusDays(1));
+        //国任
+        lqw.likeRight(InsAreaCompany::getCompanyId, InsuranceEnum.XDCX.getCode());
+        List<InsAreaCompany> list = insAreaCompanyService.list(lqw);
+
+        if (null != list && list.size() > 0) {
+            list.stream().forEach(a -> {
+                insOrderInfo(a.getId());
+            });
+        }
+        log.info("《国任定时任务》---------更新订单状态 结束---------------");
+    }
+
+
+    /**
+     * 获取支付链接  单独用
+     *
+     * @author: lig
+     * @date: 2023年09月26日 0026
+     */
+    @Override
+    @Transactional
+    public HttpResult pay(String companyId) {
+
+        // 获取协议配置信息
+        ChannelInfoDto channelInfo = gainChannelConfigInfo("115");
+        if (null == channelInfo) return HttpResult.error("请先配置保险公司渠道信息");
+        this.channelInfo = channelInfo;
+
+        //子订单
+        InsAreaCompany iac = insAreaCompanyService.getById(companyId);
+        if (iac == null) {
+            return HttpResult.error("订单不存在");
+        }
+        InsOrders order = insOrdersService.getById(iac.getOrderno());
+
+        BaseQuoteInfoVo yaQuoteInfoVo = insOrdersComponents.getQuoteInfo(order.getOrderno());
+
+//        InsuranceSlipResp insuranceSlip = gainInsuranceSlip(yaQuoteInfoVo.getOrderNo());
+
+        //获取缴费地址
+        PayResp.DataDTO payResp = pay(iac);
+        iac.setPaymentLink(payResp.getPayUrl());
+
+//        insAreaCompanyService.updateById(iac);
+
+
+        return HttpResult.ok(iac);
+    }
+
+
+    /**
+     * 影像上传
+     */
+    @Override
+    public HttpResult uploadImageApi(String quoteOrderNo) {
+
+        InsAreaCompany iac = insAreaCompanyService.getByIdIsExist(quoteOrderNo);
+        // 获取协议配置信息
+        ChannelInfoDto channelInfo = gainChannelConfigInfo(iac.getAgreementId());
+        if (null == channelInfo) return HttpResult.error("请先配置保险公司渠道信息");
+        this.channelInfo = channelInfo;
+
+        InsOrders order = insOrdersService.getById(iac.getOrderno());
+
+        BaseQuoteInfoVo yaQuoteInfoVo = insOrdersComponents.getQuoteInfo(order.getOrderno());
+
+
+        /**
+         *  4、投保单保存
+         */
+        InsuranceSlipResp insuranceSlip = insuranceSlip(yaQuoteInfoVo, iac.getInsOrderNo());
+        if (insuranceSlip.getResultCode() == 1) return HttpResult.error(insuranceSlip.getResultMsg());
+        iac.setJqapplyno(insuranceSlip.getData().getProposalNoDetailVo().getProposalNoCI());
+        iac.setSyapplyno(insuranceSlip.getData().getProposalNoDetailVo().getProposalNoBI());
+
+
+//        String redisNum = buildCarPriceQueryUidNum(yaQuoteInfoVo.getOrderNo());
+//        String uid = RedisUtils.get(redisNum);
+//        //1、投保单保存
+//        InsuranceSlipResp insuranceSlip = insuranceSlip(yaQuoteInfoVo, uid);
+
+//        if(insuranceSlip.getResultCode() == 1) return HttpResult.error(insuranceSlip.getResultMsg());
+
+//        RedisUtils.setObject(buildInsuranceSlipNum(yaQuoteInfoVo.getOrderNo()),insuranceSlip);
+
+        //影像上传
+        imageUpdate(iac, channelInfo);
+
+        insAreaCompanyService.updateById(iac);
+
+
+        return HttpResult.ok();
+    }
+
+
+    /**
+     * 影像上传 调用三方
+     */
+    public void imageUpdate(InsAreaCompany iac, ChannelInfoDto channelInfo) {
+
+        //构造请求参数
+        Map<String, Object> formMap = new HashMap<>();
+        formMap.put("businessNo", StringUtils.isEmpty(iac.getJqapplyno()) ? iac.getSyapplyno() : iac.getJqapplyno());
+        formMap.put("operatorCode", channelInfo.getHandlerCode());
+        formMap.put("comCode", channelInfo.getComCode());
+        formMap.put("fileGroup", "DZ");
+
+
+        List<InsUploadImagesDto> insUploadImagesDtos = insTaskImagesMapper.getByOrderNoInsUploadImagesDtoList(iac.getOrderno());
+        insUploadImagesDtos.stream().forEach(a -> {
+
+            try {
+
+//                FilePart file1 = new FilePart(fileName, new File("https://img0.baidu.com/it/u=3021883569,1259262591&fm=253&fmt=auto&app=120&f=JPEG?w=1140&h=641"));
+                FilePart file1 = new FilePart("file", new File(a.getFilePath()));
+
+
+                Part[] parts = {file1
+                        , new StringPart("businessNo", formMap.get("businessNo").toString())
+                        , new StringPart("operatorCode", formMap.get("operatorCode").toString())
+                        , new StringPart("comCode", formMap.get("comCode").toString())
+                        , new StringPart("fileGroup", formMap.get("fileGroup").toString())
+                };
+
+                String result = HttpUtil.sendPostFromFile(parts, uploadUrl);
+                if (StringUtils.isEmpty(result)) throw new SystemException("国任,影像上传失败");
+
+                JSONObject jsonObject = JSONObject.parseObject(result);
+                if (StringUtils.toInt(jsonObject.get("resultCode")) == 0) return;
+                throw new SystemException("国任,影像上传失败,类型:" + a.getImageType());
+
+
+            } catch (FileNotFoundException e) {
+                throw new RuntimeException(e);
+            }
+
+        });
+
+    }
+
+
+    /**
+     * 支付   获取支付url
+     */
+    public PayResp.DataDTO pay(InsAreaCompany iac) {
+
+        //构造请求参数
+        PayReq req = PayReq.buildParam(iac, redirectUrl, channelInfo);
+        String bodyStr = RequestDto.builRequestDto(req, "IIRBT00008");
+
+        String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "获取支付链接,订单号:" + iac.getId());
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+        PayResp resp = ResponseDto.buildBody(rest, PayResp.class);
+
+        if (null != rest) return resp.getData();
+
+        return null;
+    }
+
+    /**
+     * 签名链接
+     */
+    public SignatureResp.DataDTO signature(InsAreaCompany iac) {
+
+        //构造请求参数
+//        PayReq req = PayReq.buildParam(iac, redirectUrl, channelInfo);
+        Map req = new HashMap();
+        req.put("proposalNo", StringUtils.isEmpty(iac.getJqapplyno()) ? iac.getSyapplyno() : iac.getJqapplyno());
+
+        String bodyStr = RequestDto.builRequestDto(req, "IIRBT00046");
+
+        String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "获取签名链接,订单号:" + iac.getId());
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+        SignatureResp resp = ResponseDto.buildBody(rest, SignatureResp.class);
+
+        if (null != rest) return resp.getData();
+
+        return null;
+    }
+
+    /**
+     * 电子保单
+     */
+    public PolicyResp policyPrint(String policyNo) {
+
+        Map m = new HashMap();
+        m.put("policyNo", policyNo);
+
+        String bodyStr = RequestDto.builRequestDto(m, "IIRBT00027");
+        String result = HttpUtil.sendPost(baseUrl, bodyStr);
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+        PolicyResp resp = ResponseDto.buildBody(rest, PolicyResp.class);
+
+        if (null != resp && resp.getResultCode() == 0) return resp;
+
+        return null;
+    }
+
+
+    /**
+     * 6 电子保单
+     */
+    @Override
+    public HttpResult getPolicyPrintApi(PolicyPrintVo policyPrintVo) {
+
+        //子订单
+        InsAreaCompany iac = insAreaCompanyService.getById(policyPrintVo.getCompanyId());
+        AssertionUtils.isEmpty(iac, "订单不存在");
+        if (iac != null) {
+            // 获取协议配置信息
+            ChannelInfoDto channelInfo = gainChannelConfigInfo(iac.getAgreementId());
+            AssertionUtils.isEmpty(channelInfo, "请先配置保险公司渠道信息");
+            this.channelInfo = channelInfo;
+        }
+        InsOrders order = insOrdersService.getById(iac.getOrderno());
+
+        Map m = new HashMap();
+        String policyUrl = "https://devyun.guorenpcic.com/api/grsavecarcore/savecarcore/getElePolicyForGrecar?certiNo=";
+        if (policyPrintVo.getRiskCode().equals(InsuranceRisk.TRAFFIC.getCode())) {
+            PolicyResp policyResp = policyPrint(iac.getJqpolicyno());
+            //交强险标志
+            String ciFlag = "https://devyun.guorenpcic.com/api/grsavecarcore/savecarcore/getElePolicyFlagForGrecar?certiNo=" + policyResp.getData();
+            //交强险电子保单
+            String ciPolicy = policyUrl + policyResp.getData();
+
+            String jqFlagUrl = gainCarInsPolicy(ciFlag, "1", order.getLicenseno());
+            String jqUrl = gainCarInsPolicy(ciPolicy, "2", order.getLicenseno());
+            m.put("jqFlagUrl", jqFlagUrl);
+            m.put("jqUrl", jqUrl);
+        }
+        if (policyPrintVo.getRiskCode().equals(InsuranceRisk.BUSINESS.getCode())) {
+
+            PolicyResp policyResp = policyPrint(iac.getSypolicyno());
+            //商业险电子保单
+            String biPolicy = policyUrl + policyResp.getData();
+
+            String syUrl = gainCarInsPolicy(biPolicy, "3", order.getLicenseno());
+            m.put("syUrl", syUrl);
+        }
+
+
+        return HttpResult.ok(m);
+
+    }
+
+
+    /**
+     * 获取车险保单  处理保单文件
+     *
+     * @param licensePlate 车牌号
+     * @param flag         标识  1:交强险标志,2:交强险保单,3:商业险保单
+     * @author: lig
+     * @date: 2023年09月21日 0021
+     */
+    public String gainCarInsPolicy(String url, String flag, String licensePlate) {
+        String fileName = licensePlate;
+        if (flag.equals("1")) {
+            fileName += "-交强险标志.pdf";
+
+        } else if (flag.equals("2")) {
+            fileName += "-交强险电子保单.pdf";
+
+        } else if (flag.equals("3")) {
+            fileName += "-商业险电子保单.pdf";
+
+        }
+        String dir = "carInsPolicy/" + licensePlate + "/";
+        return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);
+    }
+
+
+    /**
+     * 驾意外险
+     */
+    @Override
+    public HttpResult gainAccidentList(AccidentalDrivingQueryVo accidentalDrivingVo) {
+
+        return null;
+//        HttpResult httpResult = new HttpResult();
+//
+//        try {
+////            InsAreaCompany iac = insAreaCompanyService.getById(quoteOrderNo);
+////            InsOrders order = insOrdersService.getById(iac.getOrderno());
+////            if (iac == null) {
+////                return HttpResult.error("报价订单不存在");
+////            }
+//
+//            // 获取协议配置信息
+//            ChannelInfoResp.DataDTO.PrptmainDTO channelInfo = gainChannelConfigInfo(accidentalDrivingVo.getAgreementId());
+//            if(null == channelInfo)return HttpResult.error("请先配置保险公司渠道信息");
+//            this.channelInfo = channelInfo;
+//
+//
+//            //组装参数
+//            Accident accident = Accident.buildPayParam(accidentalDrivingVo, ycConfigureParameters, null);
+//
+//            ObjectMapper xmlMapper = null;
+//            //接口请求
+//            log.debug("=========永诚API方式 - xml请求 - 获取意健险方案及险种查询开始======");
+//            InsApiLog apiLog = httpPost(xmlMapper, accident, YcBuildData.API_ACCIDENT);
+//            log.debug("=========永诚API方式 - xml请求 - 获取意健险方案及险种查询结束!======");
+////            verifyRequest(apiLog, iac,InsQuoteFlow.);
+//            String responseData = apiLog.getResponseData();
+//
+//
+//            String cleanStr = YcBuildData.cleanResponseStr(responseData);
+//            AccidentResponse accidentResp = xmlMapper.readValue(cleanStr, AccidentResponse.class);
+//
+//
+//            if (accidentResp.getHead().getResponseCompleteMessageStatus().getMessageStatusCode().equals("E0000")) {
+//                //清空旧的存入表
+//                LambdaQueryWrapper<EsmInsAttachInsure> lqw = new LambdaQueryWrapper<EsmInsAttachInsure>();
+//                lqw.eq(EsmInsAttachInsure::getCompanyId, accidentalDrivingVo.getCompanyCode());
+//                lqw.eq(EsmInsAttachInsure::getSeating, accidentalDrivingVo.getSeatNum());
+//                esmInsAttachInsureMapper.delete(lqw);
+//
+//                List<ResponseYwCvrg.CvrgList> cList = accidentResp.getResponseYwCvrg().getCvrgList();
+//
+//                List<EsmInsAttachInsure> eiaiList = new ArrayList<>();
+//                cList.stream().forEach(a -> {
+//                    EsmInsAttachInsure ati = new EsmInsAttachInsure();
+//                    ati.setCode(a.getCInsuranceTypeCode());
+//                    ati.setName(a.getCInsuranceType());
+//                    ati.setSeating(accidentalDrivingVo.getSeatNum() + "");
+//                    ati.setCompanyId(accidentalDrivingVo.getCompanyCode());
+//                    ati.setType(AttachInsureEnum.AI001.getCode());
+//                    ati.setEnable(WhetherEnum.YES.getCode());
+//                    ati.setRestrictNum(StringUtils.toInt(a.getNPurchaseLimitsNum()));
+//
+//                    esmInsAttachInsureMapper.insert(ati);
+//                    eiaiList.add(ati);
+//                });
+//
+//
+//                httpResult.setData(eiaiList);
+////                httpResult.setData(accidentResp.getResponseYwCvrg().getCvrgList());
+//                httpResult.setMsg(accidentResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription());
+//            } else {
+//                httpResult.setMsg(accidentResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription());
+//            }
+//
+//        } catch (SystemException e) {
+//            return HttpResult.error(e.getMessage());
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            return HttpResult.error("系统错误,请联系管理员");
+//        }
+//        return httpResult;
+    }
+
+
+    /**
+     * 驾意外险  同步
+     */
+    @Override
+    public HttpResult syncAccidentInsure(AccidentalDrivingQueryVo accidentalDrivingVo) {
+
+
+        //家用车驾乘意外险-山西版(02746425173001)
+        String goodsCode = "02746425173001";
+        NonAutoInsResp.DataDTO nonAutoIns = gainNonAutoInsList(goodsCode);
+
+
+//        AccidentResponse ar = gainAccidentInsure(accidentalDrivingVo, null);
+//        List<EsmInsAttachInsure> eiaiList = new ArrayList<>();
+
+        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.stream().forEach(i -> {
+                    ids.add(i.getId());
+                });
+                LambdaQueryWrapper<EsmInsAttachInsureDetails> lqwDetails = new LambdaQueryWrapper<>();
+                lqwDetails.in(EsmInsAttachInsureDetails::getAttachInsureId, ids);
+                //详情删除
+                esmInsAttachInsureDetailsMapper.delete(lqwDetails);
+
+                //            esmInsAttachInsureMapper.delete(lqw);
+                esmInsAttachInsureMapper.deleteBatchIds(ids);
+            }
+
+            List<NonAutoInsResp.DataDTO.ProdListDTO> prodList = nonAutoIns.getProdList();
+
+
+            prodList.stream().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().stream().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
+    public AccidentResponse gainAccidentInsure(AccidentalDrivingQueryVo accidentalDrivingVo, NonAutoInsResp.DataDTO.ProdListDTO.ProdRiskListDTO scheme) {
+//        HttpResult httpResult = new HttpResult();
+//
+//        // 获取协议配置信息
+//        YcConfigureParameters ycConfigureParameters = gainYcConfigParams(accidentalDrivingVo.getAgreementId());
+//        //组装参数
+//        Accident accident = Accident.buildPayParam(accidentalDrivingVo, ycConfigureParameters, schemeNo);
+//
+//        ObjectMapper xmlMapper = null;
+//        //接口请求
+//        log.debug("=========永诚API方式 - xml请求 - 获取意健险方案及险种查询开始======");
+//        InsApiLog apiLog = httpPost(xmlMapper, accident, YcBuildData.API_ACCIDENT);
+//        log.debug("=========永诚API方式 - xml请求 - 获取意健险方案及险种查询结束!======");
+////            verifyRequest(apiLog, iac,InsQuoteFlow.);
+//        String responseData = apiLog.getResponseData();
+//
+//
+//        String cleanStr = YcBuildData.cleanResponseStr(responseData);
+//        AccidentResponse accidentResp = null;
+//        try {
+//            accidentResp = xmlMapper.readValue(cleanStr, AccidentResponse.class);
+//        } catch (JsonProcessingException e) {
+//            log.error("转换错误 方法:gainAccidentInsure  类:AccidentResponse");
+//            throw new RuntimeException(e);
+//        }
+//        return accidentResp;
+
+
+        return null;
+
+
+    }
+
+
+    @Override
+    @Transactional
+    public HttpResult callBackApi(HttpServletRequest request) {
+
+        //支付流水号
+        String orderNo = request.getParameter("orderNo");
+        //承保状态  0未承保 1承保
+        String type = request.getParameter("type");
+        //支付结果  0成功 1失败
+        String payResult = request.getParameter("result");
+        //错误信息  有则必传
+        String message = request.getParameter("message");
+        //保单号   多个保单号用:连接
+        String proposalNo = request.getParameter("proposalNo");
+        //投保单号  多个投保单号用:连接
+        String policyNo = request.getParameter("policyNo");
+        //订单号
+        String orderId = request.getParameter("orderId");
+        //验签信息  MD5(要素1+3+2+4+5+6+7+私钥)
+        String signMsg = request.getParameter("signMsg");
+
+        List<String> proposalNoList = Arrays.asList(proposalNo.split(":"));
+
+
+        if (type.equals("1")) {
+
+            LambdaQueryWrapper<InsAreaCompany> lqw = new LambdaQueryWrapper();
+            lqw.or(a -> a.eq(InsAreaCompany::getJqapplyno, proposalNoList.get(0)).eq(InsAreaCompany::getSyapplyno, proposalNoList.get(1)));
+//            //交强投保单号查询
+//            lqw.eq(StringUtils.isNotEmpty(param.getCiPolicyAppNo()), InsAreaCompany::getJqapplyno, param.getCiPolicyAppNo());
+//            //商业投保单号查询
+//            lqw.eq(StringUtils.isNotEmpty(param.getBizPolicyAppNo()), InsAreaCompany::getSyapplyno, param.getBizPolicyAppNo());
+            InsAreaCompany iac = insAreaCompanyService.getOne(lqw);
+
+
+            if (null != iac) {
+//                if (StringUtils.isNotEmpty(param.getBizPolicyNo())) iac.setSypolicyno(param.getBizPolicyNo());
+//                if (StringUtils.isNotEmpty(param.getCiPolicyNo())) iac.setJqpolicyno(param.getCiPolicyNo());
+
+                iac.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+
+
+                InsOrders order = insOrdersService.getById(iac.getOrderno());
+                if (StringUtils.toInt(order.getOrderstatus()) < StringUtils.toInt(iac.getOrderstatus())) {
+                    order.setOrderstatus(iac.getOrderstatus());
+                }
+
+                insAreaCompanyService.updateById(iac);
+                insOrdersService.updateByOrderStatus(order.getOrderno(), order.getOrderstatus());
+
+                return HttpResult.ok("承保");
+
+
+            }
+        }
+        return HttpResult.ok("未承保");
+    }
+
+
+    /**
+     * @description:构造车型查询参数
+     * @author: lig
+     * @date: 2023年02月08日 0008
+     */
+    private ModelsQueryXml buildModelsQueryParam(CarModel_Req carModelReq, YcConfigureParameters ycConfigureParameters) {
+        ModelsQueryXml m = new ModelsQueryXml();
+        ModelsQueryXml.RequestLabel requestLabel = new ModelsQueryXml.RequestLabel();
+        requestLabel.setSearchKeyword(carModelReq.getFrameNo().substring(0, 8));
+        requestLabel.setVid(carModelReq.getFrameNo());
+        requestLabel.setEngineNo(carModelReq.getEngineNo());
+        requestLabel.setDptCde(ycConfigureParameters.getDptCde());
+        requestLabel.setProno("0326");
+        requestLabel.setMotorTypeCode("11");
+        requestLabel.setCFstRegYm(carModelReq.getEnrollDate());
+        requestLabel.setAuthorityData(ycConfigureParameters.gainAuthorityDataXml());
+
+
+        m.setRequestLabel(requestLabel);
+
+
+        return m;
+    }
+
+
+    /**
+     * @description: 构造返回内容,参考永安
+     * @author: lig
+     * @date: 2023年02月07日 0007
+     */
+    private List<ModelsQueryResponse.VehicleInfo> buildCarModel(ModelsQueryResponse modelsQueryResponse) {
+        List<ModelsQueryResponse.VehicleInfo> vList = modelsQueryResponse.getVehicleInfoList();
+        return vList;
+    }
+
+
+    private <T> String httpPost(ObjectMapper mapper, T requestData, String apiName) {
+
+        String xmlString = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tns=\"http://newWS.front.app.echannel.ebiz.alltrust.com/\">";
+        xmlString += "<soapenv:Body>";
+        try {
+            mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+            xmlString += mapper.writeValueAsString(requestData);
+
+            xmlString += "</soapenv:Body>\n" +
+                    "</soapenv:Envelope>";
+
+        } catch (JsonProcessingException e) {
+            throw new RuntimeException("永诚API方式-xml转换失败");
+        }
+        String s = HttpXmlUtil.sendPost(apiComponents.getUrl() + apiName, xmlString);
+        return s;
+    }
+
+
+    /**
+     * @description: 拷贝永安方法,可以封装
+     * @author: lig
+     * @date: 2023年02月08日 0008
+     */
+    private void checkEmpty(YaQuoteInfoVo yaQuoteInfoVo) {
+
+        if (yaQuoteInfoVo.getCarInfo() == null) {
+            throw new SystemException("carInfo不能为空!");
+        }
+        if (yaQuoteInfoVo.getPolicyHolderInfo() == null || yaQuoteInfoVo.getInsuredPersonInfo() == null) {
+            throw new SystemException("policyHolderInfo/insuredPersonInfo 不能为空!");
+        }
+        if (yaQuoteInfoVo.getRiskList() == null || yaQuoteInfoVo.getRiskList().size() == 0) {
+            throw new SystemException("riskList 不能为空!");
+        } else {
+            for (RiskInfoVo riskInfoVo : yaQuoteInfoVo.getRiskList()) {
+                if (riskInfoVo.getStartDate() == null || riskInfoVo.getEndDate() == null) {
+                    throw new SystemException("riskList.startDate / riskList.endDate不能为空!");
+                }
+            }
+        }
+
+    }
+
+
+    /**
+     * 新订单 - 子订单  改造为通用
+     *
+     * @author: lig
+     * @date: 2023-10-18
+     */
+    private InsAreaCompany response_order(InsOrders insOrder, QuoteRespVo quoteRespVo, BaseQuoteVo<AccidentalDrivingVo> quoteVo) {
+
+
+        EsmInsCompany eic = esmInsCompanyService.getById(quoteVo.getCompanyId());
+
+
+        //保存订单信息
+        InsAreaCompany insAreaCompany = new InsAreaCompany();
+        insAreaCompany.setOrderno(insOrder.getOrderno());
+        insAreaCompany.setSumpremium(BigDecimal.valueOf(quoteRespVo.getSumPermium()));
+        insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
+        insAreaCompany.setRiskinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getRiskList())));
+        insAreaCompany.setKindinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getKindList())));
+        insAreaCompany.setCreatetime(LocalDateTime.now());
+        insAreaCompany.setInsOrderNo(StringUtils.EMPTY);
+        insAreaCompany.setCompanyId(eic.getId());
+        insAreaCompany.setInscompany(eic.getNamesimple());
+        insAreaCompany.setAgreementId(quoteVo.getAgreementId());
+
+//        insAreaCompany.setJqapplyno(proposalNoDetailVo.getProposalNoCI());
+//        insAreaCompany.setSyapplyno(proposalNoDetailVo.getProposalNoBI());
+
+        insAreaCompany.setJqStartDate(quoteRespVo.getStartDateJq());
+        insAreaCompany.setJqEndDate(quoteRespVo.getEndDateJq());
+
+        insAreaCompany.setSyStartDate(quoteRespVo.getStartDateSy());
+        insAreaCompany.setSyEndDate(quoteRespVo.getEndDateSy());
+
+        return insAreaCompany;
+
+
+    }
+
+    /**
+     * 新订单 - 子订单  补充
+     *
+     * @author: lig
+     * @date: 2023-10-18
+     */
+    private void responseOrderExtend(InsAreaCompany iac, QuoteRespVo quoteRespVo, PremiumResp.DataDTO premiumResult, String carPriceUuid) {
+
+        //交强保费 含税
+        BigDecimal jqPremium = BigDecimal.valueOf(StringUtils.toDouble(premiumResult.getSumPremiumCI()));
+        //商业保费 含税
+        BigDecimal syPremium = BigDecimal.valueOf(StringUtils.toDouble(premiumResult.getSumPremiumBI()));
+
+
+        boolean jq_falg = jqPremium.doubleValue() > 0 ? true : false;
+        //保存订单信息
+        iac.setReptxt(JSONObject.parseObject(JSONObject.toJSONString(premiumResult)));
+        iac.setJqpremium(jqPremium);
+        iac.setSypremium(syPremium);
+        iac.setTaxamount(BigDecimal.valueOf(jq_falg ? quoteRespVo.getTaxAmount() : 0));
+        iac.setScore(StringUtils.toString(premiumResult.getBirate().getBillcomeGroup()));
+
+        StringBuffer sb = new StringBuffer();
+        sb.append("出险信息,交强险:");
+        if (CollUtil.isNotEmpty(premiumResult.getCiInsureDemandPay())) {
+            sb.append(premiumResult.getCiInsureDemandPay().size());
+        } else {
+            sb.append("0");
+
+        }
+
+        //商业险出险次数
+        iac.setAccidentStrInfo(sb.toString());
+
+        //@TODO 临时用保险公司订单号存放   投保单查询需要
+        iac.setInsOrderNo(carPriceUuid);
+
+
+    }
+
+
+    public static double add(double v1, double v2) {
+
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+
+        return b1.add(b2).doubleValue();
+
+    }
+
+
+    public static String getUserName() {
+
+        return "";
+//        String userName = null;
+//        Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
+//
+//        if (principal instanceof UserDetails) {
+//            userName = ((UserDetails) principal).getUsername();
+//        } else {
+//            userName = principal.toString();
+//        }
+//        return userName;
+    }
+
+    /**
+     * 验证远程请求
+     *
+     * @author: lig
+     * @date: 2023年02月22日 0022
+     */
+    private void verifyRequest(InsApiLog apiLog, InsAreaCompany insAreaCompany, InsQuoteFlow iqf) {
+        //增加api日志
+        insApiLogService.insertAsync(new InsApiLog(insAreaCompany, apiLog, iqf));
+        if (StringUtils.isNotEmpty(apiLog.getExceptionMsg())) {
+            throw new SystemException("远程接口调用异常");
+//            throw new RuntimeException("远程接口调用异常");
+        }
+
+    }
+//    /**
+//     * 验证远程请求
+//     *
+//     * @author: lig
+//     * @date: 2023年02月22日 0022
+//     */
+//    private void verifyRequest(InsApiLog apiLog, InsAreaCompany insAreaCompany) {
+//        //增加api日志
+//        insApiLogService.insertAsync(new InsApiLog(insAreaCompany, apiLog));
+//        if (StringUtils.isNotEmpty(apiLog.getExceptionMsg())) {
+//            throw new RuntimeException("远程接口调用异常");
+//        }
+//
+//    }
+
+    /**
+     * 更新api log
+     *
+     * @author: lig
+     * @date: 2023-03-21
+     */
+    private void updateApiLog(InsApiLog apiLog, InsAreaCompany iac) {
+        if (null != apiLog && null != iac) {
+            apiLog.setOrderNo(StringUtils.toString(iac.getId()));
+//            apiLog.setOrderStatus(iac.getOrderstatus());
+            insApiLogService.UpdateAsync(apiLog);
+        }
+
+    }
+
+
+    @Override
+    public Map<String, String> gainRegionCode(String address) {
+
+//        log.debug("*********永诚API方式 - 身份证地址解析 参数:" + address);
+        Map<String, String> m = IDCardUtils.addressResolution(address);
+        if (null == m) return null;
+        String city = m.get("city");
+        String district = m.get("district");
+//        if(StringUtils.isNullOrEmpty(district)){
+//            //第二级赋值到第三级
+//            district = city;
+//        }
+
+        List<InsAlltrustRegion> areaList = new ArrayList<>();
+        if (StringUtils.isNotEmpty(district)) {
+            //查询地区
+            LambdaQueryWrapper<InsAlltrustRegion> lqw = new LambdaQueryWrapper<>();
+            lqw.eq(InsAlltrustRegion::getArea, district);
+            areaList = insAlltrustRegionMapper.selectList(lqw);
+        }
+
+
+        //如果地区查不到 用城市当地区查
+        if (null == areaList || areaList.size() < 1) {
+            LambdaQueryWrapper<InsAlltrustRegion> cityLqw = new LambdaQueryWrapper<>();
+            cityLqw.eq(InsAlltrustRegion::getArea, city);
+            areaList = insAlltrustRegionMapper.selectList(cityLqw);
+        }
+        if (null != areaList && areaList.size() > 0) {
+            Map rMap = new HashMap();
+            rMap.put("provinceCode", areaList.get(0).getProvinceCode());
+            rMap.put("cityCode", areaList.get(0).getCityCode());
+            rMap.put("areaCode", areaList.get(0).getAreaCode());
+            return rMap;
+        }
+        return null;
+    }
+
+
+    private void buildRegion(Ruote m) {
+        //车主
+        Vhlowner owner = m.getRequestLabel().getCondition().getVhlowner();
+        //被保人
+        Insured i = m.getRequestLabel().getCondition().getInsured();
+        //投保人
+        Applicant a = m.getRequestLabel().getCondition().getApplicant();
+
+
+        String provinceCode = "provinceCode";
+        String cityCode = "cityCode";
+        String areaCode = "areaCode";
+//        owner.getCAreaCde()
+
+        Map<String, String> ownerMap = gainRegionCode(owner.getCWaddress());
+        if (null != ownerMap && ownerMap.size() > 0) {
+            owner.setCProvince(ownerMap.get(provinceCode));
+            owner.setCCity(ownerMap.get(cityCode));
+            owner.setCCounty(ownerMap.get(areaCode));
+            //清空格式化 自建数据
+            owner.setCWaddress(null);
+        } else {
+            throw new SystemException("永诚 - 车主地区获取失败,请联系管理员");
+        }
+
+        Map<String, String> iMap = gainRegionCode(i.getCClntAddr());
+        if (null != iMap && iMap.size() > 0) {
+            i.setCProvince(iMap.get(provinceCode));
+            i.setCCity(iMap.get(cityCode));
+            i.setCCounty(iMap.get(areaCode));
+        } else {
+            throw new SystemException("永诚 - 被保人地区获取失败,请联系管理员");
+        }
+
+        Map<String, String> aMap = gainRegionCode(a.getCClntAddr());
+        if (null != aMap && aMap.size() > 0) {
+            a.setCProvince(aMap.get(provinceCode));
+            a.setCCity(aMap.get(cityCode));
+            a.setCCounty(aMap.get(areaCode));
+        } else {
+            throw new SystemException("永诚 - 投保人地区获取失败,请联系管理员");
+        }
+    }
+
+//    /**
+//     * 构造回调
+//     * 依赖 buildCallBack
+//     *
+//     * @author: lig
+//     * @date: 2023-05-06
+//     */
+//    private InsAreaCompany buildCallBack(InsAreaCompany iac, CallBackRequest param) {
+//        //正常回调 与 补传回调
+//        if (StringUtils.isNotEmpty(param.getStatus())) {
+//            iac = buildCallBackStatus(iac, param.getStatus());
+//        } else {
+//            if (StringUtils.isNotEmpty(param.getJqstatus())) {
+//                iac = buildCallBackStatus(iac, param.getJqstatus());
+//            }
+//            if (StringUtils.isNotEmpty(param.getSystatus())) {
+//                iac = buildCallBackStatus(iac, param.getSystatus());
+//            }
+//
+//        }
+//        return iac;
+//    }
+
+//    /**
+//     * 构造回调状态
+//     *
+//     * @author: lig
+//     * @date: 2023-05-06
+//     */
+//    private InsAreaCompany buildCallBackStatus(InsAreaCompany iac, String status) {
+//        if (status.equals("9")) {
+//            iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+//            //更新支付连接
+//            log.debug("准备进入获取支付连接######################");
+//            iac = getPayUrlApi(iac);
+//            log.debug("结束 - 准备进入获取支付连接######################");
+//        }
+//        if (status.equals("3")) {
+//            iac.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
+//        }
+//        if (status.equals("1")) {
+//            iac.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+//        }
+//        return iac;
+//    }
+
+
+//    /**
+//     * 通过修改参数后 报价
+//     *
+//     * @author: lig
+//     * @date: 2023年05月17日 0017
+//     */
+//    private RuoteResponse quoteApiByEdit(Ruote m) {
+//
+//        RuoteResponse rd = null;
+//
+//        log.debug("=========永诚API方式 - xml请求 - (修改参数后)报价开始======");
+//        InsApiLog apiLog = httpPost(xmlMapper, m, YcBuildData.API_QUOTE);
+//        log.debug("=========永诚API方式 - xml请求 - (修改参数后)报价结束!======");
+//        verifyRequest(apiLog, null, InsQuoteFlow.Q_S_0);
+//
+//        String responseData = apiLog.getResponseData();
+//
+//        try {
+//            String cleanStr = YcBuildData.cleanResponseStr(responseData);
+//            rd = xmlMapper.readValue(cleanStr, RuoteResponse.class);
+//
+//
+//        } catch (IOException e) {
+//            log.error("=========永诚API方式 - xml请求 - (修改参数后)报价 错误:" + e.getMessage());
+//            throw new RuntimeException(e);
+//        }
+//        return rd;
+//
+//    }
+
+
+    /**
+     * 请求API接口,返回对象
+     *
+     * @author: lig
+     * @date: 2023年05月18日 0018
+     */
+    private <T> T requestApi(Object m, T response, InsAreaCompany iac, String reqUrl, InsQuoteFlow iqf) {
+//    private Object aaa(T m,T ruoteResponse,InsAreaCompany iac){
+        //6 接口请求
+        log.debug("=========永诚API方式 - xml请求 - {}开始======", iqf.getDesc());
+        String s = httpPost(xmlMapper, m, reqUrl);
+        log.debug("=========永诚API方式 - xml请求 - {}结束!======", iqf.getDesc());
+//        verifyRequest(apiLog, iac, iqf);
+
+//        String responseData = apiLog.getResponseData();
+        String cleanStr = YcBuildData.cleanResponseStr(s);
+//        Object rd = null;
+        try {
+            response = (T) xmlMapper.readValue(cleanStr, response.getClass());
+            return response;
+        } catch (JsonProcessingException e) {
+            log.debug("=========永诚API方式 - xml请求 - {}解析报错:{}", iqf.getDesc(), e.getMessage());
+//            throw new RuntimeException(e);
+            throw new SystemException("请求接口失败,对象转换错误,请联系管理员。");
+        }
+    }
+
+
+//    private boolean gainResultFlag(RuoteResponse rd,Ruote m){
+//        boolean flag = false;
+//        if (null == rd) {
+//            throw new SystemException("远程请求报价失败");
+//        }
+//
+//        if (rd.getHead().getErrorCode().equals("000000")) {
+//            //获取失败
+//            boolean fail = !(StringUtils.isNotEmpty(rd.getVhl().getCQryCdeJQ()) || StringUtils.isNotEmpty(rd.getVhl().getCQryCdeSY()));
+//            if (fail) {
+//                //如果类型错误,修改类型后,继续报价
+//                if (StringUtils.isNotEmpty(rd.getVhl().getCBusType())) {
+//                    //修改类型继续报价
+//                    m.getRequestLabel().getCondition().getVhl().setCBusType(rd.getVhl().getCBusType());
+//                    rd = requestApi(m, new RuoteResponse(), iac, YcBuildData.API_QUOTE, InsQuoteFlow.Q_S_0);
+//                    if (null == rd) return HttpResult.error("远程请求报价失败");
+//                    if (fail) {
+//                        throw new SystemException(rd.getHead().getErrorMessage());
+//                    }
+//                }
+//                throw new SystemException(rd.getHead().getErrorMessage());
+//            }
+//        } else {
+//            throw new SystemException(rd.getHead().getErrorMessage());
+//        }
+//
+//    }
+
+
+    /**
+     * 获取渠道配置信息
+     *
+     * @author: lig
+     * @date: 2023年08月25日 0025
+     */
+    private ChannelInfoDto gainChannelConfigInfo(String agreementId) {
+        ChannelInfoDto channelInfo = new ChannelInfoDto();
+        configureParametersComponents.toEntity(channelInfo, agreementId);
+        return channelInfo;
+    }
+
+
+    /**
+     * 构造 响应 QuoteRespVo
+     *
+     * @author: lig
+     * @date: 2023-08-21
+     */
+    public static QuoteRespVo buildQuoteRespVo(InsOrders insOrder, PremiumResp.DataDTO rd, YaQuoteInfoVo yaQuoteInfoVo) {
+
+
+//        if(CollUtil.isEmpty(rd.getItemVOList())){
+//
+//        }
+
+        //交强保费 含税
+        BigDecimal jqPremiumBig = BigDecimal.valueOf(StringUtils.toDouble(rd.getSumPremiumCI()));
+        //商业保费 含税
+        BigDecimal syPremiumBig = BigDecimal.valueOf(StringUtils.toDouble(rd.getSumPremiumBI()));
+        //车船税保费 含税
+        BigDecimal taxPremiumBig = BigDecimal.valueOf(StringUtils.toDouble(rd.getSumPayTax()));
+        //保费合计
+        BigDecimal sumPermium = jqPremiumBig.add(syPremiumBig).add(taxPremiumBig);
+
+//        //交强保费 含税
+//        double jqPremium = 0;
+
+        List<QuoteKindRespVo> kindRespVoList = new ArrayList<>();
+
+
+        QuoteRespVo quoteRespVo = new QuoteRespVo();
+        quoteRespVo.setStartDateJq(rd.getCiStartDate());
+        quoteRespVo.setEndDateJq(rd.getCiEndDate());
+        quoteRespVo.setStartDateSy(rd.getBiStartDate());
+        quoteRespVo.setEndDateSy(rd.getBiEndDate());
+
+
+        rd.getItemVOList().stream().forEach(a -> {
+            //交强:0507,商业:0518
+            if (a.getRiskCode().equals("0507")) {
+            }
+            if (a.getRiskCode().equals("0518")) {
+                kindRespVoList.add(buildQuoteKindList(a));
+
+            }
+        });
+
+
+        List<QuoteRiskRespVo> riskList1 = new ArrayList<>();
+//        List<QuoteKindRespVo> kindList1 = new ArrayList<>();
+        List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
+        for (RiskInfoVo riskInfoVo : riskList) {
+            if ("0507".equals(riskInfoVo.getRiskCode()) && jqPremiumBig != null) {
+                QuoteRiskRespVo risk = new QuoteRiskRespVo();
+                risk.setRiskCode("0507");
+                risk.setRiskName("机动车交通事故责任强制保险");
+                risk.setPremium(jqPremiumBig.doubleValue());
+                risk.setStartDate(riskInfoVo.getStartDate());
+                risk.setEndDate(riskInfoVo.getEndDate());
+                riskList1.add(risk);
+            }
+            if ("0510".equals(riskInfoVo.getRiskCode()) && syPremiumBig != null) {
+                QuoteRiskRespVo risk = new QuoteRiskRespVo();
+                risk.setRiskCode("0510");
+                risk.setRiskName("机动车商业保险");
+                risk.setPremium(syPremiumBig.doubleValue());
+                risk.setStartDate(riskInfoVo.getStartDate());
+                risk.setEndDate(riskInfoVo.getEndDate());
+                riskList1.add(risk);
+            }
+        }
+
+        quoteRespVo.setRiskList(riskList1);
+        quoteRespVo.setKindList(kindRespVoList);
+
+
+        PremiumResp.DataDTO.ItemVOListDTO itemVoListDto = rd.getItemVOList().get(0);
+
+
+        quoteRespVo.setCiSumPermium(jqPremiumBig.add(taxPremiumBig).doubleValue());//交强险和车船税合计
+        quoteRespVo.setSumPermium(sumPermium.doubleValue());//保费合计
+        quoteRespVo.setTaxAmount(taxPremiumBig.doubleValue());//车船税
+        quoteRespVo.setTotalAdjustRate(1);
+        quoteRespVo.setILogPreUdwMess(StringUtils.toString(rd.getBirate().getBillcomeGroup()));//评分
+        quoteRespVo.setOrderno(insOrder.getOrderno()); //订单号
+        quoteRespVo.setJqPremium(jqPremiumBig.doubleValue());
+        quoteRespVo.setSyPremium(syPremiumBig.doubleValue());
+
+
+        return quoteRespVo;
+    }
+
+
+    /**
+     * 构造 商业险数据  通过报价 响应数据
+     *
+     * @author: lig
+     * @date: 2023-08-21
+     */
+    public static QuoteKindRespVo buildQuoteKindList(PremiumResp.DataDTO.ItemVOListDTO dto) {
+
+        QuoteKindRespVo kind = new QuoteKindRespVo();
+        if (dto.getKindCode().equals(InsurKindGuoRen.A.getCode())) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(InsurKind.A.getCode());
+            kind.setKindName(InsurKind.A.getDesc());
+            kind.setAmount(dto.getAmount());
+            kind.setCoveragePremium(dto.getPremium());
+        }
+        if (dto.getKindCode().equals(InsurKindGuoRen.B.getCode())) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(InsurKind.B.getCode());
+            kind.setKindName(InsurKind.B.getDesc());
+            kind.setAmount(dto.getAmount());
+            kind.setCoveragePremium(dto.getPremium());
+        }
+        if (dto.getKindCode().equals(InsurKindGuoRen.D3.getCode())) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(InsurKind.D3.getCode());
+            kind.setKindName(InsurKind.D3.getDesc());
+            kind.setAmount(dto.getAmount());
+            kind.setCoveragePremium(dto.getPremium());
+        }
+        if (dto.getKindCode().equals(InsurKindGuoRen.D4.getCode())) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(InsurKind.D4.getCode());
+            kind.setKindName(InsurKind.D4.getDesc());
+            kind.setAmount(dto.getAmount());
+            kind.setUnitAmount(StringUtils.toDouble(dto.getUnitAmount()));
+            kind.setCoveragePremium(dto.getPremium());
+        }
+        if (dto.getKindCode().equals(InsurKindGuoRen.MJ1.getCode())) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(InsurKind.MJ1.getCode());
+            kind.setKindName(InsurKind.MJ1.getDesc());
+            kind.setAmount(dto.getAmount());
+            kind.setCoveragePremium(dto.getPremium());
+        }
+        if (dto.getKindCode().equals(InsurKindGuoRen.MJ2.getCode())) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(InsurKind.MJ2.getCode());
+            kind.setKindName(InsurKind.MJ2.getDesc());
+            kind.setAmount(dto.getAmount());
+            kind.setCoveragePremium(dto.getPremium());
+        }
+        if (dto.getKindCode().equals(InsurKindGuoRen.MJ3.getCode())) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(InsurKind.MJ3.getCode());
+            kind.setKindName(InsurKind.MJ3.getDesc());
+            kind.setAmount(dto.getAmount());
+            kind.setCoveragePremium(dto.getPremium());
+        }
+        if (dto.getKindCode().equals(InsurKindGuoRen.MJ4.getCode())) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(InsurKind.MJ4.getCode());
+            kind.setKindName(InsurKind.MJ4.getDesc());
+            kind.setAmount(dto.getAmount());
+            kind.setCoveragePremium(dto.getPremium());
+        }
+        if (dto.getKindCode().equals(InsurKindGuoRen.L.getCode())) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(InsurKind.L.getCode());
+            kind.setKindName(InsurKind.L.getDesc());
+            kind.setAmount(dto.getAmount());
+            kind.setCoveragePremium(dto.getPremium());
+        }
+//        if(dto.getKindCode().equals(InsurKindGuoRen.BD.getCode())){
+//                kind = new QuoteKindRespVo();
+//                kind.setKindCode(InsurKind.BD.getCode());
+//                kind.setKindName(InsurKind.BD.getDesc());
+//                kind.setAmount(dto.getAmount());
+//                kind.setCoveragePremium(dto.getPremium());
+//        }
+        return kind;
+
+    }
+
+
+    /**
+     * 构造 车价查询uid编号
+     */
+    private String buildCarPriceQueryUidNum(String orderNo) {
+        String redisNum = orderNo + "-guoRen" + "-CarPriceQuery-uid";
+        return redisNum;
+    }
+
+    /**
+     * 构造 投保单的redis key
+     */
+    private String buildInsuranceSlipNum(String orderNo) {
+        String redisNum = orderNo + "-guoRen" + "-InsuranceSlipNum";
+        return redisNum;
+    }
+
+
+    /**
+     * 获取投保单
+     *
+     * @author: lig
+     * @date: 2023年09月13日 0013
+     */
+    private InsuranceSlipResp gainInsuranceSlip(String orderNo) {
+
+        String s = RedisUtils.get(buildInsuranceSlipNum(orderNo));
+
+        InsuranceSlipResp insuranceSlip = JSON.parseObject(s, InsuranceSlipResp.class);
+
+//        InsuranceSlipResp insuranceSlip = (InsuranceSlipResp) JSON.parse(buildInsuranceSlipNum(orderNo));
+//        InsuranceSlipResp insuranceSlip = (InsuranceSlipResp) RedisUtils.getObject(buildInsuranceSlipNum(orderNo));
+        return insuranceSlip;
+    }
+
+
+    /**
+     * vin码查询车辆信息
+     *
+     * @return VinQueryResp.DataDTO
+     * @author: lig
+     * @date: 2023年08月18日 0018
+     */
+    public VinQueryResp.DataDTO vinQuery(VinQueryReq vinQueryReq) {
+        VinQueryReq req = VinQueryReq.buildParam2(vinQueryReq, channelInfo);
+
+        String bodyStr = RequestDto.builRequestDto(req, "IIRBT00009");
+        String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "vin码查询车辆,车牌号:" + vinQueryReq.getLicenseNo());
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+
+        if (rest.getPlatformCode().equals("T0000000")) {
+            VinQueryResp resp = ResponseDto.buildBody(rest, VinQueryResp.class);
+            if (resp.getResultCode() == 1) {
+                throw new SystemException(resp.getResultMsg() == null ? "未找到车辆信息" : resp.getResultMsg());
+            }
+            return resp.getData().get(0);
+        }
+
+
+        return null;
+
+    }
+
+
+    /**
+     * 车价查询
+     */
+    public CarPriceResp.DataDTO carPriceQuery(BaseQuoteInfoVo yaQuoteInfoVo, VinQueryResp.DataDTO vinQ) {
+
+        //构造请求参数
+        CarPriceReq req = CarPriceReq.buildCarPriceParam(yaQuoteInfoVo, vinQ, channelInfo);
+        String bodyStr = RequestDto.builRequestDto(req, "IIRBT00003");
+
+        String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "车价查询,车牌:" + yaQuoteInfoVo.getCarInfo().getLicenseNo());
+//        String result = HttpUtil.sendPost(baseUrl, bodyStr);
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+
+
+        if (rest.getPlatformCode().equals("T0000000")) {
+
+            //多条
+            CarPriceMuchResp respMuch = ResponseDto.buildBody(rest, CarPriceMuchResp.class);
+
+            //单条
+            if (CollUtil.isEmpty(respMuch.getData().getCars())) {
+                CarPriceResp resp = ResponseDto.buildBody(rest, CarPriceResp.class);
+
+                if (resp.getResultCode() == 1) {
+                    throw new SystemException(resp.getResultMsg() == null ? "未获取到车价信息,请联系管理员" : resp.getResultMsg());
+                }
+                return resp.getData();
+
+            } else {
+                CarPriceMuchResp.DataDTO.CarsDTO confirmCarMuch = new CarPriceMuchResp.DataDTO.CarsDTO();
+                CarInfoVo carInfo = yaQuoteInfoVo.getCarInfo();
+//                //匹配车型
+                //车辆年款不能超过注册日期
+                List<CarPriceMuchResp.DataDTO.CarsDTO> vehicleInfoList = respMuch.getData().getCars().stream().filter(a -> DateTimeUtil.dateIsAfter(carInfo.getRegisterDate(), a.getCarYear())).collect(Collectors.toList());
+
+                //匹配的车辆信息数据  为空
+                if (CollUtil.isEmpty(vehicleInfoList)) {
+                    confirmCarMuch = respMuch.getData().getCars().get(0);
+                } else {
+                    //匹配的车辆信息数据
+                    CarPriceMuchResp.DataDTO.CarsDTO matchVehicleInfo = vehicleInfoList.stream().filter(a -> a.getCarYear().equals(carInfo.getPurchasePrice())).findFirst().orElse(null);
+                    if (null != matchVehicleInfo) {
+                        confirmCarMuch = matchVehicleInfo;
+                    } else {
+                        //匹配的车辆信息数据里  未匹配成功   默认选择第一条
+                        //排序  年款降序  金额升序
+                        vehicleInfoList = vehicleInfoList.stream().sorted(Comparator.comparing(CarPriceMuchResp.DataDTO.CarsDTO::getCarYear)
+                                        .thenComparing((o1, o2) -> Integer.compare(StringUtils.toInt(o2.getCarYear()), StringUtils.toInt(o1.getCarYear()))).reversed())
+                                .collect(Collectors.toList());
+
+                        confirmCarMuch = vehicleInfoList.get(0);
+                    }
+                }
+
+
+                return carPriceQueryMuch(respMuch.getData().getInputvo(), confirmCarMuch, yaQuoteInfoVo.getCarInfo().getLicenseNo());
+
+
+            }
+
+
+//            if (resp.getResultCode() == 1) {
+//                throw new SystemException(resp.getResultMsg() == null ? "未获取到车价信息,请联系管理员" : resp.getResultMsg());
+//            }
+//            return resp.getData();
+        }
+
+        return null;
+
+
+    }
+
+    /**
+     * (多条)车价查询
+     */
+    public CarPriceResp.DataDTO carPriceQueryMuch(String uuid, CarPriceMuchResp.DataDTO.CarsDTO carsDTO, String licenseNo) {
+
+        //构造请求参数
+        CarPriceMuchReq req = new CarPriceMuchReq();
+        req.setUuid(uuid);
+        req.setCarPriceMuchResp(carsDTO);
+
+        String bodyStr = RequestDto.builRequestDto(req, "IIRBT00017");
+
+        String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "再次车价查询,车牌:" + licenseNo);
+//        String result = HttpUtil.sendPost(baseUrl, bodyStr);
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+
+
+        if (rest.getPlatformCode().equals("T0000000")) {
+
+            CarPriceResp resp = ResponseDto.buildBody(rest, CarPriceResp.class);
+
+            if (resp.getResultCode() == 1) {
+                throw new SystemException(resp.getResultMsg() == null ? "未获取到车价信息,请联系管理员" : resp.getResultMsg());
+            }
+            return resp.getData();
+
+        }
+
+        return null;
+
+
+    }
+
+    /**
+     * 保费计算
+     */
+    public PremiumResp.DataDTO premiumQuery(BaseQuoteInfoVo yaQuoteInfoVo, CarPriceResp.DataDTO carPriceResult, VinQueryResp.DataDTO vinQ) {
+
+        //请求信息列表
+        List<String> requestInfoList = new ArrayList<>();
+
+        boolean boo = true;
+        //构造请求参数
+        PremiumReq req = PremiumReq.buildQuoteParam(yaQuoteInfoVo, carPriceResult, vinQ);
+        PremiumResp resp = null;
+        StringBuffer flag = new StringBuffer();
+        while (boo) {
+            String bodyStr = RequestDto.builRequestDto(req, "IIRBT00004");
+            String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "保费计算 |" + flag + ",车牌:" + yaQuoteInfoVo.getCarInfo().getLicenseNo());
+            ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+            resp = ResponseDto.buildBody(rest, PremiumResp.class);
+            if (rest.getPlatformCode().equals("T0000000")) {
+
+//                //警告
+//                if (resp.getResultCode() == 0) throw new SystemException(resp.getResultMsg());
+
+                //1、 交强险重复投保 替换时间
+                boo = buildCiRepeatParam(boo, resp, requestInfoList, req);
+                if (boo) {
+                    flag.append("重复投保处理 |");
+                    continue;
+                }
+
+                //2、 转保
+                boo = buildCheckCodeParam(resp, requestInfoList, req);
+                if (boo) {
+                    flag.append("转保处理 |");
+                    continue;
+                }
+
+
+            }
+
+
+        }
+
+        resp.getData().setCiStartDate(req.getCi().getPrpTmain().getStartDate());
+        resp.getData().setCiEndDate(req.getCi().getPrpTmain().getEndDate());
+
+        resp.getData().setBiStartDate(req.getBi().getPrpTmain().getStartDate());
+        resp.getData().setBiEndDate(req.getBi().getPrpTmain().getEndDate());
+
+        if (null != resp && resp.getResultCode() == 1)
+            throw new SystemException(resp.getResultMsg() == null ? "保费计算失败,请联系管理员" : resp.getResultMsg());
+        if (null != resp) return resp.getData();
+
+
+        return null;
+
+
+    }
+
+    /**
+     * 投保单保存
+     *
+     * @author: lig
+     * @date: 2023年08月18日 0018
+     */
+    public InsuranceSlipResp insuranceSlip(BaseQuoteInfoVo yaQuoteInfoVo, String carPriceNum) {
+
+        //构造请求参数
+        InsuranceSlipReq req = InsuranceSlipReq.buildParam(yaQuoteInfoVo, carPriceNum);
+
+        String bodyStr = RequestDto.builRequestDto(req, "IIRBT00006");
+        String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "投保单保存,车牌号:" + yaQuoteInfoVo.getCarInfo().getLicenseNo());
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+        InsuranceSlipResp resp = ResponseDto.buildBody(rest, InsuranceSlipResp.class);
+
+        return resp;
+    }
+
+
+    /**
+     * 提交核保
+     *
+     * @author: lig
+     * @date: 2023-08-23
+     */
+    public SubmitAuditResp submitAudit(InsAreaCompany iac) {
+        //构造请求参数
+        SubmitAuditReq req = SubmitAuditReq.buildParam(iac, channelInfo);
+        String bodyStr = RequestDto.builRequestDto(req, "IIRBT00007");
+
+        String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "核保提交");
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+        SubmitAuditResp resp = ResponseDto.buildBody(rest, SubmitAuditResp.class);
+
+        return resp;
+    }
+
+    /**
+     * 投保单状态
+     *
+     * @author: lig
+     * @date: 2023-09-26
+     */
+    public InsOrderStatusResp insOrderStatus(InsAreaCompany iac) {
+//        //构造请求参数
+//        SubmitAuditReq req = SubmitAuditReq.buildParam(insuranceSlip, channelInfo);
+
+
+        List<String> proposalNos = new ArrayList<>();
+        String jqNo = iac.getJqapplyno();
+        String syNo = iac.getSyapplyno();
+        if (StringUtils.isNotEmpty(jqNo)) {
+            proposalNos.add(jqNo);
+        }
+        if (StringUtils.isNotEmpty(syNo)) {
+            proposalNos.add(syNo);
+        }
+        Map paramMap = new HashMap();
+        paramMap.put("proposalNos", proposalNos);
+
+
+        //投保单状态查询
+        String bodyStr = RequestDto.builRequestDto(paramMap, "IIRBT00010");
+
+        String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "投保单状态查询");
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+        InsOrderStatusResp resp = ResponseDto.buildBody(rest, InsOrderStatusResp.class);
+
+        return resp;
+    }
+
+
+    /**
+     * 非车列表
+     *
+     * @author: lig
+     * @date: 2023年09月18日 0018
+     */
+    @Override
+    public NonAutoInsResp.DataDTO gainNonAutoInsList(String goodsCode) {
+
+
+        Map bodyMap = new HashMap();
+        Map bodyParamsMap = new HashMap();
+        bodyParamsMap.put("goodsCode", goodsCode);
+        bodyMap.put("data", bodyParamsMap);
+
+        bodyMap.put("systemCode", "TQDL");
+        bodyMap.put("requestTime", Instant.now().getEpochSecond() * 1000);
+
+//        String params = JSON.toJSONString(bodyMap);
+
+
+        String bodyStr = RequestDto.builRequestDto(bodyMap, "IIIRBT00053");
+        String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "获取非车列表,产品号:" + goodsCode);
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+        NonAutoInsResp resp = ResponseDto.buildBody(rest, NonAutoInsResp.class);
+
+//        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+//        SubmitAuditResp resp = ResponseDto.buildBody(rest, SubmitAuditResp.class);
+        if (null != resp.getData()) return resp.getData();
+
+
+        return null;
+    }
+
+
+    /**
+     * 创建非车订单
+     *
+     * @author: lig
+     * @date: 2023-09-28
+     */
+    public SubmitAuditResp nonAutoInsOrder(AccidentalDrivingVo accidentalDrivingVo, String carPriceUuid) {
+
+        BaseQuoteInfoVo yaQuoteInfoVo = new BaseQuoteInfoVo();
+        VinQueryResp.DataDTO vinQ = new VinQueryResp.DataDTO();
+        //构造请求参数
+        NonAutoInsOrderReq req = NonAutoInsOrderReq.buildParam(yaQuoteInfoVo, vinQ, accidentalDrivingVo, channelInfo, carPriceUuid);
+        String bodyStr = RequestDto.builRequestDto(req, "IIIRBT00054");
+
+        String result = HttpUtil.sendPost(baseUrl, bodyStr, log, "创建非车订单");
+
+        ResponseDto rest = JSON.parseObject(result, ResponseDto.class);
+        SubmitAuditResp resp = ResponseDto.buildBody(rest, SubmitAuditResp.class);
+
+        return resp;
+    }
+
+
+    /**
+     * 构造交强险重复投保参数
+     *
+     * @param boo true 继续请求
+     * @author: lig
+     * @date: 2023年10月13日 0013
+     */
+    private boolean buildCiRepeatParam(boolean boo, PremiumResp resp, List<String> requestInfoList, PremiumReq req) {
+        //1. 交强重复投保 替换日期重新报价
+        if (resp.getResultCode() == 1 && resp.getResultMsg().contains("重复投保") && resp.getResultMsg().contains("终保日期") && resp.getResultMsg().contains("交强险平台")) {
+
+            String ciMsg = resp.getResultMsg();
+            requestInfoList.add(ciMsg);
+            //终保日期
+            String coverageEndDate = ciMsg.substring(ciMsg.indexOf("终保日期") + 5, ciMsg.indexOf("终保日期") + 5 + 16);
+
+            LocalDateTime start = DateTimeUtil.parseLocalDateTime(coverageEndDate, DateTimeUtil.DATETIME_PATTERN_EXT1);
+
+            String newStartDate = "";
+            String newEndDate = "";
+
+            //及时起保
+            if (start.getHour() > 0 && start.getHour() < 59) {
+                LocalDateTime end = start.plusYears(1L);
+                newStartDate = DateTimeUtil.format(start, DateTimeUtil.DATETIME_PATTERN);
+                newEndDate = DateTimeUtil.format(end, DateTimeUtil.DATETIME_PATTERN);
+
+                req.getCi().getPrpTmain().setStartHour(StringUtils.toString(start.getHour()));
+                req.getCi().getPrpTmain().setEndHour(StringUtils.toString(start.getHour()));
+
+                req.getCi().getPrpTmain().setImmeValidStartDate(newStartDate);
+                req.getCi().getPrpTmain().setImmeValidEndDate(newStartDate);
+                req.getCi().getPrpTmain().setImmeValiFlag("1");
+
+//                req.getCi().getPrpTmain()
+
+            } else {
+                LocalDateTime end = start.plusYears(1L).minusDays(1L);
+                newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
+                newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
+
+
+            }
+
+            req.getCi().getPrpTmain().setStartDate(newStartDate);
+            req.getCi().getPrpTmain().setEndDate(newEndDate);
+
+            req.getCi().getPrptitemkindList().get(0).setStartDate(newStartDate);
+            req.getCi().getPrptitemkindList().get(0).setEndDate(newEndDate);
+
+
+            System.err.println("国任新起:" + newStartDate);
+            System.err.println("国任新止:" + newEndDate);
+
+
+            return true;
+
+
+        }
+        return false;
+
+    }
+
+    /**
+     * 构造交强险  商业险 转报code
+     *
+     * @param boo true 继续请求
+     * @author: lig
+     * @date: 2023年10月13日 0013
+     */
+    private boolean buildCheckCodeParam(PremiumResp resp, List<String> requestInfoList, PremiumReq req) {
+
+        String ciCheckCode = resp.getData().getCicheckCode();
+        String biCheckCode = resp.getData().getBicheckCode();
+        if (StringUtils.isNotEmpty(ciCheckCode) || StringUtils.isNotEmpty(biCheckCode)) {
+            System.err.println("转保。。。。。。。。。。");
+            System.err.println("转保。。。。。。。。。。");
+            System.err.println("转保。。。。。。。。。。");
+            CheckCodeResp ccResp = gainCheckCode(ciCheckCode, biCheckCode);
+            req.getCi().getPrpTmain().setAnswer(ccResp.getJqImageCode());
+            req.getBi().getPrpTmain().setAnswer(ccResp.getSyImageCode());
+            requestInfoList.add("转保单");
+            return true;
+        }
+        return false;
+
+
+    }
+
+
+    /**
+     * 获取图片验证码 校验的code
+     *
+     * @author: lig
+     * @date: 2023年10月13日 0013
+     */
+    private CheckCodeResp gainCheckCode(String jqImageStr, String syImageStr) {
+        String sendBody = "";
+        Map bodyMap = new HashMap();
+        bodyMap.put("jqImage", StringUtils.toString(jqImageStr, ""));
+        bodyMap.put("syImage", StringUtils.toString(syImageStr, ""));
+        sendBody = JsonUtils.toJson(bodyMap);
+        String ocrStr = HttpUtil.sendPost("http://47.92.254.66:8088/getres", sendBody);
+
+        CheckCodeResp checkCodeResp = JSONUtil.toBean(ocrStr, CheckCodeResp.class);
+        return checkCodeResp;
+
+    }
+
+
+    @Data
+    class CheckCodeResp {
+        @JsonProperty(value = "jqImageCode")
+        String jqImageCode;
+        @JsonProperty(value = "syImageCode")
+        String syImageCode;
+
+    }
+
+}

Разлика између датотеке није приказан због своје велике величине
+ 135 - 0
src/main/java/com/ydtech/utils/InsUtils.java


Неке датотеке нису приказане због велике количине промена