提成按实际重量

This commit is contained in:
linfso 2025-06-13 09:55:46 +08:00
parent ee672af586
commit 253275cbc2

View File

@ -506,9 +506,9 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
} }
// 重量计算 // 重量计算
else if ("2".equals(quoteItem.getCalcType())) { else if ("2".equals(quoteItem.getCalcType())) {
if( isValueInExprScope(waybill.getSettlementWeight().doubleValue(),exprItem) ){ if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ){
calcExprStr = getCalcFeeExpStr(waybill.getSettlementWeight(),exprItem); calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getSettlementWeight().stripTrailingZeros().toPlainString()); log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString()); profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString());
} }
@ -623,9 +623,9 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
} }
// 重量计算 // 重量计算
else if ("2".equals(quoteItem.getCalcType())) { else if ("2".equals(quoteItem.getCalcType())) {
if( isValueInExprScope(waybill.getSettlementWeight().doubleValue(),exprItem) ) { if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
calcExprStr = getCalcFeeExpStr(waybill.getSettlementWeight(),exprItem); calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getSettlementWeight().stripTrailingZeros().toPlainString()); log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString()); profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString());
} }
@ -879,9 +879,9 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
// 重量计算 // 重量计算
else if ("2".equals(quoteItem.getCalcType())) { else if ("2".equals(quoteItem.getCalcType())) {
if( isValueInExprScope(waybill.getSettlementWeight().doubleValue(),exprItem) ) { if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
calcExprStr = getCalcFeeExpStr(waybill.getSettlementWeight(), exprItem); calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getSettlementWeight().stripTrailingZeros().toPlainString()); log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString()); profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString());
} }
@ -1003,9 +1003,9 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
} }
// 重量计算 // 重量计算
else if ("2".equals(quoteItem.getCalcType())) { else if ("2".equals(quoteItem.getCalcType())) {
if( isValueInExprScope(waybill.getSettlementWeight().doubleValue(),exprItem) ) { if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
calcExprStr = getCalcFeeExpStr(waybill.getSettlementWeight(), exprItem); calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getSettlementWeight().stripTrailingZeros().toPlainString()); log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString()); profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString());
} }
@ -1120,10 +1120,10 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
// 重量计算 // 重量计算
else if ("2".equals(quoteItem.getCalcType())) { else if ("2".equals(quoteItem.getCalcType())) {
if( isValueInExprScope(waybill.getSettlementWeight().doubleValue(),exprItem) ) { if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
calcExprStr = getCalcFeeExpStr(waybill.getSettlementWeight(), exprItem); calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getSettlementWeight().stripTrailingZeros().toPlainString()); log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString()); profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString());
} }
@ -1254,11 +1254,11 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
} }
// 重量计算 // 重量计算
else if ("2".equals(quoteItem.getCalcType())) { else if ("2".equals(quoteItem.getCalcType())) {
calcExprStr = calcExp.replaceAll("w", waybill.getSettlementWeight().stripTrailingZeros().toPlainString()) calcExprStr = calcExp.replaceAll("w", waybill.getBillWeight().stripTrailingZeros().toPlainString())
.replaceAll("s", exprItem.getInitialWeight().toString()) .replaceAll("s", exprItem.getInitialWeight().toString())
.replaceAll("d", exprItem.getAdditionalWeight().toString()); .replaceAll("d", exprItem.getAdditionalWeight().toString());
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getSettlementWeight().stripTrailingZeros().toPlainString()); log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString()); profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExprStr).toString());
} }