|
|
@@ -19,21 +19,21 @@ public class OrderFeeCalculatePlan1 extends DataFunction {
|
|
|
|
|
|
@Param(paramname = "站点ID", remarks = "站点ID")
|
|
|
String siteid;
|
|
|
- @Param(paramname = "单位费用", remarks = "单位费用(具体一个方案生成的一个单位费用)",sequence = 4)
|
|
|
+ @Param(paramname = "单位费用", remarks = "单位费用(具体一个方案生成的一个单位费用)", sequence = 4)
|
|
|
String unitfee;
|
|
|
- @Param(paramname = "订单类型", remarks = "订单类型(可多个(英文逗号隔开),具体在哪些订单类型中适用)",sequence = 7)
|
|
|
+ @Param(paramname = "订单类型", remarks = "订单类型(可多个(英文逗号隔开),具体在哪些订单类型中适用)", sequence = 7)
|
|
|
String ordertype;
|
|
|
- @Param(paramname = "是否订单内组合计算", remarks = "是否订单内组合计算(若组合计算则在订单中自动汇总同方案商品一起计算)",sequence = 5)
|
|
|
+ @Param(paramname = "是否订单内组合计算", remarks = "是否订单内组合计算(若组合计算则在订单中自动汇总同方案商品一起计算)", sequence = 5)
|
|
|
String iscombination;
|
|
|
- @Param(paramname = "是否累加计算", remarks = "是否累加计算(若累加计算则订单内满足时则生成费用)",sequence = 2)
|
|
|
+ @Param(paramname = "是否累加计算", remarks = "是否累加计算(若累加计算则订单内满足时则生成费用)", sequence = 2)
|
|
|
String isaccumulation;
|
|
|
- @Param(paramname = "分摊方式", remarks = "分摊方式(订货数量/订货金额,在组合计算方式下,在订单中同费用方案商品明细行中按比例分摊)",sequence = 6)
|
|
|
+ @Param(paramname = "分摊方式", remarks = "分摊方式(订货数量/订货金额,在组合计算方式下,在订单中同费用方案商品明细行中按比例分摊)", sequence = 6)
|
|
|
String apportiontype;
|
|
|
- @Param(paramname = "计算依据", remarks = "计算依据(订货数量、订货重量、订货金额)",sequence = 1)
|
|
|
+ @Param(paramname = "计算依据", remarks = "计算依据(订货数量、订货重量、订货金额)", sequence = 1)
|
|
|
String itemfield;
|
|
|
@Param(paramname = "满足条件", remarks = "满足条件(数值,大于等于某个值时产生费用)")
|
|
|
String condition;
|
|
|
- @Param(paramname = "数值", remarks = "数值(数值,大于等于某个值时产生费用)",sequence = 3)
|
|
|
+ @Param(paramname = "数值", remarks = "数值(数值,大于等于某个值时产生费用)", sequence = 3)
|
|
|
String value;
|
|
|
// @Param(paramname = "是否独立扣款", issystem = true, remarks = "是否独立扣款(独立扣款则在生成订单收支凭证时费用,若生成独立的支出凭证则需再选择支出分类)")
|
|
|
// String ispay;
|
|
|
@@ -176,16 +176,16 @@ public class OrderFeeCalculatePlan1 extends DataFunction {
|
|
|
}
|
|
|
|
|
|
public BigDecimal getTotalprice(BigDecimal bdValue, BigDecimal bdUnitfee, BigDecimal itemFieldValue, String condition, String isaccumulation) {
|
|
|
- if (itemFieldValue.compareTo(bdValue) <= 0
|
|
|
+ if (itemFieldValue.compareTo(bdValue) < 0
|
|
|
&& (condition.equals("1") || condition.equals("2"))) {
|
|
|
return bdUnitfee;
|
|
|
}
|
|
|
- if (itemFieldValue.compareTo(bdValue) >= 0
|
|
|
+ if (itemFieldValue.compareTo(bdValue) > 0
|
|
|
&& (condition.equals("5") || condition.equals("4"))) {
|
|
|
return bdUnitfee;
|
|
|
}
|
|
|
//数量,大于
|
|
|
- if ( condition.equals("3") ) {
|
|
|
+ if (itemFieldValue.compareTo(bdValue) == 0 && condition.equals("3")) {
|
|
|
//累加
|
|
|
BigDecimal scale = itemFieldValue.divide(bdValue, 0, BigDecimal.ROUND_HALF_UP);
|
|
|
return bdUnitfee.multiply(scale);
|