给批号和序列号增加限制判断(入库或者出库)
This commit is contained in:
@@ -407,19 +407,27 @@ public class DepotItemService {
|
|||||||
depotHead.getNumber(), materialExtend.getMaterialId(), depotId, depotItem.getSnList());
|
depotHead.getNumber(), materialExtend.getMaterialId(), depotId, depotItem.getSnList());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//序列号不能为空
|
//入库或出库
|
||||||
if(BusinessConstants.ENABLE_SERIAL_NUMBER_ENABLED.equals(material.getEnableSerialNumber())) {
|
if(BusinessConstants.DEPOTHEAD_TYPE_IN.equals(depotHead.getType()) ||
|
||||||
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_SERIAL_NUMBERE_EMPTY_CODE,
|
BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())) {
|
||||||
String.format(ExceptionConstants.MATERIAL_SERIAL_NUMBERE_EMPTY_MSG, barCode));
|
//序列号不能为空
|
||||||
|
if(BusinessConstants.ENABLE_SERIAL_NUMBER_ENABLED.equals(material.getEnableSerialNumber())) {
|
||||||
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_SERIAL_NUMBERE_EMPTY_CODE,
|
||||||
|
String.format(ExceptionConstants.MATERIAL_SERIAL_NUMBERE_EMPTY_MSG, barCode));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtil.isExist(rowObj.get("batchNumber"))) {
|
if (StringUtil.isExist(rowObj.get("batchNumber"))) {
|
||||||
depotItem.setBatchNumber(rowObj.getString("batchNumber"));
|
depotItem.setBatchNumber(rowObj.getString("batchNumber"));
|
||||||
} else {
|
} else {
|
||||||
//批号不能为空
|
//入库或出库
|
||||||
if(BusinessConstants.ENABLE_BATCH_NUMBER_ENABLED.equals(material.getEnableBatchNumber())) {
|
if(BusinessConstants.DEPOTHEAD_TYPE_IN.equals(depotHead.getType()) ||
|
||||||
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_BATCH_NUMBERE_EMPTY_CODE,
|
BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())) {
|
||||||
String.format(ExceptionConstants.DEPOT_HEAD_BATCH_NUMBERE_EMPTY_MSG, barCode));
|
//批号不能为空
|
||||||
|
if (BusinessConstants.ENABLE_BATCH_NUMBER_ENABLED.equals(material.getEnableBatchNumber())) {
|
||||||
|
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_BATCH_NUMBERE_EMPTY_CODE,
|
||||||
|
String.format(ExceptionConstants.DEPOT_HEAD_BATCH_NUMBERE_EMPTY_MSG, barCode));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtil.isExist(rowObj.get("expirationDate"))) {
|
if (StringUtil.isExist(rowObj.get("expirationDate"))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user