|
|
@@ -19,6 +19,7 @@ import org.springframework.util.StringUtils;
|
|
|
import java.io.Serial;
|
|
|
import java.io.Serializable;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Optional;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -134,7 +135,7 @@ public class CalculatePremiumRequest implements Serializable {
|
|
|
this.proposalAreaCode = parameters.getProposalAreaCode();
|
|
|
this.proposalCityCode = parameters.getProposalCityCode();
|
|
|
// 驾意险信息
|
|
|
- this.taxRelifInfo = new TaxRelifInfoDTO();
|
|
|
+ this.taxRelifInfo = new TaxRelifInfoDTO(quoteVo.getVehicleAndVesselTaxVo());
|
|
|
}
|
|
|
|
|
|
public void modificationOfVehicleType(ModelQueryResponse.VehicleModelInfosDTO vehicleModelInfosDTO, String actualValue) {
|
|
|
@@ -427,6 +428,11 @@ public class CalculatePremiumRequest implements Serializable {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // 免税
|
|
|
+ private static final String TAX_EXEMPTION = "2";
|
|
|
+ // 减税
|
|
|
+ private static final String TAX_REDUCTION = "3";
|
|
|
+
|
|
|
/**
|
|
|
* 车船税信息
|
|
|
*/
|
|
|
@@ -522,6 +528,34 @@ public class CalculatePremiumRequest implements Serializable {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public TaxRelifInfoDTO(VehicleAndVesselTaxVo vehicleAndVesselTaxVo){
|
|
|
+ String flag = vehicleAndVesselTaxVo.getTaxRelifFlag();
|
|
|
+ switch (flag) {
|
|
|
+ case TAX_EXEMPTION:
|
|
|
+ this.freeRateText = FreeRateText.FRT_E.getCode();
|
|
|
+ this.taxRelief = "1";
|
|
|
+ break;
|
|
|
+ case TAX_REDUCTION:
|
|
|
+ this.freeRateText = FreeRateText.FRT_P.getCode();
|
|
|
+ this.taxRelief = vehicleAndVesselTaxVo.getTaxRelief();
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ this.extendChar2 = vehicleAndVesselTaxVo.getExtendChar2();
|
|
|
+
|
|
|
+ this.relifReason = vehicleAndVesselTaxVo.getRelifReason();
|
|
|
+ this.taxComCode = vehicleAndVesselTaxVo.getTaxComCode();
|
|
|
+ this.taxComName = vehicleAndVesselTaxVo.getTaxComName();
|
|
|
+ this.taxDocumentDate = vehicleAndVesselTaxVo.getTaxDocumentDate();
|
|
|
+ this.taxPaidAreaCode = vehicleAndVesselTaxVo.getTaxPaidAreaCode();
|
|
|
+ this.paidFreeCertificate = vehicleAndVesselTaxVo.getPaidFreeCertificate();
|
|
|
+ this.taxpayerName = vehicleAndVesselTaxVo.getTaxpayerName();
|
|
|
+ this.taxpayerIdentifier = vehicleAndVesselTaxVo.getTaxpayerIdentifier();
|
|
|
+
|
|
|
+ this.identifyNumber = vehicleAndVesselTaxVo.getIdentifyNumber();
|
|
|
+ this.taxRelifFlag = flag;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -849,9 +883,76 @@ public class CalculatePremiumRequest implements Serializable {
|
|
|
|
|
|
public VehicleInfoDTO(CarInfoVo carInfoVo, ModelQueryResponse.VehicleModelInfosDTO vehicleModelInfosDTO, String actualValue) {
|
|
|
|
|
|
+ this.actualValue = actualValue;
|
|
|
+ this.agreeActualValue = actualValue;
|
|
|
+ if (carInfoVo.isTransfer()) {
|
|
|
+ this.carLoanFlag = "1";
|
|
|
+ this.chgOwnerFlag = "1";
|
|
|
+ this.makeDate = carInfoVo.getIssueDate();
|
|
|
+ this.makeDateJQ = carInfoVo.getIssueDate();
|
|
|
+ } else {
|
|
|
+ this.chgOwnerFlag = "0";
|
|
|
+ this.carLoanFlag = "0";
|
|
|
+ }
|
|
|
+ this.engineNo = carInfoVo.getEngineNo();
|
|
|
+ this.enrollDate = carInfoVo.getRegisterDate();
|
|
|
+ this.licenseColorCode = "01";
|
|
|
+ this.licenseKindCode = "02";
|
|
|
+ this.licenseNo = carInfoVo.getLicenseNo();
|
|
|
+ this.modelCode = vehicleModelInfosDTO.getModelCode();
|
|
|
+ this.noLicenseFlag = "1";
|
|
|
+ this.purchasePrice = vehicleModelInfosDTO.getPurchasePrice();
|
|
|
+ this.seatCount = carInfoVo.getSeatCount();
|
|
|
+
|
|
|
+ // 车辆使用性质代码
|
|
|
+ this.useNatureCode = carInfoVo.getVehicleUseCode();
|
|
|
|
|
|
- }
|
|
|
+ this.vehicleId = vehicleModelInfosDTO.getVehicleId();
|
|
|
+
|
|
|
+ this.vinNo = carInfoVo.getVinNo();
|
|
|
+ this.brandName = vehicleModelInfosDTO.getModelName();
|
|
|
+ this.carInsuredRelation = "1";
|
|
|
+
|
|
|
+ String limitLoad = carInfoVo.getLimitLoad();
|
|
|
+
|
|
|
+ if ("H0".equals(carInfoVo.getCarKindCode())) {
|
|
|
+ double v = Double.parseDouble(limitLoad) / 1000;
|
|
|
+ this.tonCount = String.valueOf(v);
|
|
|
+ this.carKindDetailId = carInfoVo.getCarKindDetailIdCode();
|
|
|
+ this.printUseNatureCode = "0003";
|
|
|
+ } else {
|
|
|
+ this.carKindDetailId = carInfoVo.getCarKindDetailIdCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ this.completekerbmass = carInfoVo.getCompleteKerbMass();
|
|
|
+ // 车辆种类代码
|
|
|
+ this.carKindCode = carInfoVo.getCarKindCode();
|
|
|
+
|
|
|
+ this.exhaustCapacity = !StringUtils.isEmpty(vehicleModelInfosDTO.getExhaustCapacity()) ?
|
|
|
+ vehicleModelInfosDTO.getExhaustCapacity() : "0";
|
|
|
+ this.oriCarKindName = carInfoVo.getCarTypeCode();
|
|
|
|
|
|
+ this.platVehicleCode = vehicleModelInfosDTO.getPlatVehicleCode();
|
|
|
+ this.modelEnergyType = vehicleModelInfosDTO.getPowerTypeCode();
|
|
|
+ this.ecdemicVehicleFlag = "0";
|
|
|
+ this.printModelName = vehicleModelInfosDTO.getModelName();
|
|
|
+ this.power = vehicleModelInfosDTO.getPower();
|
|
|
+ this.oriPurchasePrice = vehicleModelInfosDTO.getPurchasePrice();
|
|
|
+ this.oriBrandName = vehicleModelInfosDTO.getModelName();
|
|
|
+ this.oriModelName = vehicleModelInfosDTO.getModelName();
|
|
|
+// this.vehicleStyleUniqueId = vehicleModelInfosDTO.getVehicleId();
|
|
|
+ this.isInvokeJingYou = "1";
|
|
|
+ String[] ENERGY = new String[]{"1","2","3","4"};
|
|
|
+ //纯电动 燃料电池 插电式混合动力 归属为新能源产品
|
|
|
+ if (Arrays.asList(ENERGY).contains(carInfoVo.getEnergyTypeCode())) {
|
|
|
+ this.newEnergyFlag = "1";
|
|
|
+ this.pureRange = "";
|
|
|
+ this.fuelType = carInfoVo.getEnergyTypeCode();
|
|
|
+ }else{
|
|
|
+ this.newEnergyFlag = "0";
|
|
|
+ this.pureRange = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
public void modificationOfVehicleType(ModelQueryResponse.VehicleModelInfosDTO vehicleModelInfosDTO, String actualValue) {
|
|
|
this.actualValue = actualValue;
|
|
|
this.agreeActualValue = actualValue;
|
|
|
@@ -1019,7 +1120,8 @@ public class CalculatePremiumRequest implements Serializable {
|
|
|
this.identifyType = "73";
|
|
|
this.insuredNature = "4";
|
|
|
this.insuredType = "2";
|
|
|
- this.sex = "9";
|
|
|
+ int gender = IdcardUtil.getGenderByIdCard(customerInfoVo.getIdentifyNumber());
|
|
|
+ this.sex = gender == 1 ? "1" : "2";
|
|
|
this.certigierName = customerInfoVo.getLegalPerson();
|
|
|
this.certigierType = "01";
|
|
|
this.certigierNumber = customerInfoVo.getLeaderIdentifyNumber();
|