From 3b3ff1836b8837ffd541cc7eefde8d5e5d195110 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期四, 18 十二月 2025 16:32:13 +0800
Subject: [PATCH] 1
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 41 ++++++++++++++++++++---------------------
1 files changed, 20 insertions(+), 21 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..73308c9 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"
@@ -292,7 +292,7 @@
task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
// BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
- var result = _task_HtyService.DeleteAndMoveIntoHty(task, OperateTypeEnum.浜哄伐鍒犻櫎);
+ var result = _task_HtyService.DeleteAndMoveIntoHty(task, OperateTypeEnum.鑷姩瀹屾垚);
if (!result)
{
await Db.Deleteable(task).ExecuteCommandAsync();
@@ -502,28 +502,27 @@
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.LocationCode = "";
+
+ 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