|
|
@@ -75,10 +75,10 @@ public class RuleAttrMappingVo {
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
|
|
|
//交强起保日期
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("JqStartTime",insOrders.getJqstartdate()));
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("JqStartTime", insAreaCompany.getJqStartDate()));
|
|
|
|
|
|
//商业起保日期
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyStartTime",insOrders.getSystartdate()));
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyStartTime", insAreaCompany.getSyStartDate()));
|
|
|
|
|
|
boolean isNoLicenseFlag = false;
|
|
|
if (carJudgeRule != null) {
|
|
|
@@ -100,7 +100,7 @@ public class RuleAttrMappingVo {
|
|
|
|
|
|
//车龄
|
|
|
long between = ChronoUnit.YEARS.between(registrationDate, currentDate) + 1;
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("VehicleAge",String.valueOf(between)));
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("VehicleAge", String.valueOf(between)));
|
|
|
|
|
|
|
|
|
//发证日期
|
|
|
@@ -140,25 +140,25 @@ public class RuleAttrMappingVo {
|
|
|
|
|
|
String OPIConsistent = "0";
|
|
|
//车主 投被保人是否一致
|
|
|
- if((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
|
|
|
- (ownerInfo.getIdentifyNumber().equals(insuredPersonInfo.getIdentifyNumber()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber()))){
|
|
|
+ if ((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
|
|
|
+ (ownerInfo.getIdentifyNumber().equals(insuredPersonInfo.getIdentifyNumber()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber()))) {
|
|
|
OPIConsistent = "1";
|
|
|
}
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("OPIConsistent",OPIConsistent));
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("OPIConsistent", OPIConsistent));
|
|
|
|
|
|
String PIConsistent = "0";
|
|
|
//投被保人是否一致
|
|
|
- if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber())){
|
|
|
+ if (insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber())) {
|
|
|
PIConsistent = "1";
|
|
|
}
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("PIConsistent",PIConsistent));
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("PIConsistent", PIConsistent));
|
|
|
|
|
|
//2024-06-20 起保日期 月份判断
|
|
|
- if(insAreaCompany.getJqStartDate() != null && !insAreaCompany.getJqStartDate().equals("")){
|
|
|
+ if (insAreaCompany.getJqStartDate() != null && !insAreaCompany.getJqStartDate().equals("")) {
|
|
|
LocalDateTime jqStartDate = LocalDateTime.parse(insAreaCompany.getJqStartDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("JqStartMonth", String.valueOf(jqStartDate.getMonthValue())));
|
|
|
}
|
|
|
- if(insAreaCompany.getSyStartDate() != null && !insAreaCompany.getSyStartDate().equals("")) {
|
|
|
+ if (insAreaCompany.getSyStartDate() != null && !insAreaCompany.getSyStartDate().equals("")) {
|
|
|
LocalDateTime syStartDate = LocalDateTime.parse(insAreaCompany.getSyStartDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyStartMonth", String.valueOf(syStartDate.getMonthValue())));
|
|
|
}
|
|
|
@@ -303,73 +303,70 @@ public class RuleAttrMappingVo {
|
|
|
// 商业出险次数
|
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyNumberOfClaims", insAreaCompany.getSyClaims() == null ? "0" : insAreaCompany.getSyClaims()));
|
|
|
// 车牌地区
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("LicenseArea", insOrders.getLicenseno().substring(0,1)));
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("LicenseArea", insOrders.getLicenseno().substring(0, 1)));
|
|
|
// 系数
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("Coefficient", getCoefficient(carInfo,insAreaCompany).toString()));
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("Coefficient", getCoefficient(carInfo, insAreaCompany).toString()));
|
|
|
// 商业是否有费用
|
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("CiMessage", (insAreaCompany.getCiMessage() == null || "".equals(insAreaCompany.getCiMessage())) ? "0" : "1"));
|
|
|
return ruleAttrMappingVoList;
|
|
|
}
|
|
|
|
|
|
- private static Float getCoefficient(CarInfoVo carInfo,InsAreaCompany insAreaCompany){
|
|
|
+ private static Float getCoefficient(CarInfoVo carInfo, InsAreaCompany insAreaCompany) {
|
|
|
Integer seatCount = Integer.parseInt(carInfo.getSeatCount());
|
|
|
Float coefficient = 1.00f;
|
|
|
|
|
|
// ruleAttrMappingVoList.add(new RuleAttrMappingVo())
|
|
|
//家庭自用车
|
|
|
- if(carInfo.getCimodelclass().equals(VehicleType.VT_A0.getCode()) &&
|
|
|
- carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_05.getCode())){
|
|
|
+ if (carInfo.getCimodelclass().equals(VehicleType.VT_A0.getCode()) &&
|
|
|
+ carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_05.getCode())) {
|
|
|
//2-5座
|
|
|
- if(seatCount >= 2 && seatCount <=5) {
|
|
|
+ if (seatCount >= 2 && seatCount <= 5) {
|
|
|
coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 950;
|
|
|
}
|
|
|
//6-9座
|
|
|
- if(seatCount >= 6 && seatCount <=9){
|
|
|
+ if (seatCount >= 6 && seatCount <= 9) {
|
|
|
coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1100;
|
|
|
}
|
|
|
- }else
|
|
|
+ } else
|
|
|
//非营业机关、企业
|
|
|
- if(carInfo.getCimodelclass().equals(VehicleType.VT_A0.getCode()) &&
|
|
|
+ if (carInfo.getCimodelclass().equals(VehicleType.VT_A0.getCode()) &&
|
|
|
(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_06.getCode()) ||
|
|
|
- carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_07.getCode()))){
|
|
|
+ carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_07.getCode()))) {
|
|
|
//2-5座
|
|
|
- if(seatCount >= 2 && seatCount <=5) {
|
|
|
+ if (seatCount >= 2 && seatCount <= 5) {
|
|
|
coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1000;
|
|
|
}
|
|
|
//6-9座
|
|
|
- if(seatCount >= 6 && seatCount <=9){
|
|
|
+ if (seatCount >= 6 && seatCount <= 9) {
|
|
|
coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1130;
|
|
|
}
|
|
|
- }
|
|
|
- else
|
|
|
+ } else
|
|
|
//货车
|
|
|
- if(carInfo.getCimodelclass().equals(VehicleType.VT_A1.getCode()))
|
|
|
- {
|
|
|
+ if (carInfo.getCimodelclass().equals(VehicleType.VT_A1.getCode())) {
|
|
|
//营业货运 2吨
|
|
|
- if(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_04.getCode()) &&
|
|
|
- Integer.parseInt(carInfo.getLimitLoad()) < 2000){
|
|
|
+ if (carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_04.getCode()) &&
|
|
|
+ Integer.parseInt(carInfo.getLimitLoad()) < 2000) {
|
|
|
coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1850;
|
|
|
}
|
|
|
|
|
|
//非营业货运 2吨
|
|
|
- if(carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_08.getCode()) &&
|
|
|
- Integer.parseInt(carInfo.getLimitLoad()) < 2000){
|
|
|
+ if (carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_08.getCode()) &&
|
|
|
+ Integer.parseInt(carInfo.getLimitLoad()) < 2000) {
|
|
|
coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1200;
|
|
|
}
|
|
|
|
|
|
//大吨位
|
|
|
- if(Integer.parseInt(carInfo.getLimitLoad()) > 2000){
|
|
|
+ if (Integer.parseInt(carInfo.getLimitLoad()) > 2000) {
|
|
|
coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 4480;
|
|
|
}
|
|
|
- }
|
|
|
- else
|
|
|
+ } else
|
|
|
//出租车 网约车
|
|
|
- if(carInfo.getCimodelclass().equals(VehicleType.VT_A0.getCode()) &&
|
|
|
- carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_01.getCode())){
|
|
|
+ if (carInfo.getCimodelclass().equals(VehicleType.VT_A0.getCode()) &&
|
|
|
+ carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_01.getCode())) {
|
|
|
coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1800;
|
|
|
}
|
|
|
|
|
|
- return coefficient;
|
|
|
+ return coefficient;
|
|
|
}
|
|
|
|
|
|
}
|