Jelajahi Sumber

华泰财险特别约定修改

wks 2 tahun lalu
induk
melakukan
c708119f7f

+ 15 - 6
src/main/java/com/ydtech/modules/order/controller/HuaTaiOrderApiController.java

@@ -7,12 +7,12 @@ import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.components.huatai.HuiTaiUploadImageComponents;
+import com.ydtech.modules.order.entity.api.zijin.response.QueryClauseDataResponse;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
 import com.ydtech.modules.order.entity.dto.InsUploadImagesDto;
-import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
-import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+import com.ydtech.modules.order.entity.po.InsHuataiContributing;
+import com.ydtech.modules.order.entity.vo.*;
+import com.ydtech.modules.order.entity.vo.huatai.InsHuataiContributingVo;
 import com.ydtech.modules.order.service.HuaTaiOrderApiService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.Collections;
+import java.util.List;
 
 
 @Api(tags = "华泰财险 API ")
@@ -50,10 +51,17 @@ public class HuaTaiOrderApiController {
         return this.huaTaiOrderApiService.quote(quoteInfo, zmQuoteVo);
     }
 
+    @PostMapping(value = "/queryClauseData")
+    @ApiOperation(value = "特约查询")
+    public HttpResult<List<InsHuataiContributing>> queryClauseData(@RequestSingleParam(value = "companyId") String companyId) {
+        return this.huaTaiOrderApiService.queryClauseData(companyId);
+    }
+
+
     @PostMapping(value = "/audit")
     @ApiOperation(value = "提交核保")//3.6.	转投保接口
