出库,散料 箱子回库逻辑

分解订单 排除入库锁定库存
This commit is contained in:
zgf committed 2023-11-25 12:49:11 +08:00
1 parent 1365920fee
commit 0269655891
5 files changed
+34 -16

No files matched your search

@@ -87,9 +87,15 @@ namespace HHWMS.Web
_unitwork.Update(shipment);
}
var inTaskContainerList = _unitwork.Find<TaskHeader>(x => x.TaskType == TaskTypeEnum.盘料盒入库
|| x.TaskType == TaskTypeEnum.盘料入库
|| x.TaskType == TaskTypeEnum.散料盒入库)
.Select(x => x.ContainerCode)
.ToList();
//出库库存通过托盘号分组
var lockInvs = _unitwork.Find<Inventory>(x => x.TaskStatus == InventoryTaskStatus.任务中
&& !"L01,L02".Contains(x.ContainerCode))
&& !"L01,L02".Contains(x.LocationCode)
&& !inTaskContainerList.Contains(x.LocationCode))
.ToList();
shiInventorys.AddRange(lockInvs);
//已生成任务的库存不再生成任务
@@ -281,7 +287,7 @@ namespace HHWMS.Web
_unitwork.Update(tLoc);
_unitwork.Update(containerTask);
}
else
else if (tLoc != null)
{
task.ZoneCode = ZoneCodeEnum.盘料库;
task.TaskNo = _unitwork.GetSerialNumber("pout", 4);