Explorar o código

华泰对接新建实体

cuixinpeng %!s(int64=2) %!d(string=hai) anos
pai
achega
4a42ec6b67

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

@@ -0,0 +1,109 @@
+package com.ydtech.modules.order.controller;
+
+
+import com.ydtech.aop.request.RequestSingleParam;
+import com.ydtech.config.properties.ZmApiConfigurationProperties;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.ins.model.ya.CarModelDTO;
+import com.ydtech.modules.order.aop.QuoteVerification;
+import com.ydtech.modules.order.components.InsOrdersComponents;
+import com.ydtech.modules.order.entity.api.zhongmei.request.ApprovedRequest;
+import com.ydtech.modules.order.entity.api.zhongmei.request.CoverageRequest;
+import com.ydtech.modules.order.entity.vo.*;
+import com.ydtech.modules.order.service.HuaTaiOrderApiService;
+import com.ydtech.modules.order.service.ZhongMeiOrderApiService;
+import com.ydtech.modules.order.utils.AESUtilsWithDataBase;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.util.List;
+
+
+@Api(tags = "华泰财险 API ")
+@Slf4j
+@RestController
+@RequestMapping("/order/huaTaiApi")
+public class HuaTaiOrderApiController {
+
+    private final HuaTaiOrderApiService huaTaiOrderApiService;
+
+    private final InsOrdersComponents insOrdersComponents;
+
+    private final ZmApiConfigurationProperties properties;
+
+    public HuaTaiOrderApiController(HuaTaiOrderApiService huaTaiOrderApiService, InsOrdersComponents insOrdersComponents, ZmApiConfigurationProperties properties) {
+        this.huaTaiOrderApiService = huaTaiOrderApiService;
+        this.insOrdersComponents = insOrdersComponents;
+        this.properties = properties;
+    }
+
+    @PostMapping(value = "/modelsQuery")
+    @ApiOperation(value = "车型查询接口")
+    public HttpResult<List<CarModelDTO>> modelsQuery(@RequestSingleParam(value = "modelName") String modelName) {
+        return this.huaTaiOrderApiService.modelsQuery(modelName);
+    }
+
+    @QuoteVerification("报价授权")
+    @PostMapping("/quote")
+    @ApiOperation("报价")
+    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<AccidentalDrivingVo> zmQuoteVo) {
+        BaseQuoteInfoVo quoteInfo = this.insOrdersComponents.getQuoteInfo(zmQuoteVo.getOrderNo(), zmQuoteVo.getAgreementId());
+        return this.huaTaiOrderApiService.quote(quoteInfo, zmQuoteVo);
+    }
+
+    @PostMapping(value = "/audit")
+    @ApiOperation(value = "提交核保")
+    public HttpResult<Object> audit(@RequestSingleParam(value = "companyId") String companyId) {
+        return this.huaTaiOrderApiService.audit(companyId);
+    }
+
+    @PostMapping(value = "/submitImage")
+    @ApiOperation(value = "提交影像信息")
+    public HttpResult<Object> submitImage(@RequestSingleParam(value = "companyId") String companyId) {
+        return this.huaTaiOrderApiService.submitImage(companyId);
+    }
+
+    @PostMapping("/getPolicyPrint")
+    @ApiOperation(value = "电子保单")
+    public HttpResult<List<String>> getPolicyPrint(@RequestBody PolicyPrintVo policyPrintVo) {
+        return this.huaTaiOrderApiService.getPolicyPrint(policyPrintVo);
+    }
+
+    @PostMapping("/paymentEnquiry")
+    @ApiOperation(value = "缴费查询")
+    public HttpResult<Object> paymentEnquiry(@RequestSingleParam(value = "companyId") String companyId) {
+        return this.huaTaiOrderApiService.paymentEnquiry(companyId);
+    }
+
+    @PostMapping("/underwritingCallback")
+    @ApiOperation(value = "承保回调")
+    public HttpResult<Object> underwritingCallback(@RequestBody String s) {
+        CoverageRequest coverageRequest = AESUtilsWithDataBase.decryptMessage(s, CoverageRequest.class, "承保回调", properties.getSessionKey());
+        return this.huaTaiOrderApiService.underwritingCallback(coverageRequest);
+    }
+
+    @PostMapping("/auditCallback")
+    @ApiOperation(value = "审核回调")
+    public HttpResult<Object> auditCallback(@RequestBody String s) {
+        ApprovedRequest approvedRequest = AESUtilsWithDataBase.decryptMessage(s, ApprovedRequest.class, "审核回调", properties.getSessionKey());
+        return this.huaTaiOrderApiService.auditCallback(approvedRequest);
+    }
+
+    @PostMapping("/auditStatusQuery")
+    @ApiOperation(value = "核保状态查询")
+    public HttpResult<Object> auditStatusQuery(@RequestSingleParam(value = "companyId") String companyId) {
+        return this.huaTaiOrderApiService.auditStatusQuery(companyId);
+    }
+    @PostMapping("/rideAccidentQuery")
+    @ApiOperation(value = "核保状态查询")
+    public HttpResult<Object> rideAccidentQuery(@RequestBody @Valid AccidentalDrivingQueryVo accidentalDrivingVo) {
+        return this.huaTaiOrderApiService.rideAccidentQuery(accidentalDrivingVo);
+    }
+}

+ 19 - 0
src/main/java/com/ydtech/modules/order/entity/api/huatai/HuaTaiBaseRequest.java

@@ -0,0 +1,19 @@
+package com.ydtech.modules.order.entity.api.huatai;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+@Data
+public abstract class HuaTaiBaseRequest implements Serializable {
+
+
+    private static final long serialVersionUID = -9001122041744022753L;
+    @JsonProperty(value = "head")
+    private HuaTaiBaseRequestHead head;
+
+}

+ 43 - 0
src/main/java/com/ydtech/modules/order/entity/api/huatai/HuaTaiBaseRequestHead.java

@@ -0,0 +1,43 @@
+package com.ydtech.modules.order.entity.api.huatai;
+
+import com.ydtech.modules.order.entity.config.ZmConfigureParameters;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class HuaTaiBaseRequestHead extends HuaTaiBastHead {
+
+
+    private static final long serialVersionUID = -859451412538220070L;
+    //出单工具
+    private String source;
+    //出单机构
+    private String comCode;
+    //出单代理人
+    private String agentCode;
+    //业务员代码
+    private String userCode;
+    //代理人协议代码
+    private String agreementNo;
+    //操作人员代码
+    private String operatorCode;
+    //中介机构销售人员
+    private String saUserCode;
+    //中介机构销售人员执业证书号
+    private String saUserProNo;
+
+    public HuaTaiBaseRequestHead(String token, String source) {
+        super.setToken(token);
+        this.source = source;
+    }
+
+    public HuaTaiBaseRequestHead(ZmConfigureParameters zmConfigureParameters) {
+        super.setToken(zmConfigureParameters.getToken());
+        this.source = zmConfigureParameters.getSource();
+    }
+
+}

+ 20 - 0
src/main/java/com/ydtech/modules/order/entity/api/huatai/HuaTaiBaseResponse.java

@@ -0,0 +1,20 @@
+package com.ydtech.modules.order.entity.api.huatai;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author: CXP
+ * @Date: 2023/10/26 21:09
+ */
+@Data
+public abstract class HuaTaiBaseResponse implements Serializable {
+
+
+    private static final long serialVersionUID = -990496711871560039L;
+    @JsonProperty(value = "head")
+    private HuaTaiBaseResponseHead head;
+
+}

+ 18 - 0
src/main/java/com/ydtech/modules/order/entity/api/huatai/HuaTaiBaseResponseHead.java

