From 71d29e20547b01047be2f5fde0734dec48bb9b86 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 19 三月 2026 22:20:00 +0800
Subject: [PATCH] 1
---
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs | 5 +
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 169 ++++++++++++++++++++++++++++---------------------------
2 files changed, 90 insertions(+), 84 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
index 1135b03..f6c2e50 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -127,7 +127,10 @@
return ((char)Convert.ToInt32(match.Groups[1].Value, 16)).ToString();
});
}
-
+ /// <summary>
+ /// MES鎵嬪姩鍙枡鎺ュ彛
+ /// </summary>
+ /// <returns></returns>
public WebResponseContent ReceiveManualIssue(MESManualIssueDTO manualIssueDTO)
{
WebResponseContent content = new WebResponseContent();
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index 389fb59..0b22aa0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -395,8 +395,11 @@
taskType = outStockLockInfo.MachineName.ObjToInt() switch
{
(int)StationAreaEnum.浜屾ゼ绾歌 => TaskTypeEnum.PaperYLOutZDGL,
+ (int)StationAreaEnum.浜屾ゼ鏃犵汉甯冭 => TaskTypeEnum.OutWFBGL,
+ (int)StationAreaEnum.涓�妤兼棤绾烘穻鑶� => TaskTypeEnum.OutWFBLM,
(int)StationAreaEnum.涓�妤煎嵃鍒� => TaskTypeEnum.PrintYLOutbound,
(int)StationAreaEnum.涓�妤煎垎鍒� => TaskTypeEnum.OutFenQie,
+ (int)StationAreaEnum.涓�妤肩焊寮犳穻鑶� => TaskTypeEnum.OutPaperLM,
_ => throw new Exception($"鏈壘鍒板姞宸ヤ腑蹇冧换鍔$被鍨嬪垎閰�")
};
Dt_Task task = new()
@@ -1019,90 +1022,90 @@
_unitOfWorkManage.BeginTran();
//鎿嶄綔鏁版嵁锛屽苟鍒嗛厤闇�姹傚簱瀛�
_outboundRepository.OutMESOrderRepository.AddData(AddoutMESOrders);
- //List<Dt_OutMESOrder> mESOrders = _outboundRepository.OutMESOrderRepository.QueryData(x => AddoutMESOrders.Select(x => x.OutDetailId).Contains(x.OutDetailId));
- //{
- // List<Dt_Task> tasks = new List<Dt_Task>();
- // List<Dt_ProStockInfo>? stockInfos = null;
- // List<Dt_OutMESOrder>? Orders = null;
- // List<Dt_OutStockLockInfo>? outStockLockInfos = null;
- // List<Dt_LocationInfo>? locationInfos = null;
- // {
- // if (mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt()).ToList().Count>0)
- // {
- // //鍒嗛厤搴撳瓨
- // (List<Dt_ProStockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignProStockOutbound(mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt()).ToList());
- // if (result.Item1 != null && result.Item1.Count > 0)
- // {
- // //鍒涘缓浠诲姟
- // tasks = GetTasks(result.Item1, result.Item3);
- // result.Item3.ForEach(x =>
- // {
- // x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
- // });
- // stockInfos = result.Item1;
- // Orders = result.Item2;
- // outStockLockInfos = result.Item3;
- // locationInfos = result.Item4;
- // }
- // }
- // }
- // if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count>0)
- // {
- // BaseDal.AddData(tasks);
- // stockInfos.ForEach(x =>
- // {
- // x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
- // });
- // WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks);
+ List<Dt_OutMESOrder> mESOrders = _outboundRepository.OutMESOrderRepository.QueryData(x => AddoutMESOrders.Select(x => x.OutDetailId).Contains(x.OutDetailId));
+ {
+ List<Dt_Task> tasks = new List<Dt_Task>();
+ List<Dt_ProStockInfo>? stockInfos = null;
+ List<Dt_OutMESOrder>? Orders = null;
+ List<Dt_OutStockLockInfo>? outStockLockInfos = null;
+ List<Dt_LocationInfo>? locationInfos = null;
+ {
+ if (mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt()).ToList().Count > 0)
+ {
+ //鍒嗛厤搴撳瓨
+ (List<Dt_ProStockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignProStockOutbound(mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDFL.ObjToInt()).ToList());
+ if (result.Item1 != null && result.Item1.Count > 0)
+ {
+ //鍒涘缓浠诲姟
+ tasks = GetTasks(result.Item1, result.Item3);
+ result.Item3.ForEach(x =>
+ {
+ x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
+ });
+ stockInfos = result.Item1;
+ Orders = result.Item2;
+ outStockLockInfos = result.Item3;
+ locationInfos = result.Item4;
+ }
+ }
+ }
+ if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count > 0)
+ {
+ BaseDal.AddData(tasks);
+ stockInfos.ForEach(x =>
+ {
+ x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+ });
+ WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks);
- // if (!contentResponse.Status)
- // {
- // _unitOfWorkManage.RollbackTran();
- // return content.Error(contentResponse.Message);
- // }
- // }
- //}
- //{
- // List<Dt_Task> tasks = new List<Dt_Task>();
- // List<Dt_StockInfo>? stockInfos = null;
- // List<Dt_OutMESOrder>? Orders = null;
- // List<Dt_OutStockLockInfo>? outStockLockInfos = null;
- // List<Dt_LocationInfo>? locationInfos = null;
- // {
- // if (mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt()).ToList().Count > 0)
- // {
- // //鍒嗛厤搴撳瓨
- // (List<Dt_StockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignStockOutbound(mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt()).ToList());
- // if (result.Item1 != null && result.Item1.Count > 0)
- // {
- // //鍒涘缓浠诲姟
- // tasks = GetTasks(result.Item1, result.Item3);
- // result.Item3.ForEach(x =>
- // {
- // x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
- // });
- // stockInfos = result.Item1;
- // Orders = result.Item2;
- // outStockLockInfos = result.Item3;
- // locationInfos = result.Item4;
- // }
- // }
- // }
- // if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count>0)
- // {
- // BaseDal.AddData(tasks);
- // stockInfos.ForEach(x =>
- // {
- // x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
- // });
- // WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks);
- // if (!contentResponse.Status)
- // {
- // _unitOfWorkManage.RollbackTran();
- // return content.Error(contentResponse.Message);
- // }
- // }
- //}
+ if (!contentResponse.Status)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return content.Error(contentResponse.Message);
+ }
+ }
+ }
+ {
+ List<Dt_Task> tasks = new List<Dt_Task>();
+ List<Dt_StockInfo>? stockInfos = null;
+ List<Dt_OutMESOrder>? Orders = null;
+ List<Dt_OutStockLockInfo>? outStockLockInfos = null;
+ List<Dt_LocationInfo>? locationInfos = null;
+ {
+ if (mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt()).ToList().Count > 0)
+ {
+ //鍒嗛厤搴撳瓨
+ (List<Dt_StockInfo>, List<Dt_OutMESOrder>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutMESOrderService.AssignStockOutbound(mESOrders.Where(x => x.WarehouseId == WarehouseEnum.LLDYL.ObjToInt()).ToList());
+ if (result.Item1 != null && result.Item1.Count > 0)
+ {
+ //鍒涘缓浠诲姟
+ tasks = GetTasks(result.Item1, result.Item3);
+ result.Item3.ForEach(x =>
+ {
+ x.Status = OutLockStockStatusEnum.鍑哄簱涓�.ObjToInt();
+ });
+ stockInfos = result.Item1;
+ Orders = result.Item2;
+ outStockLockInfos = result.Item3;
+ locationInfos = result.Item4;
+ }
+ }
+ }
+ if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0 && tasks.Count > 0)
+ {
+ BaseDal.AddData(tasks);
+ stockInfos.ForEach(x =>
+ {
+ x.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+ });
+ WebResponseContent contentResponse = _outboundService.OutMESOrderService.LockOutboundStockDataUpdate(stockInfos, Orders, outStockLockInfos, locationInfos, tasks: tasks);
+ if (!contentResponse.Status)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return content.Error(contentResponse.Message);
+ }
+ }
+ }
_unitOfWorkManage.CommitTran();
return content.OK(ErrorMsg.IsNullOrEmpty()? "鎺ユ敹鎴愬姛" : $"淇℃伅锛歿ErrorMsg}");
}
--
Gitblit v1.9.3