|
@@ -17,6 +17,7 @@ import com.ydtech.modules.fee.dto.vo.RuleAttrMappingVo;
|
|
|
import com.ydtech.modules.fee.service.FeeRuleSchemeNewService;
|
|
import com.ydtech.modules.fee.service.FeeRuleSchemeNewService;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
|
|
|
+import com.ydtech.modules.order.entity.bo.InsOrdersBo;
|
|
|
import com.ydtech.modules.order.entity.vo.*;
|
|
import com.ydtech.modules.order.entity.vo.*;
|
|
|
import com.ydtech.modules.order.service.InsOrdersService;
|
|
import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreement;
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreement;
|
|
@@ -104,7 +105,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
* 校验费用因子
|
|
* 校验费用因子
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public void verificationCostFactor(InsAreaCompany insAreaCompany,InsOrders insOrders){
|
|
|
|
|
|
|
+ public void verificationCostFactor(InsAreaCompany insAreaCompany, InsOrdersBo insOrders){
|
|
|
|
|
|
|
|
List<AgreementProductCosts> agreementProductCosts = ptlAgreementProductCostsNewService.costsGetList(insAreaCompany.getAgreementId(),insOrders.getProductid());
|
|
List<AgreementProductCosts> agreementProductCosts = ptlAgreementProductCostsNewService.costsGetList(insAreaCompany.getAgreementId(),insOrders.getProductid());
|
|
|
// if(agreementProductCosts == null || agreementProductCosts.size() == 0){
|
|
// if(agreementProductCosts == null || agreementProductCosts.size() == 0){
|
|
@@ -120,7 +121,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
//按优先级进行排序
|
|
//按优先级进行排序
|
|
|
Collections.sort(agreementProductCosts, Comparator.comparingInt(AgreementProductCosts::getPriorityLevel).reversed());
|
|
Collections.sort(agreementProductCosts, Comparator.comparingInt(AgreementProductCosts::getPriorityLevel).reversed());
|
|
|
//遍历费用因子
|
|
//遍历费用因子
|
|
|
- String costsId = verificationCosts(agreementProductCosts, insAreaCompany, insOrders);
|
|
|
|
|
|
|
+ String costsId = verificationCosts(agreementProductCosts, insAreaCompany);
|
|
|
if(costsId != null) {
|
|
if(costsId != null) {
|
|
|
calcCosts(costsId, insAreaCompany);
|
|
calcCosts(costsId, insAreaCompany);
|
|
|
System.out.printf("费用因子校验通过,子订单id:" + insAreaCompany.getId() + ",费用id:" + costsId);
|
|
System.out.printf("费用因子校验通过,子订单id:" + insAreaCompany.getId() + ",费用id:" + costsId);
|
|
@@ -131,14 +132,13 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
/**
|
|
/**
|
|
|
* 校验承保规则
|
|
* 校验承保规则
|
|
|
* @param insAreaCompany
|
|
* @param insAreaCompany
|
|
|
- * @param insOrders
|
|
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public void verificationRuleFactor(InsAreaCompany insAreaCompany, InsOrders insOrders) {
|
|
|
|
|
|
|
+ public void verificationRuleFactor(InsAreaCompany insAreaCompany) {
|
|
|
|
|
|
|
|
|
|
|
|
|
List<PtlAgreementUndwrtRulesNew> ptlAgreementUndwrtRules = ptlAgreementUndwrtRulesNewService.rulesList(insAreaCompany.getAgreementId());
|
|
List<PtlAgreementUndwrtRulesNew> ptlAgreementUndwrtRules = ptlAgreementUndwrtRulesNewService.rulesList(insAreaCompany.getAgreementId());
|
|
|
- verificationRules(ptlAgreementUndwrtRules, insAreaCompany,insOrders);
|
|
|
|
|
|
|
+ verificationRules(ptlAgreementUndwrtRules, insAreaCompany);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -451,14 +451,14 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
* @param insOrders
|
|
* @param insOrders
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- private String verificationCosts(List<AgreementProductCosts> agreementProductCosts,InsAreaCompany insAreaCompany,InsOrders insOrders){
|
|
|
|
|
|
|
+ private String verificationCosts(List<AgreementProductCosts> agreementProductCosts,InsAreaCompany insAreaCompany){
|
|
|
//匹配费用因子
|
|
//匹配费用因子
|
|
|
//获取所有费用属性
|
|
//获取所有费用属性
|
|
|
List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
|
|
List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
|
|
|
//获取新旧车信息
|
|
//获取新旧车信息
|
|
|
PtlNewCarJudgeRules carJudgeRule = getCarJudgeRule(insAreaCompany.getCompanyId());
|
|
PtlNewCarJudgeRules carJudgeRule = getCarJudgeRule(insAreaCompany.getCompanyId());
|
|
|
//获取所有费用属性关联
|
|
//获取所有费用属性关联
|
|
|
- List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(insAreaCompany, insOrders, undwrtRulesAttrList, carJudgeRule);
|
|
|
|
|
|
|
+ List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(insAreaCompany, undwrtRulesAttrList, carJudgeRule);
|
|
|
|
|
|
|
|
// List<AgreementProductCosts> filterAgreementProductCosts = new ArrayList<>();
|
|
// List<AgreementProductCosts> filterAgreementProductCosts = new ArrayList<>();
|
|
|
|
|
|
|
@@ -511,12 +511,12 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- private boolean verificationRules(List<PtlAgreementUndwrtRulesNew> ptlAgreementUndwrtRulesNews,InsAreaCompany insAreaCompany,InsOrders insOrders){
|
|
|
|
|
|
|
+ private boolean verificationRules(List<PtlAgreementUndwrtRulesNew> ptlAgreementUndwrtRulesNews,InsAreaCompany insAreaCompany){
|
|
|
//匹配承保规则
|
|
//匹配承保规则
|
|
|
//获取所有承保规则属性
|
|
//获取所有承保规则属性
|
|
|
List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
|
|
List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
|
|
|
//获取所有费用属性关联
|
|
//获取所有费用属性关联
|
|
|
- List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(insAreaCompany, insOrders, undwrtRulesAttrList,getCarJudgeRule(insAreaCompany.getCompanyId()));
|
|
|
|
|
|
|
+ List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(insAreaCompany, undwrtRulesAttrList,getCarJudgeRule(insAreaCompany.getCompanyId()));
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < ptlAgreementUndwrtRulesNews.size(); i++) {
|
|
for (int i = 0; i < ptlAgreementUndwrtRulesNews.size(); i++) {
|