|
|
@@ -1,6 +1,11 @@
|
|
|
package com.jzg.quotation.dajia.crawler.entity.request.quote;
|
|
|
|
|
|
+import cn.hutool.core.date.DateTime;
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
+import com.jzg.quotation.commons.entity.vo.quote.RiskInfoVo;
|
|
|
+import com.jzg.quotation.dajia.enums.dictionary.CIKind;
|
|
|
+import com.jzg.quotation.dajia.enums.dictionary.PayCarType;
|
|
|
+import com.jzg.quotation.dajia.enums.dictionary.TaxTypeYn;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
@@ -34,9 +39,18 @@ public class CompulsoryInsuranceDTO {
|
|
|
@JsonProperty("specialInfos")
|
|
|
private List<Object> specialInfos;
|
|
|
|
|
|
+ public CompulsoryInsuranceDTO(RiskInfoVo ciRiskInfoVo, double vehicleExhaust, int seatCount ) {
|
|
|
+ this.productInfo = new ProductInfoDTO(ciRiskInfoVo);
|
|
|
+ this.itemKinds = ItemKindsDTO.getKinds();
|
|
|
+ this.carShipTax = new CarShipTaxDTO(vehicleExhaust, seatCount);
|
|
|
+ this.coefficientInfo = new CoefficientInfoDTO();
|
|
|
+ this.specialInfos = List.of();
|
|
|
+ }
|
|
|
+
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
public static class ProductInfoDTO {
|
|
|
+
|
|
|
@JsonProperty("businessID")
|
|
|
private String businessID;
|
|
|
@JsonProperty("effective")
|
|
|
@@ -169,6 +183,30 @@ public class CompulsoryInsuranceDTO {
|
|
|
private String uncarDateMark;
|
|
|
@JsonProperty("supFlag")
|
|
|
private String supFlag;
|
|
|
+
|
|
|
+ public ProductInfoDTO(RiskInfoVo ciRiskInfoVo) {
|
|
|
+ this.businessID = "KSCD";
|
|
|
+ this.day = "365";
|
|
|
+ this.effective = "0";
|
|
|
+ this.elPolicy = "";
|
|
|
+ this.endDate = ciRiskInfoVo.getEndDate();
|
|
|
+ this.feeCoef = "";
|
|
|
+ this.feeRate = "";
|
|
|
+ this.lastPolicyNo = "";
|
|
|
+ this.policyNo = "";
|
|
|
+ this.premium = "0.00";
|
|
|
+ this.productCode = "0320";
|
|
|
+ this.proposalNo = "0356";
|
|
|
+ this.proposalStatus = "";
|
|
|
+ this.proposalTime = "";
|
|
|
+ this.renewMark = "";
|
|
|
+ this.selfMark = "";
|
|
|
+ this.startDate = ciRiskInfoVo.getStartDate();
|
|
|
+ this.isReform = "1";
|
|
|
+ this.taxRate = "";
|
|
|
+ this.noTaxSumPremium = "";
|
|
|
+ this.taxPrm = "";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@NoArgsConstructor
|
|
|
@@ -340,6 +378,39 @@ public class CompulsoryInsuranceDTO {
|
|
|
private String taxStartDate;
|
|
|
@JsonProperty("taxEndDate")
|
|
|
private String taxEndDate;
|
|
|
+
|
|
|
+ public CarShipTaxDTO(double vehicleExhaust, int seatCount) {
|
|
|
+ String payCarType = PayCarType.getPayCarType(vehicleExhaust, seatCount);
|
|
|
+ this.comDocumentNumber = "";
|
|
|
+ this.comTaxOrg = "";
|
|
|
+ this.comTaxOrgCde = "";
|
|
|
+ this.deptNonlocal = "";
|
|
|
+ this.freeRate = "";
|
|
|
+ this.fuelType = "";
|
|
|
+ this.identifyType = "";
|
|
|
+ this.isCommissionTax = "";
|
|
|
+ this.overDueAmt = "";
|
|
|
+ int year = DateTime.now().year();
|
|
|
+ this.payEndTm = year + "-12-31";
|
|
|
+ this.payStartTm = year + "-01-01";
|
|
|
+ this.previousPay = "";
|
|
|
+ this.taxActual = "";
|
|
|
+ this.taxDocumentDate = "";
|
|
|
+ this.taxDocumentNumber = "";
|
|
|
+ this.taxPaidAreaCode = "";
|
|
|
+ this.taxPayWay = TaxTypeYn.TAX_TYPE_YN_3T5002.getCode();
|
|
|
+ this.taxReductionReason = "";
|
|
|
+ this.taxReliefPlan = "";
|
|
|
+ this.taxVhlType = payCarType;
|
|
|
+ this.taxpayerIdentifier = "";
|
|
|
+ this.taxPayerName = "";
|
|
|
+ this.totalTax = "";
|
|
|
+ this.unitTaxAmt = "";
|
|
|
+ this.weight = String.valueOf(vehicleExhaust);
|
|
|
+ this.usage = "200";
|
|
|
+ this.certificateDate = "";
|
|
|
+ this.abateAmt = "";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@NoArgsConstructor
|
|
|
@@ -614,6 +685,83 @@ public class CompulsoryInsuranceDTO {
|
|
|
private String oncePerDisableLmt;
|
|
|
@JsonProperty("onceIndemLmt")
|
|
|
private String onceIndemLmt;
|
|
|
+
|
|
|
+ private static ItemKindsDTO buildItemKindsDTO(String amount, CIKind ciKind) {
|
|
|
+ ItemKindsDTO itemKindsDTO = new ItemKindsDTO();
|
|
|
+ itemKindsDTO.setProposalNo("");
|
|
|
+ itemKindsDTO.setKindCode(ciKind.getKindCode());
|
|
|
+ itemKindsDTO.setKindName(ciKind.getKindCode());
|
|
|
+ itemKindsDTO.setKindPackage("");
|
|
|
+ itemKindsDTO.setProductName("");
|
|
|
+ itemKindsDTO.setBasePremium("0");
|
|
|
+ itemKindsDTO.setNoTaxDiscountPremium("");
|
|
|
+ itemKindsDTO.setTaxDiscountPremium("0");
|
|
|
+ itemKindsDTO.setPremium("");
|
|
|
+ itemKindsDTO.setNoDeductible("");
|
|
|
+ itemKindsDTO.setNoDeductiblePremium("");
|
|
|
+ itemKindsDTO.setPayPremium("0");
|
|
|
+ itemKindsDTO.setAmount(amount);
|
|
|
+ itemKindsDTO.setLiabilityLevel("");
|
|
|
+ itemKindsDTO.setDamageDeductible("0");
|
|
|
+ itemKindsDTO.setDeductible("");
|
|
|
+ itemKindsDTO.setDeductibleFlag("");
|
|
|
+ itemKindsDTO.setRate("0");
|
|
|
+ itemKindsDTO.setDeductibleRatio("");
|
|
|
+ itemKindsDTO.setDutyDays("");
|
|
|
+ itemKindsDTO.setQuantity("0");
|
|
|
+ itemKindsDTO.setYearPayPremium("0");
|
|
|
+ itemKindsDTO.setGlassType("");
|
|
|
+ itemKindsDTO.setValueAddTax("0");
|
|
|
+ itemKindsDTO.setDiscount("0");
|
|
|
+ itemKindsDTO.setNeedCalculateAmount("");
|
|
|
+ itemKindsDTO.setMainRiskFlag("");
|
|
|
+ itemKindsDTO.setBeginTime("");
|
|
|
+ itemKindsDTO.setEndTime("");
|
|
|
+ itemKindsDTO.setPkID("");
|
|
|
+ itemKindsDTO.setPremiumYear("0");
|
|
|
+ itemKindsDTO.setAfterPremiumYear("0");
|
|
|
+ itemKindsDTO.setAdjustRate("0");
|
|
|
+ itemKindsDTO.setNindemlmt("");
|
|
|
+ itemKindsDTO.setAmtChange("0");
|
|
|
+ itemKindsDTO.setDuctAmt("");
|
|
|
+ itemKindsDTO.setPerAmt("");
|
|
|
+ itemKindsDTO.setActPremium("0");
|
|
|
+ itemKindsDTO.setDays("");
|
|
|
+ itemKindsDTO.setDuctDiscount("");
|
|
|
+ itemKindsDTO.setSeqNo("");
|
|
|
+ itemKindsDTO.setTotalPremium("");
|
|
|
+ itemKindsDTO.setServiceTimes("");
|
|
|
+ itemKindsDTO.setDuctRate("");
|
|
|
+ itemKindsDTO.setKindValueRate("");
|
|
|
+ itemKindsDTO.setKindCost("");
|
|
|
+ itemKindsDTO.setDutyCode("");
|
|
|
+ itemKindsDTO.setDutyName("");
|
|
|
+ itemKindsDTO.setPerPrm("");
|
|
|
+ itemKindsDTO.setProdPlace("");
|
|
|
+ itemKindsDTO.setCancelMrk("");
|
|
|
+ itemKindsDTO.setAdjustProportion("");
|
|
|
+ itemKindsDTO.setFloatRate("");
|
|
|
+ itemKindsDTO.setIdentifyNo("");
|
|
|
+ itemKindsDTO.setCvrgType("");
|
|
|
+ itemKindsDTO.setOnceInjurLmt("");
|
|
|
+ itemKindsDTO.setOnceMedicalIndemLmt("");
|
|
|
+ itemKindsDTO.setOncePropertyIndemLmt("");
|
|
|
+ itemKindsDTO.setOncePerDeathLmt("");
|
|
|
+ itemKindsDTO.setOncePerDisableLmt("");
|
|
|
+ itemKindsDTO.setOnceIndemLmt("");
|
|
|
+ return itemKindsDTO;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static List<ItemKindsDTO> getKinds() {
|
|
|
+ ItemKindsDTO kind030055 = buildItemKindsDTO("180000", CIKind.KIND_030055);
|
|
|
+ ItemKindsDTO kind030056 = buildItemKindsDTO("18000", CIKind.KIND_030056);
|
|
|
+ ItemKindsDTO kind030057 = buildItemKindsDTO("2000", CIKind.KIND_030057);
|
|
|
+ ItemKindsDTO kind030058 = buildItemKindsDTO("18000", CIKind.KIND_030058);
|
|
|
+ ItemKindsDTO kind030059 = buildItemKindsDTO("1800", CIKind.KIND_030059);
|
|
|
+ ItemKindsDTO kind030060 = buildItemKindsDTO("100", CIKind.KIND_030060);
|
|
|
+ return List.of(kind030055, kind030056, kind030057, kind030058, kind030059, kind030060);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|