-    public HttpResult<Object> audit(@RequestSingleParam(value = "companyId") String companyId) {
-        return this.huaTaiOrderApiService.audit(companyId);
+    public HttpResult<Object> audit(@RequestBody SpecialAuditVo<InsHuataiContributingVo> specialAudit) {
+        return this.huaTaiOrderApiService.audit(specialAudit);
     }
 
     @PostMapping(value = "/submitImage")
@@ -68,6 +76,7 @@ public class HuaTaiOrderApiController {
         return this.huaTaiOrderApiService.getPolicyPrint(policyPrintVo);
     }
 
+
     @PostMapping("/paymentEnquiry")
     @ApiOperation(value = "缴费查询")//3.15.	见费出单结果查询接口
     public HttpResult<Object> paymentEnquiry(@RequestSingleParam(value = "companyId") String companyId) {

+ 18 - 0
src/main/java/com/ydtech/modules/order/dao/InsHuataiContributingMapper.java

@@ -0,0 +1,18 @@
+package com.ydtech.modules.order.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ydtech.modules.order.entity.po.InsHuataiContributing;
+
+/**
+* @author Administrator
+* @description 针对表【ins_huatai_contributing】的数据库操作Mapper
+* @createDate 2023-11-24 15:51:26
+* @Entity generator.domain.InsHuataiContributing
+*/
+public interface InsHuataiContributingMapper extends BaseMapper<InsHuataiContributing> {
+
+}
+
+
+
+

+ 142 - 136
src/main/java/com/ydtech/modules/order/entity/api/huatai/request/HuaTaiSubmitRequest.java

@@ -2,9 +2,7 @@ package com.ydtech.modules.order.entity.api.huatai.request;
 
 import com.alibaba.fastjson.annotation.JSONField;
 import com.ydtech.constants.enums.InsuranceRisk;
-import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
-import com.ydtech.modules.ins.model.vo.KindInfoVo;
 import com.ydtech.modules.ins.model.vo.RiskInfoVo;
 import com.ydtech.modules.ins.model.ya.YaQuoteInfoVo;
 import com.ydtech.modules.order.constants.InsuranceTypeCorrespondence;
@@ -12,13 +10,9 @@ import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.api.huatai.HuaTaiBaseRequest;
 import com.ydtech.modules.order.entity.api.huatai.HuaTaiBaseRequestHead;
 import com.ydtech.modules.order.entity.api.huatai.constants.HuaTaiTransCode;
-import com.ydtech.modules.order.entity.api.huatai.response.HuaTaiActualValueResponse;
-import com.ydtech.modules.order.entity.api.huatai.response.HuaTaiModelsQueryResponse;
 import com.ydtech.modules.order.entity.api.zhongmei.constants.TimeConstants;
 import com.ydtech.modules.order.entity.config.HuaTaiConfigureParameters;
-import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
-import com.ydtech.modules.order.entity.vo.VehicleAndVesselTax;
+import com.ydtech.modules.order.entity.vo.huatai.InsHuataiContributingVo;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -26,35 +20,39 @@ import lombok.NoArgsConstructor;
 import org.apache.commons.lang3.StringUtils;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
 
 @EqualsAndHashCode(callSuper = true)
 @NoArgsConstructor
 @Data
-public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
+public class HuaTaiSubmitRequest extends HuaTaiBaseRequest {
 
     private static final long serialVersionUID = -3434101420731502321L;
-    @JSONField(name="businessData")
+    @JSONField(name = "businessData")
     //投保单信息
     private BusinessDataDto businessData;
     //Y	机构代码
-    @JSONField(name="loginCom")
+    @JSONField(name = "loginCom")
     private String loginCom;
+
     @Override
     public void setHead(HuaTaiBaseRequestHead head) {
         super.setHead(head);
         super.getHead().setTransCode(HuaTaiTransCode.SAVE);
     }
 
-    public HuaTaiSubmitRequest (YaQuoteInfoVo yaQuoteInfoVo, InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters){
-        this.businessData = new BusinessDataDto(yaQuoteInfoVo,insAreaCompany,huaTaiConfigureParameters);
+    public HuaTaiSubmitRequest(YaQuoteInfoVo yaQuoteInfoVo, InsAreaCompany insAreaCompany,
+                               HuaTaiConfigureParameters huaTaiConfigureParameters, List<InsHuataiContributingVo> engageList) {
+        this.businessData = new BusinessDataDto(yaQuoteInfoVo, insAreaCompany, huaTaiConfigureParameters, engageList);
         this.loginCom = huaTaiConfigureParameters.getComCode();
     }
+
     @AllArgsConstructor
     @NoArgsConstructor
     @Data
@@ -62,19 +60,20 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
 
         private static final long serialVersionUID = -4470540010039479454L;
         // 投保主信息
-        @JSONField(name="businessMain")
+        @JSONField(name = "businessMain")
         private BusinessMainDto businessMain;
         // 业务信息(列表)
-        @JSONField(name="contract")
+        @JSONField(name = "contract")
         private List<ContractDto> contract;
         // 客户信息(列表)
-        @JSONField(name="customer")
+        @JSONField(name = "customer")
         private List<CustomerDto> customer;
         //  销售信息
-        @JSONField(name="saleInfo")
+        @JSONField(name = "saleInfo")
         private SaleInfoDto saleInfo;
 
-        public BusinessDataDto(YaQuoteInfoVo yaQuoteInfoVo,InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters) {
+        public BusinessDataDto(YaQuoteInfoVo yaQuoteInfoVo, InsAreaCompany insAreaCompany,
+                               HuaTaiConfigureParameters huaTaiConfigureParameters, List<InsHuataiContributingVo> engageList) {
             List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
             CustomerInfoVo ownerInfo = yaQuoteInfoVo.getOwnerInfo();
             CustomerInfoVo policyHolderInfo = yaQuoteInfoVo.getPolicyHolderInfo();
@@ -82,9 +81,9 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
             // 保单归属地
             this.businessMain = new BusinessMainDto(huaTaiConfigureParameters);
             // 保险信息
-            this.contract = new ContractDto().getContract(riskList,insAreaCompany,huaTaiConfigureParameters);
+            this.contract = new ContractDto().getContract(riskList, insAreaCompany, huaTaiConfigureParameters, engageList);
             // 客户信息
-            this.customer = new CustomerDto().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo,huaTaiConfigureParameters);
+            this.customer = new CustomerDto().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo, huaTaiConfigureParameters);
             //销售信息
             this.saleInfo = new SaleInfoDto(huaTaiConfigureParameters);
 
@@ -94,14 +93,14 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
     @AllArgsConstructor
     @NoArgsConstructor
     @Data
-    public static class BusinessMainDto implements Serializable{
+    public static class BusinessMainDto implements Serializable {
 
         private static final long serialVersionUID = -3901160212812740520L;
         // 操作机构代码
-        @JSONField(name="makeCom")
+        @JSONField(name = "makeCom")
         private String makeCom;
         // 操作员代码
-        @JSONField(name="operatorCode")
+        @JSONField(name = "operatorCode")
         private String operatorCode;
 
         public BusinessMainDto(HuaTaiConfigureParameters huaTaiConfigureParameters) {
@@ -113,35 +112,42 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
     @AllArgsConstructor
     @NoArgsConstructor
     @Data
-    public static class ContractDto implements Serializable{
+    public static class ContractDto implements Serializable {
 
         private static final long serialVersionUID = 2452110821283897129L;
         // 业务主信息
-        @JSONField(name="contractMain")
+        @JSONField(name = "contractMain")
         private ContractMainDto contractMain;
         // 平台交互信息
-        @JSONField(name="platFormMessage")
+        @JSONField(name = "platFormMessage")
         private PlatFormMessage platFormMessage;
         //CY	自定义特别约定列表
-        @JSONField(name="engage")
+        @JSONField(name = "engage")
         private List<EngageDto> engage;
 
-        public List<ContractDto> getContract(List<RiskInfoVo> riskInfoVos,InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters) {
+        public List<ContractDto> getContract(List<RiskInfoVo> riskInfoVos, InsAreaCompany insAreaCompany,
+                                             HuaTaiConfigureParameters huaTaiConfigureParameters,
+                                             List<InsHuataiContributingVo> engageList) {
             String querySequenceNos[] = insAreaCompany.getInsOrderNo().split("-");
             String jqQuerySequenceNo = querySequenceNos[0].trim();
             String syQuerySequenceNo = querySequenceNos[1].trim();
             List<ContractDto> contractDTOS = new ArrayList<>();
             for (RiskInfoVo riskInfoVo : riskInfoVos) {
                 ContractDto contractDto = new ContractDto();
-                this.contractMain = new ContractMainDto(riskInfoVo,insAreaCompany,huaTaiConfigureParameters);
+                this.contractMain = new ContractMainDto(riskInfoVo, insAreaCompany, huaTaiConfigureParameters);
                 if (InsuranceRisk.TRAFFIC.getCode().equals(riskInfoVo.getRiskCode())) {
-                    this.platFormMessage = new PlatFormMessage(jqQuerySequenceNo,huaTaiConfigureParameters);
+                    this.platFormMessage = new PlatFormMessage(jqQuerySequenceNo);
                 }
+
                 if (InsuranceRisk.BUSINESS.getCode().equals(riskInfoVo.getRiskCode())) {
-                    this.platFormMessage = new PlatFormMessage(syQuerySequenceNo,huaTaiConfigureParameters);
-                    this.engage = new EngageDto().getEngageList(syQuerySequenceNo,huaTaiConfigureParameters);
-                    contractDto.setEngage(engage);
+                    this.platFormMessage = new PlatFormMessage(syQuerySequenceNo);
                 }
+                List<InsHuataiContributingVo> insHuataiContributingVos =
+                        engageList.stream().filter(x -> x.getRiskCode().equals(riskInfoVo.getRiskCode())).collect(Collectors.toList());
+
+                this.engage = new EngageDto().getEngageList(insHuataiContributingVos);
+
+                contractDto.setEngage(engage);
                 contractDto.setContractMain(contractMain);
                 contractDto.setPlatFormMessage(platFormMessage);
                 contractDTOS.add(contractDto);
@@ -153,33 +159,33 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
     @AllArgsConstructor
     @NoArgsConstructor
     @Data
-    public static class ContractMainDto implements Serializable{
+    public static class ContractMainDto implements Serializable {
 
         private static final long serialVersionUID = -827498526562322815L;
         //报价单号(需传入报价接口返回的值)
-        @JSONField(name="contractNo")
+        @JSONField(name = "contractNo")
         private String contractNo;
         //参见险种代码
-        @JSONField(name="riskCode")
+        @JSONField(name = "riskCode")
         private String riskCode;
         //起保日期(YYYY-MM-DD HH24:MI:SS)
-        @JSONField(name="validDate")
+        @JSONField(name = "validDate")
         private String validDate;
         //终保日期(YYYY-MM-DD HH24:MI:SS)
-        @JSONField(name="expiryDate")
+        @JSONField(name = "expiryDate")
         private String expiryDate;
         //总签单保费
-        @JSONField(name="totalPremium")
+        @JSONField(name = "totalPremium")
         private double totalPremium;
         //备注
-        @JSONField(name="remark")
+        @JSONField(name = "remark")
         private String remark;
 
-        public ContractMainDto(RiskInfoVo riskInfoVo,InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters) {
-            if("0507".equals(riskInfoVo.getRiskCode())){
+        public ContractMainDto(RiskInfoVo riskInfoVo, InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters) {
+            if ("0507".equals(riskInfoVo.getRiskCode())) {
                 this.contractNo = insAreaCompany.getJqapplyno();
                 this.totalPremium = insAreaCompany.getJqpremium().doubleValue();
-            }else{
+            } else {
                 this.contractNo = insAreaCompany.getSyapplyno();
                 this.totalPremium = insAreaCompany.getSypremium().doubleValue();
             }
@@ -203,210 +209,209 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
         }
     }
 
-    @AllArgsConstructor
     @NoArgsConstructor
     @Data
-    public static class PlatFormMessage implements Serializable{
+    public static class PlatFormMessage implements Serializable {
 
         private static final long serialVersionUID = 7957269957188794595L;
         // 业务主信息
-        @JSONField(name="querySequenceNo")
+        @JSONField(name = "querySequenceNo")
         private String querySequenceNo;
 
-        public PlatFormMessage(String querySequenceNo, HuaTaiConfigureParameters huaTaiConfigureParameters){
+        public PlatFormMessage(String querySequenceNo) {
             this.querySequenceNo = querySequenceNo;
         }
     }
+
     @AllArgsConstructor
     @NoArgsConstructor
     @Data
-    public static class EngageDto implements Serializable{
+    public static class EngageDto implements Serializable {
 
         private static final long serialVersionUID = 7957269957188794595L;
         // 业务主信息
-        @JSONField(name="engageCode")
+        @JSONField(name = "engageCode")
         private String engageCode;
         // 业务主信息
-        @JSONField(name="engageTitle")
+        @JSONField(name = "engageTitle")
         private String engageTitle;
         // 业务主信息
-        @JSONField(name="engageDetail")
+        @JSONField(name = "engageDetail")
         private String engageDetail;
 
-        public EngageDto(String querySequenceNo, HuaTaiConfigureParameters huaTaiConfigureParameters){
-            this.engageCode ="T9994";
-            this.engageTitle = "非营业约定(1251)";
-            this.engageDetail = "本保险单承保非营业车辆,如果保险车辆用于租赁或营业运输,发生保险事故,保险人不承担赔偿责任。";
+        public EngageDto(InsHuataiContributingVo insHuataiContributingVo) {
+            this.engageCode = insHuataiContributingVo.getEngageCode();
+            this.engageTitle = insHuataiContributingVo.getEngageTitle();
+            this.engageDetail = insHuataiContributingVo.getEngageDetail();
         }
 
-        public List<EngageDto> getEngageList(String querySequenceNo, HuaTaiConfigureParameters huaTaiConfigureParameters){
-            List<EngageDto> engageDtoList = new ArrayList<>();
-            engageDtoList.add(new EngageDto(querySequenceNo,huaTaiConfigureParameters));
-            return engageDtoList;
+        public List<EngageDto> getEngageList(List<InsHuataiContributingVo> insHuataiContributingVos) {
+            return insHuataiContributingVos.stream().map(EngageDto::new).collect(Collectors.toList());
         }
+
     }
 
     @AllArgsConstructor
     @NoArgsConstructor
     @Data
-    public static class CustomerDto implements Serializable{
+    public static class CustomerDto implements Serializable {
 
         private static final long serialVersionUID = 3423549173956690508L;
         //Y	证件号码(个人客户必传)
-        @JSONField(name="identifyNumber")
+        @JSONField(name = "identifyNumber")
         private String identifyNumber;
         //CY	组织机构代码(机构客户必录)
-        @JSONField(name="organizeCode")
+        @JSONField(name = "organizeCode")
         private String organizeCode;
         //Y	参见客户证件类型代码(机构客户传99)
-        @JSONField(name="identifyType")
+        @JSONField(name = "identifyType")
         private String identifyType;
         //Y	名称
-        @JSONField(name="name")
+        @JSONField(name = "name")
         private String name;
         //Y	客户角色身份(1-投保人;2-被保险人;3-车主)
-        @JSONField(name="role")
+        @JSONField(name = "role")
         private String role;
         //Y	手机号码
-        @JSONField(name="mobile")
+        @JSONField(name = "mobile")
         private String mobile;
         //Y	证件有效起期(格式:YYYY-MM-DD HH24:MI:SS)
-        @JSONField(name="identifyValidDate")
+        @JSONField(name = "identifyValidDate")
         private String identifyValidDate;
         //Y	证件有效止期(格式:YYYY-MM-DD HH24:MI:SS)
-        @JSONField(name="identifyValidEndDate")
+        @JSONField(name = "identifyValidEndDate")
         private String identifyValidEndDate;
         //Y	客户职业(通过职业查询接口获得)
-        @JSONField(name="occupationCode")
+        @JSONField(name = "occupationCode")
         private String occupationCode;
         //Y	客户地址
-        @JSONField(name="addr")
+        @JSONField(name = "addr")
         private String addr;
         //Y	客户邮箱
-        @JSONField(name="email")
+        @JSONField(name = "email")
         private String email;
         //Y	客户类型(1-个人,2-机构)
-        @JSONField(name="type")
+        @JSONField(name = "type")
         private String type;
         //CY	车辆与被保险人所属关系(1-所有;2-使用;3-管理,当角色是被保险人时必传)
-        @JSONField(name="carInsuredRelation")
+        @JSONField(name = "carInsuredRelation")
         private String carInsuredRelation;
         //CY 参见投保人与被保人关系代码(投保人和被保人均为个人客户时必传)
-        @JSONField(name="aiRelation")
+        @JSONField(name = "aiRelation")
         private String aiRelation;
         //CY	客户地址(省)代码(江西必传)
-        @JSONField(name="Province")
+        @JSONField(name = "Province")
         private String province;
         //CY	客户地址(省)名称(江西必传)
-        @JSONField(name="ProvinceName")
+        @JSONField(name = "ProvinceName")
         private String provinceName;
         //CY	客户地址(市)代码(江西必传)
-        @JSONField(name="City")
+        @JSONField(name = "City")
         private String city;
         //CY	客户地址(市)名称(江西必传)
-        @JSONField(name="CityName")
+        @JSONField(name = "CityName")
         private String cityName;
         //CY	客户地址(区)代码(江西必传)
-        @JSONField(name="District")
+        @JSONField(name = "District")
         private String district;
         //CY	客户地址(区)名称(江西必传)
-        @JSONField(name="DistrictName")
+        @JSONField(name = "DistrictName")
         private String districtName;
         //CY	手机实际持有人姓名(上海出单必录)
-        @JSONField(name="ActualHolderName")
+        @JSONField(name = "ActualHolderName")
         private String actualHolderName;
         //CY	手机实际持有人证件类型(参见客户证件类型代码)(上海出单必录)
-        @JSONField(name="ActualHolderIdentifyType")
+        @JSONField(name = "ActualHolderIdentifyType")
         private String actualHolderIdentifyType;
         //CY	手机实际持有人证件号码(上海出单必录)
-        @JSONField(name="ActualHolderIdentifyCode")
+        @JSONField(name = "ActualHolderIdentifyCode")
         private String actualHolderIdentifyCode;
         //CY	企业经办人类别(传值参见企业经办人类别)(上海机构客户出单必录)
-        @JSONField(name="transactorType")
+        @JSONField(name = "transactorType")
         private String transactorType;
         //CY	营业性质/主要业务范围(机构客户)
-        @JSONField(name="businessDetail")
+        @JSONField(name = "businessDetail")
         private String businessDetail;
         //CY	行业代码(机构客户)(传值参见行业代码)
-        @JSONField(name="BusinessSource")
+        @JSONField(name = "BusinessSource")
         private String businessSource;
         //CY	国籍代码(传值参见国籍代码)
-        @JSONField(name="CitizenshipCode")
+        @JSONField(name = "CitizenshipCode")
         private String citizenshipCode;
         //CY	股权结构(机构客户)(传值参见股权结构)
-        @JSONField(name="EquityStructure")
+        @JSONField(name = "EquityStructure")
         private String equityStructure;
         //CY	法定代表人姓名(机构客户)
-        @JSONField(name="leaderName")
+        @JSONField(name = "leaderName")
         private String leaderName;
         //CY	法定代表人姓名其他身份证明号码(机构客户)
-        @JSONField(name="leaderIdentifyNumber")
+        @JSONField(name = "leaderIdentifyNumber")
         private String leaderIdentifyNumber;
         //CY	法定代表人姓名其他身份证明种类(机构客户)(参见客户证件类型代码)
-        @JSONField(name="leaderOtherIdentifyType")
+        @JSONField(name = "leaderOtherIdentifyType")
         private String leaderOtherIdentifyType;
         //CY	法定代表人姓名其他身份证明号码(机构客户)
-        @JSONField(name="leaderOtherIdentifyNumber")
+        @JSONField(name = "leaderOtherIdentifyNumber")
         private String leaderOtherIdentifyNumber;
         //CY	法定代表人姓名其他身份证明有效期(机构客户)
-        @JSONField(name="leaderOtherEffectiveDate")
+        @JSONField(name = "leaderOtherEffectiveDate")
         private String leaderOtherEffectiveDate;
         //CY	注册所在地代码(机构客户)(参见注册所在地代码)
-        @JSONField(name="nationalityCode")
+        @JSONField(name = "nationalityCode")
         private String nationalityCode;
         //CY	注册资本金币种(机构客户)
-        @JSONField(name="registCurrency")
+        @JSONField(name = "registCurrency")
         private String registCurrency;
         //CY	注册资本金(机构客户)
-        @JSONField(name="registFund")
+        @JSONField(name = "registFund")
         private String registFund;
         //CY	税务号(机构客户)
-        @JSONField(name="RevenueCode")
+        @JSONField(name = "RevenueCode")
         private String revenueCode;
         //CY	反洗钱交易监测记录(参见风险提示信息或权威媒体报道)
-        @JSONField(name="MonitorRecord")
+        @JSONField(name = "MonitorRecord")
         private String monitorRecord;
         //CY	风险提示信息或权威媒体报道(参见风险提示信息或权威媒体报道)
-        @JSONField(name="RiskWarnInfo")
+        @JSONField(name = "RiskWarnInfo")
         private String riskWarnInfo;
         //CY	执照、证明名称(机构客户必传)
-        @JSONField(name="supportDocuName")
+        @JSONField(name = "supportDocuName")
         private String supportDocuName;
         //CY	执照、证明号码(机构客户必传)
-        @JSONField(name="supportDocuNumber")
+        @JSONField(name = "supportDocuNumber")
         private String supportDocuNumber;
         //CY	执照、证明有效期(机构客户必传)
-        @JSONField(name="supportDocuValidDate")
+        @JSONField(name = "supportDocuValidDate")
         private String supportDocuValidDate;
         //CY	办理人姓名(机构客户必传)
-        @JSONField(name="TransactorName")
+        @JSONField(name = "TransactorName")
         private String transactorName;
         //CY	办理人证件类型代码(机构客户必传)(参见客户证件类型代码)
-        @JSONField(name="transactorIdentifyType")
+        @JSONField(name = "transactorIdentifyType")
         private String transactorIdentifyType;
         //CY	办理人证件号码(机构客户必传)
-        @JSONField(name="transactorIdentifyCode")
+        @JSONField(name = "transactorIdentifyCode")
         private String transactorIdentifyCode;
         //CY	办理人手机号码(机构客户必传)
-        @JSONField(name="transactorMobile")
+        @JSONField(name = "transactorMobile")
         private String transactorMobile;
         //CY	办理人证件有效期(机构客户必传)
-        @JSONField(name="transactorExpiryDate")
+        @JSONField(name = "transactorExpiryDate")
         private String transactorExpiryDate;
         //CY	工作单位名称(个人客户必传)
-        @JSONField(name="workUnit")
+        @JSONField(name = "workUnit")
         private String workUnit;
         //CY	工作单位地址(个人客户必传)
-        @JSONField(name="workAddress")
+        @JSONField(name = "workAddress")
         private String workAddress;
         //CY	其他联系方式(个人客户必传)
-        @JSONField(name="otherContact")
+        @JSONField(name = "otherContact")
         private String otherContact;
         //CY	其他住所地或工作单位地址(个人客户必传)
-        @JSONField(name="otherWorkAddress")
+        @JSONField(name = "otherWorkAddress")
         private String otherWorkAddress;
         //CY	联系人信息
-        @JSONField(name="insuredLinkerList")
+        @JSONField(name = "insuredLinkerList")
         private List<InsuredLinkerBean> insuredLinkerList;
 
 
@@ -422,13 +427,13 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
             this.identifyValidEndDate = customerInfoVo.getIdentifyValidEndDate() + " " + TimeConstants.END_TIME;
             this.addr = customerInfoVo.getAddr();
             this.email = "123@qq.com";
-            if(StringUtils.isNotEmpty(customerInfoVo.getEmail())){
+            if (StringUtils.isNotEmpty(customerInfoVo.getEmail())) {
                 this.email = customerInfoVo.getEmail();
             }
-            if("2".equals(role)){
-                if(customerInfoVo.isOwner()){
+            if ("2".equals(role)) {
+                if (customerInfoVo.isOwner()) {
                     this.carInsuredRelation = "1";
-                }else{
+                } else {
                     this.carInsuredRelation = "2";
                 }
             }
@@ -436,49 +441,50 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
             this.workUnit = "其他";
             this.workAddress = customerInfoVo.getAddr();
             this.otherWorkAddress = customerInfoVo.getAddr();
-            this.insuredLinkerList = Arrays.asList(new InsuredLinkerBean(customerInfoVo,huaTaiConfigureParameters));
+            this.insuredLinkerList = Arrays.asList(new InsuredLinkerBean(customerInfoVo, huaTaiConfigureParameters));
         }
 
-        public List<CustomerDto> getCustomers(CustomerInfoVo ownerInfo, CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo, HuaTaiConfigureParameters huaTaiConfigureParameters) {
-            return Arrays.asList(new CustomerDto(ownerInfo, "3",huaTaiConfigureParameters), new CustomerDto(policyHolderInfo, "1",huaTaiConfigureParameters), new CustomerDto(insuredPersonInfo, "2",huaTaiConfigureParameters));
+        public List<CustomerDto> getCustomers(CustomerInfoVo ownerInfo, CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo
+                , HuaTaiConfigureParameters huaTaiConfigureParameters) {
+            return Arrays.asList(new CustomerDto(ownerInfo, "3", huaTaiConfigureParameters), new CustomerDto(policyHolderInfo, "1",
+                    huaTaiConfigureParameters), new CustomerDto(insuredPersonInfo, "2", huaTaiConfigureParameters));
         }
 
     }
 
 
-
     @AllArgsConstructor
     @NoArgsConstructor
     @Data
-    public static class InsuredLinkerBean implements Serializable{
+    public static class InsuredLinkerBean implements Serializable {
 
         private static final long serialVersionUID = -7819712018066777471L;
         // Y	联系人名称
-        @JSONField(name="linkName")
+        @JSONField(name = "linkName")
         private String linkName;
         // Y	联系人关联关系(默认传01,对应本人)
-        @JSONField(name="linkerRelation")
+        @JSONField(name = "linkerRelation")
         private String linkerRelation;
         // CY	单位电话(机构客户出单必传)
-        @JSONField(name="unitPhoneNumber")
+        @JSONField(name = "unitPhoneNumber")
         private String unitPhoneNumber;
         //Y	省(需传省国标码)
-        @JSONField(name="province")
+        @JSONField(name = "province")
         private String province;
         //Y	市(需传市国标码)
-        @JSONField(name="city")
+        @JSONField(name = "city")
         private String city;
         //Y	区(需传区国标码)
-        @JSONField(name="district")
+        @JSONField(name = "district")
         private String district;
         //Y	地址
-        @JSONField(name="street")
+        @JSONField(name = "street")
         private String street;
         // Y	电话
-        @JSONField(name="mobile")
+        @JSONField(name = "mobile")
         private String mobile;
         // CY	邮箱(电子保单必传)
-        @JSONField(name="email")
+        @JSONField(name = "email")
         private String email;
 
         public InsuredLinkerBean(CustomerInfoVo customerInfoVo, HuaTaiConfigureParameters huaTaiConfigureParameters) {
@@ -490,7 +496,7 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
             this.street = customerInfoVo.getAddr();
             this.mobile = customerInfoVo.getMobile();
             this.email = "123@qq.com";
-            if(StringUtils.isNotEmpty(customerInfoVo.getEmail())){
+            if (StringUtils.isNotEmpty(customerInfoVo.getEmail())) {
                 this.email = customerInfoVo.getEmail();
             }
         }
@@ -500,14 +506,14 @@ public class HuaTaiSubmitRequest extends HuaTaiBaseRequest  {
     @AllArgsConstructor
     @NoArgsConstructor
     @Data
-    public static class SaleInfoDto implements Serializable{
+    public static class SaleInfoDto implements Serializable {
 
         private static final long serialVersionUID = 2631084372177408934L;
         // 操作机构代码
-        @JSONField(name="agentCode")
+        @JSONField(name = "agentCode")
         private String agentCode;
         // 操作员代码
-        @JSONField(name="agreementNo")
+        @JSONField(name = "agreementNo")
         private String agreementNo;
 
         public SaleInfoDto(HuaTaiConfigureParameters huaTaiConfigureParameters) {

+ 66 - 0
src/main/java/com/ydtech/modules/order/entity/po/InsHuataiContributing.java

@@ -0,0 +1,66 @@
+package com.ydtech.modules.order.entity.po;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 
+ * @TableName ins_huatai_contributing
+ */
+@TableName(value ="ins_huatai_contributing")
+@Data
+@ApiModel("华泰特别约定")
+public class InsHuataiContributing implements Serializable {
+    /**
+     * 
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 险种代码
+     */
+    @TableField(value = "risk_code")
+    @ApiModelProperty("险种代码")
+    private String riskCode;
+
+    /**
+     * 险种名称
+     */
+    @TableField(value = "risk_name")
+    @ApiModelProperty("险种名称")
+    private String riskName;
+
+    /**
+     * 特约编码
+     */
+    @TableField(value = "engage_code")
+    @ApiModelProperty("特约编码")
+    private String engageCode;
+
+    /**
+     * 特约名称
+     */
+    @TableField(value = "engage_title")
+    @ApiModelProperty("特约名称")
+    private String engageTitle;
+
+    /**
+     * 特约内容
+     */
+    @ApiModelProperty("特约内容")
+    @TableField(value = "engage_detail")
+    private String engageDetail;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+
+}

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/vo/SpecialAuditVo.java

@@ -13,7 +13,7 @@ import java.util.List;
  * @author: wenks
  * @date: 2023/9/6 11:46
  **/
-@ApiModel("紫金核保参数")
+@ApiModel("核保参数")
 @Data
 public class SpecialAuditVo<T extends Serializable> implements Serializable {
 

+ 25 - 0
src/main/java/com/ydtech/modules/order/entity/vo/huatai/InsHuataiContributingVo.java

@@ -0,0 +1,25 @@
+package com.ydtech.modules.order.entity.vo.huatai;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+@ApiModel("华泰特约实体")
+public class InsHuataiContributingVo implements Serializable {
+
+    @ApiModelProperty("险种代码")
+    private String riskCode;
+
+    @ApiModelProperty("特约编码")
+    private String engageCode;
+
+    @ApiModelProperty("特约名称")
+    private String engageTitle;
+
+    @ApiModelProperty("特约内容")
+    private String engageDetail;
+
+}

+ 34 - 5
src/main/java/com/ydtech/modules/order/service/HuaTaiOrderApiService.java

@@ -1,17 +1,44 @@
 package com.ydtech.modules.order.service;
 
 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.entity.api.zhongmei.request.ApprovedRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.request.CoverageRequest;
+import com.ydtech.modules.order.entity.api.zijin.response.QueryClauseDataResponse;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
-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 com.ydtech.modules.order.entity.po.InsHuataiContributing;
+import com.ydtech.modules.order.entity.vo.*;
+import com.ydtech.modules.order.entity.vo.huatai.InsHuataiContributingVo;
 
 import java.util.List;
 
-public interface HuaTaiOrderApiService extends BaseOrderService<AccidentalDrivingVo> {
+public interface HuaTaiOrderApiService{
+
+
+    /**
+     *
+     * @param specialAudit
+     * @return
+     */
+    HttpResult<Object> audit(SpecialAuditVo<InsHuataiContributingVo> specialAudit);
+
+    /**
+     *
+     * @param quoteInfo
+     * @param zmQuoteVo
+     * @return
+     */
+    HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfo, BaseQuoteVo<AccidentalDrivingVo> zmQuoteVo);
+
+
+    /**
+     * 特约查询
+     * @param companyId 子订单编号
+     * @return
+     */
+    HttpResult<List<InsHuataiContributing>> queryClauseData(String companyId);
+
 
     /**
      * 提交影像信息
@@ -43,7 +70,9 @@ public interface HuaTaiOrderApiService extends BaseOrderService<AccidentalDrivin
      */
     HttpResult<Object> auditStatusQuery(String companyId);
 
-/*    *//**
+
+
+    /*    *//**
      * 获取支付链接(电子投保单确认及缴费短信发送接口)
      * @param companyId
      * @return

+ 13 - 0
src/main/java/com/ydtech/modules/order/service/InsHuataiContributingService.java

@@ -0,0 +1,13 @@
+package com.ydtech.modules.order.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ydtech.modules.order.entity.po.InsHuataiContributing;
+
+/**
+* @author Administrator
+* @description 针对表【ins_huatai_contributing】的数据库操作Service
+* @createDate 2023-11-24 15:51:26
+*/
+public interface InsHuataiContributingService extends IService<InsHuataiContributing> {
+
+}

+ 24 - 28
src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java

@@ -24,16 +24,16 @@ import com.ydtech.modules.order.entity.config.HuaTaiConfigureParameters;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
 import com.ydtech.modules.order.entity.dto.InsUploadImagesDto;
 import com.ydtech.modules.order.entity.filter.CarModelsFilterUtils;
-import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
-import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+import com.ydtech.modules.order.entity.po.InsHuataiContributing;
+import com.ydtech.modules.order.entity.vo.*;
+import com.ydtech.modules.order.entity.vo.huatai.InsHuataiContributingVo;
 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 com.ydtech.utils.idgen.IdGenerate;
+import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -47,6 +47,7 @@ import java.util.stream.Collectors;
 
 @Service
 @Slf4j
+@RequiredArgsConstructor
 public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
 
     private final InsOrdersService insOrdersService;
@@ -68,6 +69,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
     private final HuiTaiUploadImageComponents huiTaiUploadImageComponents;
 
 
+    private final InsHuataiContributingService insHuataiContributingService;
+
     @Value("${upload.file.path}")
     private String uploadFilePath;
 
@@ -77,25 +80,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
     @Value("${api.url}")
     private String apiUrl;
 
-    public HuaTaiOrderApiServiceImpl(InsOrdersService insOrdersService,
-                                     InsAreaCompanyService insAreaCompanyService,
-                                     InsTaskImagesService insTaskImagesService,
-                                     HuaTaiRequestApiComponents huaTaiRequestApiComponents,
-                                     ConfigureParametersComponents configureParametersComponents,
-                                     PtlAgreementAttributionService ptlAgreementAttributionService,
-                                     FeeRuleSchemeService feeRuleSchemeService,
-                                     InsFeeOrderService insFeeOrderService,
-                                     HuiTaiUploadImageComponents huiTaiUploadImageComponents) {
-        this.insOrdersService = insOrdersService;
-        this.insAreaCompanyService = insAreaCompanyService;
-        this.insTaskImagesService = insTaskImagesService;
-        this.huaTaiRequestApiComponents = huaTaiRequestApiComponents;
-        this.configureParametersComponents = configureParametersComponents;
-        this.ptlAgreementAttributionService = ptlAgreementAttributionService;
-        this.feeRuleSchemeService = feeRuleSchemeService;
-        this.insFeeOrderService = insFeeOrderService;
-        this.huiTaiUploadImageComponents = huiTaiUploadImageComponents;
-    }
+
 
     @Override
     public HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfo, BaseQuoteVo<AccidentalDrivingVo> zmQuoteVo) {
@@ -154,7 +139,10 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
      * @return
      */
     @Override
-    public HttpResult<Object> audit(String companyId) {
+    public HttpResult<Object> audit(SpecialAuditVo<InsHuataiContributingVo> specialAudit) {
+        String companyId = specialAudit.getCompanyId();
+        List<InsHuataiContributingVo> engageList = specialAudit.getEngageList();
+
         InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
         // 1. 协议id获取配置实体
         HuaTaiConfigureParameters huaTaiConfigureParameters = configureParametersComponents.toEntity(HuaTaiConfigureParameters.class, insAreaCompany.getAgreementId());
@@ -162,7 +150,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
         YaQuoteInfoVo yaQuoteInfoVo = new YaQuoteInfoVo(insOrders);
 
         // 2. 调用转投保接口
-        HuaTaiSubmitResponse response = submitForUnderwriting(yaQuoteInfoVo, insAreaCompany, huaTaiConfigureParameters);
+        HuaTaiSubmitResponse response = submitForUnderwriting(yaQuoteInfoVo, insAreaCompany, huaTaiConfigureParameters, engageList);
 
         /**
          * 0	下发修改
@@ -257,7 +245,15 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
         }
     }
 
-    private HttpResult<Object> getPayURL(InsAreaCompany insAreaCompany,HuaTaiConfigureParameters huaTaiConfigureParameters){
+    @Override
+    public HttpResult<List<InsHuataiContributing>> queryClauseData(String companyId) {
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
+        List<String> collect = insAreaCompany.getRiskinfo().toJavaList(RiskInfoVo.class).stream().map(RiskInfoVo::getRiskCode).collect(Collectors.toList());
+        List<InsHuataiContributing> list = insHuataiContributingService.lambdaQuery().in(InsHuataiContributing::getRiskCode, collect).list();
+        return HttpResult.ok(list);
+    }
+
+    private HttpResult<Object> getPayURL(InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters){
         String payUrl = getPaymentUrl(insAreaCompany, huaTaiConfigureParameters);
         if (StringUtils.isNotEmpty(payUrl)) {
             insAreaCompany.setPaymentLink(payUrl);
@@ -427,8 +423,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
      * @param huaTaiConfigureParameters
      * @return
      */
-    private HuaTaiSubmitResponse submitForUnderwriting(YaQuoteInfoVo yaQuoteInfoVo, InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters) {
-        HuaTaiSubmitRequest submitRequest = new HuaTaiSubmitRequest(yaQuoteInfoVo, insAreaCompany, huaTaiConfigureParameters);
+    private HuaTaiSubmitResponse submitForUnderwriting(YaQuoteInfoVo yaQuoteInfoVo, InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters,  List<InsHuataiContributingVo> engageList) {
+        HuaTaiSubmitRequest submitRequest = new HuaTaiSubmitRequest(yaQuoteInfoVo, insAreaCompany, huaTaiConfigureParameters, engageList);
         submitRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
         return huaTaiRequestApiComponents.submit(submitRequest, HuaTaiSubmitResponse.class);
     }

+ 22 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsHuataiContributingServiceImpl.java

@@ -0,0 +1,22 @@
+package com.ydtech.modules.order.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.modules.order.dao.InsHuataiContributingMapper;
+import com.ydtech.modules.order.entity.po.InsHuataiContributing;
+import com.ydtech.modules.order.service.InsHuataiContributingService;
+import org.springframework.stereotype.Service;
+
+/**
+* @author Administrator
+* @description 针对表【ins_huatai_contributing】的数据库操作Service实现
+* @createDate 2023-11-24 15:51:26
+*/
+@Service
+public class InsHuataiContributingServiceImpl extends ServiceImpl<InsHuataiContributingMapper, InsHuataiContributing>
+    implements InsHuataiContributingService {
+
+}
+
+
+
+