From 8a718d4a371257af9afa5816989791865f21f696 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期四, 20 十一月 2025 18:23:23 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 84 ++++++++++++++++++------------------------
1 files changed, 36 insertions(+), 48 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index 2bd7d87..58c97a7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -148,53 +148,41 @@
List<Dt_OutboundOrderDetail>? orderDetails = null;
List<Dt_OutStockLockInfo>? outStockLockInfos = null;
List<Dt_LocationInfo>? locationInfos = null;
- //if (outboundOrderDetail.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt())
+
+ (List<Dt_StockInfo>, List<Dt_OutboundOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundOrderDetailService.AssignStockOutbound(outboundOrderDetails);
+ if (result.Item1 != null && result.Item1.Count > 0)
{
- (List<Dt_StockInfo>, List<Dt_OutboundOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundOrderDetailService.AssignStockOutbound(outboundOrderDetails);
- if (result.Item1 != null && result.Item1.Count > 0)
+ Dt_OutboundOrder outboundOrder = _outboundOrderService.Repository.QueryFirst(x => x.Id == outboundOrderDetails.FirstOrDefault().OrderId);
+ TaskTypeEnum typeEnum = outboundOrder.OrderType switch
{
- Dt_OutboundOrder outboundOrder = _outboundOrderService.Repository.QueryFirst(x => x.Id == outboundOrderDetails.FirstOrDefault().OrderId);
- TaskTypeEnum typeEnum = outboundOrder.OrderType switch
- {
- (int)OutOrderTypeEnum.Issue => TaskTypeEnum.Outbound,
- (int)OutOrderTypeEnum.Allocate => TaskTypeEnum.OutAllocate,
- (int)OutOrderTypeEnum.Quality => TaskTypeEnum.OutQuality,
- _ => TaskTypeEnum.Outbound
- };
- tasks = GetTasks(result.Item1, typeEnum, outStation);
- tasks.ForEach(x =>
- {
- x.OrderNo = outboundOrder.OrderNo;
- });
- result.Item2.ForEach(x =>
- {
- x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
- });
- result.Item3.ForEach(x =>
- {
- x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
- });
+ (int)OutOrderTypeEnum.Issue => TaskTypeEnum.Outbound,
+ (int)OutOrderTypeEnum.Allocate => TaskTypeEnum.OutAllocate,
+ (int)OutOrderTypeEnum.Quality => TaskTypeEnum.OutQuality,
+ _ => TaskTypeEnum.Outbound
+ };
+ tasks = GetTasks(result.Item1, typeEnum, outStation);
+ tasks.ForEach(x =>
+ {
+ x.OrderNo = outboundOrder.OrderNo;
+ });
+ result.Item2.ForEach(x =>
+ {
+ x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
+ });
+ result.Item3.ForEach(x =>
+ {
+ x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
+ });
- stockInfos = result.Item1;
- orderDetails = result.Item2;
- outStockLockInfos = result.Item3;
- locationInfos = result.Item4;
- }
- else
- {
- throw new Exception("鏃犲簱瀛�");
- }
+ stockInfos = result.Item1;
+ orderDetails = result.Item2;
+ outStockLockInfos = result.Item3;
+ locationInfos = result.Item4;
}
- //else
- //{
- // List<Dt_OutStockLockInfo> stockLockInfos = _outboundService.OutboundStockLockInfoService.GetByOrderDetailId(outboundOrderDetail.OrderId, OutLockStockStatusEnum.宸插垎閰�);
- // if (stockLockInfos != null && stockLockInfos.Count > 0)
- // {
- // List<Dt_StockInfo> stocks = _stockService.StockInfoService.Repository.GetStockInfosByPalletCodes(stockLockInfos.Select(x => x.PalletCode).Distinct().ToList());
- // tasks = GetTasks(stocks);
- // }
- //}
-
+ else
+ {
+ throw new Exception("鏃犲簱瀛�");
+ }
return (tasks, stockInfos, orderDetails, outStockLockInfos, locationInfos);
}
@@ -257,7 +245,7 @@
taskType = "carry",
taskGroupCode = "",
groupPriority = 0,
- tasks = new List<TasksType>()
+ tasks = new List<TasksType>()
};
foreach (var task in tasks)
@@ -290,7 +278,7 @@
else
{
return WebResponseContent.Instance.Error("涓嬪彂鏈哄櫒浜轰换鍔″け璐ワ紒");
- }
+ }
}
catch (Exception ex)
{
@@ -331,7 +319,7 @@
// TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
PalletType = stockInfo.PalletType,
WarehouseId = stockInfo.WarehouseId,
-
+
};
//if (taskType != TaskTypeEnum.OutEmpty)
//{
@@ -353,7 +341,7 @@
/// </summary>
/// <param name="keys">鍑哄簱鍗曟槑缁嗕富閿�</param>
/// <returns></returns>
- public async Task<WebResponseContent> GenerateOutboundTasksAsync(int[] keys,string outStation)
+ public async Task<WebResponseContent> GenerateOutboundTasksAsync(int[] keys, string outStation)
{
try
{
@@ -364,7 +352,7 @@
List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>();
List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
- (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(keys,outStation);
+ (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(keys, outStation);
if (result.Item2 != null && result.Item2.Count > 0)
{
stockInfos.AddRange(result.Item2);
--
Gitblit v1.9.3