增加规则判断
This commit is contained in:
+11
-13
@@ -35,7 +35,7 @@ import com.bms.common.utils.uuid.IdUtils;
|
||||
import com.bms.customer.customerinfo.domain.BmsCustomer;
|
||||
import com.bms.customer.customerinfo.mapper.BmsCustomerMapper;
|
||||
import com.bms.system.mapper.SysUserMapper;
|
||||
// import com.bms.system.service.IBmsBizRuleService;
|
||||
import com.bms.system.service.IBmsBizRuleService;
|
||||
import com.bms.price.domain.PrcIncomeBill;
|
||||
import com.bms.price.domain.PrcIncomeBillFee;
|
||||
import com.bms.price.domain.PrcOrderBill;
|
||||
@@ -143,9 +143,8 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
||||
@Autowired
|
||||
private PrcRecalcBillPriceAsyncRunner recalcBillPriceAsyncRunner;
|
||||
|
||||
// TODO: reopen with three-side / biz weight rules
|
||||
// @Autowired
|
||||
// private IBmsBizRuleService bizRuleService;
|
||||
@Autowired
|
||||
private IBmsBizRuleService bizRuleService;
|
||||
|
||||
private static final int BATCH_ADD_FEE_MAX = 5000;
|
||||
private static final int BATCH_ADD_FEE_PREVIEW_LIMIT = 20;
|
||||
@@ -172,16 +171,15 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
||||
PrcOrderBill existed = orderBillMapper.selectPrcOrderBillByOrderNo(request.getOrderNo());
|
||||
BigDecimal systemWeight = request.getWeight();
|
||||
BigDecimal calcWeight = resolveCalcWeight(existed, systemWeight);
|
||||
// TODO: reopen three-side / biz weight rules later
|
||||
// Manual charge_weight wins; otherwise apply active biz rules (e.g. three-side).
|
||||
// if (!isManualChargeWeight(existed))
|
||||
// {
|
||||
// BigDecimal ruled = bizRuleService.resolveWeightByRule(request, systemWeight);
|
||||
// if (ruled != null)
|
||||
// {
|
||||
// calcWeight = ruled;
|
||||
// }
|
||||
// }
|
||||
if (!isManualChargeWeight(existed))
|
||||
{
|
||||
BigDecimal ruled = bizRuleService.resolveWeightByRule(request, systemWeight);
|
||||
if (ruled != null)
|
||||
{
|
||||
calcWeight = ruled;
|
||||
}
|
||||
}
|
||||
request.setWeight(calcWeight);
|
||||
TmsPriceQuoteResult result = tmsPriceQuoteService.calculate(request);
|
||||
persistBill(request, systemWeight, bizDate, result);
|
||||
|
||||
Reference in New Issue
Block a user