diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCommissionQuote.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCommissionQuote.java
index 91f8d4d80..54405e46c 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCommissionQuote.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisCommissionQuote.java
@@ -59,6 +59,8 @@ public class EmisCommissionQuote extends BaseEntity
private String feeType;
/* 计算类型 票,重量 emis_commission_type */
private String calcType;
+ /* 重量计算方式,1:按照结算重量计算计提,2:按照实际重量计算计提 */
+ private String calcWeightType;
/* 岗位类型:emis_commission_post */
private String postType;
/* 快递类型:emis_biz_shipping_method */
diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java
index c14a4034d..ed7745dea 100644
--- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java
+++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisCommissionProfitServiceImpl.java
@@ -543,8 +543,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
- String transType = waybill.getTransType();
- BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
+ String calcWeightType = quoteItem.getCalcWeightType();
+ BigDecimal usedWeight = ("1".equals(calcWeightType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
@@ -682,8 +682,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
- String transType = waybill.getTransType();
- BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
+ String calcWeightType = quoteItem.getCalcWeightType();
+ BigDecimal usedWeight = ("1".equals(calcWeightType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
@@ -830,8 +830,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算-结算重量
else if ("2".equals(quoteItem.getCalcType())) {
- String transType = waybill.getTransType();
- BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
+ String calcWeightType = quoteItem.getCalcWeightType();
+ BigDecimal usedWeight = ("1".equals(calcWeightType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
@@ -986,8 +986,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
- String transType = waybill.getTransType();
- BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
+ String calcWeightType = quoteItem.getCalcWeightType();
+ BigDecimal usedWeight = ("1".equals(calcWeightType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
@@ -1136,8 +1136,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
- String transType = waybill.getTransType();
- BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
+ String calcWeightType = quoteItem.getCalcWeightType();
+ BigDecimal usedWeight = ("1".equals(calcWeightType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
@@ -1283,8 +1283,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
- String transType = waybill.getTransType();
- BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
+ String calcWeightType = quoteItem.getCalcWeightType();
+ BigDecimal usedWeight = ("1".equals(calcWeightType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
if (isValueInExprScope(usedWeight != null ? usedWeight.doubleValue() : 0.0, exprItem)) {
@@ -1448,8 +1448,8 @@ public class EmisCommissionProfitServiceImpl extends EmisBaseService implements
}
// 重量计算
else if ("2".equals(quoteItem.getCalcType())) {
- String transType = waybill.getTransType();
- BigDecimal usedWeight = ("1".equals(transType) || "2".equals(transType))
+ String calcWeightType = quoteItem.getCalcWeightType();
+ BigDecimal usedWeight = ("1".equals(calcWeightType))
? waybill.getSettlementWeight()
: waybill.getBillWeight();
calcExprStr = calcExp
diff --git a/emis-biz/src/main/resources/mapper/EmisCommissionQuoteMapper.xml b/emis-biz/src/main/resources/mapper/EmisCommissionQuoteMapper.xml
index 23935e561..4259208fa 100644
--- a/emis-biz/src/main/resources/mapper/EmisCommissionQuoteMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisCommissionQuoteMapper.xml
@@ -16,6 +16,7 @@
+
@@ -37,7 +38,7 @@
- select quote_id, quote_code, quote_name, trans_line_code, send_site_code, next_site_code, prod_code, from_country, country, fee_type, calc_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_commission_quote
+ select quote_id, quote_code, quote_name, trans_line_code, send_site_code, next_site_code, prod_code, from_country, country, fee_type, calc_type, calc_weight_type, post_type, trans_type, bl_open, emp_code, emp_name, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_commission_quote
@@ -159,6 +163,7 @@
country,
fee_type,
calc_type,
+ calc_weight_type,
post_type,
trans_type,
bl_open,
@@ -189,6 +194,7 @@
#{country},
#{feeType},
#{calcType},
+ #{calcWeightType},
#{postType},
#{transType},
#{blOpen},
@@ -224,6 +230,7 @@
fee_type = #{feeType},
calc_type = #{calcType},
+ calc_weight_type = #{calcWeightType},
post_type = #{postType},
trans_type = #{transType},
bl_open = #{blOpen},
@@ -281,6 +288,7 @@
and fee_type=#{feeType}
and bl_open=#{blOpen}
and calc_type=#{calcType}
+ and calc_weight_type=#{calcWeightType}
and post_type=#{postType}
and (
trans_type = #{transType}