Bladeren bron

华泰对接新建实体

cuixinpeng 2 jaren geleden
bovenliggende
commit
6cbdd7d6df

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

@@ -28,6 +28,9 @@ public class HuaTaiQuotedPriceResponse extends HuaTaiBaseResponse {
     @Data
     public static class BusinessDataDto implements Serializable {
 
+        private static final long serialVersionUID = 204528161258466544L;
+        //投保险别信息列表
+        @JsonProperty("contract")
         private List<ContractDto> contract;
     }
 
@@ -36,16 +39,16 @@ public class HuaTaiQuotedPriceResponse extends HuaTaiBaseResponse {
     @Data
     public static class ContractDto implements Serializable{
         private static final long serialVersionUID = -8141574495483504299L;
-        //Y	业务主信息
+        //Y	投保险别主信息
         @JsonProperty("contractMain")
         private ContractMainDto contractMain;
-        //Y	投保险别列表
+        //Y	险别信息(列表
         @JsonProperty("coverage")
         private List<CoverageDto> coverage;
         //Y	平台交互信息
         @JsonProperty("platFormMessage")
         private PlatFormMessageDto platFormMessage;
-        //CY	车船税信息(交强险节点下传值)
+        //CY	车船税信息
         @JsonProperty("tax")
         private TaxDto tax;
         //CY	充电桩信息(列表)
@@ -55,131 +58,183 @@ public class HuaTaiQuotedPriceResponse extends HuaTaiBaseResponse {
         @NoArgsConstructor
         @Data
         public static class ContractMainDto implements Serializable{
-            //CY	报价单号(初次报价为空,同一单再次报价需传入之前接口返回的值)
+            private static final long serialVersionUID = 1697439760193401733L;
+            //Y	报价单号
             @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	起保日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("validDate")
+            private Date validDate;
             //Y	参见险种代码
             @JsonProperty("riskCode")
             private String riskCode;
+            //Y	总浮动系数
+            @JsonProperty("totalAdjustRate")
             private String totalAdjustRate;
+            //Y	总签单保费
+            @JsonProperty("totalPremium")
             private String totalPremium;
+            //Y	核保业务品质
+            @JsonProperty("category")
             private String category;
         }
         @NoArgsConstructor
         @Data
         public static class CoverageDto implements Serializable{
-            //Y	保额(传值要求参见险别代码)
-            @JsonProperty("amount")
+            private static final long serialVersionUID = -5558633804113575096L;
+            //Y	总浮动系数
+            @JsonProperty("coverageAdjustRate")
             private double coverageAdjustRate;
+            //Y	险别签单保费
+            @JsonProperty("coveragePremium")
             private double coveragePremium;
+            //Y	终保日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("expiryDate")
             private Date expiryDate;
+            //Y	起保日期(格式:YYYY-MM-DD HH24:MI:SS)
+            @JsonProperty("validDate")
             private Date validDate;
+            //Y	险别代码
+            @JsonProperty("kindCode")
             private String kindCode;
+            //Y	险别名称
+            @JsonProperty("kindName")
             private String kindName;
         }
 
         @NoArgsConstructor
         @Data
         public static class PlatFormMessageDto implements Serializable {
+            private static final long serialVersionUID = 6009071402390966463L;
             //CY	平台查询码
             @JsonProperty("querySequenceNo")
             private String querySequenceNo;
             //CY	平台查询码(获取上年保单信息)
             @JsonProperty("querySequenceNoForBiRe")
             private String querySequenceNoForBiRe;
-            //CY	平台校验图片转码后得到的验证码
+            //CY	平台校验图片转码
             @JsonProperty("checkCode")
             private String checkCode;
-            //CY	平台校验图片转码后得到的验证码(获取上年保单信息)
+            //CY	平台校验图片转码(获取上年保单信息)
             @JsonProperty("checkCodeForBiRe")
             private String checkCodeForBiRe;
+            //CY	平台车型精准服务信息(如果报价返回,则需要前台展示车型信息,选择其中一个以后,重新查车、计算实际价值、并再次报价)
+            @JsonProperty("accurateServiceInfo")
             private List<AccurateServiceInfoDto> accurateServiceInfo;
+            //CY	平台重复投保提示信息(如果报价返回,则需要前台展示,选择对应车型后重新保费计算)
+            @JsonProperty("reInsureMsg")
             private String reInsureMsg;
         }
+        @NoArgsConstructor
+        @Data
         public static class AccurateServiceInfoDto implements Serializable{
+            private static final long serialVersionUID = -3637136496580082363L;
+            //Y	上市年份
+            @JsonProperty("carYear")
             private String carYear;
+            //Y	排量(单位:升)
+            @JsonProperty("displacement")
             private String displacement;
+            //Y	系统车型编码
+            @JsonProperty("modelCode")
             private String modelCode;
+            //Y	推荐标识(1-推荐;0-无标识)
+            @JsonProperty("modelFlag")
             private String modelFlag;
+            //Y	厂牌型号
+            @JsonProperty("modelName")
             private String modelName;
+            //Y	新车购置价
+            @JsonProperty("purchasePrice")
             private String purchasePrice;
+            //Y	备注
+            @JsonProperty("remark")
             private String remark;
+            //Y	核定载客
+            @JsonProperty("seatCount")
             private String seatCount;
+            //Y	核定载质量
+            @JsonProperty("tonCount")
             private String tonCount;
+            //Y	行业车型编码
+            @JsonProperty("vehicleCode")
             private String vehicleCode;
         }
         @NoArgsConstructor
         @Data
         public static class TaxDto implements Serializable{
+            private static final long serialVersionUID = -5447178202141350948L;
             //Y	参见纳税类型代码
             @JsonProperty("taxConditionCode")
             private String taxConditionCode;
-            //CY	缴税起期(完税必传
+            //Y	缴税起期(格式:YYYY-MM-DD HH24:MI:SS
             @JsonProperty("taxStartDate")
             private Date taxStartDate;
-            //CY	缴税止期(完税必传
+            //Y	缴税止期(格式:YYYY-MM-DD HH24:MI:SS
             @JsonProperty("taxEndDate")
             private String taxEndDate;
-            //CY	参见纳税地区代码(完税必传)
+            //CY	开具完税凭证地区代码
             @JsonProperty("taxLocationCode")
             private String taxLocationCode;
-            //CY	开具税务机关代码(减税、免税、完税必传)
+            //CY	开具税务机关代码
             @JsonProperty("TaxDepartmentCode")
             private String TaxDepartmentCode;
-            //CY	开具税务机关名称(减税、免税、完税必传)
+            //CY	开具税务机关名称
             @JsonProperty("taxDepartment")
             private String taxDepartment;
-            //CY	纳税人证件号码(纳税人不同车主时必填)
-            @JsonProperty("TaxPayerIdentificationCode")
-            private String TaxPayerIdentificationCode;
-            //CY	纳税人名称(纳税人不同车主时必填)
-            @JsonProperty("TaxPayerName")
-            private String TaxPayerName;
+            //CY	纳税人识别号
+            @JsonProperty("taxPayerIdentificationCode")
+            private String taxPayerIdentificationCode;
+            //CY	纳税人名称
+            @JsonProperty("taxPayerName")
+            private String taxPayerName;
             //CY	减税/免税/完税凭证号(减税、免税、完税必传)
             @JsonProperty("documentNumber")
             private String documentNumber;
             //CY	参见减免原因代码
-            @JsonProperty("DeductionDueCode")
-            private String DeductionDueCode;
+            @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")
+            @JsonProperty("deductionDueType")
+            private String deductionDueType;
+            //CY	减免比例(单位:%)
+            @JsonProperty("deductionDueProportion")
+            private double deductionDueProportion;
+            //CY	减免金额(单位:元)
+            @JsonProperty("deduction")
+            private double deduction;
+            //CY	前次缴税年度
+            @JsonProperty("lastPaidYear")
+            private int lastPaidYear;
+            //CY	年单位税额
+            @JsonProperty("annualTaxAmount")
             private String annualTaxAmount;
-
-
-
-            //CY	完税凭证填发日期(完税必传)(格式:YYYY-MM-DD HH24:MI:SS)
-            @JsonProperty("taxDocumentDate")
+            //CY	单位数量
+            @JsonProperty("unit")
             private String unit;
-            private String annualTaxDue;
-            private String sumTaxDefault;
-            private String sumOverdue;
-            private String exceedDaysCount;
-            private String sumTax;
-
-
+            //CY	当年应缴
+            @JsonProperty("annualTaxDue")
+            private double annualTaxDue;
+            //CY	往年补缴
+            @JsonProperty("sumTaxDefault")
+            private double sumTaxDefault;
+            //CY	滞纳金
+            @JsonProperty("sumOverdue")
+            private double sumOverdue;
+            //CY	滞纳天数
+            @JsonProperty("exceedDaysCount")
+            private int exceedDaysCount;
+            //Y	合计金额
+            @JsonProperty("sumTax")
+            private double sumTax;
         }
         @NoArgsConstructor
         @Data
         public static class ChargingPostDto implements Serializable{
+            private static final long serialVersionUID = -1914275609505968266L;
             //Y	充电桩序号
             @JsonProperty("itemNo")
             private String itemNo;

+ 2 - 27
src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java

@@ -21,6 +21,8 @@ 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.huatai.HuaTaiBaseRequestHead;
+import com.ydtech.modules.order.entity.api.huatai.request.HuaTaiQuotedPriceRequest;
 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;
@@ -165,18 +167,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
         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);
@@ -401,11 +392,9 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
 
         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();
@@ -464,20 +453,6 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
         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;
     }