校验:序列号单据录入中,商品条码数量与序列号不一致
This commit is contained in:
@@ -397,6 +397,9 @@ public class ExceptionConstants {
|
||||
//单据录入-单据明细中必须要有组合件和普通子件
|
||||
public static final int DEPOT_HEAD_CHECK_ASSEMBLE_EMPTY_CODE = 8000020;
|
||||
public static final String DEPOT_HEAD_CHECK_ASSEMBLE_EMPTY_MSG = "抱歉,单据明细中必须要有组合件和普通子件";
|
||||
//单据录入-商品条码XXX的数量与序列号不一致
|
||||
public static final int DEPOT_HEAD_SN_NUMBERE_FAILED_CODE = 8000021;
|
||||
public static final String DEPOT_HEAD_SN_NUMBERE_FAILED_MSG = "抱歉,商品条码:%s的数量与序列号不一致";
|
||||
|
||||
/**
|
||||
* 单据明细信息
|
||||
|
||||
@@ -434,9 +434,16 @@ public class DepotItemService {
|
||||
if (StringUtil.isExist(rowObj.get("snList"))) {
|
||||
depotItem.setSnList(rowObj.getString("snList"));
|
||||
if(StringUtil.isExist(rowObj.get("depotId"))) {
|
||||
String [] snArray = depotItem.getSnList().split(",");
|
||||
int operNum = rowObj.getInteger("operNumber");
|
||||
if(snArray.length == operNum) {
|
||||
Long depotId = rowObj.getLong("depotId");
|
||||
serialNumberService.addSerialNumberByBill(depotHead.getType(), depotHead.getSubType(),
|
||||
depotHead.getNumber(), materialExtend.getMaterialId(), depotId, depotItem.getSnList());
|
||||
} else {
|
||||
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_SN_NUMBERE_FAILED_CODE,
|
||||
String.format(ExceptionConstants.DEPOT_HEAD_SN_NUMBERE_FAILED_MSG, barCode));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//入库或出库
|
||||
|
||||
Reference in New Issue
Block a user