Merge pull request 'develop' (#124) from develop into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/124
This commit is contained in:
heyu 2025-07-19 10:16:47 +08:00
commit 5d89b4becf
3 changed files with 74 additions and 43 deletions

View File

@ -54,7 +54,7 @@ public class EmisTransProductController extends EmisBaseController
/**
* 查询运输产品类型列表
*/
@PreAuthorize("@ss.hasPermi('emis:emisTransProduct:list')")
// @PreAuthorize("@ss.hasPermi('emis:emisTransProduct:list')")
@GetMapping("/list")
public TableDataInfo list(EmisTransProduct emisTransProduct)
{

View File

@ -11,10 +11,7 @@
package com.xdadan.erp.emis.service.impl;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@ -546,14 +543,19 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ){
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString());
String transType = waybill.getTransType();
BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
+ (usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0"));
Map<String, Object> env = new HashMap<>();
env.put("w", waybill.getBillWeight());
env.put("w", usedWeight);
env.put("s", exprItem.getInitialWeight());
env.put("d", exprItem.getAdditionalWeight());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
}
}
@ -680,14 +682,19 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString());
String transType = waybill.getTransType();
BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
+ (usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0"));
Map<String, Object> env = new HashMap<>();
env.put("w", waybill.getBillWeight());
env.put("w", usedWeight);
env.put("s", exprItem.getInitialWeight());
env.put("d", exprItem.getAdditionalWeight());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
}
}
@ -823,15 +830,19 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算-结算重量
else if ("2".equals(quoteItem.getCalcType())) {
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(),exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:" + waybill.getBillWeight().stripTrailingZeros().toPlainString());
String transType = waybill.getTransType();
BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
+ (usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0"));
Map<String, Object> env = new HashMap<>();
env.put("w", waybill.getBillWeight());
env.put("w", usedWeight);
env.put("s", exprItem.getInitialWeight());
env.put("d", exprItem.getAdditionalWeight());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
}
}
@ -975,16 +986,20 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
String transType = waybill.getTransType();
BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
+ waybill.getBillWeight().stripTrailingZeros().toPlainString());
Map<String, Object> env = new HashMap<>();
env.put("w", waybill.getBillWeight());
env.put("w", usedWeight);
env.put("s", exprItem.getInitialWeight());
env.put("d", exprItem.getAdditionalWeight());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
}
}
@ -1121,16 +1136,21 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
String transType = waybill.getTransType();
BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
+ waybill.getBillWeight().stripTrailingZeros().toPlainString());
Map<String, Object> env = new HashMap<>();
env.put("w", waybill.getBillWeight());
env.put("w", usedWeight);
env.put("s", exprItem.getInitialWeight());
env.put("d", exprItem.getAdditionalWeight());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
}
@ -1263,18 +1283,22 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
String transType = waybill.getTransType();
BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
calcExprStr = getCalcFeeExpStr(usedWeight, exprItem);
if( isValueInExprScope(waybill.getBillWeight().doubleValue(),exprItem) ) {
calcExprStr = getCalcFeeExpStr(waybill.getBillWeight(), exprItem);
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
+ waybill.getBillWeight().stripTrailingZeros().toPlainString());
Map<String, Object> env = new HashMap<>();
env.put("w", waybill.getBillWeight());
env.put("w", usedWeight);
env.put("s", exprItem.getInitialWeight());
env.put("d", exprItem.getAdditionalWeight());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
}
@ -1424,18 +1448,25 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
calcExprStr = calcExp.replaceAll("w", waybill.getBillWeight().stripTrailingZeros().toPlainString())
String transType = waybill.getTransType();
BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
calcExprStr = calcExp
.replaceAll("w",
usedWeight != null ? usedWeight.stripTrailingZeros().toPlainString() : "0")
.replaceAll("s", exprItem.getInitialWeight().toString())
.replaceAll("d", exprItem.getAdditionalWeight().toString());
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"+waybill.getBillWeight().stripTrailingZeros().toPlainString());
log.info("按重量计算:计算公式:" + calcExprStr + ",重量:"
+ waybill.getBillWeight().stripTrailingZeros().toPlainString());
Map<String, Object> env = new HashMap<>();
env.put("w", waybill.getBillWeight());
env.put("w", usedWeight);
env.put("s", exprItem.getInitialWeight());
env.put("d", exprItem.getAdditionalWeight());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp,env).toString());
profitMoney = Double.valueOf(AviatorEvaluator.execute(calcExp, env).toString());
}
// 体积计算

View File

@ -1300,7 +1300,7 @@
<if test="paymentRemark != null and paymentRemark != ''"> and payment_remark like concat('%', #{paymentRemark}, '%')</if>
<if test="orderRemark != null and orderRemark != ''"> and order_remark like concat('%', #{orderRemark}, '%')</if>
<if test="sendSiteCode != null and sendSiteCode != ''">and (a.send_site_code=#{params.privSiteCode} or a.start_site_code=#{params.privSiteCode})
<if test="sendSiteCode != null and sendSiteCode != ''">and (a.send_site_code=#{sendSiteCode} or a.start_site_code=#{sendSiteCode})
</if>
<if test="remark != null and remark != ''"> and a.remark like concat('%', #{remark}, '%')</if>