|
|
@@ -8,134 +8,24 @@ import com.ydtech.utils.StringUtils;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
-public class InsurePremiumResponse extends ChengTaiBaseResponse{
|
|
|
-
|
|
|
+public class InsurePremiumResponse extends ChengTaiBaseResponse {
|
|
|
@JsonProperty("orderId")
|
|
|
private String orderId;
|
|
|
+ @JsonProperty("carRegistFlag")
|
|
|
+ private String carRegistFlag;
|
|
|
@JsonProperty("biContract")
|
|
|
private BiContractDTO biContract;
|
|
|
-// @JsonProperty("insuredObject")
|
|
|
-// private InsuredObjectDTO insuredObject;
|
|
|
- @JsonProperty("ciContract")
|
|
|
- private CiContractDTO ciContract;
|
|
|
@JsonProperty("accContract")
|
|
|
private AccContractDTO accContract;
|
|
|
- @JsonProperty("carRegistFlag")
|
|
|
- private String carRegistFlag;
|
|
|
-
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class AccContractDTO {
|
|
|
- @JsonProperty("coverage")
|
|
|
- private List<InsurePremiumResponse.AccContractDTO.CoverageDTO> coverage;
|
|
|
- @JsonProperty("engage")
|
|
|
- private List<InsurePremiumResponse.AccContractDTO.EngageDTO> engage;
|
|
|
- @JsonProperty("contractMain")
|
|
|
- private InsurePremiumResponse.AccContractDTO.ContractMainDTO contractMain;
|
|
|
-
|
|
|
- public static List<AccidentResponseVo> toAccidentResponseVoList(AccContractDTO accContract, BaseQuoteVo<InsDrivingIntentionInsurance> quoteInfoVo) {
|
|
|
- InsurePremiumResponse.AccContractDTO.ContractMainDTO contractMainDTO = accContract.getContractMain();
|
|
|
- InsDrivingIntentionInsurance insDrivingIntentionInsurance = quoteInfoVo.getAccidentalDrivingVo();
|
|
|
- List<AccidentResponseVo> accidentResponseVoList = new ArrayList<>();
|
|
|
- AccidentResponseVo accidentResponseVo = new AccidentResponseVo();
|
|
|
-
|
|
|
- accidentResponseVo.setProjectCode(quoteInfoVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
- if (StringUtils.isNotBlank(quoteInfoVo.getAccidentalDrivingVo().getProjectName())) {
|
|
|
- accidentResponseVo.setProjectName(quoteInfoVo.getAccidentalDrivingVo().getProjectName());
|
|
|
- }
|
|
|
- accidentResponseVo.setPremium(contractMainDTO.getTotalPremium().toString());
|
|
|
- accidentResponseVo.setQuantity("1");
|
|
|
- accidentResponseVo.setActualPremium(contractMainDTO.getSumAmount().toString());
|
|
|
- accidentResponseVoList.add(accidentResponseVo);
|
|
|
- return accidentResponseVoList;
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class ContractMainDTO {
|
|
|
- @JsonProperty("riskName")
|
|
|
- private String riskName;
|
|
|
- @JsonProperty("hopeDiscount")
|
|
|
- private String hopeDiscount;
|
|
|
- @JsonProperty("validDate")
|
|
|
- private String validDate;
|
|
|
- @JsonProperty("riskCode")
|
|
|
- private String riskCode;
|
|
|
- @JsonProperty("totalPremium")
|
|
|
- private String totalPremium;
|
|
|
- @JsonProperty("policyNo")
|
|
|
- private String policyNo;
|
|
|
- @JsonProperty("validAtOnce")
|
|
|
- private String validAtOnce;
|
|
|
- @JsonProperty("renewalFlag")
|
|
|
- private String renewalFlag;
|
|
|
- @JsonProperty("lastYearPolicyNo")
|
|
|
- private String lastYearPolicyNo;
|
|
|
- @JsonProperty("sumAmount")
|
|
|
- private String sumAmount;
|
|
|
- @JsonProperty("proposalNo")
|
|
|
- private String proposalNo;
|
|
|
- @JsonProperty("expiryDate")
|
|
|
- private String expiryDate;
|
|
|
- @JsonProperty("currency")
|
|
|
- private String currency;
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class CoverageDTO {
|
|
|
- @JsonProperty("glassClassName")
|
|
|
- private String glassClassName;
|
|
|
- @JsonProperty("amount")
|
|
|
- private Integer amount;
|
|
|
- @JsonProperty("kindCode")
|
|
|
- private String kindCode;
|
|
|
- @JsonProperty("quantity")
|
|
|
- private String quantity;
|
|
|
- @JsonProperty("validDate")
|
|
|
- private String validDate;
|
|
|
- @JsonProperty("coveragePremium")
|
|
|
- private String coveragePremium;
|
|
|
- @JsonProperty("glassClassCode")
|
|
|
- private String glassClassCode;
|
|
|
- @JsonProperty("calculateFlag")
|
|
|
- private String calculateFlag;
|
|
|
- @JsonProperty("expiryDate")
|
|
|
- private String expiryDate;
|
|
|
- @JsonProperty("ifMainKind")
|
|
|
- private String ifMainKind;
|
|
|
- @JsonProperty("deductible")
|
|
|
- private String deductible;
|
|
|
- @JsonProperty("kindName")
|
|
|
- private String kindName;
|
|
|
- @JsonProperty("unitAmount")
|
|
|
- private String unitAmount;
|
|
|
- @JsonProperty("currency")
|
|
|
- private String currency;
|
|
|
- }
|
|
|
-
|
|
|
- @NoArgsConstructor
|
|
|
- @Data
|
|
|
- public static class EngageDTO {
|
|
|
- @JsonProperty("engageDetail")
|
|
|
- private String engageDetail;
|
|
|
- @JsonProperty("modifyind")
|
|
|
- private String modifyind;
|
|
|
- @JsonProperty("engageCode")
|
|
|
- private String engageCode;
|
|
|
- @JsonProperty("engageTitle")
|
|
|
- private String engageTitle;
|
|
|
- @JsonProperty("chooseType")
|
|
|
- private String chooseType;
|
|
|
- }
|
|
|
- }
|
|
|
+ @JsonProperty("insuredObject")
|
|
|
+ private InsuredObjectDTO insuredObject;
|
|
|
+ @JsonProperty("ciContract")
|
|
|
+ private CiContractDTO ciContract;
|
|
|
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
@@ -153,7 +43,7 @@ public class InsurePremiumResponse extends ChengTaiBaseResponse{
|
|
|
@JsonProperty("chargingPileList")
|
|
|
private List<?> chargingPileList;
|
|
|
@JsonProperty("coveragePremium")
|
|
|
- private List<CoveragePremiumDTO> coveragePremium;
|
|
|
+ private List<?> coveragePremium;
|
|
|
@JsonProperty("reInsureItem")
|
|
|
private ReInsureItemDTO reInsureItem;
|
|
|
@JsonProperty("contractMain")
|
|
|
@@ -276,7 +166,7 @@ public class InsurePremiumResponse extends ChengTaiBaseResponse{
|
|
|
@JsonProperty("riskCode")
|
|
|
private String riskCode;
|
|
|
@JsonProperty("totalPremium")
|
|
|
- private BigDecimal totalPremium;
|
|
|
+ private Double totalPremium;
|
|
|
@JsonProperty("policyNo")
|
|
|
private String policyNo;
|
|
|
@JsonProperty("validAtOnce")
|
|
|
@@ -303,7 +193,7 @@ public class InsurePremiumResponse extends ChengTaiBaseResponse{
|
|
|
@JsonProperty("glassClassName")
|
|
|
private String glassClassName;
|
|
|
@JsonProperty("amount")
|
|
|
- private Double amount;
|
|
|
+ private Integer amount;
|
|
|
@JsonProperty("kindCode")
|
|
|
private String kindCode;
|
|
|
@JsonProperty("quantity")
|
|
|
@@ -311,7 +201,7 @@ public class InsurePremiumResponse extends ChengTaiBaseResponse{
|
|
|
@JsonProperty("validDate")
|
|
|
private String validDate;
|
|
|
@JsonProperty("coveragePremium")
|
|
|
- private BigDecimal coveragePremium;
|
|
|
+ private String coveragePremium;
|
|
|
@JsonProperty("glassClassCode")
|
|
|
private String glassClassCode;
|
|
|
@JsonProperty("calculateFlag")
|
|
|
@@ -325,7 +215,7 @@ public class InsurePremiumResponse extends ChengTaiBaseResponse{
|
|
|
@JsonProperty("kindName")
|
|
|
private String kindName;
|
|
|
@JsonProperty("unitAmount")
|
|
|
- private BigDecimal unitAmount;
|
|
|
+ private Double unitAmount;
|
|
|
@JsonProperty("currency")
|
|
|
private String currency;
|
|
|
}
|
|
|
@@ -359,16 +249,112 @@ public class InsurePremiumResponse extends ChengTaiBaseResponse{
|
|
|
@JsonProperty("chooseType")
|
|
|
private String chooseType;
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class AccContractDTO {
|
|
|
+ @JsonProperty("coverage")
|
|
|
+ private List<CoverageDTO> coverage;
|
|
|
+ @JsonProperty("engage")
|
|
|
+ private List<EngageDTO> engage;
|
|
|
+ @JsonProperty("contractMain")
|
|
|
+ private ContractMainDTO contractMain;
|
|
|
+
|
|
|
+ public static List<AccidentResponseVo> toAccidentResponseVoList(AccContractDTO accContract, BaseQuoteVo<InsDrivingIntentionInsurance> quoteInfoVo) {
|
|
|
+ InsurePremiumResponse.AccContractDTO.ContractMainDTO contractMainDTO = accContract.getContractMain();
|
|
|
+ InsDrivingIntentionInsurance insDrivingIntentionInsurance = quoteInfoVo.getAccidentalDrivingVo();
|
|
|
+ List<AccidentResponseVo> accidentResponseVoList = new ArrayList<>();
|
|
|
+ AccidentResponseVo accidentResponseVo = new AccidentResponseVo();
|
|
|
+
|
|
|
+ accidentResponseVo.setProjectCode(quoteInfoVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ if (StringUtils.isNotBlank(quoteInfoVo.getAccidentalDrivingVo().getProjectName())) {
|
|
|
+ accidentResponseVo.setProjectName(quoteInfoVo.getAccidentalDrivingVo().getProjectName());
|
|
|
+ }
|
|
|
+ accidentResponseVo.setPremium(contractMainDTO.getTotalPremium().toString());
|
|
|
+ accidentResponseVo.setQuantity("1");
|
|
|
+ accidentResponseVo.setActualPremium(contractMainDTO.getSumAmount().toString());
|
|
|
+ accidentResponseVoList.add(accidentResponseVo);
|
|
|
+ return accidentResponseVoList;
|
|
|
+ }
|
|
|
|
|
|
@NoArgsConstructor
|
|
|
@Data
|
|
|
- public static class CoveragePremiumDTO {
|
|
|
- @JsonProperty("vehiclaCode")
|
|
|
- private String vehiclaCode;
|
|
|
- @JsonProperty("pureriskPremium")
|
|
|
- private String pureriskPremium;
|
|
|
- @JsonProperty("used")
|
|
|
- private String used;
|
|
|
+ public static class ContractMainDTO {
|
|
|
+ @JsonProperty("riskName")
|
|
|
+ private String riskName;
|
|
|
+ @JsonProperty("hopeDiscount")
|
|
|
+ private String hopeDiscount;
|
|
|
+ @JsonProperty("validDate")
|
|
|
+ private String validDate;
|
|
|
+ @JsonProperty("riskCode")
|
|
|
+ private String riskCode;
|
|
|
+ @JsonProperty("totalPremium")
|
|
|
+ private Double totalPremium;
|
|
|
+ @JsonProperty("policyNo")
|
|
|
+ private String policyNo;
|
|
|
+ @JsonProperty("validAtOnce")
|
|
|
+ private String validAtOnce;
|
|
|
+ @JsonProperty("renewalFlag")
|
|
|
+ private String renewalFlag;
|
|
|
+ @JsonProperty("lastYearPolicyNo")
|
|
|
+ private String lastYearPolicyNo;
|
|
|
+ @JsonProperty("sumAmount")
|
|
|
+ private String sumAmount;
|
|
|
+ @JsonProperty("proposalNo")
|
|
|
+ private String proposalNo;
|
|
|
+ @JsonProperty("expiryDate")
|
|
|
+ private String expiryDate;
|
|
|
+ @JsonProperty("currency")
|
|
|
+ private String currency;
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class CoverageDTO {
|
|
|
+ @JsonProperty("glassClassName")
|
|
|
+ private String glassClassName;
|
|
|
+ @JsonProperty("amount")
|
|
|
+ private Integer amount;
|
|
|
+ @JsonProperty("kindCode")
|
|
|
+ private String kindCode;
|
|
|
+ @JsonProperty("quantity")
|
|
|
+ private String quantity;
|
|
|
+ @JsonProperty("validDate")
|
|
|
+ private String validDate;
|
|
|
+ @JsonProperty("coveragePremium")
|
|
|
+ private String coveragePremium;
|
|
|
+ @JsonProperty("glassClassCode")
|
|
|
+ private String glassClassCode;
|
|
|
+ @JsonProperty("calculateFlag")
|
|
|
+ private String calculateFlag;
|
|
|
+ @JsonProperty("expiryDate")
|
|
|
+ private String expiryDate;
|
|
|
+ @JsonProperty("ifMainKind")
|
|
|
+ private String ifMainKind;
|
|
|
+ @JsonProperty("deductible")
|
|
|
+ private String deductible;
|
|
|
+ @JsonProperty("kindName")
|
|
|
+ private String kindName;
|
|
|
+ @JsonProperty("unitAmount")
|
|
|
+ private String unitAmount;
|
|
|
+ @JsonProperty("currency")
|
|
|
+ private String currency;
|
|
|
+ }
|
|
|
+
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class EngageDTO {
|
|
|
+ @JsonProperty("engageDetail")
|
|
|
+ private String engageDetail;
|
|
|
+ @JsonProperty("modifyind")
|
|
|
+ private String modifyind;
|
|
|
+ @JsonProperty("engageCode")
|
|
|
+ private String engageCode;
|
|
|
+ @JsonProperty("engageTitle")
|
|
|
+ private String engageTitle;
|
|
|
+ @JsonProperty("chooseType")
|
|
|
+ private String chooseType;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -475,9 +461,9 @@ public class InsurePremiumResponse extends ChengTaiBaseResponse{
|
|
|
@Data
|
|
|
public static class TaxDTO {
|
|
|
@JsonProperty("sumTax")
|
|
|
- private BigDecimal sumTax;
|
|
|
+ private Double sumTax;
|
|
|
@JsonProperty("sumOverdue")
|
|
|
- private BigDecimal sumOverdue;
|
|
|
+ private Double sumOverdue;
|
|
|
@JsonProperty("taxPayerIdentityNo")
|
|
|
private String taxPayerIdentityNo;
|
|
|
@JsonProperty("documentNumber")
|
|
|
@@ -485,7 +471,7 @@ public class InsurePremiumResponse extends ChengTaiBaseResponse{
|
|
|
@JsonProperty("taxPayerName")
|
|
|
private String taxPayerName;
|
|
|
@JsonProperty("annualTaxDue")
|
|
|
- private BigDecimal annualTaxDue;
|
|
|
+ private Double annualTaxDue;
|
|
|
@JsonProperty("noTaxReasonCode")
|
|
|
private String noTaxReasonCode;
|
|
|
@JsonProperty("sumTaxDefault")
|
|
|
@@ -542,7 +528,7 @@ public class InsurePremiumResponse extends ChengTaiBaseResponse{
|
|
|
@JsonProperty("riskCode")
|
|
|
private String riskCode;
|
|
|
@JsonProperty("totalPremium")
|
|
|
- private BigDecimal totalPremium;
|
|
|
+ private String totalPremium;
|
|
|
@JsonProperty("policyNo")
|
|
|
private String policyNo;
|
|
|
@JsonProperty("validAtOnce")
|