BifronsV пре 3 година
родитељ
комит
de8fefbc09

+ 27 - 7
src/main/java/com/ydtech/components/ZhongmeiRequestApiComponents.java

@@ -1,5 +1,6 @@
 package com.ydtech.components;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.ydtech.config.properties.ZmApiConfigurationProperties;
 import com.ydtech.exception.SystemException;
@@ -7,8 +8,9 @@ import com.ydtech.modules.order.entity.api.zm.BaseRequest;
 import com.ydtech.modules.order.entity.api.zm.BaseRequestHead;
 import com.ydtech.modules.order.entity.api.zm.BaseResponse;
 import com.ydtech.modules.order.entity.api.zm.request.ModelsQueryRequest;
+import com.ydtech.modules.order.entity.api.zm.request.QuotedPriceRequest;
 import com.ydtech.modules.order.entity.api.zm.response.ModelsQueryResponse;
-import com.ydtech.utils.StringUtils;
+import com.ydtech.modules.order.entity.api.zm.response.QuotedPriceResponse;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.http.*;
 import org.springframework.stereotype.Component;
@@ -37,19 +39,23 @@ public class ZhongmeiRequestApiComponents {
         this.restTemplate = restTemplate;
     }
 
-    public <K extends BaseRequest, T extends  BaseResponse> T post(K k, String url, Class<T> tClass) {
+    public <K extends BaseRequest, T extends BaseResponse> T post(K k, String url, Class<T> tClass) {
         HttpHeaders httpHeaders = new HttpHeaders();
         httpHeaders.setContentType(MediaType.APPLICATION_JSON);
         HttpEntity<K> yaQuoteInfoVoHttpEntity = new HttpEntity<>(k, httpHeaders);
+        String jsonString = JSON.toJSONString(k);
+        log.info("---------> 请求参数:{}", jsonString);
         ResponseEntity<String> response = restTemplate.postForEntity(url, yaQuoteInfoVoHttpEntity, String.class);
 
-        T t = JSONObject.parseObject(response.getBody(), tClass);
+        String body = response.getBody();
+        log.info("---------> 响应参数:{}", body);
+        T t = JSONObject.parseObject(body, tClass);
 
-        if(ObjectUtils.isEmpty(t)){
+        if (ObjectUtils.isEmpty(t)) {
             throw new SystemException("请求失败");
         }
 
-        if("-1".equals(t.getHead().getReturnCode())){
+        if ("-1".equals(t.getHead().getReturnCode())) {
             throw new SystemException(t.getHead().getReturnMessage());
         }
 
@@ -58,8 +64,9 @@ public class ZhongmeiRequestApiComponents {
 
     /**
      * 车型查询
-     * @param request 请求呢通
-     * @param tClass 响应类型
+     *
+     * @param request 请求内容
+     * @param tClass  响应类型
      * @return 响应内容
      */
     public List<ModelsQueryResponse.SimpleStadarCarDTO> modelQuery(ModelsQueryRequest request, Class<ModelsQueryResponse> tClass) {
@@ -71,5 +78,18 @@ public class ZhongmeiRequestApiComponents {
         return post.getSimpleStadarCar();
     }
 
+    /**
+     * 报价
+     *
+     * @param request 请求内容
+     * @return 响应内容
+     */
+    public QuotedPriceResponse quotedPrice(QuotedPriceRequest request, Class<QuotedPriceResponse> tClass) {
+        String transCode = "QuotedPrice";
+        String url = zmApiConfigurationProperties.getUrl() + transCode + ".do";
+        BaseRequestHead head = zmApiConfigurationProperties.getHead(transCode);
+        request.setHead(head);
+        return post(request, url, tClass);
+    }
 
 }

+ 1 - 0
src/main/java/com/ydtech/modules/ins/vo/CarInfoVo.java

@@ -86,6 +86,7 @@ public class CarInfoVo {
 
     @ApiModelProperty(value = "是否过户")
     private boolean transferFlag;
+
     @ApiModelProperty(value = "过户日期")
     private String transferDate;
     @ApiModelProperty(value = "是否贷款车")

+ 36 - 0
src/main/java/com/ydtech/modules/order/entity/api/zm/constants/InsuranceTypeCorrespondence.java

@@ -0,0 +1,36 @@
+package com.ydtech.modules.order.entity.api.zm.constants;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author wenks
+ * @version 0.0.2
+ * @description 险种编号对应
+ * @date 2023/4/23 11:45
+ */
+public class InsuranceTypeCorrespondence {
+
+    public static final String[] JINZHANGGUI_TYPE = {"A", "B", "D3", "D4", "MJ1", "MJ2", "MJ3", "MJ4", "BD", "L", "SY_FJ_YBW1", "SY_FJ_YBW2", "SY_FJ_YBW3"};
+
+    public static final String[] CONNECT_INSURANCE_TYPE = {"01", "02", "041", "044", "501", "502", "5041", "5044", "49", "21", "5302", "5344", "5341"};
+
+    // 乘客
+    public static final String[] PASSENGER = {"D4", "SY_FJ_YBW2"};
+
+    //司机
+    public static final String[] DRIVER = {"D3", "SY_FJ_YBW3"};
+    // 绝对免赔
+    public static final String[] ABSOLUTE_DEDUCTIBLE  = {"MJ1", "MJ2", "MJ3", "MJ4"};
+
+    public static final String TRAFFIC = "0507";
+    public static final String BUSINESS = "0510";
+
+    public final static Map<String, String> RISK = new HashMap<>();
+
+    static {
+        RISK.put("0507", "0330");
+        RISK.put("0510", "0361");
+    }
+
+}

+ 15 - 0
src/main/java/com/ydtech/modules/order/entity/api/zm/constants/TimeConstants.java

@@ -0,0 +1,15 @@
+package com.ydtech.modules.order.entity.api.zm.constants;
+
+/**
+ * @author wenks
+ * @version 0.0.2
+ * @description TODO
+ * @date 2023/4/23 14:15
+ */
+public class TimeConstants {
+
+    public static final String START_TIME = "00:00:00";
+
+    public static final String END_TIME = "23:59:59";
+
+}

+ 52 - 0
src/main/java/com/ydtech/modules/order/entity/api/zm/constants/enums/ContractEnum.java

@@ -0,0 +1,52 @@
+package com.ydtech.modules.order.entity.api.zm.constants.enums;
+
+/**
+ *
+ *
+ */
+public enum ContractEnum {
+    C_BZ("BZ", "机动车交通事故责任强制险"),
+    C_01("01", "机动车损失保险"),
+    C_02("02", "机动车第三者责任保险"),
+    C_041("041", "机动车车上人员责任保险(司机)"),
+    C_044("044", "机动车车上人员责任保险(乘客)"),
+    C_52("52", "附加车轮单独损失险"),
+    C_14("14", "附加新增加设备损失险"),
+    C_21("21", "附加车身划痕损失险"),
+    C_26("26", "附加修理期间费用补偿险"),
+    C_51("51", "附加发动机进水损坏除外特约条款"),
+    C_08("08", "附加车上货物责任险"),
+    C_2702("2702", "附加精神损害抚慰金责任险(三者)"),
+    C_2741("2741", "附加精神损害抚慰金责任险(司机)"),
+    C_2744("2744", "附加精神损害抚慰金责任险(乘客)"),
+    C_49("49", "附加法定节假日限额翻倍险"),
+    C_5302("5302", "附加医保外用药责任险(三者)"),
+    C_5341("5341", "附加医保外用药责任险(司机)"),
+    C_5344("5344", "附加医保外用药责任险(乘客)"),
+    C_54("54", "附加机动车增值服务特约条款(救援)"),
+    C_55("55", "附加机动车增值服务特约条款(检测)"),
+    C_56("56", "附加机动车增值服务特约条款(代驾)"),
+    C_57("57", "附加机动车增值服务特约条款(送检)"),
+    C_501("501", "附加绝对免赔率特约条款(车损)"),
+    C_502("502", "附加绝对免赔率特约条款(三者)"),
+    C_5041("5041", "附加绝对免赔率特约条款(司机)"),
+    C_5044("5044", "附加绝对免赔率特约条款(乘客)");
+
+    ContractEnum(String kindCode, String kindName) {
+        this.kindCode = kindCode;
+        this.kindName = kindName;
+    }
+
+    // 险别代码
+    private final String kindCode;
+    // 险别名称
+    private final String kindName;
+
+    public String getKindCode() {
+        return kindCode;
+    }
+
+    public String getKindName() {
+        return kindName;
+    }
+}

+ 325 - 127
src/main/java/com/ydtech/modules/order/entity/api/zm/request/QuotedPriceRequest.java

@@ -1,13 +1,30 @@
 package com.ydtech.modules.order.entity.api.zm.request;
 
+import cn.hutool.core.util.ArrayUtil;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.ins.vo.CarInfoVo;
 import com.ydtech.modules.ins.vo.CustomerInfoVo;
+import com.ydtech.modules.ins.vo.KindInfoVo;
+import com.ydtech.modules.ins.vo.RiskInfoVo;
 import com.ydtech.modules.order.entity.api.zm.BaseRequest;
+import com.ydtech.modules.order.entity.api.zm.constants.InsuranceTypeCorrespondence;
+import com.ydtech.modules.order.entity.api.zm.constants.TimeConstants;
+import com.ydtech.modules.order.entity.api.zm.constants.enums.ContractEnum;
+import com.ydtech.modules.order.entity.api.zm.response.ModelsQueryResponse;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.utils.StringUtils;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -26,6 +43,11 @@ public class QuotedPriceRequest extends BaseRequest {
     @JsonProperty("businessData")
     private BusinessDataDTO businessData;
 
+    public QuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO) {
+        this.businessData = new BusinessDataDTO(baseQuoteInfoVo, simpleStadarCarDTO);
+    }
+
+    @AllArgsConstructor
     @NoArgsConstructor
     @Data
     public static class BusinessDataDTO {
@@ -34,8 +56,11 @@ public class QuotedPriceRequest extends BaseRequest {
         @JsonProperty("policyLocation")
         private PolicyLocationDTO policyLocation;
 
+        // 车辆信息
         @JsonProperty("insuredObject")
         private InsuredObjectDTO insuredObject;
+
+        // 保险信息
         @JsonProperty("contract")
         private List<ContractDTO> contract;
 
@@ -43,9 +68,30 @@ public class QuotedPriceRequest extends BaseRequest {
         @JsonProperty("customer")
         private List<CustomerDTO> customer;
 
+        // 驾意险
         @JsonProperty("accident")
         private List<Object> accident;
 
+        public BusinessDataDTO(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO) {
+            CarInfoVo carInfo = baseQuoteInfoVo.getCarInfo();
+            List<RiskInfoVo> riskList = baseQuoteInfoVo.getRiskList();
+            List<KindInfoVo> kindList = baseQuoteInfoVo.getKindList();
+            CustomerInfoVo ownerInfo = baseQuoteInfoVo.getOwnerInfo();
+            CustomerInfoVo policyHolderInfo = baseQuoteInfoVo.getPolicyHolderInfo();
+            CustomerInfoVo insuredPersonInfo = baseQuoteInfoVo.getInsuredPersonInfo();
+            int i = Integer.parseInt(carInfo.getSeatCount());
+            // 保单归属地
+            this.policyLocation = new PolicyLocationDTO("", "", "");
+            // 车辆信息
+            this.insuredObject = new InsuredObjectDTO(carInfo, simpleStadarCarDTO);
+            // 保险信息
+            this.contract = new ContractDTO().getContract(riskList, kindList, i - 1);
+            // 客户信息
+            this.customer = new CustomerDTO().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo);
+
+        }
+
+
         @AllArgsConstructor
         @NoArgsConstructor
         @Data
@@ -66,181 +112,333 @@ public class QuotedPriceRequest extends BaseRequest {
             private PolicyCarDTO policyCar;
 
             @JsonProperty("simpleStadarCar")
-            private SimpleStadarCarDTO simpleStadarCar;
+            private ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCar;
+
+            public InsuredObjectDTO(CarInfoVo carInfo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO) {
+                this.policyCar = new PolicyCarDTO(carInfo);
+                this.simpleStadarCar = simpleStadarCarDTO;
+            }
 
             @NoArgsConstructor
             @Data
             public static class PolicyCarDTO {
+                // 发动机号
                 @JsonProperty("engine")
                 private String engine;
+                // 新车标志
                 @JsonProperty("newCarSign")
                 private Boolean newCarSign;
+                // 车牌号
                 @JsonProperty("plateNo")
                 private String plateNo;
+                // VIN/车架号
                 @JsonProperty("VIN")
                 private String vin;
+                /**
+                 * 过户标志
+                 * 0 未过户
+                 * 01 过户
+                 */
                 @JsonProperty("chgOwnerFlag")
                 private String chgOwnerFlag;
+                // 行驶证注册登记日期(初登日期)
                 @JsonProperty("registerDate")
                 private String registerDate;
+                // 转移登记日期(过户日期)
                 @JsonProperty("transferDate")
                 private String transferDate;
+                // 外地车标志
                 @JsonProperty("ecdemicVehicleFlag")
                 private Boolean ecdemicVehicleFlag;
+                // 发证日期(行驶证)
                 @JsonProperty("issueDate")
                 private String issueDate;
+                /**
+                 * 号牌底色
+                 * 01	蓝
+                 * 02	黄
+                 * 03	黑
+                 * 04	白
+                 * 05	绿
+                 * 06	白蓝
+                 */
                 @JsonProperty("plateColorCode")
                 private String plateColorCode;
+                /**
+                 * 验车状态
+                 * 2	其他免验车
+                 * 3	已验车
+                 * 4	补验车
+                 */
                 @JsonProperty("carCheckStatus")
                 private String carCheckStatus;
+                /**
+                 * 车辆用途
+                 * 01	家庭自用
+                 * 02	非营业党政机关,事业团体
+                 * 03	非营业企业
+                 */
+                @JsonProperty("carCheckStatus")
+                private String carUseType;
+                /**
+                 * 使用性质
+                 * 01	营业
+                 * 02	非营业
+                 */
+                @JsonProperty("carCheckStatus")
+                private String motorUsageTypeCode;
 
+                public PolicyCarDTO(CarInfoVo carInfoVo) {
+                    this.engine = carInfoVo.getEngineNo();
+                    if (StringUtils.isNullOrEmpty(carInfoVo.getLicenseNo())) {
+                        this.newCarSign = true;
+                    }
+                    this.plateNo = carInfoVo.getLicenseNo();
+                    this.vin = carInfoVo.getFrameNo();
+                    if (carInfoVo.isTransferFlag()) {
+                        this.chgOwnerFlag = "01";
+                        this.transferDate = carInfoVo.getTransferDate() + " " + TimeConstants.START_TIME;
+                    } else {
+                        this.chgOwnerFlag = "0";
+                    }
 
-
+                    this.registerDate = carInfoVo.getRegisterDate();
+                    this.issueDate = carInfoVo.getIssueDate();
+                    this.plateColorCode = "01";
+                    this.carCheckStatus = "3";
+                    this.carUseType = "01";
+                    this.motorUsageTypeCode = "02";
+                }
             }
 
-            @NoArgsConstructor
-            @Data
-            public static class SimpleStadarCarDTO {
-                @JsonProperty("localModelCode")
-                private String localModelCode;
-                @JsonProperty("modelCode")
-                private String modelCode;
-                @JsonProperty("approvedLoad")
-                private String approvedLoad;
-                @JsonProperty("approvedPassengersCapacity")
-                private Integer approvedPassengersCapacity;
-                @JsonProperty("displacement")
-                private Double displacement;
-                @JsonProperty("purchasePrice")
-                private Integer purchasePrice;
-                @JsonProperty("energyTypes")
-                private String energyTypes;
-                @JsonProperty("brand")
-                private String brand;
-                @JsonProperty("brandCode")
-                private String brandCode;
-                @JsonProperty("series")
-                private String series;
-                @JsonProperty("seriesCode")
-                private String seriesCode;
-                @JsonProperty("power")
-                private Integer power;
-                @JsonProperty("unladenMass")
-                private Double unladenMass;
-                @JsonProperty("grossMass")
-                private Integer grossMass;
-                @JsonProperty("tractionMass")
-                private Integer tractionMass;
+
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class ContractDTO {
+
+        @JsonProperty("contractMain")
+        private ContractMainDTO contractMain;
+
+        @JsonProperty("coverage")
+        private List<CoverageDTO> coverage;
+
+        public List<ContractDTO> getContract(List<RiskInfoVo> riskInfoVos, List<KindInfoVo> kindInfoVos, Integer quantity) {
+            List<ContractDTO> contractDTOS = new ArrayList<>();
+            for (RiskInfoVo riskInfoVo : riskInfoVos) {
+                ContractDTO contractDTO = new ContractDTO();
+                contractDTO.contractMain = new ContractMainDTO(riskInfoVo);
+                if (InsuranceTypeCorrespondence.TRAFFIC.equals(riskInfoVo.getRiskCode())) {
+                    contractDTO.coverage = Collections.singletonList(new CoverageDTO().getTraffic());
+                }
+
+                if (InsuranceTypeCorrespondence.BUSINESS.equals(riskInfoVo.getRiskCode())) {
+                    contractDTO.coverage = new CoverageDTO().getBusiness(kindInfoVos, quantity);
+                }
+
             }
+            return contractDTOS;
         }
 
         @NoArgsConstructor
         @Data
-        public static class ContractDTO {
-            @JsonProperty("contractMain")
-            private ContractMainDTO contractMain;
-            @JsonProperty("coverage")
-            private List<CoverageDTO> coverage;
+        public static class ContractMainDTO {
+            // 失效日期(终保日期)
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+            /**
+             * 险种代码
+             * 0330	机动车交通事故责任强制保险
+             * 0361	机动车商业保险
+             */
+            @JsonProperty("riskCode")
+            private String riskCode;
+            // 生效日期(起保日期)
+            @JsonProperty("validDate")
+            private String validDate;
+            // 即时生效标志 1:是 0:否
+            @JsonProperty("reinsuranceFlag")
+            private String reinsuranceFlag;
 
-            @NoArgsConstructor
-            @Data
-            public static class ContractMainDTO {
-                @JsonProperty("expiryDate")
-                private String expiryDate;
-                @JsonProperty("riskCode")
-                private String riskCode;
-                @JsonProperty("validDate")
-                private String validDate;
-            }
+            public ContractMainDTO(RiskInfoVo riskInfoVo) {
+                this.riskCode = InsuranceTypeCorrespondence.RISK.get(riskInfoVo.getRiskCode());
+                String startDate = riskInfoVo.getStartDate();
+                DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+                LocalDate localDate = LocalDate.parse(startDate, formatter);
+                LocalDate nextYears = localDate.plus(1, ChronoUnit.YEARS);
+                if (startDate.indexOf(TimeConstants.START_TIME) > 0) {
+                    LocalDate expiryDate = nextYears.minus(1, ChronoUnit.DAYS);
+                    this.validDate = riskInfoVo.getStartDate();
+                    this.expiryDate = expiryDate + " " + TimeConstants.END_TIME;
+                    this.reinsuranceFlag = "0";
+                } else {
+                    // 及时
+                    LocalDateTime localDateTime = LocalDateTime.parse(startDate, formatter);
+                    LocalDateTime expiryDateTime = localDateTime.plus(1, ChronoUnit.YEARS);
+                    this.validDate = startDate;
+                    this.expiryDate = expiryDateTime.toString();
+                    this.reinsuranceFlag = "1";
+                }
 
-            @NoArgsConstructor
-            @Data
-            public static class CoverageDTO {
-                @JsonProperty("unitAmount")
-                private Integer unitAmount;
-                @JsonProperty("quantity")
-                private Integer quantity;
-                @JsonProperty("amount")
-                private Integer amount;
-                @JsonProperty("relatedInd")
-                private String relatedInd;
-                @JsonProperty("kindCode")
-                private String kindCode;
-                @JsonProperty("kindName")
-                private String kindName;
-                @JsonProperty("deductibleRate")
-                private String deductibleRate;
-                @JsonProperty("deductible")
-                private String deductible;
             }
         }
 
-        @AllArgsConstructor
         @NoArgsConstructor
         @Data
-        public static class CustomerDTO {
-            // 名称
-            @JsonProperty("name")
-            private String name;
+        public static class CoverageDTO {
+            // 单位限额
+            @JsonProperty("unitAmount")
+            private Integer unitAmount;
+            //  数量
+            @JsonProperty("quantity")
+            private Integer quantity;
+            // 保额
+            @JsonProperty("amount")
+            private Integer amount;
+            // 险别代码
+            @JsonProperty("kindCode")
+            private String kindCode;
+            // 险别名称
+            @JsonProperty("kindName")
+            private String kindName;
+            // 绝对免赔率
+            @JsonProperty("deductibleRate")
+            private String deductibleRate;
+            // 绝对免赔额
+            @JsonProperty("deductible")
+            private String deductible;
+
             /**
-             * 证件类型
-             * 01 身份证
-             * 3 组织机构代码
-             * 4 统一社会信用代码
+             * 商业险
+             *
+             * @param kindInfoVos 商业险
+             * @param quantity    乘客数
+             * @return
              */
-            @JsonProperty("identifyType")
-            private String identifyType;
-            // 证件号码
-            @JsonProperty("identifyNumber")
-            private String identifyNumber;
-            // 地址
-            @JsonProperty("addr")
-            private String addr;
-            // 移动电话
-            @JsonProperty("mobile")
-            private String mobile;
-            // 电子保单接收邮箱
-            @JsonProperty("emailPolicy")
-            private String emailPolicy;
-            // 客户类型 1-个人,2-法人
-            @JsonProperty("type")
-            private String type;
-            // 客户角色
-            @JsonProperty("role")
-            private String role;
+            public List<CoverageDTO> getBusiness(List<KindInfoVo> kindInfoVos, Integer quantity) {
+                List<CoverageDTO> list = new ArrayList<>();
+                for (KindInfoVo kindInfoVo : kindInfoVos) {
+                    CoverageDTO coverageDTO = new CoverageDTO();
+                    String code = kindInfoVo.getKindCode();
+                    int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.JINZHANGGUI_TYPE, code);
+                    String s = InsuranceTypeCorrespondence.CONNECT_INSURANCE_TYPE[i];
+                    ContractEnum contractEnum = Enum.valueOf(ContractEnum.class, "C_" + s);
+                    coverageDTO.kindName = contractEnum.getKindName();
+                    coverageDTO.kindCode = contractEnum.getKindName();
+                    coverageDTO.amount = (int) kindInfoVo.getAmount();
+                    coverageDTO.unitAmount = (int) kindInfoVo.getUnitAmount();
+                    // 司机
+                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.DRIVER, code) > 0) {
+                        coverageDTO.quantity = 1;
+                        coverageDTO.amount = (int) kindInfoVo.getUnitAmount();
+                    }
+
+                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.PASSENGER, code) > 0) {
+                        coverageDTO.quantity = quantity;
+                        coverageDTO.amount = (int) kindInfoVo.getUnitAmount() * quantity;
+                    }
+                    // 绝对免赔
+                    if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.ABSOLUTE_DEDUCTIBLE, code) > 0) {
+                        coverageDTO.deductible = "-" + kindInfoVo.getDeductibleRate();
+                    }
+                    list.add(coverageDTO);
+
+                }
+                return list;
+            }
+
             /**
-             * 发票种类
-             * 026	电子发票
-             * 007	普通发票
-             * 004	专用发票
+             * 交强险
+             *
+             * @return
              */
-            @JsonProperty("invocieType")
-            private String invocieType;
-            // 投保人是否从事以下行业:银行、证券、期货、保险、律师、会计师、房地产、拍卖
-            @JsonProperty("jobRisk")
-            private String jobRisk;
-            // 证件有效起期
-            @JsonProperty("identifyValidDate")
-            private String identifyValidDate;
-            // identifyValidEndDate
-            @JsonProperty("identifyValidEndDate")
-            private String identifyValidEndDate;
-
-            public CustomerDTO(CustomerInfoVo customerInfoVo, String role) {
-                this.name = customerInfoVo.getName();
-                this.identifyType = "01";
-                this.identifyNumber = customerInfoVo.getIdentifyNumber();
-                this.addr = customerInfoVo.getAddr();
-                this.mobile = customerInfoVo.getMobile();
-                this.emailPolicy = customerInfoVo.getEmail();
-                this.type = "1";
-                this.role = role;
-                this.invocieType = "026";
-                this.jobRisk = "1";
-                this.identifyValidDate = customerInfoVo.getIdentifyValidDate();
-                this.identifyValidEndDate = customerInfoVo.getIdentifyValidEndDate();
+            public CoverageDTO getTraffic() {
+                this.amount = 200000;
+                this.kindName = ContractEnum.C_BZ.getKindCode();
+                this.kindCode = ContractEnum.C_BZ.getKindName();
+                return this;
             }
 
         }
+
+
+    }
+
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @Data
+    public static class CustomerDTO {
+        // 名称
+        @JsonProperty("name")
+        private String name;
+        /**
+         * 证件类型
+         * 01 身份证
+         * 3 组织机构代码
+         * 4 统一社会信用代码
+         */
+        @JsonProperty("identifyType")
+        private String identifyType;
+        // 证件号码
+        @JsonProperty("identifyNumber")
+        private String identifyNumber;
+        // 地址
+        @JsonProperty("addr")
+        private String addr;
+        // 移动电话
+        @JsonProperty("mobile")
+        private String mobile;
+        // 电子保单接收邮箱
+        @JsonProperty("emailPolicy")
+        private String emailPolicy;
+        // 客户类型 1-个人,2-法人
+        @JsonProperty("type")
+        private String type;
+        // 客户角色
+        @JsonProperty("role")
+        private String role;
+        /**
+         * 发票种类
+         * 026	电子发票
+         * 007	普通发票
+         * 004	专用发票
+         */
+        @JsonProperty("invocieType")
+        private String invocieType;
+        // 投保人是否从事以下行业:银行、证券、期货、保险、律师、会计师、房地产、拍卖
+        @JsonProperty("jobRisk")
+        private String jobRisk;
+        // 证件有效起期
+        @JsonProperty("identifyValidDate")
+        private String identifyValidDate;
+        // identifyValidEndDate
+        @JsonProperty("identifyValidEndDate")
+        private String identifyValidEndDate;
+
+        public CustomerDTO(CustomerInfoVo customerInfoVo, String role) {
+            this.name = customerInfoVo.getName();
+            this.identifyType = "01";
+            this.identifyNumber = customerInfoVo.getIdentifyNumber();
+            this.addr = customerInfoVo.getAddr();
+            this.mobile = customerInfoVo.getMobile();
+            this.emailPolicy = customerInfoVo.getEmail();
+            this.type = "1";
+            this.role = role;
+            this.invocieType = "026";
+            this.jobRisk = "1";
+            this.identifyValidDate = customerInfoVo.getIdentifyValidDate();
+            this.identifyValidEndDate = customerInfoVo.getIdentifyValidEndDate();
+        }
+
+        public List<CustomerDTO> getCustomers(CustomerInfoVo ownerInfo, CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo) {
+            return Arrays.asList(
+                    new CustomerDTO(ownerInfo, "3"),
+                    new CustomerDTO(policyHolderInfo, "1"),
+                    new CustomerDTO(insuredPersonInfo, "2"));
+
+        }
     }
 }
+

+ 138 - 0
src/main/java/com/ydtech/modules/order/entity/api/zm/response/QuotedPriceResponse.java

@@ -0,0 +1,138 @@
+package com.ydtech.modules.order.entity.api.zm.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.order.entity.api.zm.BaseResponse;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @author wenks
+ * @version 0.0.2
+ * @description 报价响应
+ * @date 2023/4/23 17:35
+ */
+@NoArgsConstructor
+@Data
+public class QuotedPriceResponse extends BaseResponse {
+
+    private static final long serialVersionUID = 773463426510753990L;
+
+    @JsonProperty("bizPremium")
+    private BizPremiumDTO bizPremium;
+    @JsonProperty("businessNo")
+    private String businessNo;
+    @JsonProperty("forcePrimium")
+    private ForcePrimiumDTO forcePrimium;
+    @JsonProperty("insuranceScheme")
+    private InsuranceSchemeDTO insuranceScheme;
+    @JsonProperty("platMain")
+    private PlatMainDTO platMain;
+    @JsonProperty("taxinfo")
+    private TaxinfoDTO taxinfo;
+    @JsonProperty("vin")
+    private String vin;
+
+    @NoArgsConstructor
+    @Data
+    public static class BizPremiumDTO {
+        @JsonProperty("accidentBeanlist")
+        private List<?> accidentBeanlist;
+        @JsonProperty("adjust")
+        private List<AdjustDTO> adjust;
+        @JsonProperty("coverageList")
+        private List<CoverageListDTO> coverageList;
+        @JsonProperty("isRenewal")
+        private Boolean isRenewal;
+        @JsonProperty("sumPremium")
+        private Double sumPremium;
+
+        @NoArgsConstructor
+        @Data
+        public static class AdjustDTO {
+            @JsonProperty("adjustCode")
+            private String adjustCode;
+            @JsonProperty("adjustName")
+            private String adjustName;
+            @JsonProperty("adjustRate")
+            private Integer adjustRate;
+            @JsonProperty("maxRate")
+            private Integer maxRate;
+            @JsonProperty("minRate")
+            private Integer minRate;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class CoverageListDTO {
+            @JsonProperty("amount")
+            private Integer amount;
+            @JsonProperty("kindCode")
+            private String kindCode;
+            @JsonProperty("kindName")
+            private String kindName;
+            @JsonProperty("premium")
+            private Double premium;
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class ForcePrimiumDTO {
+        @JsonProperty("accidentBeanlist")
+        private List<?> accidentBeanlist;
+        @JsonProperty("adjust")
+        private List<AdjustDTO> adjust;
+        @JsonProperty("amount")
+        private Integer amount;
+        @JsonProperty("isRenewal")
+        private Boolean isRenewal;
+        @JsonProperty("kindCode")
+        private String kindCode;
+        @JsonProperty("kindName")
+        private String kindName;
+        @JsonProperty("premium")
+        private Integer premium;
+
+        @NoArgsConstructor
+        @Data
+        public static class AdjustDTO {
+            @JsonProperty("adjustRate")
+            private Integer adjustRate;
+            @JsonProperty("maxRate")
+            private Integer maxRate;
+            @JsonProperty("minRate")
+            private Integer minRate;
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class InsuranceSchemeDTO {
+        @JsonProperty("schemeFlag")
+        private String schemeFlag;
+        @JsonProperty("schemeMessage")
+        private String schemeMessage;
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class PlatMainDTO {
+        @JsonProperty("zmScore")
+        private String zmScore;
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class TaxinfoDTO {
+        @JsonProperty("delayPayTax")
+        private Integer delayPayTax;
+        @JsonProperty("payTax")
+        private Integer payTax;
+        @JsonProperty("prePayTax")
+        private Integer prePayTax;
+        @JsonProperty("sumPayTax")
+        private Integer sumPayTax;
+    }
+}

+ 2 - 12
src/main/java/com/ydtech/modules/order/service/impl/YongAnOrderServiceImpl.java

@@ -920,23 +920,13 @@ public class YongAnOrderServiceImpl implements YongAnOrderService {
                 kindList_n[j] = kindInfo;
             }
             // 附加医保外医疗费用责任险(机动车车上人员责任保险(乘客)) 033617
-//            if (kindList.get(j).getKindCode().equals(InsurKind.SY_FJ_YBW2.getCode())) {
-//                KindDTO kindInfo = new KindDTO();
-//                kindInfo.setKindCode("033617");
-//                kindInfo.setKindname("附加医保外医疗费用责任险(机动车车上人员责任保险(乘客))");
-//                kindInfo.setQuantity(carDTO.getSeatCount() - 1);
-//                kindInfo.setAmount(kindList.get(j).getUnitAmount() * (carDTO.getSeatCount() - 1));
-//                kindInfo.setUnitAmount(kindList.get(j).getUnitAmount());
-//                kindList_n[j] = kindInfo;
-//            }
-
             if (kindList.get(j).getKindCode().equals(InsurKind.SY_FJ_YBW2.getCode())) {
                 KindDTO kindInfo = new KindDTO();
                 kindInfo.setKindCode("033617");
                 kindInfo.setKindname("附加医保外医疗费用责任险(机动车车上人员责任保险(乘客))");
                 kindInfo.setQuantity(carDTO.getSeatCount() - 1);
-                kindInfo.setAmount(kindList.get(j).getAmount() * (carDTO.getSeatCount() - 1));
-                kindInfo.setUnitAmount(kindList.get(j).getAmount());
+                kindInfo.setAmount(kindList.get(j).getUnitAmount() * (carDTO.getSeatCount() - 1));
+                kindInfo.setUnitAmount(kindList.get(j).getUnitAmount());
                 kindList_n[j] = kindInfo;
             }
 

+ 110 - 79
src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderApiServiceImpl.java

@@ -1,20 +1,29 @@
 package com.ydtech.modules.order.service.impl;
 
+import cn.hutool.core.util.ArrayUtil;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.ydtech.components.ZhongmeiRequestApiComponents;
+import com.ydtech.constants.enums.InsOrderStatus;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.esm.model.InsTaskImage;
 import com.ydtech.modules.esm.service.EsmInsCompanyService;
 import com.ydtech.modules.esm.service.InsTaskImageService;
+import com.ydtech.modules.ins.model.request.Response;
+import com.ydtech.modules.ins.model.request.ZhongmeiQuoteResponse;
 import com.ydtech.modules.ins.model.ya.CarModelDTO;
-import com.ydtech.modules.ins.vo.CarInfoVo;
+import com.ydtech.modules.ins.model.ya.YaQuoteInfoVo;
+import com.ydtech.modules.ins.vo.*;
 import com.ydtech.modules.order.convert.SimpleStadarCarDTOConvert;
 import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.TaxArrears;
+import com.ydtech.modules.order.entity.api.zm.constants.InsuranceTypeCorrespondence;
 import com.ydtech.modules.order.entity.api.zm.request.ModelsQueryRequest;
 import com.ydtech.modules.order.entity.api.zm.request.QuotedPriceRequest;
 import com.ydtech.modules.order.entity.api.zm.response.ModelsQueryResponse;
+import com.ydtech.modules.order.entity.api.zm.response.QuotedPriceResponse;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
@@ -22,13 +31,18 @@ import com.ydtech.modules.order.service.InsAreaCompanyService;
 import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.order.service.ZhongMeiOrderApiService;
 import com.ydtech.nai.httpvo.*;
+import com.ydtech.utils.CalculateUtils;
 import com.ydtech.utils.HttpsPostUtil;
+import com.ydtech.utils.idgen.IdGenerate;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.stereotype.Service;
+import org.springframework.util.ObjectUtils;
+
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -83,106 +97,123 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         List<ModelsQueryResponse.SimpleStadarCarDTO> simpleStadarCarDTOS = zhongmeiRequestApiComponents.modelQuery(modelsQueryResponse, ModelsQueryResponse.class);
         // 1.1 过滤车型
         List<ModelsQueryResponse.SimpleStadarCarDTO> stadarCarDTOS = simpleStadarCarDTOS.stream().filter(car -> carInfo.getCaryear().equals(car.getLfDate())).collect(Collectors.toList());
-        if(stadarCarDTOS.size() > 0){
+        if (stadarCarDTOS.size() > 0) {
             simpleStadarCarDTOS = stadarCarDTOS;
         }
         ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO = simpleStadarCarDTOS.stream().filter(car -> Integer.valueOf(carInfo.getPurchasePrice()).equals(car.getOriginalPurchasePrice())).collect(Collectors.toList()).get(0);
 
-
-
-
-
-
         // 组装参数
-        QuotedPriceRequest.BusinessDataDTO.PolicyLocationDTO policyLocationDTO = new QuotedPriceRequest.BusinessDataDTO.PolicyLocationDTO();
-
-
+        QuotedPriceRequest quotedPriceRequest = new QuotedPriceRequest(quoteInfo, simpleStadarCarDTO);
+        QuotedPriceResponse quotedPriceResponse = zhongmeiRequestApiComponents.quotedPrice(quotedPriceRequest, QuotedPriceResponse.class);
+        getQuoteRespVo(quotedPriceResponse, quoteInfo);
 
         return null;
     }
 
     @Override
     public HttpResult getPolicyPrint(String companyId) {
-        String url = ZMUrl + "InsurancePolicyPrint.do";
-        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
-        InsurancePolicyPrintHeadVO record = new InsurancePolicyPrintHeadVO();
-        record.setPolicyNo(insAreaCompany.getJqpolicyno());
-        record.setRiskCode("0330");
-        record.setBusinessType("P");
-        record.setEndorSeqNo("endorSeqNo");
-        record.setDocumentType("DZ_AE");
-        HeadVO head = head("InsurancePolicyPrint", ZMToken);
-        record.setHead(head);
-        String json = JSON.toJSONString(record);
-        String post = HttpsPostUtil.sendPost(url, json);
-        return HttpResult.ok(post);
+        return null;
     }
 
     @Override
     public HttpResult uploadImage(String orderNo) {
-        InsOrders insOrders = insOrdersService.existOrder(orderNo);
-        List<InsTaskImage> insTaskImages = insTaskImageService.selectByTaskId(insOrders.getQuoteno());
-        NodeBeanlistVO nodeBean = new NodeBeanlistVO();
-        ImageBeanListVO imgVO = new ImageBeanListVO();
-        List<NodeBeanlistVO> nodeBeanList = new ArrayList<>();
-        UploadImageHeadVO uploadHead = new UploadImageHeadVO();
-        for (InsTaskImage record : insTaskImages) {
-            List<ImageBeanListVO> imgList = new ArrayList<>();
-            nodeBean.setId(record.getId());
-            imgVO.setFileName(getUserName());
-            imgVO.setImage(record.getImage());
-            if (record.getImgtype() != null && record.getImgtype().equals("C01")) {
-                nodeBean.setId("UW_0305");
-            } else if (record.getImgtype() != null && record.getImgtype().equals("C03")) {
-                nodeBean.setId("UW_0302");
-            } else if (record.getImgtype() != null && record.getImgtype().equals("C05")) {
-                nodeBean.setId("UW_0301");
-            }
-            imgVO.setRemark("测试");
-            imgList.add(imgVO);
-            nodeBean.setImageBeanList(imgList);
-            nodeBeanList.add(nodeBean);
-        }
-        String url = ZMIMGUrl + "UploadImage.do";
-
-        HeadVO heads = head("UploadImage", ZMToken);
-        uploadHead.setHead(heads);
-        uploadHead.setNodeBeanlist(nodeBeanList);
-//        String s = redisTemplate.opsForValue().get(RedisConstant.INS_ZHONGMEI_KEY + insOrders.getOrderno());
-//        Response response = JSONObject.parseObject(s, Response.class);
-        uploadHead.setContractNo("4140403137920230731843");
-        String jsons = JSON.toJSONString(uploadHead);
-        String posts = HttpsPostUtil.sendPost(url, jsons);
-        return HttpResult.ok(posts);
+        return null;
     }
 
-    public String getUserName() {
-        String userName = null;
-        Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
+    public QuoteRespVo getQuoteRespVo(QuotedPriceResponse quotedPriceResponse, BaseQuoteInfoVo yaQuoteInfoVo) {
+        double jqPremium = quotedPriceResponse.getForcePrimium().getPremium();
+        double syPremium = quotedPriceResponse.getBizPremium().getSumPremium();
+        QuoteRespVo quoteRespVo = new QuoteRespVo();
+        List<QuoteRiskRespVo> riskList1 = new ArrayList<>();
+        List<QuoteKindRespVo> kindList1 = new ArrayList<>();
+        List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
+        for (RiskInfoVo riskInfoVo : riskList) {
+            if ("0507".equals(riskInfoVo.getRiskCode()) && jqPremium != 0) {
+                QuoteRiskRespVo risk = new QuoteRiskRespVo();
+                risk.setRiskCode("0507");
+                risk.setRiskName("机动车交通事故责任强制保险");
+                risk.setPremium(jqPremium);
+                risk.setStartDate(riskInfoVo.getStartDate());
+                risk.setEndDate(riskInfoVo.getEndDate());
+                riskList1.add(risk);
+            }
+            if ("0510".equals(riskInfoVo.getRiskCode()) && syPremium != 0) {
+                QuoteRiskRespVo risk = new QuoteRiskRespVo();
+                risk.setRiskCode("0510");
+                risk.setRiskName("机动车商业保险");
+                risk.setPremium(syPremium);
+                risk.setStartDate(riskInfoVo.getStartDate());
+                risk.setEndDate(riskInfoVo.getEndDate());
+                riskList1.add(risk);
+            }
+        }
 
-        if (principal instanceof UserDetails) {
-            userName = ((UserDetails) principal).getUsername();
-        } else {
-            userName = principal.toString();
+        QuoteKindRespVo kind;
+        List<QuotedPriceResponse.BizPremiumDTO.CoverageListDTO> coverageList = quotedPriceResponse.getBizPremium().getCoverageList();
+        List<KindInfoVo> kindList = yaQuoteInfoVo.getKindList();
+
+        for (KindInfoVo kindInfoVo : kindList) {
+            kind = new QuoteKindRespVo();
+            kind.setKindCode(kindInfoVo.getKindCode());
+            kind.setKindName(kindInfoVo.getKindName());
+            kind.setAmount(kindInfoVo.getAmount());
+            QuotedPriceResponse.BizPremiumDTO.CoverageListDTO coverageListDTOS = coverageList.stream().filter(
+                            a -> ArrayUtil.indexOf(InsuranceTypeCorrespondence.CONNECT_INSURANCE_TYPE, a.getKindCode()) > 0)
+                    .collect(Collectors.toList()).get(0);
+            kind.setCoveragePremium(coverageListDTOS.getPremium());
+            kind.setUnitAmount(kindInfoVo.getUnitAmount());
+            if (!ObjectUtils.isEmpty(kindInfoVo.getDeductibleRate())) {
+                kind.setDeductibleRate(Double.parseDouble(kindInfoVo.getDeductibleRate()));
+            }
+            kindList1.add(kind);
         }
-        return userName;
-    }
 
-    /**
-     * 设置 head 参数
-     *
-     * @param methodName
-     * @return
-     */
-    public HeadVO head(String methodName, String token) {
-        HeadVO headVO = new HeadVO();
-        headVO.setTransCode(methodName);
-        headVO.setTransType("Req");
-        headVO.setToken(token);
-        headVO.setSource("326");
-        return headVO;
+        quoteRespVo.setRiskList(riskList1);
+        quoteRespVo.setKindList(kindList1);
+        quoteRespVo.setJqPremium(jqPremium);
+        quoteRespVo.setSyPremium(syPremium);
+        Integer sumPayTax = quotedPriceResponse.getTaxinfo().getSumPayTax();
+        quoteRespVo.setCiSumPermium(CalculateUtils.add(jqPremium, sumPayTax));//交强险和车船税合计
+        quoteRespVo.setSumPermium(CalculateUtils.add(jqPremium, syPremium, sumPayTax));//保费合计
+        quoteRespVo.setTaxAmount(sumPayTax);//车船税
+        quoteRespVo.setTotalAdjustRate(0);
+        String zmScore = quotedPriceResponse.getPlatMain().getZmScore();
+        quoteRespVo.setILogPreUdwMess(zmScore);//评分
+        quoteRespVo.setOrderno(yaQuoteInfoVo.getOrderNo()); //订单号
+        return quoteRespVo;
     }
 
+//    public HttpResult responseOrder(String orderNo, QuotedPriceResponse quotedPriceResponse, QuoteRespVo quoteRespVo, EsmInsCompany esmInsCompanies) {
+//        //保存订单信息
+//        InsAreaCompany insAreaCompany = new InsAreaCompany();
+//        insAreaCompany.setId(IdGenerate.nextId());
+//        insAreaCompany.setOrderno(orderNo);
+//        insAreaCompany.setReptxt(JSONObject.parseObject(JSON.toJSONString(quotedPriceResponse)));
+//        insAreaCompany.setJqpremium(BigDecimal.valueOf(quoteRespVo.getJqPremium()));
+//        insAreaCompany.setSypremium(BigDecimal.valueOf(quoteRespVo.getSyPremium()));
+//        insAreaCompany.setTaxamount(BigDecimal.valueOf(quoteRespVo.getTaxAmount()));
+//        insAreaCompany.setSumpremium(BigDecimal.valueOf(quoteRespVo.getSumPermium()));
+//        insAreaCompany.setOrderstatus(InsOrderStatus.S_0.getCode()); // "1"
+//        insAreaCompany.setRiskinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getRiskList())));
+//        insAreaCompany.setKindinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getKindList())));
+//        insAreaCompany.setJqapplyno(quotedPriceResponse.getForcePrimium().get);
+//        insAreaCompany.setSyapplyno(response.getSContractNo());
+//        insAreaCompany.setCompanyId(esmInsCompanies.getId());
+//        insAreaCompany.setInscompany(esmInsCompanies.getNamesimple());
+//        insAreaCompany.setAccidentInfo(JSONObject.parseObject(JSON.toJSONString(accident)));
+//        insAreaCompany.setInsOrderNo(response.getContractMainNo());
+//        // 车船税
+//        TaxArrears taxArrears = new TaxArrears("往年欠税", response.getSumTaxDefault(), response.getSumOverdue());
+//        List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
+//        insAreaCompany.setTaxArrears(JSONObject.parseArray(JSONObject.toJSONString(taxArrearsList)));
+//        insAreaCompanyService.save(insAreaCompany);
+//        insOrdersService.updateByOrderStatus(orderNo, InsOrderStatus.S_0.getCode());
+//        quoteRespVo.setCompanyId(insAreaCompany.getId());
+//        quoteRespVo.setAccident(accident);
+//        quoteRespVo.setTaxArrears(taxArrearsList);
+//        return HttpResult.ok(body.getMessage(), quoteRespVo);
+//    }
+
 }