From fb8169d1d8e4e8e4c2091cc128c05a8966cc5915 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期一, 19 一月 2026 15:51:07 +0800
Subject: [PATCH] 盘点流程
---
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs | 42 ++++++++++++++++++++++++------------------
1 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
index e6ddda7..467c714 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs
@@ -47,7 +47,7 @@
if (stockInfo != null)
{
Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
- if (locationInfo==null)
+ if (locationInfo == null)
{
throw new Exception("鏈壘鍒板嚭搴撳簱浣�");
}
@@ -116,7 +116,7 @@
}
tasks.Add(task);
}
-
+
}
}
@@ -163,7 +163,7 @@
(int)OrderTypeEnum.鍙嶆嫞鍑哄簱鍗� => TaskTypeEnum.ReverseOut,
_ => new TaskTypeEnum()
};
- tasks = GetTasks(result.Item1,typeEnum);
+ tasks = GetTasks(result.Item1, typeEnum);
tasks.ForEach(x =>
{
x.OrderNo = outboundOrder.OrderNo;
@@ -316,7 +316,7 @@
CreateDate = DateTime.Now,
Remark = details.Remark,
SupplierBatch = details.SupplierBatch,
- OrinalLocation=details.OrinalLocation,
+ OrinalLocation = details.OrinalLocation,
};
_newOutboundOrderDetailRepository.AddData(outboundOrderDetail);
foreach (var item in orderAddDTO1.Details)
@@ -676,23 +676,25 @@
inboundOrder.OrderType = OutOrderTypeEnum.OutInventory.ObjToInt();
inboundOrder.Creater = "WMS";
inboundOrder.CreateDate = DateTime.Now;
-
- Dt_OutboundOrder oldOutboundOrder = BaseDal.Db.Queryable<Dt_OutboundOrder>().Where(x => x.OrderNo == orderAddDTO1.OrderNo).Includes(x => x.Details).First();
- Dt_OutboundOrderDetail outboundOrderDetail = _outboundService.OutboundOrderDetailService.Repository.QueryFirst(x => x.OrderId == oldOutboundOrder.Id);
List<StockSelectViewDTO> stockSelectViews = new List<StockSelectViewDTO>();
- StockSelectViewDTO stockSelectViewDTO = new()
+ foreach (var item in inboundOrder.Details)
{
- OrderNo = orderAddDTO1.OrderNo,
- MaterielCode = outboundOrderDetail.MaterielCode,
- MaterielName = outboundOrderDetail.MaterielName,
- UseableQuantity = outboundOrderDetail.OrderQuantity,
- BatchNo = outboundOrderDetail.BatchNo,
- LinId = outboundOrderDetail.LinId,
- };
+
+ StockSelectViewDTO stockSelectViewDTO = new()
+ {
+ OrderNo = orderAddDTO1.OrderNo,
+ MaterielCode = item.MaterielCode,
+ MaterielName = item.MaterielName,
+ UseableQuantity = item.OrderQuantity,
+ BatchNo = item.BatchNo,
+ LinId = item.LinId,
+ };
+ stockSelectViews.Add(stockSelectViewDTO);
+ }
_unitOfWorkManage.BeginTran();
bool a = BaseDal.Db.InsertNav(inboundOrder).Include(x => x.Details).ExecuteCommand();
- stockSelectViews.Add(stockSelectViewDTO);
- GenerateOutboundTasks(oldOutboundOrder.Id, stockSelectViews);
+
+ GenerateOutboundTasks(inboundOrder.Id, stockSelectViews);
_unitOfWorkManage.CommitTran();
content = WebResponseContent.Instance.OK();
}
@@ -825,7 +827,7 @@
}
_unitOfWorkManage.CommitTran();
//灏嗕换鍔℃帹閫佸埌WCS
-
+
if (tasks.FirstOrDefault().Roadway.Contains("SC01_BC"))
{
PushTasksToWCS(tasks);
@@ -1155,6 +1157,10 @@
{
return content.Error($"鏈壘鍒皗item.PalletCode}搴撳瓨鏄庣粏鏁版嵁");
}
+ if (item.System.Contains("SMOM"))
+ {
+ return content.Error($"SMOM绯荤粺搴撳瓨鏁版嵁涓嶅彲鎵嬪姩鐩樼偣锛屾墭鐩樺彿{item.PalletCode}");
+ }
Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.LocationCode == item.LocationCode);
if (locationInfo != null && (locationInfo.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && locationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && item.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt())
{
--
Gitblit v1.9.3