@@ -0,0 +1,18 @@
+package com.ydtech.modules.order.entity.api.huatai;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @Author: CXP
+ * @Date: 2023/10/26 21:09
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class HuaTaiBaseResponseHead  extends HuaTaiBastHead {
+
+    private static final long serialVersionUID = 9208429342236691664L;
+    private String returnCode;
+    private String returnMessage;
+
+}

+ 25 - 0
src/main/java/com/ydtech/modules/order/entity/api/huatai/HuaTaiBastHead.java

@@ -0,0 +1,25 @@
+package com.ydtech.modules.order.entity.api.huatai;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @Author: CXP
+ * @Date: 2023/10/24 22:15
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class HuaTaiBastHead implements Serializable {
+    private static final long serialVersionUID = 7194330650127377368L;
+    //接口代码
+    private String transCode;
+    //请求类型
+    private String transType;
+    //第三方订单号
+    private String token;
+
+}

+ 460 - 0
src/main/java/com/ydtech/modules/order/entity/api/huatai/request/HuaTaiQuotedPriceRequest.java

@@ -0,0 +1,460 @@
+package com.ydtech.modules.order.entity.api.huatai.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.order.entity.api.huatai.HuaTaiBaseRequest;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Author: CXP
+ * @Date: 2023/10/24 21:46
+ */
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class HuaTaiQuotedPriceRequest extends HuaTaiBaseRequest {
+
+    private static final long serialVersionUID = -3877935401822194816L;
+
+    //Y	投保单信息
+    @JsonProperty("businessData")
+    private BusinessDataDto businessData;
+    //Y	机构代码
+    @JsonProperty("loginCom")
+    private String loginCom;
+
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @Data
+    public static class BusinessDataDto implements Serializable {
+
+        private static final long serialVersionUID = -1000678860334502885L;
+        //Y	投保主信息
+        @JsonProperty("businessMain")
+        private BusinessMainDto businessMain;
+        //Y	业务信息(列表)
+        @JsonProperty("contract")
+        private List<ContractDto> contract;
+        //Y	客户信息(列表)
+        @JsonProperty("customer")
+        private List<CustomerDto> customer;
+        //Y	投保车辆信息
+        @JsonProperty("insuredObject")
+        private InsuredObjectDto insuredObject;
+        //Y	销售信息
+        @JsonProperty("saleInfo")
+        private SaleInfoDto saleInfo;
+
+        @NoArgsConstructor
+        @Data
+        public static class BusinessMainDto implements Serializable{
+            private static final long serialVersionUID = 2471155101522896774L;
+            //Y	操作机构代码
+            @JsonProperty("makeCom")
+            private String makeCom;
+            //Y	操作员代码
+            @JsonProperty("operatorCode")
+            private String operatorCode;
+            //Y	投保日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("operateDate")
+            private String operateDate;
+            //CY	出单计算机IP地址(北京出单机构必传)
+            @JsonProperty("computerIp")
+            private String computerIp;
+        }
+        @NoArgsConstructor
+        @Data
+        public static class InsuredObjectDto implements Serializable{
+            //Y	保险采集和管理车信息
+            @JsonProperty("simpleStadarCar")
+            private PolicyCarDto policyCar;
+            //Y	简化版精友信息
+            @JsonProperty("simpleStadarCar")
+            private SimpleStadarCarDto simpleStadarCar;
+
+            @NoArgsConstructor
+            @Data
+            public static class PolicyCarDto implements Serializable{
+                //Y	排量(单位:升)
+                @JsonProperty("displacement")
+                private double displacement;
+                //Y	排量(单位:升)
+                @JsonProperty("plateNo")
+                private String plateNo;
+                //Y	初次登记日期(格式:YYYY-MM-DD HH24:MI:SS)
+                @JsonProperty("registerDate")
+                private Date registerDate;
+                //Y	行驶证发证日期(格式:YYYY-MM-DD HH24:MI:SS)
+                @JsonProperty("issueDate")
+                private String issueDate;
+                //Y	新车购置价
+                @JsonProperty("purchasePrice")
+                private String purchasePrice;
+                //Y	港澳车标志(false-非港澳车;true-是港澳车)
+                @JsonProperty("hKFlag")
+                private boolean hKFlag;
+                //Y	发动机号
+                @JsonProperty("engine")
+                private String engine;
+                //Y	外地车标志(false-本地车;true-外地车)
+                @JsonProperty("ecdemicVehicleFlag")
+                private boolean ecdemicVehicleFlag;
+                //Y	商业险过户车标志(0-非过户车;1-过户重新投保)
+                @JsonProperty("chgOwnerFlag")
+                private String chgOwnerFlag;
+                //Y	交强险过户车标志(1-过户重新投保,非过户车传空即可)
+                @JsonProperty("specialCarFlag")
+                private String specialCarFlag;
+                //CY	过户日期(过户车必传)(格式:YYYY-MM-DD HH24:MI:SS)
+                @JsonProperty("transferDate")
+                private Date transferDate;
+                //Y	车架号
+                @JsonProperty("vIN")
+                private String vIN;
+                //Y	是否贷款购车标志(0-非贷款车;1-是贷款车)
+                @JsonProperty("loanStatus")
+                private String loanStatus;
+                //Y	厂牌型号
+                @JsonProperty("modelName")
+                private String modelName;
+                //CY	整备质量
+                @JsonProperty("UnladenMass")
+                private String UnladenMass;
+                //CY	车辆来历凭证种类(新车,北京上海机构出单必录)
+                @JsonProperty("CertificateType")
+                private String CertificateType;
+                //CY	车辆来历凭证编号(新车,北京机构出单必录)
+                @JsonProperty("CertificateNo")
+                private String CertificateNo;
+                //CY	车辆来历凭证所载日期(新车,北京机构出单必录)(格式:YYYY-MM-DD HH24:MI:SS)
+                @JsonProperty("CertificateDate")
+                private String CertificateDate;
+                //CY	参见车辆种类代码
+                @JsonProperty("MotorTypeCode")
+                private String MotorTypeCode;
+                //CY	参见使用性质代码
+                @JsonProperty("MotorUsageTypeCode")
+                private String MotorUsageTypeCode;
+                //CY	参见号牌种类代码
+                @JsonProperty("PlateType")
+                private String PlateType;
+                //CY	功率(纯电摩托车必录)
+                @JsonProperty("Power")
+                private String Power;
+                //CY	最高设计车速(摩托车必录)
+                @JsonProperty("MaximumSpeed")
+                private String MaximumSpeed;
+                //CY	参见所属性质代码
+                @JsonProperty("Property")
+                private String Property;
+                //CY	新车销售公司名称(广东机构新车出单必录)
+                @JsonProperty("NewCarSalesCompanyName")
+                private String NewCarSalesCompanyName;
+                //CY	销售公司所在省(广东机构出单新车必录)
+                @JsonProperty("NewCarSalesProvince")
+                private String NewCarSalesProvince;
+                //CY	销售公司所在市(广东机构出单新车必录)
+                @JsonProperty("NewCarSalesCity")
+                private String NewCarSalesCity;
+                //CY	销售公司所在区(广东机构出单新车必录)
+                @JsonProperty("NewCarSalesDistrict")
+                private String NewCarSalesDistrict;
+                //CY	是否4S店销售(广东机构出单新车必录)
+                @JsonProperty("IsFourSShop")
+                private String IsFourSShop;
+                //CY	购车发票日期(上海机构出单必录)(格式:YYYY-MM-DD HH24:MI:SS)
+                @JsonProperty("InvoiceDate")
+                private Date InvoiceDate;
+                //CY	参见车身颜色代码
+                @JsonProperty("ColorCode")
+                private String ColorCode;
+                //CY	验车状态代码(1-未验车;2-免验车;4-已验车)
+                @JsonProperty("CarCheckStatus")
+                private String CarCheckStatus;
+                //CY	验车人(已验车必录)
+                @JsonProperty("CarChecker")
+                private String CarChecker;
+                //CY	验车时间(已验车必录)(格式:YYYY-MM-DD HH24:MI:SS)
+                @JsonProperty("CarCheckTime")
+                private String CarCheckTime;
+                //CY	验车记录(已验车必录)
+                @JsonProperty("CarCheckRecord")
+                private String CarCheckRecord;
+                //CY	车况(0-好;1-中;2-差)
+                @JsonProperty("VehicleCondition")
+                private String VehicleCondition;
+                //Y	参见交管车辆类型代码
+                @JsonProperty("VehicleType")
+                private String VehicleType;
+                //CY	行驶证车型
+                @JsonProperty("RegistModelCode")
+                private String RegistModelCode;
+                //CY	参见号牌底色代码
+                @JsonProperty("PlateColorCode")
+                private String PlateColorCode;
+            }
+            @NoArgsConstructor
+            @Data
+            public static class SimpleStadarCarDto implements Serializable{
+                //Y	行业车型编码
+                @JsonProperty("modelCode")
+                private String modelCode;
+                //Y	座位数
+                @JsonProperty("approvedPassengersCapacity")
+                private int approvedPassengersCapacity;
+                //Y	精友车型编码
+                @JsonProperty("localModelCode")
+                private String localModelCode;
+                //Y	参见能源种类代码
+                @JsonProperty("energyTypes")
+                private String energyTypes;
+            }
+
+        }
+        @NoArgsConstructor
+        @Data
+        public static class SaleInfoDto implements Serializable{
+            //Y	代理人代码
+            @JsonProperty("agentCode")
+            private String agentCode;
+            //Y	代理协议编码
+            @JsonProperty("agreementNo")
+            private String agreementNo;
+            //Y	机构代码
+            @JsonProperty("comCode")
+            private String comCode;
+            //Y	活动ID(通过活动查询接口获得)
+            @JsonProperty("promoteSalePlanID")
+            private String promoteSalePlanID;
+
+        }
+    }
+
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @Data
+    public static class ContractDto implements Serializable{
+        private static final long serialVersionUID = -8141574495483504299L;
+        //Y	业务主信息
+        @JsonProperty("contractMain")
+        private ContractMainDto contractMain;
+        //Y	投保险别列表
+        @JsonProperty("coverage")
+        private List<CoverageDto> coverage;
+        //Y	平台交互信息
+        @JsonProperty("platFormMessage")
+        private PlatFormMessageDto platFormMessage;
+        //CY	车船税信息(交强险节点下传值)
+        @JsonProperty("tax")
+        private TaxDto tax;
+        //CY	充电桩信息(列表)
+        @JsonProperty("ChargingPost")
+        private List<ChargingPostDto> chargingPost;
+
+        @NoArgsConstructor
+        @Data
+        public static class ContractMainDto implements Serializable{
+            //CY	报价单号(初次报价为空,同一单再次报价需传入之前接口返回的值)
+            @JsonProperty("contractNo")
+            private String contractNo;
+            //Y	经办人代码
+            @JsonProperty("handlerCode")
+            private String handlerCode;
+            //Y	参见险种代码
+            @JsonProperty("riskCode")
+            private String riskCode;
+            //Y	起保日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("validDate")
+            private String validDate;
+            //Y	终保日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+            //Y	生成日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("productionDate")
+            private String productionDate;
+        }
+        @NoArgsConstructor
+        @Data
+        public static class CoverageDto implements Serializable{
+            //Y	保额(传值要求参见险别代码)
+            @JsonProperty("amount")
+            private double amount;
+            //Y	起保日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("validDate")
+            private String validDate;
+            //Y	终保日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("expiryDate")
+            private String expiryDate;
+            //Y	参见险别代码
+            @JsonProperty("kindCode")
+            private String kindCode;
+            //Y	险别名称(传值要求参见险别代码)
+            @JsonProperty("kindName")
+            private String kindName;
+            //CY	单位保额(传值要求参见险别代码)
+            @JsonProperty("unitAmount")
+            private String unitAmount;
+            //CY	数量(乘客险录入值为座位数-1,其他险别无需录入)
+            @JsonProperty("quantity")
+            private String quantity;
+            //CY	服务次数(传值要求参见险别代码)
+            @JsonProperty("serviceTimes")
+            private String serviceTimes;
+            //CY	免赔率(车损险可传,传值要求参见险别代码)
+            @JsonProperty("deductibleRate")
+            private String deductibleRate;
+            //CY	可选免赔额(附加绝对免赔率特约条款必传,传值要求参见险别代码)
+            @JsonProperty("deductible")
+            private String deductible;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PlatFormMessageDto implements Serializable {
+            //CY	平台查询码
+            @JsonProperty("querySequenceNo")
+            private String querySequenceNo;
+            //CY	平台查询码(获取上年保单信息)
+            @JsonProperty("querySequenceNoForBiRe")
+            private String querySequenceNoForBiRe;
+            //CY	平台校验图片转码后得到的验证码
+            @JsonProperty("checkCode")
+            private String checkCode;
+            //CY	平台校验图片转码后得到的验证码(获取上年保单信息)
+            @JsonProperty("checkCodeForBiRe")
+            private String checkCodeForBiRe;
+        }
+        @NoArgsConstructor
+        @Data
+        public static class TaxDto implements Serializable{
+            //Y	参见纳税类型代码
+            @JsonProperty("TaxConditionCode")
+            private String TaxConditionCode;
+            //CY	缴税起期(完税必传)
+            @JsonProperty("TaxStartDate")
+            private String TaxStartDate;
+            //CY	缴税止期(完税必传)
+            @JsonProperty("TaxEndDate")
+            private String TaxEndDate;
+            //CY	开具税务机关代码(减税、免税、完税必传)
+            @JsonProperty("TaxDepartmentCode")
+            private String TaxDepartmentCode;
+            //CY	开具税务机关名称(减税、免税、完税必传)
+            @JsonProperty("TaxDepartment")
+            private String TaxDepartment;
+            //CY	减税/免税/完税凭证号(减税、免税、完税必传)
+            @JsonProperty("DocumentNumber")
+            private String DocumentNumber;
+            //Y	纳税人是否同车主(1-是;0-否)
+            @JsonProperty("isSameWithOwner")
+            private String isSameWithOwner;
+            //CY	纳税人证件类型代码,参见证件类型代码(纳税人不同车主时必填)
+            @JsonProperty("taxpayerIdentifyType")
+            private String taxpayerIdentifyType;
+            //CY	纳税人证件号码(纳税人不同车主时必填)
+            @JsonProperty("TaxPayerIdentificationCode")
+            private String TaxPayerIdentificationCode;
+            //CY	纳税人名称(纳税人不同车主时必填)
+            @JsonProperty("TaxPayerName")
+            private String TaxPayerName;
+            //CY	参见纳税地区代码(完税必传)
+            @JsonProperty("taxLocationCode")
+            private String taxLocationCode;
+            //CY	完税凭证填发日期(完税必传)(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("taxDocumentDate")
+            private String taxDocumentDate;
+            //CY	参见减免原因代码
+            @JsonProperty("DeductionDueCode")
+            private String DeductionDueCode;
+            //CY	减免方案代码(1-按金额减免;2-按比例减免)
+            @JsonProperty("DeductionDueType")
+            private String DeductionDueType;
+            //CY	减免金额(减免方案为1时必传)
+            @JsonProperty("Deduction")
+            private double Deduction;
+            //CY	减免比例(取值区间为0-100之间,减免方案为2时必传)
+            @JsonProperty("DeductionDueProportion")
+            private double DeductionDueProportion;
+        }
+        @NoArgsConstructor
+        @Data
+        public static class ChargingPostDto implements Serializable{
+            //Y	充电桩序号
+            @JsonProperty("itemNo")
+            private String itemNo;
+            //Y	充电桩型号
+            @JsonProperty("chargingPostType")
+            private String chargingPostType;
+            //Y	充电桩编码
+            @JsonProperty("chargingPostCode")
+            private String chargingPostCode;
+            //Y	充电桩地址
+            @JsonProperty("chargingPostAddress")
+            private String chargingPostAddress;
+            //Y	充电桩安装地点类型
+            @JsonProperty("chargingPostAddressType")
+            private String chargingPostAddressType;
+            //Y	充电桩种类
+            @JsonProperty("chargingPostKind")
+            private String chargingPostKind;
+            //Y	充电桩购买日期(格式:YYYY-MM-DD)
+            @JsonProperty("chargingPostDate")
+            private String chargingPostDate;
+            //CY	UAP对应保额(投保UAP险必传,传值要求参见险别代码)
+            @JsonProperty("amountUAP")
+            private String amountUAP;
+            //CY	UBP对应保额(投保UBP险必传,传值要求参见险别代码)
+            @JsonProperty("amountUBP")
+            private String amountUBP;
+        }
+    }
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @Data
+    public static class CustomerDto implements Serializable{
+        private static final long serialVersionUID = -931739185225437306L;
+        //CY	证件号码(个人客户必传)
+        @JsonProperty("identifyNumber")
+        private String identifyNumber;
+        //Y	参见客户证件类型代码
+        @JsonProperty("identifyType")
+        private String identifyType;
+        //Y	客户名称
+        @JsonProperty("name")
+        private String name;
+        //Y	客户角色身份(1-投保人;2-被保险人;3-车主)
+        @JsonProperty("role")
+        private String role;
+        //Y	手机号码
+        @JsonProperty("mobile")
+        private String mobile;
+        //Y	证件有效起期(格式:YYYY-MM-DD HH24:MI:SS)
+        @JsonProperty("identifyValidDate")
+        private String identifyValidDate;
+        //Y	证件有效止期(格式:YYYY-MM-DD HH24:MI:SS)
+        @JsonProperty("identifyValidEndDate")
+        private String identifyValidEndDate;
+        //Y	客户职业(传值要求通过职业查询接口获得)
+        @JsonProperty("occupationCode")
+        private String occupationCode;
+        //Y	客户类型(1-个人,2-机构)
+        @JsonProperty("type")
+        private String type;
+        //CY	办理人姓名(机构客户必录)
+        @JsonProperty("transactorName")
+        private String transactorName;
+        //CY	组织机构代码(机构客户必录)
+        @JsonProperty("organizeCode")
+        private String organizeCode;
+        //Y	车辆与被保险人所属关系(1-所有;2-使用;3-管理)
+        @JsonProperty("carInsuredRelation")
+        private String carInsuredRelation;
+    }
+
+}

+ 200 - 0
src/main/java/com/ydtech/modules/order/entity/api/huatai/response/HuaTaiQuotedPriceResponse.java

@@ -0,0 +1,200 @@
+package com.ydtech.modules.order.entity.api.huatai.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.order.entity.api.huatai.HuaTaiBaseResponse;
+import com.ydtech.modules.order.entity.api.huatai.request.HuaTaiQuotedPriceRequest;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Author: CXP
+ * @Date: 2023/10/26 21:07
+ */
+@NoArgsConstructor
+@Data
+public class HuaTaiQuotedPriceResponse extends HuaTaiBaseResponse {
+
+    //Y	投保单信息
+    @JsonProperty("businessData")
+    private BusinessDataDto businessData;
+
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @Data
+    public static class BusinessDataDto implements Serializable {
+
+        private List<ContractDto> contract;
+    }
+
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @Data
+    public static class ContractDto implements Serializable{
+        private static final long serialVersionUID = -8141574495483504299L;
+        //Y	业务主信息
+        @JsonProperty("contractMain")
+        private ContractMainDto contractMain;
+        //Y	投保险别列表
+        @JsonProperty("coverage")
+        private List<CoverageDto> coverage;
+        //Y	平台交互信息
+        @JsonProperty("platFormMessage")
+        private PlatFormMessageDto platFormMessage;
+        //CY	车船税信息(交强险节点下传值)
+        @JsonProperty("tax")
+        private TaxDto tax;
+        //CY	充电桩信息(列表)
+        @JsonProperty("ChargingPost")
+        private List<ChargingPostDto> chargingPost;
+
+        @NoArgsConstructor
+        @Data
+        public static class ContractMainDto implements Serializable{
+            //CY	报价单号(初次报价为空,同一单再次报价需传入之前接口返回的值)
+            @JsonProperty("contractNo")
+            private String contractNo;
+            //Y	起保日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("validDate")
+            private Date validDate;
+            //Y	终保日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("expiryDate")
+            private Date expiryDate;
+            //Y	参见险种代码
+            @JsonProperty("riskCode")
+            private String riskCode;
+            private String totalAdjustRate;
+            private String totalPremium;
+            private String category;
+        }
+        @NoArgsConstructor
+        @Data
+        public static class CoverageDto implements Serializable{
+            //Y	保额(传值要求参见险别代码)
+            @JsonProperty("amount")
+            private double coverageAdjustRate;
+            private double coveragePremium;
+            private Date expiryDate;
+            private Date validDate;
+            private String kindCode;
+            private String kindName;
+        }
+
+        @NoArgsConstructor
+        @Data
+        public static class PlatFormMessageDto implements Serializable {
+            //CY	平台查询码
+            @JsonProperty("querySequenceNo")
+            private String querySequenceNo;
+            //CY	平台查询码(获取上年保单信息)
+            @JsonProperty("querySequenceNoForBiRe")
+            private String querySequenceNoForBiRe;
+            //CY	平台校验图片转码后得到的验证码
+            @JsonProperty("checkCode")
+            private String checkCode;
+            //CY	平台校验图片转码后得到的验证码(获取上年保单信息)
+            @JsonProperty("checkCodeForBiRe")
+            private String checkCodeForBiRe;
+            private List<AccurateServiceInfoDto> accurateServiceInfo;
+            private String reInsureMsg;
+        }
+        public static class AccurateServiceInfoDto implements Serializable{
+            private String carYear;
+            private String displacement;
+            private String modelCode;
+            private String modelFlag;
+            private String modelName;
+            private String purchasePrice;
+            private String remark;
+            private String seatCount;
+            private String tonCount;
+            private String vehicleCode;
+        }
+        @NoArgsConstructor
+        @Data
+        public static class TaxDto implements Serializable{
+            //Y	参见纳税类型代码
+            @JsonProperty("taxConditionCode")
+            private String taxConditionCode;
+            //CY	缴税起期(完税必传)
+            @JsonProperty("taxStartDate")
+            private Date taxStartDate;
+            //CY	缴税止期(完税必传)
+            @JsonProperty("taxEndDate")
+            private String taxEndDate;
+            //CY	参见纳税地区代码(完税必传)
+            @JsonProperty("taxLocationCode")
+            private String taxLocationCode;
+            //CY	开具税务机关代码(减税、免税、完税必传)
+            @JsonProperty("TaxDepartmentCode")
+            private String TaxDepartmentCode;
+            //CY	开具税务机关名称(减税、免税、完税必传)
+            @JsonProperty("taxDepartment")
+            private String taxDepartment;
+            //CY	纳税人证件号码(纳税人不同车主时必填)
+            @JsonProperty("TaxPayerIdentificationCode")
+            private String TaxPayerIdentificationCode;
+            //CY	纳税人名称(纳税人不同车主时必填)
+            @JsonProperty("TaxPayerName")
+            private String TaxPayerName;
+            //CY	减税/免税/完税凭证号(减税、免税、完税必传)
+            @JsonProperty("documentNumber")
+            private String documentNumber;
+            //CY	参见减免原因代码
+            @JsonProperty("DeductionDueCode")
+            private String DeductionDueCode;
+            //CY	减免方案代码(1-按金额减免;2-按比例减免)
+            @JsonProperty("DeductionDueType")
+            private String DeductionDueType;
+            //CY	减免比例(取值区间为0-100之间,减免方案为2时必传)
+            @JsonProperty("DeductionDueProportion")
+            private double DeductionDueProportion;
+            //CY	减免金额(减免方案为1时必传)
+            @JsonProperty("Deduction")
+            private double Deduction;
+
+            //Y	纳税人是否同车主(1-是;0-否)
+            @JsonProperty("isSameWithOwner")
+            private String lastPaidYear;
+            //CY	纳税人证件类型代码,参见证件类型代码(纳税人不同车主时必填)
+            @JsonProperty("taxpayerIdentifyType")
+            private String annualTaxAmount;
+
+
+
+            //CY	完税凭证填发日期(完税必传)(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("taxDocumentDate")
+            private String unit;
+            private String annualTaxDue;
+            private String sumTaxDefault;
+            private String sumOverdue;
+            private String exceedDaysCount;
+            private String sumTax;
+
+
+        }
+        @NoArgsConstructor
+        @Data
+        public static class ChargingPostDto implements Serializable{
+            //Y	充电桩序号
+            @JsonProperty("itemNo")
+            private String itemNo;
+            //Y	充电桩型号
+            @JsonProperty("chargingPostType")
+            private String chargingPostType;
+            //Y	充电桩编码
+            @JsonProperty("chargingPostCode")
+            private String chargingPostCode;
+            //CY	UAP对应保额(投保UAP险必传,传值要求参见险别代码)
+            @JsonProperty("premiumUAP")
+            private String premiumUAP;
+            //CY	UBP对应保额(投保UBP险必传,传值要求参见险别代码)
+            @JsonProperty("premiumUBP")
+            private String premiumUBP;
+        }
+    }
+}

+ 75 - 0
src/main/java/com/ydtech/modules/order/service/HuaTaiOrderApiService.java

@@ -0,0 +1,75 @@
+package com.ydtech.modules.order.service;
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.ins.model.ya.CarModelDTO;
+import com.ydtech.modules.order.entity.api.zhongmei.request.ApprovedRequest;
+import com.ydtech.modules.order.entity.api.zhongmei.request.CoverageRequest;
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
+import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+
+import java.util.List;
+
+public interface HuaTaiOrderApiService extends BaseOrderService<AccidentalDrivingVo> {
+
+    /**
+     * 车型查询
+     *
+     * @param modelName 车型名称
+     * @return
+     */
+    HttpResult<List<CarModelDTO>> modelsQuery(String modelName);
+
+    /**
+     * 提交影像信息
+     *
+     * @param companyId 子订单编号
+     * @return
+     */
+    HttpResult<Object> submitImage(String companyId);
+
+    /**
+     * 承保回调
+     *
+     * @param coverageRequest
+     * @return
+     */
+    HttpResult<Object> underwritingCallback(CoverageRequest coverageRequest);
+
+    /**
+     * 审核回调
+     *
+     * @param approvedRequest
+     * @return
+     */
+    HttpResult<Object> auditCallback(ApprovedRequest approvedRequest);
+
+    /**
+     * 中煤保单下载
+     *
+     * @return 响应
+     */
+    HttpResult<List<String>> getPolicyPrint(PolicyPrintVo policyPrintVo);
+
+    /**
+     * 缴费查询
+     *
+     * @param companyId 子订单号
+     * @return 响应
+     */
+    HttpResult<Object> paymentEnquiry(String companyId);
+
+    /**
+     * 核保状态查询
+     * @param companyId
+     * @return
+     */
+    HttpResult<Object> auditStatusQuery(String companyId);
+
+    /**
+     * 非车可投保产品查询
+     * @param accidentalDrivingVo
+     * @return
+     */
+    HttpResult<Object> rideAccidentQuery(AccidentalDrivingQueryVo accidentalDrivingVo);
+}

+ 551 - 0
src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java

@@ -0,0 +1,551 @@
+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.ZhongmeiRequestComponents;
+import com.ydtech.constants.enums.InsuranceRisk;
+import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.fee.service.FeeRuleSchemeService;
+import com.ydtech.modules.ins.model.request.Response;
+import com.ydtech.modules.ins.model.vo.*;
+import com.ydtech.modules.ins.model.ya.CarModelDTO;
+import com.ydtech.modules.ins.model.zm.ZmCarModel;
+import com.ydtech.modules.order.components.ConfigureParametersComponents;
+import com.ydtech.modules.order.components.ZhongmeiRequestApiComponents;
+import com.ydtech.modules.order.components.zhongmei.ZhongmeiRepeatInsuranceComponents;
+import com.ydtech.modules.order.constants.InsuranceTypeCorrespondence;
+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.zhongmei.BaseRequestHead;
+import com.ydtech.modules.order.entity.api.zhongmei.constants.enums.AuditStatusEnum;
+import com.ydtech.modules.order.entity.api.zhongmei.constants.enums.DocumentTypeEnum;
+import com.ydtech.modules.order.entity.api.zhongmei.constants.enums.PaymentStatusEnum;
+import com.ydtech.modules.order.entity.api.zhongmei.constants.enums.SubmitStatus;
+import com.ydtech.modules.order.entity.api.zhongmei.request.*;
+import com.ydtech.modules.order.entity.api.zhongmei.response.*;
+import com.ydtech.modules.order.entity.config.ZmConfigureParameters;
+import com.ydtech.modules.order.entity.filter.CarModelsFilterUtils;
+import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
+import com.ydtech.modules.order.entity.vo.*;
+import com.ydtech.modules.order.service.*;
+import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
+import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
+import com.ydtech.utils.CalculateUtils;
+import com.ydtech.utils.baidu.FileUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.stereotype.Service;
+import org.springframework.util.ObjectUtils;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+@Slf4j
+public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
+
+    private final InsOrdersService insOrdersService;
+
+    private final InsAreaCompanyService insAreaCompanyService;
+
+    private final InsTaskImagesService insTaskImagesService;
+
+    private final ZhongmeiRequestApiComponents zhongmeiRequestApiComponents;
+
+
+    private final ZhongmeiRequestComponents zhongmeiRequestComponents;
+
+    private final PtlAgreementAttributionService ptlAgreementAttributionService;
+
+    private final ConfigureParametersComponents configureParametersComponents;
+
+    private final FeeRuleSchemeService feeRuleSchemeService;
+
+    private final InsFeeOrderService insFeeOrderService;
+
+    private final ZhongmeiRepeatInsuranceComponents zhongmeiRepeatInsuranceComponents;
+
+    @Value("${upload.file.path}")
+    private String uploadFilePath;
+
+    @Value("${upload.file.url}")
+    private String showFileUrl;
+
+    @Value("${api.url}")
+    private String apiUrl;
+
+    public HuaTaiOrderApiServiceImpl(InsOrdersService insOrdersService, InsAreaCompanyService insAreaCompanyService, InsTaskImagesService insTaskImagesService,
+                                     ZhongmeiRequestApiComponents zhongmeiRequestApiComponents, ZhongmeiRequestComponents zhongmeiRequestComponents,
+                                     ConfigureParametersComponents configureParametersComponents, PtlAgreementAttributionService ptlAgreementAttributionService,
+                                     FeeRuleSchemeService feeRuleSchemeService, InsFeeOrderService insFeeOrderService, ZhongmeiRepeatInsuranceComponents zhongmeiRepeatInsuranceComponents) {
+        this.insOrdersService = insOrdersService;
+        this.insAreaCompanyService = insAreaCompanyService;
+        this.insTaskImagesService = insTaskImagesService;
+        this.zhongmeiRequestApiComponents = zhongmeiRequestApiComponents;
+        this.zhongmeiRequestComponents = zhongmeiRequestComponents;
+        this.configureParametersComponents = configureParametersComponents;
+        this.ptlAgreementAttributionService = ptlAgreementAttributionService;
+        this.feeRuleSchemeService = feeRuleSchemeService;
+        this.insFeeOrderService = insFeeOrderService;
+        this.zhongmeiRepeatInsuranceComponents = zhongmeiRepeatInsuranceComponents;
+    }
+
+    private void modelInquiry(String modelName, List<ModelsQueryResponse.SimpleStadarCarDTO> simpleStadarCarDTOS) {
+        if (!simpleStadarCarDTOS.isEmpty()) {
+            return;
+        }
+
+        Map<String, Object> map = new HashMap<>();
+        map.put("modelName", modelName);
+        Response<List<ZmCarModel>> model = zhongmeiRequestComponents.modelQuery(map, new ParameterizedTypeReference<Response<List<ZmCarModel>>>() {
+        });
+        List<ZmCarModel> data = model.getData();
+        if (data.isEmpty()) {
+            throw new SystemException("未查到你想要的车型");
+        }
+
+        for (ZmCarModel zmCarModel : data) {
+            simpleStadarCarDTOS.add(new ModelsQueryResponse.SimpleStadarCarDTO(zmCarModel));
+        }
+
+    }
+
+    @Override
+    public HttpResult<List<CarModelDTO>> modelsQuery(String modelName) {
+        ModelsQueryRequest modelsQueryResponse = new ModelsQueryRequest();
+        modelsQueryResponse.setModelName(modelName);
+//        List<ModelsQueryResponse.SimpleStadarCarDTO> car = zhongmeiRequestApiComponents.modelQuery(modelsQueryResponse, ModelsQueryResponse.class);
+        List<ModelsQueryResponse.SimpleStadarCarDTO> car = new ArrayList<>();
+        modelInquiry(modelName, car);
+
+        List<CarModelDTO> map = SimpleStadarCarDTOConvert.INSTANCE.map(car);
+        return HttpResult.ok(map);
+    }
+
+    @Override
+    public HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfo, BaseQuoteVo<AccidentalDrivingVo> zmQuoteVo) {
+        // 1. 协议id获取配置实体
+        String agreementId = zmQuoteVo.getAgreementId();
+        // 账号信息
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(agreementId);
+        // 通过 协议id获取配置实体
+        ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class, ptlAgreementAttribution);
+
+        BaseRequestHead baseRequestHead = new BaseRequestHead(zmConfigureParameters);
+
+        CarInfoVo carInfo = quoteInfo.getCarInfo();
+        // 2. 查询车型
+        ModelsQueryRequest modelsQueryResponse = new ModelsQueryRequest();
+        modelsQueryResponse.setModelName(carInfo.getModelcname());
+        modelsQueryResponse.setBrand(carInfo.getBrandName());
+        modelsQueryResponse.setHead(baseRequestHead);
+        List<ModelsQueryResponse.SimpleStadarCarDTO> simpleStadarCarDTOS = zhongmeiRequestApiComponents.modelQuery(modelsQueryResponse, ModelsQueryResponse.class);
+
+        // 2.1 使用爬虫接口调用车型
+        modelInquiry(carInfo.getModelcname(), simpleStadarCarDTOS);
+
+        // 2.2 过滤车型
+        ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO =
+                new CarModelsFilterUtils<ModelsQueryResponse.SimpleStadarCarDTO>().to(simpleStadarCarDTOS, carInfo);
+
+        //座位数根据前端传入的赋值
+        if(StringUtils.isNotEmpty(carInfo.getSeatCount())){
+            int seatCount = Integer.parseInt(carInfo.getSeatCount());
+            simpleStadarCarDTO.setApprovedPassengersCapacity(seatCount);
+        }
+        // 3 组装参数
+        QuotedPriceRequest quotedPriceRequest = new QuotedPriceRequest(quoteInfo, simpleStadarCarDTO, zmQuoteVo.getAccidentalDrivingVo(), zmConfigureParameters);
+        quotedPriceRequest.setHead(baseRequestHead);
+
+        QuotedPriceResponse quotedPriceResponse = zhongmeiRequestApiComponents.quotedPrice(quotedPriceRequest, QuotedPriceResponse.class);
+        if ("-1".equals(quotedPriceResponse.getHead().getReturnCode())) {
+            if (StringUtils.isNotEmpty(quotedPriceResponse.getHead().getReturnMessage()) && quotedPriceResponse.getHead().getReturnMessage().contains("商业险重复投保") && quotedPriceResponse.getHead().getReturnMessage().contains("重复投保的本公司的保单信息")) {
+                quotedPriceResponse = zhongmeiRepeatInsuranceComponents.dealRepeatDateFormError(quotedPriceRequest,quotedPriceResponse,quoteInfo);
+            }
+        }
+        QuoteRespVo quoteRespVo = getQuoteRespVo(quotedPriceResponse, quoteInfo);
+        if(quotedPriceResponse.getBizPlatformMsg()!=null && StringUtils.isNotEmpty(quotedPriceResponse.getBizPlatformMsg().getAnswer())){
+            if(quotedPriceResponse.getBizPlatformMsg().getAnswer().contains("起保日期")&&quotedPriceResponse.getBizPlatformMsg().getAnswer().contains("终保日期")){
+                quotedPriceResponse = zhongmeiRepeatInsuranceComponents.dealRepeatDate(quotedPriceRequest,quotedPriceResponse,quoteInfo);
+                quoteRespVo = getQuoteRespVo(quotedPriceResponse, quoteInfo);
+            }
+        }
+        //这里调用费用匹配功能
+        feeRuleSchemeService.dealFeeOrderInfo(quoteInfo,quoteRespVo,ptlAgreementAttribution.getId(),quotedPriceResponse.getBusinessNo());
+        return responseOrder(quotedPriceResponse, quoteRespVo, ptlAgreementAttribution);
+    }
+
+
+    @Override
+    public HttpResult<Object> audit(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(companyId);
+        // 1. 协议id获取配置实体
+        ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class, insAreaCompany.getAgreementId());
+
+        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        JSONObject ownerinfo = insOrders.getApplyinfo();
+        CustomerInfoVo customerInfoVo = ownerinfo.toJavaObject(CustomerInfoVo.class);
+        // 2. 提交核保
+        SubmitResponse response = submitForUnderwriting(insAreaCompany.getId(), insOrders.getFrameno(), customerInfoVo, zmConfigureParameters);
+        // 3. 人工核保
+        if (SubmitStatus.S_3.getCode().equals(response.getSubmitStatus())) {
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
+            if(StringUtils.isNotEmpty(response.getSubmitNotion())){
+                insAreaCompany.setAuditopinion(response.getSubmitNotion());
+            }
+            insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+            return HttpResult.error(response.getSubmitNotion());
+        }
+        zhongmeiRequestApiComponents.validationResults(response);
+        // 4. 投保单号
+        insAreaCompany.setPaymentLink(response.getPayUrl());
+        insAreaCompany.setJqapplyno(response.getForceProposalNo());
+        insAreaCompany.setSyapplyno(response.getBizProposalNo());
+//        insAreaCompany.setJyapplyno(response.getAccidentProposalNo());
+        insAreaCompany.setInsOrderNo(response.getProposalNo());
+        insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+        insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+        return HttpResult.ok("核保成功");
+    }
+
+    @Override
+    public HttpResult<Object> submitImage(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(companyId);
+        // 1. 协议id获取配置实体
+        ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class, insAreaCompany.getAgreementId());
+
+        InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+        // 2. 投保单号(总)
+        String insOrderNo = insAreaCompany.getId();
+
+        List<InsTaskImagesBase64> insTaskImagesBase64s = insTaskImagesService.findByOrderNo(insOrders.getOrderno());
+        if (insTaskImagesBase64s.isEmpty()) {
+            throw new SystemException("请检查影像是否上传了");
+        }
+        UploadImageRequest request = new UploadImageRequest(insTaskImagesBase64s, insOrderNo);
+        request.setHead(new BaseRequestHead(zmConfigureParameters));
+        zhongmeiRequestApiComponents.uploadImage(request, UploadImageResponse.class);
+        return HttpResult.ok("上传文件成功");
+    }
+
+    @Override
+    public HttpResult<Object> underwritingCallback(CoverageRequest coverageRequest) {
+        try {
+            if (coverageRequest.getStatus() == PaymentStatusEnum.P_2.getCode()) {
+                // 主投保单号
+                String proposalNo = coverageRequest.getProposalNo();
+                InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(proposalNo);
+                // 保单号
+                insAreaCompany.setJqpolicyno(coverageRequest.getForcePolicyNo());
+                insAreaCompany.setSypolicyno(coverageRequest.getBizPolicyNo());
+//                insAreaCompany.setJypolicyno(coverageRequest.getAccidentPolicyNo());
+                insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+                insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+            }
+        } catch (Exception e) {
+            log.debug("承保回调 {}", e.getMessage());
+        }
+
+        return null;
+    }
+
+    @Override
+    public HttpResult<Object> auditCallback(ApprovedRequest approvedRequest) {
+        try {
+            // 主投保单号
+            String contractNo = approvedRequest.getContractNo();
+            InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(contractNo);
+            if (AuditStatusEnum.S_1.getCode().equals(approvedRequest.getStatusCode())) {
+                insAreaCompany.setJqapplyno(approvedRequest.getProposalNoJ());
+                insAreaCompany.setSyapplyno(approvedRequest.getProposalNoS());
+//                insAreaCompany.setJyapplyno(approvedRequest.getProposalNoCP());
+                insAreaCompany.setPaymentLink(approvedRequest.getPayUrl());
+                insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
+            } else {
+                if(StringUtils.isNotEmpty(approvedRequest.getHandleText())){
+                    insAreaCompany.setAuditopinion(approvedRequest.getHandleText());
+                }
+                insAreaCompany.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
+            }
+            insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+        } catch (Exception e) {
+            log.debug("审核回调 {}", e.getMessage());
+        }
+        return null;
+    }
+
+    @Override
+    public HttpResult<Object> paymentEnquiry(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(companyId);
+
+        // 1. 协议id获取配置实体
+        ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class, insAreaCompany.getAgreementId());
+
+        if (insAreaCompany.getOrderstatus().equals(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode())) {
+            return HttpResult.ok(InsOrderStatusEnum.ACCEPT_INSURANCE.getDesc());
+        }
+
+        // 2. 组装请求体
+        OrderStatusRequest orderStatusRequest = new OrderStatusRequest();
+        orderStatusRequest.setOrderNo(insAreaCompany.getId());
+        orderStatusRequest.setSubProposalNo(insAreaCompany.getInsOrderNo());
+        orderStatusRequest.setHead(new BaseRequestHead(zmConfigureParameters));
+
+        OrderStatusResponse orderStatusResponse = zhongmeiRequestApiComponents.orderStatus(orderStatusRequest, OrderStatusResponse.class);
+        String status = orderStatusResponse.getStatus();
+
+        // 3. 承保成功修改状态
+        if (status.equals(String.valueOf(PaymentStatusEnum.P_2.getCode()))) {
+            insAreaCompany.setJqpolicyno(orderStatusResponse.getSubContractNoJ());
+            insAreaCompany.setSypolicyno(orderStatusResponse.getSubContractNoS());
+//            insAreaCompany.setJypolicyno(orderStatusResponse.getAccidentNo());
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
+            insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+
+            return HttpResult.ok(PaymentStatusEnum.P_2.getMeaning());
+        }
+
+        return HttpResult.error(Enum.valueOf(PaymentStatusEnum.class, "P_" + status).getMeaning());
+    }
+
+    @Override
+    public HttpResult<List<String>> getPolicyPrint(PolicyPrintVo policyPrintVo) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(policyPrintVo.getCompanyId());
+        // 1. 协议id获取配置实体
+        ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class, insAreaCompany.getAgreementId());
+        InsOrders order = insOrdersService.getById(insAreaCompany.getOrderno());
+        String licensePlate = order.getLicenseno();
+        String policyNo;
+        String code = DocumentTypeEnum.code(policyPrintVo.getType());
+        String riskCode = policyPrintVo.getRiskCode();
+        if (InsuranceRisk.TRAFFIC.getCode().equals(riskCode)) {
+            policyNo = insAreaCompany.getJqpolicyno();
+        } else if (InsuranceRisk.BUSINESS.getCode().equals(riskCode)) {
+            policyNo = insAreaCompany.getJqpolicyno();
+        } else {
+            throw new SystemException("险种代码不存在");
+        }
+
+        // 2. 组装请求体
+        InsurancePolicyPrintRequest request = new InsurancePolicyPrintRequest();
+        request.setRiskCode(InsuranceTypeCorrespondence.getRisk().get(riskCode));
+        request.setPolicyNo(policyNo);
+        request.setDocumentType(code);
+        request.setHead(new BaseRequestHead(zmConfigureParameters));
+        InsurancePolicyPrintResponse response = zhongmeiRequestApiComponents.insurancePolicyPrint(request, InsurancePolicyPrintResponse.class);
+        if("1".equals(response.getStatusCode())){
+            List<String> urlList = response.getDownloadUrl();
+
+            if(urlList!=null && !urlList.isEmpty()){
+               String url = urlList.get(0);
+               String templateName = "";
+               if("DZ_AJ".equals(code)){
+                   templateName = "-交强险标志.pdf";
+               }else if("DZ_AE".equals(code)){
+                   if("0330".equals(request.getRiskCode())){
+                       templateName = "-交强险保单.pdf";
+                   }else {
+                       templateName = "-商业险保单.pdf";
+                   }
+               }
+                String transferUrl = gainCarInsPolicy(url, licensePlate + templateName, licensePlate);
+                List<String> transferUrlList = new ArrayList<>();
+                transferUrlList.add(transferUrl);
+                response.setDownloadUrl(transferUrlList);
+            }
+        }else{
+            return HttpResult.error("中煤电子保单生成失败,请重试或联系中煤!");
+        }
+        return HttpResult.ok("下载成功", response.getDownloadUrl());
+    }
+
+    public String gainCarInsPolicy(String url, String fileName, String licensePlate) {
+        String dir = "carInsPolicy/" + licensePlate + "/";
+        return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);
+    }
+    /**
+     * @param orderNo               中煤订单号
+     * @param frameNo               车架号
+     * @param customerInfoVo        车辆信息
+     * @param zmConfigureParameters 中煤配置参数
+     * @return 核保请求参数
+     */
+    public SubmitResponse submitForUnderwriting(String orderNo, String frameNo, CustomerInfoVo customerInfoVo, ZmConfigureParameters zmConfigureParameters) {
+        SubmitRequest submitRequest = new SubmitRequest();
+        submitRequest.setBusinessNo(orderNo);
+        submitRequest.setVin(frameNo);
+        SubmitRequest.DeliveryInfoDTO deliveryInfoDTO = new SubmitRequest.DeliveryInfoDTO(customerInfoVo.getName(), customerInfoVo.getMobile(),
+                // 省
+                zmConfigureParameters.getProvince(),
+                // 市
+                zmConfigureParameters.getCity(),
+                // 县
+                zmConfigureParameters.getDistrict(), customerInfoVo.getAddr());
+        submitRequest.setDeliveryInfo(deliveryInfoDTO);
+        submitRequest.setHead(new BaseRequestHead(zmConfigureParameters));
+        return zhongmeiRequestApiComponents.submit(submitRequest, SubmitResponse.class);
+    }
+
+    public QuoteRespVo getQuoteRespVo(QuotedPriceResponse quotedPriceResponse, BaseQuoteInfoVo yaQuoteInfoVo) {
+        double jqPremium = 0;
+        double syPremium = 0;
+        double jqDiscount = 0;
+        double syDiscount = 0;
+
+        if (!ObjectUtils.isEmpty(quotedPriceResponse.getForcePrimium())) {
+            jqPremium = quotedPriceResponse.getForcePrimium().getPremium();
+            jqDiscount = quotedPriceResponse.getForcePrimium().getJqDiscount();
+        }
+        if (!ObjectUtils.isEmpty(quotedPriceResponse.getBizPremium())) {
+            syPremium = quotedPriceResponse.getBizPremium().getSumPremium();
+            syDiscount = quotedPriceResponse.getBizPremium().getSyDiscount();
+        }
+
+        QuoteRespVo quoteRespVo = new QuoteRespVo();
+
+        List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
+        // 报价险种放入保费
+        List<QuoteRiskRespVo> riskList1 = QuoteRiskRespVo.toQuoteRiskRespVoList(riskList, jqPremium, syPremium);
+
+        for(QuoteRiskRespVo quoteRiskRespVo:riskList1){
+            if (InsuranceRisk.TRAFFIC.getCode().equals(quoteRiskRespVo.getRiskCode())) {
+                quoteRespVo.setStartDateJq(quoteRiskRespVo.getStartDate());
+                quoteRespVo.setEndDateJq(quoteRiskRespVo.getEndDate());
+            } else if (InsuranceRisk.BUSINESS.getCode().equals(quoteRiskRespVo.getRiskCode())) {
+                quoteRespVo.setStartDateSy(quoteRiskRespVo.getStartDate());
+                quoteRespVo.setEndDateSy(quoteRiskRespVo.getEndDate());
+            }
+        }
+        List<QuoteKindRespVo> kindList1 = new ArrayList<>();
+        QuoteKindRespVo kind;
+        List<QuotedPriceResponse.BizPremiumDTO.CoverageListDTO> coverageList;
+        if (!ObjectUtils.isEmpty(quotedPriceResponse.getBizPremium())) {
+            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());
+                int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), kindInfoVo.getKindCode());
+
+                QuotedPriceResponse.BizPremiumDTO.CoverageListDTO coverageListDTOS = coverageList.stream().filter(a -> a.getKindCode().equals(InsuranceTypeCorrespondence.getZmConnectInsuranceType()[i])).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);
+            }
+        }
+
+        quoteRespVo.setRiskList(riskList1);
+        quoteRespVo.setKindList(kindList1);
+        quoteRespVo.setJqPremium(jqPremium);
+        quoteRespVo.setSyPremium(syPremium);
+        quoteRespVo.setJqAdjustRate(String.valueOf(jqDiscount));
+        quoteRespVo.setSyAdjustRate(String.valueOf(syDiscount));
+        QuotedPriceResponse.TaxinfoDTO taxinfo = quotedPriceResponse.getTaxinfo();
+
+        double sumPayTax = ObjectUtils.isEmpty(taxinfo) ? 0 : taxinfo.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()); //订单号
+
+        List<QuotedPriceResponse.accidentPremium> accidentPremiumList = quotedPriceResponse.getAccidentPremium();
+        if(accidentPremiumList!=null && accidentPremiumList.size()>0){
+            List<AccidentResponseVo> accidentResponseVoList = new ArrayList<>();
+            for (QuotedPriceResponse.accidentPremium accidentPremium : accidentPremiumList) {
+                AccidentResponseVo accidentResponseVo = new AccidentResponseVo();
+                accidentResponseVo.setProjectCode(accidentPremium.getRideRiskCode());
+                accidentResponseVo.setProjectName(accidentPremium.getRideRiskName());
+                accidentResponseVo.setQuantity(String.valueOf(accidentPremium.getQuantity()));
+                accidentResponseVo.setPremium(String.valueOf(accidentPremium.getUnitPremium()));
+                accidentResponseVo.setActualPremium(String.valueOf(quoteRespVo.getSumPermium()));
+                accidentResponseVoList.add(accidentResponseVo);
+            }
+            quoteRespVo.setAccident(accidentResponseVoList);
+        }
+        return quoteRespVo;
+    }
+
+    public HttpResult<QuoteRespVo> responseOrder(QuotedPriceResponse quotedPriceResponse, QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution) {
+        //保存订单信息
+        InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
+        insAreaCompany.setId(quotedPriceResponse.getBusinessNo());
+        insAreaCompany.setInsOrderNo(quotedPriceResponse.getBusinessNo());
+        // 车船税
+        TaxArrears taxArrears = new TaxArrears("往年欠税", quotedPriceResponse.getTaxinfo().getPrePayTax(), quotedPriceResponse.getTaxinfo().getDelayPayTax());
+        List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
+        insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
+
+        insAreaCompanyService.insertCompanyAndOrders(insAreaCompany);
+        quoteRespVo.setCompanyId(insAreaCompany.getId());
+        quoteRespVo.setTaxArrears(taxArrearsList);
+        return HttpResult.ok(quotedPriceResponse.getHead().getReturnMessage(), quoteRespVo);
+    }
+
+    @Override
+    public HttpResult<Object> auditStatusQuery(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(companyId);
+        // 1. 协议id获取配置实体
+        ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class, insAreaCompany.getAgreementId());
+
+        if (insAreaCompany.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
+            return HttpResult.ok(InsOrderStatusEnum.WAIT_PAY.getDesc());
+        }
+
+        // 2. 组装请求体
+        SubmitStatusQueryRequest submitStatusQueryRequest = new SubmitStatusQueryRequest();
+        submitStatusQueryRequest.setProposalNo(insAreaCompany.getInsOrderNo());
+        submitStatusQueryRequest.setHead(new BaseRequestHead(zmConfigureParameters));
+
+        SubmitStatusQueryResponse submitStatusQueryResponse = zhongmeiRequestApiComponents.submitStatus(submitStatusQueryRequest, SubmitStatusQueryResponse.class);
+        String underWriteInd = submitStatusQueryResponse.getUnderWriteInd();
+
+        // 3. 通过返回核保状态修改状态
+        if ("核保通过".equals(underWriteInd) || "自动核保".equals(underWriteInd)) {
+            insAreaCompany.setPaymentLink(submitStatusQueryResponse.getPayUrl());
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());//当核保状态返回核保通过时,调整保单状态为已核保待缴费
+            insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+            return HttpResult.ok(underWriteInd);
+        }else if("核保不通过".equals(underWriteInd)){//当状态为核保不通过时,调整保单状态为报价中
+            insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
+            insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
+            return HttpResult.error("核保不通过:"+submitStatusQueryResponse.getIssuedReason());
+        }else {
+            return HttpResult.ok(underWriteInd);
+        }
+    }
+    @Override
+    public HttpResult<Object> rideAccidentQuery(AccidentalDrivingQueryVo accidentalDrivingVo) {
+        // 1. 协议id获取配置实体
+        ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class, accidentalDrivingVo.getAgreementId());
+
+        // 2. 组装请求体
+        RideAccidentQueryRequest rideAccidentQueryRequest = new RideAccidentQueryRequest(zmConfigureParameters);
+        rideAccidentQueryRequest.setSeats(accidentalDrivingVo.getSeatNum());
+        rideAccidentQueryRequest.setHead(new BaseRequestHead(zmConfigureParameters));
+
+        RideAccidentQueryResponse rideAccidentQueryResponse = zhongmeiRequestApiComponents.rideAccidentQuery(rideAccidentQueryRequest, RideAccidentQueryResponse.class);
+
+        return HttpResult.ok("");
+    }
+
+}
+
+
+
+