|
@@ -37,36 +37,76 @@ public class SchemeRuleAttrMappingVo {
|
|
|
CustomerInfoVo insuredPersonInfo,
|
|
CustomerInfoVo insuredPersonInfo,
|
|
|
PtlNewCarJudgeRules carJudgeRule) {
|
|
PtlNewCarJudgeRules carJudgeRule) {
|
|
|
List<SchemeRuleAttrMappingVo> ruleAttrMappingVoList = new ArrayList<>();
|
|
List<SchemeRuleAttrMappingVo> ruleAttrMappingVoList = new ArrayList<>();
|
|
|
- //车牌号
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("LicenseNo", carInfo.getLicenseNo()));
|
|
|
|
|
- //品牌型号
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("BrandandModel", carInfo.getModelcname()));
|
|
|
|
|
- //座位数
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("PassengerCarSeatingCapacity", carInfo.getSeatCount()));
|
|
|
|
|
- //新车购置价
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("PurchasePriceofNewVehicle", carInfo.getPurchasePrice()));
|
|
|
|
|
- //车辆用途
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("NatureOfUse", TypeVehicleMapping.getByCode(carInfo.getVehicleUse())));
|
|
|
|
|
- //车辆种类
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarType", VehicleType.getByCode(carInfo.getCimodelclass())));
|
|
|
|
|
- //使用性质
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("carnature", VehicleUsage.valueOf("VU_" + carInfo.getCarnature()).getDesc()));
|
|
|
|
|
- //核定载质量
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("AuthorizedLoadWeight", carInfo.getLimitLoad()));
|
|
|
|
|
- //整备质量
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CurbWeight", carInfo.getVehicleweight()));
|
|
|
|
|
- //能源类型
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("NewEnergy", carInfo.getEnergyType()));
|
|
|
|
|
- //注册日期
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("RegistrationDate", carInfo.getRegisterDate()));
|
|
|
|
|
- //是否过户
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("TransferVehicle", carInfo.isTransferFlag() ? "1" : "0"));
|
|
|
|
|
- //是否新车
|
|
|
|
|
- //使用注册日期算出自然月 然后判断是否是新旧车
|
|
|
|
|
- LocalDate registrationDate = LocalDate.parse(carInfo.getRegisterDate());
|
|
|
|
|
- LocalDate currentDate = LocalDate.now();
|
|
|
|
|
-
|
|
|
|
|
- boolean isNoLicenseFlag = false;
|
|
|
|
|
|
|
+ //所属性质(1个人 2企业 3机关)
|
|
|
|
|
+ String property = carInfo.getProperty();
|
|
|
|
|
+ if ("2".equals(property)) {
|
|
|
|
|
+ //车牌号
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("LicenseNo", carInfo.getLicenseNo()));
|
|
|
|
|
+ //品牌型号
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("BrandandModel", carInfo.getModelcname()));
|
|
|
|
|
+ //座位数
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("PassengerCarSeatingCapacity", carInfo.getSeatCount()));
|
|
|
|
|
+ //新车购置价
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("PurchasePriceofNewVehicle", carInfo.getPurchasePrice()));
|
|
|
|
|
+ //车辆用途
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("NatureOfUse", TypeVehicleMapping.getByCode(carInfo.getVehicleUse())));
|
|
|
|
|
+ //车辆种类
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarType", VehicleType.getByCode(carInfo.getCimodelclass())));
|
|
|
|
|
+ //使用性质
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("carnature", VehicleUsage.valueOf("VU_" + carInfo.getCarnature()).getDesc()));
|
|
|
|
|
+ //核定载质量
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("AuthorizedLoadWeight", carInfo.getLimitLoad()));
|
|
|
|
|
+ //整备质量
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CurbWeight", carInfo.getVehicleweight()));
|
|
|
|
|
+ //能源类型
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("NewEnergy", carInfo.getEnergyType()));
|
|
|
|
|
+ //注册日期
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("RegistrationDate", carInfo.getRegisterDate()));
|
|
|
|
|
+ //是否过户
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("TransferVehicle", carInfo.isTransferFlag() ? "1" : "0"));
|
|
|
|
|
+ //是否新车
|
|
|
|
|
+ //使用注册日期算出自然月 然后判断是否是新旧车
|
|
|
|
|
+ LocalDate registrationDate = LocalDate.parse(carInfo.getRegisterDate());
|
|
|
|
|
+ LocalDate currentDate = LocalDate.now();
|
|
|
|
|
+
|
|
|
|
|
+ boolean isNoLicenseFlag = false;
|
|
|
|
|
+
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("NewAndOldCars", isNoLicenseFlag ? "1" : "0"));
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }else {
|
|
|
|
|
+
|
|
|
|
|
+ //车牌号
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("LicenseNo", carInfo.getLicenseNo()));
|
|
|
|
|
+ //品牌型号
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("BrandandModel", carInfo.getModelcname()));
|
|
|
|
|
+ //座位数
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("PassengerCarSeatingCapacity", carInfo.getSeatCount()));
|
|
|
|
|
+ //新车购置价
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("PurchasePriceofNewVehicle", carInfo.getPurchasePrice()));
|
|
|
|
|
+ //车辆用途
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("NatureOfUse", TypeVehicleMapping.getByCode(carInfo.getVehicleUse())));
|
|
|
|
|
+ //车辆种类
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarType", VehicleType.getByCode(carInfo.getCimodelclass())));
|
|
|
|
|
+ //使用性质
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("carnature", VehicleUsage.valueOf("VU_" + carInfo.getCarnature()).getDesc()));
|
|
|
|
|
+ //核定载质量
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("AuthorizedLoadWeight", carInfo.getLimitLoad()));
|
|
|
|
|
+ //整备质量
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CurbWeight", carInfo.getVehicleweight()));
|
|
|
|
|
+ //能源类型
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("NewEnergy", carInfo.getEnergyType()));
|
|
|
|
|
+ //注册日期
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("RegistrationDate", carInfo.getRegisterDate()));
|
|
|
|
|
+ //是否过户
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("TransferVehicle", carInfo.isTransferFlag() ? "1" : "0"));
|
|
|
|
|
+ //是否新车
|
|
|
|
|
+ //使用注册日期算出自然月 然后判断是否是新旧车
|
|
|
|
|
+ LocalDate registrationDate = LocalDate.parse(carInfo.getRegisterDate());
|
|
|
|
|
+ LocalDate currentDate = LocalDate.now();
|
|
|
|
|
+
|
|
|
|
|
+ boolean isNoLicenseFlag = false;
|
|
|
// if (carJudgeRule != null) {
|
|
// if (carJudgeRule != null) {
|
|
|
// if (carJudgeRule.getUnitTypeCode().equals("天")) {
|
|
// if (carJudgeRule.getUnitTypeCode().equals("天")) {
|
|
|
// long days = ChronoUnit.DAYS.between(registrationDate, currentDate);
|
|
// long days = ChronoUnit.DAYS.between(registrationDate, currentDate);
|
|
@@ -82,37 +122,37 @@ public class SchemeRuleAttrMappingVo {
|
|
|
// }
|
|
// }
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("NewAndOldCars", isNoLicenseFlag ? "1" : "0"));
|
|
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("NewAndOldCars", isNoLicenseFlag ? "1" : "0"));
|
|
|
|
|
|
|
|
- //发证日期
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("DateofIssuance", carInfo.getIssueDate()));
|
|
|
|
|
- //车长
|
|
|
|
|
|
|
+ //发证日期
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("DateofIssuance", carInfo.getIssueDate()));
|
|
|
|
|
+ //车长
|
|
|
// ruleAttrMappingVoList.add(new RuleAttrMappingVo("VehicleLength", carInfo.getCarLength()));
|
|
// ruleAttrMappingVoList.add(new RuleAttrMappingVo("VehicleLength", carInfo.getCarLength()));
|
|
|
|
|
|
|
|
- //车主 证件号码(前6位)
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarOwnersIDNumber", ownerInfo.getIdentifyNumber()));
|
|
|
|
|
- //车主 年龄
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarOwnersAge", ownerInfo.getAge()));
|
|
|
|
|
- //车主 性别
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarOwnersSex", ownerInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
- //车主 姓名
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarOwnerName", ownerInfo.getName()));
|
|
|
|
|
-
|
|
|
|
|
- //投保人 证件号码(前6位)
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("ApplicantIDNumber", policyHolderInfo.getIdentifyNumber()));
|
|
|
|
|
- //投保人 年龄
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("ApplicantAge", policyHolderInfo.getAge()));
|
|
|
|
|
- //投保人 性别
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("ApplicantSex", policyHolderInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
-
|
|
|
|
|
- //被保人 证件号码(前6位)
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("InsuredIDNumber", insuredPersonInfo.getIdentifyNumber()));
|
|
|
|
|
- //被保人 年龄
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("InsuredAge", insuredPersonInfo.getAge()));
|
|
|
|
|
- //被保人 性别
|
|
|
|
|
- ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("InsuredSex", insuredPersonInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
-
|
|
|
|
|
- //2024-06-20 起保日期 月份判断
|
|
|
|
|
|
|
+ //车主 证件号码(前6位)
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarOwnersIDNumber", ownerInfo.getIdentifyNumber()));
|
|
|
|
|
+ //车主 年龄
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarOwnersAge", ownerInfo.getAge()));
|
|
|
|
|
+ //车主 性别
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarOwnersSex", ownerInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
+ //车主 姓名
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("CarOwnerName", ownerInfo.getName()));
|
|
|
|
|
+
|
|
|
|
|
+ //投保人 证件号码(前6位)
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("ApplicantIDNumber", policyHolderInfo.getIdentifyNumber()));
|
|
|
|
|
+ //投保人 年龄
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("ApplicantAge", policyHolderInfo.getAge()));
|
|
|
|
|
+ //投保人 性别
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("ApplicantSex", policyHolderInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
+
|
|
|
|
|
+ //被保人 证件号码(前6位)
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("InsuredIDNumber", insuredPersonInfo.getIdentifyNumber()));
|
|
|
|
|
+ //被保人 年龄
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("InsuredAge", insuredPersonInfo.getAge()));
|
|
|
|
|
+ //被保人 性别
|
|
|
|
|
+ ruleAttrMappingVoList.add(new SchemeRuleAttrMappingVo("InsuredSex", insuredPersonInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
+
|
|
|
|
|
+ //2024-06-20 起保日期 月份判断
|
|
|
// if(quoteInfoVo.get() != null && !insAreaCompany.getJqStartDate().equals("")){
|
|
// if(quoteInfoVo.get() != null && !insAreaCompany.getJqStartDate().equals("")){
|
|
|
// LocalDateTime jqStartDate = LocalDateTime.parse(insAreaCompany.getJqStartDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
// LocalDateTime jqStartDate = LocalDateTime.parse(insAreaCompany.getJqStartDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
// ruleAttrMappingVoList.add(new RuleAttrMappingVo("JqStartMonth", String.valueOf(jqStartDate.getMonthValue())));
|
|
// ruleAttrMappingVoList.add(new RuleAttrMappingVo("JqStartMonth", String.valueOf(jqStartDate.getMonthValue())));
|
|
@@ -121,6 +161,7 @@ public class SchemeRuleAttrMappingVo {
|
|
|
// LocalDateTime syStartDate = LocalDateTime.parse(insAreaCompany.getSyStartDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
// LocalDateTime syStartDate = LocalDateTime.parse(insAreaCompany.getSyStartDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
// ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyStartMonth", String.valueOf(syStartDate.getMonthValue())));
|
|
// ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyStartMonth", String.valueOf(syStartDate.getMonthValue())));
|
|
|
// }
|
|
// }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return ruleAttrMappingVoList;
|
|
return ruleAttrMappingVoList;
|
|
|
}
|
|
}
|