Commit f47cfbb7 authored by 季圣华's avatar 季圣华
Browse files

给盘点增加商品选择的过滤

parent d01bc132
......@@ -92,6 +92,7 @@ public class BusinessConstants {
public static final String SUB_TYPE_SALES = "销售";
public static final String SUB_TYPE_SALES_RETURN = "销售退货";
public static final String SUB_TYPE_TRANSFER = "调拨";
public static final String SUB_TYPE_CHECK_ENTER = "盘点录入";
public static final String SUB_TYPE_REPLAY = "盘点复盘";
public static final String SUB_TYPE_ASSEMBLE = "组装单";
public static final String SUB_TYPE_DISASSEMBLE = "拆卸单";
......
......@@ -331,7 +331,10 @@ public class ExceptionConstants {
public static final String MATERIAL_ASSEMBLE_SELECT_ERROR_MSG = "抱歉,组装拆卸单不能选择批号或序列号商品:%s";
//调拨单不能选择批号或序列号商品
public static final int MATERIAL_TRANSFER_SELECT_ERROR_CODE = 80000018;
public static final String MATERIAL_TRANSFER_SELECT_ERROR_MSG = "抱歉,调拨单不能选择批号或序列号商品:%s";
public static final String MATERIAL_TRANSFER_SELECT_ERROR_MSG = "抱歉,调拨单不能选择批号或序列号商品:%s,建议走其它入库和出库单";
//盘点业务不能选择批号或序列号商品
public static final int MATERIAL_STOCK_CHECK_ERROR_CODE = 80000019;
public static final String MATERIAL_STOCK_CHECK_ERROR_MSG = "抱歉,盘点业务不能选择批号或序列号商品:%s,建议走其它入库和出库单";
/**
* 单据信息
......
......@@ -419,6 +419,12 @@ public class DepotItemService {
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_TRANSFER_SELECT_ERROR_CODE,
String.format(ExceptionConstants.MATERIAL_TRANSFER_SELECT_ERROR_MSG, barCode));
}
//盘点业务不能选择批号或序列号商品(该场景走出库和入库单)
if(BusinessConstants.SUB_TYPE_CHECK_ENTER.equals(depotHead.getSubType())
||BusinessConstants.SUB_TYPE_REPLAY.equals(depotHead.getSubType())) {
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_STOCK_CHECK_ERROR_CODE,
String.format(ExceptionConstants.MATERIAL_STOCK_CHECK_ERROR_MSG, barCode));
}
}
if (StringUtil.isExist(rowObj.get("snList"))) {
depotItem.setSnList(rowObj.getString("snList"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment