From c1c941eb5768afb2e53afdb48c5b9af23fc31da5 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期四, 18 十二月 2025 11:36:34 +0800
Subject: [PATCH] 1
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 38 ++++++++++++++++++--------------------
1 files changed, 18 insertions(+), 20 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.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.cs"
index 3729f7d..b8f8669 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.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.cs"
@@ -502,28 +502,26 @@
locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
_locationInfoService.Repository.UpdateData(locationInfo);
- var outloks = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>().Where(x => x.TaskNum == task.TaskNum).ToListAsync();
-
- var stockids = outloks.Select(x => x.StockId).ToList();
-
- _stockService.StockInfoService.Db.Updateable<Dt_StockInfo>()
- .SetColumns(it => new Dt_StockInfo
- {
- StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt(),
- LocationCode = ""
- })
- .Where(it => stockids.Contains(it.Id))
- .ExecuteCommand();
-
- _stockService.StockInfoDetailService.Db.Updateable<Dt_StockInfoDetail>()
- .SetColumns(it => new Dt_StockInfoDetail
- {
- Status = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt()
- })
- .Where(it => stockids.Contains(it.StockId))
- .ExecuteCommand();
+ var stock = _stockService.StockInfoService.Db.Queryable<Dt_StockInfo>()
+ .Includes(x => x.Details)
+ .Where(x => x.PalletCode == task.PalletCode)
+ .First();
+ stock.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
+
+ stock.Details.ForEach(x =>
+ {
+ x.Status = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
+ });
+
+ _stockService.StockInfoService.Db.UpdateNav(stock).IncludesAllFirstLayer().ExecuteCommand();
+
+ var result = _task_HtyService.DeleteAndMoveIntoHty(task, OperateTypeEnum.鑷姩瀹屾垚);
+ if (!result)
+ {
+ await Db.Deleteable(task).ExecuteCommandAsync();
+ }
return WebResponseContent.Instance.OK();
--
Gitblit v1.9.3