|
@@ -11,6 +11,7 @@ import com.ydtech.modules.order.entity.api.bohai.constants.VehicleUsage;
|
|
|
import com.ydtech.modules.order.entity.api.dajia.constants.TypeVehicleMapping;
|
|
import com.ydtech.modules.order.entity.api.dajia.constants.TypeVehicleMapping;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlNewCarJudgeRules;
|
|
import com.ydtech.modules.protocol.entity.po.PtlNewCarJudgeRules;
|
|
|
import com.ydtech.modules.protocols.entity.po.PtlAgreementUndwrtRulesAttr;
|
|
import com.ydtech.modules.protocols.entity.po.PtlAgreementUndwrtRulesAttr;
|
|
|
|
|
+import com.ydtech.utils.StringUtils;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
|
|
|
|
|
@@ -113,44 +114,85 @@ public class RuleAttrMappingVo {
|
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyRenewalOfInsurance", insAreaCompany.getSyRenewal()));
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyRenewalOfInsurance", insAreaCompany.getSyRenewal()));
|
|
|
|
|
|
|
|
CustomerInfoVo ownerInfo = insOrders.getOwnerinfo().toJavaObject(CustomerInfoVo.class);
|
|
CustomerInfoVo ownerInfo = insOrders.getOwnerinfo().toJavaObject(CustomerInfoVo.class);
|
|
|
- //车主 证件号码(前6位)
|
|
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersIDNumber", ownerInfo.getIdentifyNumber()));
|
|
|
|
|
- //车主 年龄
|
|
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersAge", ownerInfo.getAge()));
|
|
|
|
|
- //车主 性别
|
|
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersSex", ownerInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
|
|
+ if(StringUtils.isBlank(ownerInfo.getProperty()) || !"0".equals(ownerInfo.getProperty())) {
|
|
|
|
|
+ //车主 证件号码(前6位)
|
|
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersIDNumber", ownerInfo.getIdentifyNumber()));
|
|
|
|
|
+ //车主 年龄
|
|
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersAge", ownerInfo.getAge()));
|
|
|
|
|
+ //车主 性别
|
|
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersSex", ownerInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
+ }
|
|
|
//车主 姓名
|
|
//车主 姓名
|
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnerName", ownerInfo.getName()));
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnerName", ownerInfo.getName()));
|
|
|
|
|
|
|
|
CustomerInfoVo policyHolderInfo = insOrders.getApplyinfo().toJavaObject(CustomerInfoVo.class);
|
|
CustomerInfoVo policyHolderInfo = insOrders.getApplyinfo().toJavaObject(CustomerInfoVo.class);
|
|
|
- //投保人 证件号码(前6位)
|
|
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantIDNumber", policyHolderInfo.getIdentifyNumber()));
|
|
|
|
|
- //投保人 年龄
|
|
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantAge", policyHolderInfo.getAge()));
|
|
|
|
|
- //投保人 性别
|
|
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantSex", policyHolderInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
|
|
+ if(StringUtils.isBlank(policyHolderInfo.getProperty()) || !"0".equals(policyHolderInfo.getProperty())) {
|
|
|
|
|
+ //投保人 证件号码(前6位)
|
|
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantIDNumber", policyHolderInfo.getIdentifyNumber()));
|
|
|
|
|
+ //投保人 年龄
|
|
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantAge", policyHolderInfo.getAge()));
|
|
|
|
|
+ //投保人 性别
|
|
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantSex", policyHolderInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
CustomerInfoVo insuredPersonInfo = insOrders.getInsureinfo().toJavaObject(CustomerInfoVo.class);
|
|
CustomerInfoVo insuredPersonInfo = insOrders.getInsureinfo().toJavaObject(CustomerInfoVo.class);
|
|
|
- //被保人 证件号码(前6位)
|
|
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredIDNumber", insuredPersonInfo.getIdentifyNumber()));
|
|
|
|
|
- //被保人 年龄
|
|
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredAge", insuredPersonInfo.getAge()));
|
|
|
|
|
- //被保人 性别
|
|
|
|
|
- ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredSex", insuredPersonInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if(StringUtils.isBlank(insuredPersonInfo.getProperty()) || !"0".equals(insuredPersonInfo.getProperty())) {
|
|
|
|
|
+ //被保人 证件号码(前6位)
|
|
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredIDNumber", insuredPersonInfo.getIdentifyNumber()));
|
|
|
|
|
+ //被保人 年龄
|
|
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredAge", insuredPersonInfo.getAge()));
|
|
|
|
|
+ //被保人 性别
|
|
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredSex", insuredPersonInfo.getGender().equals("男") ? "1" : "2"));
|
|
|
|
|
+ }
|
|
|
String OPIConsistent = "0";
|
|
String OPIConsistent = "0";
|
|
|
- //车主 投被保人是否一致
|
|
|
|
|
- if((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
|
|
|
|
|
- (ownerInfo.getIdentifyNumber().equals(insuredPersonInfo.getIdentifyNumber()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber()))){
|
|
|
|
|
- OPIConsistent = "1";
|
|
|
|
|
|
|
+ if(StringUtils.isNotBlank(ownerInfo.getProperty())){
|
|
|
|
|
+ boolean boo = ownerInfo.getProperty().equals(insuredPersonInfo.getProperty()) && insuredPersonInfo.getProperty().equals(policyHolderInfo.getProperty());
|
|
|
|
|
+ if(boo){
|
|
|
|
|
+ if("0".equals(ownerInfo.getProperty())){
|
|
|
|
|
+ if((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
|
|
|
|
|
+ (ownerInfo.getOrganizationCode().equals(insuredPersonInfo.getOrganizationCode()) && insuredPersonInfo.getOrganizationCode().equals(policyHolderInfo.getOrganizationCode()))){
|
|
|
|
|
+ OPIConsistent = "1";
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
|
|
|
|
|
+ (ownerInfo.getIdentifyNumber().equals(insuredPersonInfo.getIdentifyNumber()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber()))){
|
|
|
|
|
+ OPIConsistent = "1";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ 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";
|
|
String PIConsistent = "0";
|
|
|
- //投被保人是否一致
|
|
|
|
|
- if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber())){
|
|
|
|
|
- PIConsistent = "1";
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if(StringUtils.isNotBlank(insuredPersonInfo.getProperty())){
|
|
|
|
|
+ boolean boo = insuredPersonInfo.getProperty().equals(policyHolderInfo.getProperty());
|
|
|
|
|
+ if(boo){
|
|
|
|
|
+ if("0".equals(insuredPersonInfo.getProperty())){
|
|
|
|
|
+ //投被保人是否一致
|
|
|
|
|
+ if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getOrganizationCode().equals(policyHolderInfo.getOrganizationCode())){
|
|
|
|
|
+ PIConsistent = "1";
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ //投被保人是否一致
|
|
|
|
|
+ if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber())){
|
|
|
|
|
+ PIConsistent = "1";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ //投被保人是否一致
|
|
|
|
|
+ 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 起保日期 月份判断
|
|
//2024-06-20 起保日期 月份判断
|