|
@@ -24,6 +24,7 @@ import com.ydtech.modules.fee.service.FeeRuleSchemeNewService;
|
|
|
import com.ydtech.modules.fee.service.FeeRuleSchemeService;
|
|
import com.ydtech.modules.fee.service.FeeRuleSchemeService;
|
|
|
import com.ydtech.modules.fee.service.InsFeeOrderConfigService;
|
|
import com.ydtech.modules.fee.service.InsFeeOrderConfigService;
|
|
|
import com.ydtech.modules.fee.service.InsFeeOrderNewHistoryService;
|
|
import com.ydtech.modules.fee.service.InsFeeOrderNewHistoryService;
|
|
|
|
|
+import com.ydtech.modules.ins.model.vo.QuoteRespVo;
|
|
|
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.api.dajia.constants.TypeVehicleMapping;
|
|
import com.ydtech.modules.order.entity.api.dajia.constants.TypeVehicleMapping;
|
|
@@ -137,7 +138,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
* 校验费用因子
|
|
* 校验费用因子
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public void verificationCostFactor(InsAreaCompany insAreaCompany, InsOrders insOrders, StringBuilder logs) {
|
|
|
|
|
|
|
+ public void verificationCostFactor(QuoteRespVo quoteRespVo, InsAreaCompany insAreaCompany, InsOrders insOrders, StringBuilder logs) {
|
|
|
|
|
|
|
|
List<AgreementProductCosts> agreementProductCostsNoMatched =
|
|
List<AgreementProductCosts> agreementProductCostsNoMatched =
|
|
|
ptlAgreementProductCostsNewService.costsGetList(insAreaCompany.getAgreementId(), insAreaCompany.getProductid());
|
|
ptlAgreementProductCostsNewService.costsGetList(insAreaCompany.getAgreementId(), insAreaCompany.getProductid());
|
|
@@ -195,7 +196,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
//按优先级进行排序
|
|
//按优先级进行排序
|
|
|
Collections.sort(agreementProductCosts, Comparator.comparingInt(AgreementProductCosts::getPriorityLevel));
|
|
Collections.sort(agreementProductCosts, Comparator.comparingInt(AgreementProductCosts::getPriorityLevel));
|
|
|
//遍历费用因子
|
|
//遍历费用因子
|
|
|
- String costsId = verificationCosts(agreementProductCosts, insAreaCompany, insOrders, logs);
|
|
|
|
|
|
|
+ String costsId = verificationCosts(agreementProductCosts, quoteRespVo, insAreaCompany, insOrders, logs);
|
|
|
if (costsId != null) {
|
|
if (costsId != null) {
|
|
|
calcCosts(costsId, insAreaCompany);
|
|
calcCosts(costsId, insAreaCompany);
|
|
|
log.debug("费用因子校验通过,子订单id:" + insAreaCompany.getId() + ",费用id:" + costsId);
|
|
log.debug("费用因子校验通过,子订单id:" + insAreaCompany.getId() + ",费用id:" + costsId);
|
|
@@ -2786,7 +2787,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
* @param insOrders
|
|
* @param insOrders
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- private String verificationCosts(List<AgreementProductCosts> agreementProductCosts, InsAreaCompany insAreaCompany,
|
|
|
|
|
|
|
+ private String verificationCosts(List<AgreementProductCosts> agreementProductCosts, QuoteRespVo quoteRespVo, InsAreaCompany insAreaCompany,
|
|
|
InsOrders insOrders, StringBuilder logs) {
|
|
InsOrders insOrders, StringBuilder logs) {
|
|
|
//匹配费用因子
|
|
//匹配费用因子
|
|
|
//获取所有费用属性
|
|
//获取所有费用属性
|
|
@@ -2794,7 +2795,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
//获取新旧车信息
|
|
//获取新旧车信息
|
|
|
PtlNewCarJudgeRules carJudgeRule = getCarJudgeRule(insAreaCompany.getCompanyId());
|
|
PtlNewCarJudgeRules carJudgeRule = getCarJudgeRule(insAreaCompany.getCompanyId());
|
|
|
//获取所有费用属性关联
|
|
//获取所有费用属性关联
|
|
|
- List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(insAreaCompany, insOrders,
|
|
|
|
|
|
|
+ List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(quoteRespVo, insAreaCompany, insOrders,
|
|
|
undwrtRulesAttrList, carJudgeRule);
|
|
undwrtRulesAttrList, carJudgeRule);
|
|
|
|
|
|
|
|
for (int i = 0; i < agreementProductCosts.size(); i++) {
|
|
for (int i = 0; i < agreementProductCosts.size(); i++) {
|
|
@@ -2824,7 +2825,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
//获取所有承保规则属性
|
|
//获取所有承保规则属性
|
|
|
List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
|
|
List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
|
|
|
//获取所有费用属性关联
|
|
//获取所有费用属性关联
|
|
|
- List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(insAreaCompany, insOrders,
|
|
|
|
|
|
|
+ List<RuleAttrMappingVo> ruleAttrMappingVoList = RuleAttrMappingVo.getRuleAttrMappingVoList(null,insAreaCompany, insOrders,
|
|
|
undwrtRulesAttrList, getCarJudgeRule(insAreaCompany.getCompanyId()));
|
|
undwrtRulesAttrList, getCarJudgeRule(insAreaCompany.getCompanyId()));
|
|
|
|
|
|
|
|
|
|
|