出库分解修改
出库分拣页面修改 mes接口修改
This commit is contained in:
1 parent
26d46cad00
commit
30f1e69664
6 files changed
+89
-62
No files matched your search
@@ -193,53 +193,57 @@ namespace HHWMS.Web
|
||||
.FirstOrDefault();
|
||||
|
||||
//查询料塔是否为空
|
||||
//if (tLoc == null)
|
||||
//{
|
||||
// //判断是否存在此托盘的出库任务
|
||||
// var containerTask = _unitwork.Find<TaskHeader>(x => x.Status < TaskStatusEnum.已下发
|
||||
// && x.ContainerCode == item.Key
|
||||
// && x.TaskType == TaskTypeEnum.盘料出库)
|
||||
// .Include(x => x.TaskDetails).FirstOrDefault();
|
||||
// if (containerTask != null)
|
||||
// {
|
||||
// foreach (var inventory in item)
|
||||
// {
|
||||
// if (tLoc.Height < tLoc.Length)
|
||||
// {
|
||||
// var detail = new TaskDetail
|
||||
// {
|
||||
// UniqueCode = inventory.UniqueCode,
|
||||
// Lot = $"{Convert.ToInt32(location.Length)}-{tLoc.Code}",
|
||||
// FromLocation = inventory.Lot,
|
||||
// ToLocation = (Convert.ToInt32(tLoc.Height) + 1).ToString(),
|
||||
// Status = TaskStatusEnum.新建,
|
||||
// ContainerCode = inventory.ContainerCode,
|
||||
// CreateTime = DateTime.Now
|
||||
// };
|
||||
// tLoc.Height += 1;
|
||||
// containerTask.Status = TaskStatusEnum.待下发;
|
||||
// containerTask.TaskDetails.Add(detail);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// _unitwork.Update(tLoc);
|
||||
// _unitwork.Update(containerTask);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
if (tLoc == null)
|
||||
{
|
||||
//判断是否存在此托盘的出库任务
|
||||
var containerTask = _unitwork.Find<TaskHeader>(x => x.Status < TaskStatusEnum.已下发
|
||||
&& x.ContainerCode == item.Key
|
||||
&& x.TaskType == TaskTypeEnum.盘料出库)
|
||||
.Include(x => x.TaskDetails)
|
||||
.FirstOrDefault();
|
||||
if (containerTask != null)
|
||||
{
|
||||
tLoc = _unitwork.Find<Location>(x => x.Code == containerTask.ToLocation
|
||||
&& x.Type.Equals(LocationTypeEnum.料塔))
|
||||
.FirstOrDefault();
|
||||
foreach (var inventory in item)
|
||||
{
|
||||
if (tLoc.Height < tLoc.Length)
|
||||
{
|
||||
var detail = new TaskDetail
|
||||
{
|
||||
UniqueCode = inventory.UniqueCode,
|
||||
Lot = $"{Convert.ToInt32(location.Length)}-{tLoc.Code}",
|
||||
FromLocation = inventory.Lot,
|
||||
ToLocation = (Convert.ToInt32(tLoc.Height) + 1).ToString(),
|
||||
Status = TaskStatusEnum.新建,
|
||||
ContainerCode = inventory.ContainerCode,
|
||||
CreateTime = DateTime.Now
|
||||
};
|
||||
tLoc.Height += 1;
|
||||
containerTask.Status = TaskStatusEnum.待下发;
|
||||
containerTask.TaskDetails.Add(detail);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
_unitwork.Update(tLoc);
|
||||
_unitwork.Update(containerTask);
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (tLoc != null)
|
||||
{
|
||||
task.ZoneCode = ZoneCodeEnum.盘料库;
|
||||
task.TaskNo = _unitwork.GetSerialNumber("pout", 4);
|
||||
task.TaskType = TaskTypeEnum.盘料出库;
|
||||
task.Status = TaskStatusEnum.新建;
|
||||
task.Status = TaskStatusEnum.待下发;
|
||||
task.ContainerCode = item.Key;
|
||||
task.Priority = 100;
|
||||
task.FromLocation = _unitwork
|
||||
|
||||
Reference in new issue
Block a user