零售或销售单价低于最低售价,进行提示
This commit is contained in:
@@ -382,6 +382,9 @@ public class ExceptionConstants {
|
|||||||
//单据录入-累计订金超出原订单中的订金
|
//单据录入-累计订金超出原订单中的订金
|
||||||
public static final int DEPOT_HEAD_DEPOSIT_OVER_PRE_CODE = 8000017;
|
public static final int DEPOT_HEAD_DEPOSIT_OVER_PRE_CODE = 8000017;
|
||||||
public static final String DEPOT_HEAD_DEPOSIT_OVER_PRE_MSG = "抱歉,累计订金超出原订单中的订金";
|
public static final String DEPOT_HEAD_DEPOSIT_OVER_PRE_MSG = "抱歉,累计订金超出原订单中的订金";
|
||||||
|
//单据录入-商品条码XXX的单价低于最低售价
|
||||||
|
public static final int DEPOT_HEAD_UNIT_PRICE_LOW_CODE = 8000018;
|
||||||
|
public static final String DEPOT_HEAD_UNIT_PRICE_LOW_MSG = "商品条码%s的单价低于最低售价";
|
||||||
/**
|
/**
|
||||||
* 单据明细信息
|
* 单据明细信息
|
||||||
* type = 90
|
* type = 90
|
||||||
|
|||||||
@@ -486,7 +486,17 @@ public class DepotItemService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtil.isExist(rowObj.get("unitPrice"))) {
|
if (StringUtil.isExist(rowObj.get("unitPrice"))) {
|
||||||
depotItem.setUnitPrice(rowObj.getBigDecimal("unitPrice"));
|
BigDecimal unitPrice = rowObj.getBigDecimal("unitPrice");
|
||||||
|
depotItem.setUnitPrice(unitPrice);
|
||||||
|
if(materialExtend.getLowDecimal()!=null) {
|
||||||
|
//零售或销售单价低于最低售价,进行提示
|
||||||
|
if("零售".equals(depotHead.getSubType()) || "销售".equals(depotHead.getSubType())) {
|
||||||
|
if (unitPrice.compareTo(materialExtend.getLowDecimal()) < 0) {
|
||||||
|
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_UNIT_PRICE_LOW_CODE,
|
||||||
|
String.format(ExceptionConstants.DEPOT_HEAD_UNIT_PRICE_LOW_MSG, barCode));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (StringUtil.isExist(rowObj.get("taxUnitPrice"))) {
|
if (StringUtil.isExist(rowObj.get("taxUnitPrice"))) {
|
||||||
depotItem.setTaxUnitPrice(rowObj.getBigDecimal("taxUnitPrice"));
|
depotItem.setTaxUnitPrice(rowObj.getBigDecimal("taxUnitPrice"));
|
||||||
|
|||||||
Reference in New Issue
Block a user