|
|
@@ -7,6 +7,7 @@ import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.KindInfoVo;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
|
+import com.ydtech.modules.order.entity.api.bohai.constants.VehicleUsage;
|
|
|
import com.ydtech.modules.order.entity.api.dajia.constants.TypeVehicleMapping;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlNewCarJudgeRules;
|
|
|
import com.ydtech.modules.protocols.entity.po.PtlAgreementUndwrtRulesAttr;
|
|
|
@@ -275,6 +276,73 @@ public class RuleAttrMappingVo {
|
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("JqNumberOfClaims", insAreaCompany.getJqClaims() == null ? "0" : insAreaCompany.getJqClaims()));
|
|
|
// 商业出险次数
|
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyNumberOfClaims", insAreaCompany.getSyClaims() == null ? "0" : insAreaCompany.getSyClaims()));
|
|
|
+ // 车牌地区
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("LicenseArea", insAreaCompany.getLicenseno().substring(0,1)));
|
|
|
+ // 系数
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("Coefficient", getCoefficient(carInfo,insAreaCompany).toString()));
|
|
|
return ruleAttrMappingVoList;
|
|
|
}
|
|
|
+
|
|
|
+ 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())){
|
|
|
+ //2-5座
|
|
|
+ if(seatCount >= 2 && seatCount <=5) {
|
|
|
+ coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 950;
|
|
|
+ }
|
|
|
+ //6-9座
|
|
|
+ if(seatCount >= 6 && seatCount <=9){
|
|
|
+ coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1100;
|
|
|
+ }
|
|
|
+ }else
|
|
|
+ //非营业机关、企业
|
|
|
+ if(carInfo.getCimodelclass().equals(VehicleType.VT_A0.getCode()) &&
|
|
|
+ (carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_06.getCode()) ||
|
|
|
+ carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_07.getCode()))){
|
|
|
+ //2-5座
|
|
|
+ if(seatCount >= 2 && seatCount <=5) {
|
|
|
+ coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1000;
|
|
|
+ }
|
|
|
+ //6-9座
|
|
|
+ if(seatCount >= 6 && seatCount <=9){
|
|
|
+ coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1130;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ //货车
|
|
|
+ if(carInfo.getCimodelclass().equals(VehicleType.VT_A1.getCode()))
|
|
|
+ {
|
|
|
+ //营业货运 2吨
|
|
|
+ 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){
|
|
|
+ coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1200;
|
|
|
+ }
|
|
|
+
|
|
|
+ //大吨位
|
|
|
+ if(Integer.parseInt(carInfo.getLimitLoad()) > 2000){
|
|
|
+ coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 4480;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ //出租车 网约车
|
|
|
+ if(carInfo.getCimodelclass().equals(VehicleType.VT_A0.getCode()) &&
|
|
|
+ carInfo.getVehicleUse().equals(TypeVehicleMapping.TM_01.getCode())){
|
|
|
+ coefficient = Float.parseFloat(insAreaCompany.getJqpremium().toString()) / 1800;
|
|
|
+ }
|
|
|
+
|
|
|
+ return coefficient;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|