同位置的不让移位
This commit is contained in:
+8
@@ -522,6 +522,14 @@ public class ShiftManageDomainService {
|
||||
if (4 == shiftManagePO.getShiftStatus()) {
|
||||
throw new ServiceException("移位单【" + shiftManagePO.getShiftNumber() + "】已完成移位,请重新选择");
|
||||
}
|
||||
List<ShiftMaterialDetailDO> shiftMaterialDetailList = shiftManageDO.getShiftMaterialDetailList();
|
||||
for (ShiftMaterialDetailDO shiftMaterialDetailDO : shiftMaterialDetailList) {//原始库位与目标库位不能一致
|
||||
String oldLoc = shiftMaterialDetailDO.getOldStorageLocationCode();
|
||||
String newLoc = shiftMaterialDetailDO.getNewStorageLocationCode();
|
||||
if (oldLoc != null && oldLoc.equals(newLoc)) {
|
||||
throw new ServiceException("移库失败:物料 [" + shiftMaterialDetailDO.getMaterialName() + "] 的源库位 (" + oldLoc + ") 与目标库位不能一致!");
|
||||
}
|
||||
}
|
||||
//修改物料移位信息
|
||||
shiftMaterialDetailService.batchShiftUpdate(shiftManageDO);
|
||||
//修改移位单状态为完成移位
|
||||
|
||||
Reference in New Issue
Block a user