增加规则配置
This commit is contained in:
+15
@@ -35,6 +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.price.domain.PrcIncomeBill;
|
||||
import com.bms.price.domain.PrcIncomeBillFee;
|
||||
import com.bms.price.domain.PrcOrderBill;
|
||||
@@ -142,6 +143,10 @@ public class PrcOrderBillServiceImpl implements IPrcOrderBillService
|
||||
@Autowired
|
||||
private PrcRecalcBillPriceAsyncRunner recalcBillPriceAsyncRunner;
|
||||
|
||||
// TODO: reopen with three-side / biz weight rules
|
||||
// @Autowired
|
||||
// private IBmsBizRuleService bizRuleService;
|
||||
|
||||
private static final int BATCH_ADD_FEE_MAX = 5000;
|
||||
private static final int BATCH_ADD_FEE_PREVIEW_LIMIT = 20;
|
||||
private static final int CHARGE_WEIGHT_IMPORT_MAX = 5000;
|
||||
@@ -167,6 +172,16 @@ 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;
|
||||
// }
|
||||
// }
|
||||
request.setWeight(calcWeight);
|
||||
TmsPriceQuoteResult result = tmsPriceQuoteService.calculate(request);
|
||||
persistBill(request, systemWeight, bizDate, result);
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 公共业务附件 bms_biz_attachment
|
||||
* 公共业务附件 biz_attachment
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.bms.system.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.bms.common.annotation.Excel;
|
||||
import com.bms.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 业务规则配置 biz_rule(产品/国家/客户维度)
|
||||
*/
|
||||
public class BmsBizRule extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long ruleId;
|
||||
|
||||
/** 规则名称 */
|
||||
@Excel(name = "规则名称")
|
||||
private String ruleName;
|
||||
|
||||
/** 规则类型(字典 bms_biz_rule_type) */
|
||||
@Excel(name = "规则类型")
|
||||
private String ruleType;
|
||||
|
||||
/** 产品代码(空=全部) */
|
||||
@Excel(name = "产品")
|
||||
private String productCode;
|
||||
|
||||
/** 国家ISO2(空=全部) */
|
||||
@Excel(name = "国家")
|
||||
private String countryCode;
|
||||
|
||||
/** 客户代码(空=全部) */
|
||||
@Excel(name = "客户")
|
||||
private String customerCode;
|
||||
|
||||
/** 重量段最小KG(含) */
|
||||
private BigDecimal weightMin;
|
||||
|
||||
/** 重量段最大KG(含) */
|
||||
private BigDecimal weightMax;
|
||||
|
||||
/** 取值字段(字典 bms_biz_weight_source) */
|
||||
@Excel(name = "取值字段")
|
||||
private String weightSource;
|
||||
|
||||
/** 三边和上限(三边规则) */
|
||||
private BigDecimal sideSumMax;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
private String status;
|
||||
|
||||
private String delFlag;
|
||||
|
||||
/** 新增时多产品展开(非表字段) */
|
||||
private List<String> productCodes;
|
||||
/** 新增时多国家展开(非表字段) */
|
||||
private List<String> countryCodes;
|
||||
/** 新增时多客户展开(非表字段) */
|
||||
private List<String> customerCodes;
|
||||
|
||||
public Long getRuleId() { return ruleId; }
|
||||
public void setRuleId(Long ruleId) { this.ruleId = ruleId; }
|
||||
public String getRuleName() { return ruleName; }
|
||||
public void setRuleName(String ruleName) { this.ruleName = ruleName; }
|
||||
public String getRuleType() { return ruleType; }
|
||||
public void setRuleType(String ruleType) { this.ruleType = ruleType; }
|
||||
public String getProductCode() { return productCode; }
|
||||
public void setProductCode(String productCode) { this.productCode = productCode; }
|
||||
public String getCountryCode() { return countryCode; }
|
||||
public void setCountryCode(String countryCode) { this.countryCode = countryCode; }
|
||||
public String getCustomerCode() { return customerCode; }
|
||||
public void setCustomerCode(String customerCode) { this.customerCode = customerCode; }
|
||||
public BigDecimal getWeightMin() { return weightMin; }
|
||||
public void setWeightMin(BigDecimal weightMin) { this.weightMin = weightMin; }
|
||||
public BigDecimal getWeightMax() { return weightMax; }
|
||||
public void setWeightMax(BigDecimal weightMax) { this.weightMax = weightMax; }
|
||||
public String getWeightSource() { return weightSource; }
|
||||
public void setWeightSource(String weightSource) { this.weightSource = weightSource; }
|
||||
public BigDecimal getSideSumMax() { return sideSumMax; }
|
||||
public void setSideSumMax(BigDecimal sideSumMax) { this.sideSumMax = sideSumMax; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public String getDelFlag() { return delFlag; }
|
||||
public void setDelFlag(String delFlag) { this.delFlag = delFlag; }
|
||||
public List<String> getProductCodes() { return productCodes; }
|
||||
public void setProductCodes(List<String> productCodes) { this.productCodes = productCodes; }
|
||||
public List<String> getCountryCodes() { return countryCodes; }
|
||||
public void setCountryCodes(List<String> countryCodes) { this.countryCodes = countryCodes; }
|
||||
public List<String> getCustomerCodes() { return customerCodes; }
|
||||
public void setCustomerCodes(List<String> customerCodes) { this.customerCodes = customerCodes; }
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("ruleId", getRuleId())
|
||||
.append("ruleName", getRuleName())
|
||||
.append("ruleType", getRuleType())
|
||||
.append("productCode", getProductCode())
|
||||
.append("countryCode", getCountryCode())
|
||||
.append("customerCode", getCustomerCode())
|
||||
.append("weightMin", getWeightMin())
|
||||
.append("weightMax", getWeightMax())
|
||||
.append("weightSource", getWeightSource())
|
||||
.append("sideSumMax", getSideSumMax())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.bms.system.mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.bms.system.domain.BmsBizRule;
|
||||
|
||||
public interface BmsBizRuleMapper
|
||||
{
|
||||
List<BmsBizRule> selectList(BmsBizRule query);
|
||||
|
||||
BmsBizRule selectById(Long ruleId);
|
||||
|
||||
List<BmsBizRule> selectActiveByType(String ruleType);
|
||||
|
||||
int countByDim(@Param("ruleType") String ruleType,
|
||||
@Param("productCode") String productCode,
|
||||
@Param("countryCode") String countryCode,
|
||||
@Param("customerCode") String customerCode,
|
||||
@Param("weightMin") BigDecimal weightMin,
|
||||
@Param("weightMax") BigDecimal weightMax,
|
||||
@Param("excludeId") Long excludeId);
|
||||
|
||||
int insert(BmsBizRule row);
|
||||
|
||||
int update(BmsBizRule row);
|
||||
|
||||
int deleteByIds(Long[] ruleIds);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.bms.system.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import com.bms.system.domain.BmsBizRule;
|
||||
import com.bms.price.domain.vo.TmsPriceBillRequest;
|
||||
|
||||
/**
|
||||
* 业务规则配置
|
||||
*/
|
||||
public interface IBmsBizRuleService
|
||||
{
|
||||
List<BmsBizRule> selectList(BmsBizRule query);
|
||||
|
||||
BmsBizRule selectById(Long ruleId);
|
||||
|
||||
int insert(BmsBizRule row);
|
||||
|
||||
int update(BmsBizRule row);
|
||||
|
||||
int deleteByIds(Long[] ruleIds);
|
||||
|
||||
/**
|
||||
* Apply active weight rules to bill request.
|
||||
* @return overridden weight when a rule matches; null when no rule applies
|
||||
*/
|
||||
BigDecimal resolveWeightByRule(TmsPriceBillRequest request, BigDecimal systemWeight);
|
||||
}
|
||||
+383
@@ -0,0 +1,383 @@
|
||||
package com.bms.system.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.bms.common.exception.ServiceException;
|
||||
import com.bms.common.utils.StringUtils;
|
||||
import com.bms.price.domain.vo.TmsPriceBillRequest;
|
||||
import com.bms.system.domain.BmsBizRule;
|
||||
import com.bms.system.mapper.BmsBizRuleMapper;
|
||||
import com.bms.system.service.IBmsBizRuleService;
|
||||
import com.bms.system.service.IBmsProductCodeMappingService;
|
||||
|
||||
@Service
|
||||
public class BmsBizRuleServiceImpl implements IBmsBizRuleService
|
||||
{
|
||||
public static final String RULE_TYPE_THREE_SIDE = "THREE_SIDE";
|
||||
public static final String WEIGHT_SOURCE_RECEIVE = "RECEIVE_WEIGHT";
|
||||
public static final String WEIGHT_SOURCE_CHARGE = "CHARGE_WEIGHT";
|
||||
|
||||
@Autowired
|
||||
private BmsBizRuleMapper bizRuleMapper;
|
||||
|
||||
@Autowired
|
||||
private IBmsProductCodeMappingService productCodeMappingService;
|
||||
|
||||
@Override
|
||||
public List<BmsBizRule> selectList(BmsBizRule query)
|
||||
{
|
||||
return bizRuleMapper.selectList(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BmsBizRule selectById(Long ruleId)
|
||||
{
|
||||
return bizRuleMapper.selectById(ruleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insert(BmsBizRule row)
|
||||
{
|
||||
normalizeHeader(row);
|
||||
validateHeader(row);
|
||||
if (StringUtils.isEmpty(row.getStatus()))
|
||||
{
|
||||
row.setStatus("0");
|
||||
}
|
||||
List<String> products = dimValues(row.getProductCodes(), row.getProductCode());
|
||||
List<String> countries = dimValues(row.getCountryCodes(), row.getCountryCode());
|
||||
List<String> customers = dimValues(row.getCustomerCodes(), row.getCustomerCode());
|
||||
int n = 0;
|
||||
for (String product : products)
|
||||
{
|
||||
for (String country : countries)
|
||||
{
|
||||
for (String customer : customers)
|
||||
{
|
||||
BmsBizRule one = copyBase(row);
|
||||
one.setProductCode(product);
|
||||
one.setCountryCode(country);
|
||||
one.setCustomerCode(customer);
|
||||
assertUnique(one, null);
|
||||
n += bizRuleMapper.insert(one);
|
||||
}
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(BmsBizRule row)
|
||||
{
|
||||
if (row.getRuleId() == null)
|
||||
{
|
||||
throw new ServiceException("ruleId required");
|
||||
}
|
||||
normalizeHeader(row);
|
||||
validateHeader(row);
|
||||
// edit: single dimension row
|
||||
if (row.getProductCodes() != null && !row.getProductCodes().isEmpty())
|
||||
{
|
||||
row.setProductCode(normalizeCode(row.getProductCodes().get(0)));
|
||||
}
|
||||
else
|
||||
{
|
||||
row.setProductCode(normalizeCode(row.getProductCode()));
|
||||
}
|
||||
if (row.getCountryCodes() != null && !row.getCountryCodes().isEmpty())
|
||||
{
|
||||
row.setCountryCode(normalizeCode(row.getCountryCodes().get(0)));
|
||||
}
|
||||
else
|
||||
{
|
||||
row.setCountryCode(normalizeCode(row.getCountryCode()));
|
||||
}
|
||||
if (row.getCustomerCodes() != null && !row.getCustomerCodes().isEmpty())
|
||||
{
|
||||
row.setCustomerCode(normalizeCode(row.getCustomerCodes().get(0)));
|
||||
}
|
||||
else
|
||||
{
|
||||
row.setCustomerCode(normalizeCode(row.getCustomerCode()));
|
||||
}
|
||||
assertUnique(row, row.getRuleId());
|
||||
return bizRuleMapper.update(row);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByIds(Long[] ruleIds)
|
||||
{
|
||||
return bizRuleMapper.deleteByIds(ruleIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal resolveWeightByRule(TmsPriceBillRequest request, BigDecimal systemWeight)
|
||||
{
|
||||
if (request == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<BmsBizRule> rules = bizRuleMapper.selectActiveByType(RULE_TYPE_THREE_SIDE);
|
||||
if (rules == null || rules.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (BmsBizRule rule : rules)
|
||||
{
|
||||
if (matchThreeSide(rule, request, systemWeight))
|
||||
{
|
||||
return pickWeight(rule.getWeightSource(), request, systemWeight);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void assertUnique(BmsBizRule row, Long excludeId)
|
||||
{
|
||||
int cnt = bizRuleMapper.countByDim(row.getRuleType(), row.getProductCode(), row.getCountryCode(),
|
||||
row.getCustomerCode(), row.getWeightMin(), row.getWeightMax(), excludeId);
|
||||
if (cnt > 0)
|
||||
{
|
||||
throw new ServiceException("同维度规则已存在(产品/国家/客户/重量段)");
|
||||
}
|
||||
}
|
||||
|
||||
private static BmsBizRule copyBase(BmsBizRule row)
|
||||
{
|
||||
BmsBizRule one = new BmsBizRule();
|
||||
one.setRuleName(row.getRuleName());
|
||||
one.setRuleType(row.getRuleType());
|
||||
one.setWeightMin(row.getWeightMin());
|
||||
one.setWeightMax(row.getWeightMax());
|
||||
one.setWeightSource(row.getWeightSource());
|
||||
one.setSideSumMax(row.getSideSumMax());
|
||||
one.setStatus(row.getStatus());
|
||||
one.setRemark(row.getRemark());
|
||||
one.setCreateBy(row.getCreateBy());
|
||||
return one;
|
||||
}
|
||||
|
||||
/** empty list / blank => one null dimension (means all) */
|
||||
private static List<String> dimValues(List<String> list, String single)
|
||||
{
|
||||
Set<String> set = new LinkedHashSet<String>();
|
||||
if (list != null)
|
||||
{
|
||||
for (String s : list)
|
||||
{
|
||||
String c = normalizeCode(s);
|
||||
if (c != null)
|
||||
{
|
||||
set.add(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (set.isEmpty())
|
||||
{
|
||||
String c = normalizeCode(single);
|
||||
if (c != null)
|
||||
{
|
||||
set.add(c);
|
||||
}
|
||||
}
|
||||
if (set.isEmpty())
|
||||
{
|
||||
return Collections.singletonList(null);
|
||||
}
|
||||
return new ArrayList<String>(set);
|
||||
}
|
||||
|
||||
private boolean matchThreeSide(BmsBizRule rule, TmsPriceBillRequest request, BigDecimal systemWeight)
|
||||
{
|
||||
if (rule == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!dimMatch(request.getProductCode(), rule.getProductCode(), true))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!dimMatch(request.getCountryCode(), rule.getCountryCode(), false))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!dimMatch(request.getCustomerCode(), rule.getCustomerCode(), false))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
BigDecimal checkWeight = firstPositive(request.getReceiveWeight(), systemWeight, request.getWeight());
|
||||
if (!inWeightRange(checkWeight, rule.getWeightMin(), rule.getWeightMax()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (rule.getSideSumMax() != null)
|
||||
{
|
||||
BigDecimal sum = sideSum(request);
|
||||
if (sum == null || sum.compareTo(rule.getSideSumMax()) >= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean dimMatch(String requestCode, String ruleCode, boolean tryProductMap)
|
||||
{
|
||||
if (StringUtils.isEmpty(ruleCode))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (StringUtils.isEmpty(requestCode))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
String req = requestCode.trim().toUpperCase(Locale.ROOT);
|
||||
String rule = ruleCode.trim().toUpperCase(Locale.ROOT);
|
||||
if (req.equals(rule))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (tryProductMap)
|
||||
{
|
||||
String mapped = productCodeMappingService.resolveBmsProductCode(requestCode);
|
||||
return mapped != null && mapped.trim().toUpperCase(Locale.ROOT).equals(rule);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static BigDecimal pickWeight(String weightSource, TmsPriceBillRequest request, BigDecimal systemWeight)
|
||||
{
|
||||
if (WEIGHT_SOURCE_RECEIVE.equalsIgnoreCase(weightSource))
|
||||
{
|
||||
BigDecimal rw = firstPositive(request.getReceiveWeight(), request.getActualWeight());
|
||||
return rw != null ? rw : systemWeight;
|
||||
}
|
||||
if (WEIGHT_SOURCE_CHARGE.equalsIgnoreCase(weightSource))
|
||||
{
|
||||
return systemWeight != null ? systemWeight : request.getWeight();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static boolean inWeightRange(BigDecimal weight, BigDecimal min, BigDecimal max)
|
||||
{
|
||||
if (min == null && max == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (weight == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (min != null && weight.compareTo(min) < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (max != null && weight.compareTo(max) > 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static BigDecimal sideSum(TmsPriceBillRequest request)
|
||||
{
|
||||
BigDecimal l = nzDim(request.getPkgLength());
|
||||
BigDecimal w = nzDim(request.getPkgWidth());
|
||||
BigDecimal h = nzDim(request.getPkgHeight());
|
||||
if (l == null || w == null || h == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return l.add(w).add(h);
|
||||
}
|
||||
|
||||
private static BigDecimal nzDim(BigDecimal v)
|
||||
{
|
||||
if (v == null || v.compareTo(BigDecimal.ZERO) <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
private static BigDecimal firstPositive(BigDecimal... vals)
|
||||
{
|
||||
if (vals == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (BigDecimal v : vals)
|
||||
{
|
||||
if (v != null && v.compareTo(BigDecimal.ZERO) > 0)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void normalizeHeader(BmsBizRule row)
|
||||
{
|
||||
if (row.getRuleName() != null)
|
||||
{
|
||||
row.setRuleName(row.getRuleName().trim());
|
||||
}
|
||||
if (row.getRuleType() != null)
|
||||
{
|
||||
row.setRuleType(row.getRuleType().trim().toUpperCase(Locale.ROOT));
|
||||
}
|
||||
if (row.getWeightSource() != null)
|
||||
{
|
||||
row.setWeightSource(row.getWeightSource().trim().toUpperCase(Locale.ROOT));
|
||||
}
|
||||
}
|
||||
|
||||
private static String normalizeCode(String code)
|
||||
{
|
||||
if (code == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
String t = code.trim();
|
||||
if (t.isEmpty())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return t.toUpperCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
private void validateHeader(BmsBizRule row)
|
||||
{
|
||||
if (StringUtils.isEmpty(row.getRuleName()))
|
||||
{
|
||||
throw new ServiceException("规则名称不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(row.getRuleType()))
|
||||
{
|
||||
throw new ServiceException("规则类型不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(row.getWeightSource()))
|
||||
{
|
||||
throw new ServiceException("取值字段不能为空");
|
||||
}
|
||||
if (RULE_TYPE_THREE_SIDE.equalsIgnoreCase(row.getRuleType()) && row.getSideSumMax() == null)
|
||||
{
|
||||
throw new ServiceException("三边规则必须填写三边和上限");
|
||||
}
|
||||
if (row.getWeightMin() != null && row.getWeightMax() != null
|
||||
&& row.getWeightMin().compareTo(row.getWeightMax()) > 0)
|
||||
{
|
||||
throw new ServiceException("重量段最小值不能大于最大值");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user