From 4ac3f08f416685db0e218df55750d94556030330 Mon Sep 17 00:00:00 2001
From: HuBingJie <3146306518@qq.com>
Date: 星期四, 06 十一月 2025 20:25:17 +0800
Subject: [PATCH] 1
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index fecb1ee..09a2a21 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -167,11 +167,8 @@
Dt_StockInfo dt_Stock = _stockRepository.QueryFirst(x => x.LocationCode == ShallowLocation.LocationCode);
if (dt_Stock == null) return content.Error($"璐т綅缂栧彿:{Locatask}鐨勬祬璐т綅搴撳瓨寮傚父锛岃妫�鏌ワ紒锛侊紒");
- Dt_Task _Task = BaseDal.QueryFirst(x => x.SourceAddress == ShallowLocation.LocationCode || x.TargetAddress == ShallowLocation.LocationCode);
- if (_Task != null) return content.Error($"璐т綅缂栧彿:{Locatask}鐨勬祬璐т綅搴撳凡鏈変换鍔★紝涓嶅彲杩涜绉诲簱");
-
//杩涜鑾峰彇鏂扮殑搴撲綅
- Dt_LocationInfo? Nextlocation = _basicService.LocationInfoService.AssignLocation(DeepLocation.RoadwayNo, 0, "");//鑾峰彇鍒版柊搴撲綅
+ Dt_LocationInfo? Nextlocation = _basicService.LocationInfoService.GetLocation(DeepLocation.RoadwayNo);//鑾峰彇鍒版柊搴撲綅
if (Nextlocation == null)
{
return content.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅");
@@ -323,12 +320,13 @@
//鍒犻櫎浠诲姟娣诲姞鍘嗗彶
BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
- WebResponseContent content = TaskCompletionFeedback(task);
+
+ /*WebResponseContent content = TaskCompletionFeedback(task);
if (!content.Status)
{
_unitOfWorkManage.RollbackTran();
return content;
- }
+ }*/
_unitOfWorkManage.CommitTran();
}
@@ -359,20 +357,22 @@
stockInfo.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
int beforeStatus = locationInfo.LocationStatus;
- locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
+ locationInfo.LocationStatus =(int)LocationStatusEnum.Free;
task.TaskStatus = TaskOutStatusEnum.OutFinish.ObjToInt();
_unitOfWorkManage.BeginTran();
+
_stockRepository.DeleteData(stockInfo);
_locationInfoRepository.UpdateData(locationInfo); //淇敼鎴愮┖璐т綅
+
BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
- _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
- WebResponseContent content = TaskCompletionFeedback(task);
+ _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt(), "1", task.TaskNum);
+ /*WebResponseContent content = TaskCompletionFeedback(task);
if (!content.Status)
{
_unitOfWorkManage.RollbackTran();
return content;
- }
+ }*/
_unitOfWorkManage.CommitTran();
return webResponse.OK();
@@ -380,7 +380,7 @@
catch (Exception ex)
{
_unitOfWorkManage.RollbackTran();
- return webResponse.Error($"绉诲簱浠诲姟瀹屾垚澶辫触锛屼换鍔d锛歿task.TaskNum},閿欒鍘熷洜锛歿ex.Message}");
+ return webResponse.Error($"鍑哄簱浠诲姟瀹屾垚澶辫触锛屼换鍔d锛歿task.TaskNum},閿欒鍘熷洜锛歿ex.Message}");
throw;
}
--
Gitblit v1.9.3