力阔入库修改,添加物料绑定
This commit is contained in:
1 parent
a3e91357ee
commit
38c126c7b7
11 files changed
+895
-184
No files matched your search
@@ -56,6 +56,7 @@ namespace HHWMS.Web
|
||||
// 1.更新库存
|
||||
_unitWork.BatchUpdate<Inventory>(x => x.ContainerCode.Equals(task.ContainerCode), x => new Inventory
|
||||
{
|
||||
LocationCode = task.ToLocation,
|
||||
UpdateTime = DateTime.Now,
|
||||
UpdateBy = "WMS",
|
||||
TaskStatus = InventoryTaskStatus.无任务
|
||||
@@ -80,29 +81,29 @@ namespace HHWMS.Web
|
||||
});
|
||||
// 4.插入库存交易
|
||||
// 1.将任务容器的库存查出来
|
||||
if (inventoryList.Count > 0)
|
||||
{
|
||||
// 2.根据库存生成库存交易出库信息
|
||||
var inventoryTransactions = inventoryList.Select(inventory => new InventoryTransaction
|
||||
{
|
||||
BillType = InventoryTranType.入库,
|
||||
MaterialCode = inventory.MaterialCode,
|
||||
MaterialName = inventory.MaterialName,
|
||||
MaterialUnit = inventory.MaterialUnit,
|
||||
Batch = inventory.Batch,
|
||||
Lot = inventory.Lot,
|
||||
LocationCode = inventory.LocationCode,
|
||||
ContainerCode = inventory.ContainerCode,
|
||||
Qty = inventory.Qty,
|
||||
CreateTime = DateTime.Now,
|
||||
CreateBy = "WMS",
|
||||
UpdateTime = DateTime.Now,
|
||||
UpdateBy = "WMS"
|
||||
}).ToList();
|
||||
|
||||
// 3.批量插入库存交易
|
||||
_unitWork.BatchAdd(inventoryTransactions);
|
||||
}
|
||||
// if (inventoryList.Count > 0)
|
||||
// {
|
||||
// // 2.根据库存生成库存交易出库信息
|
||||
// var inventoryTransactions = inventoryList.Select(inventory => new InventoryTransaction
|
||||
// {
|
||||
// BillType = InventoryTranType.入库,
|
||||
// MaterialCode = inventory.MaterialCode,
|
||||
// MaterialName = inventory.MaterialName,
|
||||
// MaterialUnit = inventory.MaterialUnit,
|
||||
// Batch = inventory.Batch,
|
||||
// Lot = inventory.Lot,
|
||||
// LocationCode = inventory.LocationCode,
|
||||
// ContainerCode = inventory.ContainerCode,
|
||||
// Qty = inventory.Qty,
|
||||
// CreateTime = DateTime.Now,
|
||||
// CreateBy = "WMS",
|
||||
// UpdateTime = DateTime.Now,
|
||||
// UpdateBy = "WMS"
|
||||
// }).ToList();
|
||||
//
|
||||
// // 3.批量插入库存交易
|
||||
// _unitWork.BatchAdd(inventoryTransactions);
|
||||
// }
|
||||
|
||||
break;
|
||||
case TaskTypeEnum.立库出库:
|
||||
@@ -121,6 +122,8 @@ namespace HHWMS.Web
|
||||
Status = LocationStatus.空仓位,
|
||||
ContainerCode = ""
|
||||
});
|
||||
|
||||
/*
|
||||
// 1.将任务容器的库存查出来
|
||||
var inventoryList2 = _unitWork.Find<Inventory>(x => x.ContainerCode.Equals(task.ContainerCode))
|
||||
.ToList();
|
||||
@@ -149,10 +152,13 @@ namespace HHWMS.Web
|
||||
|
||||
_unitWork.BatchDelete<Inventory>(inventoryList2);
|
||||
}
|
||||
*/
|
||||
|
||||
// 如果是出库页面创建的任务,则创建入库任务并联动AGV
|
||||
if (task.Station == "1")
|
||||
/*
|
||||
if (task.Station == "1")
|
||||
{
|
||||
new ReceiptInController(_unitWork, Wtm).TaskIn(task.ContainerCode, false, false);
|
||||
new ReceiptInController(_unitWork, Wtm).TaskIn(task.ContainerCode);
|
||||
|
||||
// 下发AGV到出库口的任务
|
||||
|
||||
@@ -170,6 +176,7 @@ namespace HHWMS.Web
|
||||
// }
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user