修改WCS任务反馈逻辑,添加盘料入库扫描料箱号占用站台逻辑,修改盘料库启动入库逻辑,将启动入库功能迁移到盘料操作界面中,修改盘料出库料塔取料逻辑,创建出库单据分解定时器,任务下发定时器添加盘料出库任务逻辑
This commit is contained in:
1 parent
79d4512266
commit
1fa11ab235
11 files changed
+536
-136
No files matched your search
@@ -53,6 +53,41 @@ namespace HHWMS.Web.Controllers
|
||||
return JsonMore(null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 盘料入库扫描料箱号
|
||||
/// </summary>
|
||||
/// <param name="boxCode"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public ActionResult ScanBox(string boxCode)
|
||||
{
|
||||
// 判断任务重复
|
||||
if (_unitWork.IsExit<TaskHeader>(x => x.ZoneCode.Equals(ZoneCodeEnum.盘料库) && x.ContainerCode.Equals(boxCode)))
|
||||
{
|
||||
return JsonMore(null, 500, $"库内已存在{boxCode}的任务,请勿重复操作!");
|
||||
};
|
||||
// 判断箱号是否合理
|
||||
var box = _unitWork.FindSingle<Location>(x => x.Code.Equals(boxCode));
|
||||
if (box != null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(box.ContainerCode))
|
||||
{
|
||||
box.ContainerCode = boxCode;
|
||||
_unitWork.Update(box);
|
||||
}
|
||||
else
|
||||
{
|
||||
return JsonMore(null, 500, $"{boxCode}已经被其他任务占用,无法入库!");
|
||||
}
|
||||
return JsonMore(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
return JsonMore(null, 500, $"{boxCode}不正确!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 入库盘料绑定操作
|
||||
/// </summary>
|
||||
@@ -73,11 +108,7 @@ namespace HHWMS.Web.Controllers
|
||||
//var receipt = _unitWork.FindSingle<ReceiptDetail>(x => x.UniqueCode == item.UniqueCode);
|
||||
if (receipt != null)
|
||||
{
|
||||
if (receipt.Status == ReceiptStatusEnum.收完) continue;
|
||||
receipt.CompletedQty += item.BindQty;
|
||||
}
|
||||
if (receipt.CompletedQty == receipt.Qty)
|
||||
{
|
||||
receipt.CompletedQty = receipt.Qty;
|
||||
receipt.Status = ReceiptStatusEnum.收完;
|
||||
if (!header.ReceiptDetails.Any(x => x.Status < ReceiptStatusEnum.收完))
|
||||
{
|
||||
@@ -85,14 +116,15 @@ namespace HHWMS.Web.Controllers
|
||||
_unitWork.Update(header);
|
||||
}
|
||||
}
|
||||
_unitWork.Update(receipt);
|
||||
// 新建库存
|
||||
var inventory = new Inventory
|
||||
{
|
||||
ZoneCode = ZoneCodeEnum.盘料库,
|
||||
UniqueCode = item.UniqueCode,
|
||||
Flag = item.Index,
|
||||
Flag = item.Size,
|
||||
Qty = receipt.Qty,
|
||||
Lot = item.Size.ToString(),
|
||||
Lot = item.Index.ToString(),
|
||||
ContainerCode = item.BoxCode,
|
||||
TaskStatus = InventoryTaskStatus.任务中
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user