From 5a15fa73d5f6a39917013871a65eb11a8c013391 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 05 十一月 2025 17:30:56 +0800
Subject: [PATCH] 1

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs"
index c7de8c4..9818ca4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs"
@@ -68,21 +68,22 @@
     }
 
     #region 鍒濆鍖栧簱浣�
-    public async Task<WebResponseContent> initializeLocation(int locationID)
+    public async Task<WebResponseContent> initializeLocation(string locationCode)
     {
         WebResponseContent content = new WebResponseContent();
         try
         {
-            DtLocationInfo? location = BaseDal.QueryData(x => x.Id == locationID).FirstOrDefault();
+            DtLocationInfo? location = BaseDal.QueryData(x => x.LocationCode == locationCode).FirstOrDefault();
             int LastStatus = location.LocationStatus;
             if (location == null)
             {
                 return content.Error("鏈壘鍒拌揣浣嶄俊鎭�!");
             }
-            DtStockInfo stock = _stockInfoRepository.QueryFirst(x => x.LocationId == location.Id);
+            DtStockInfo stock = _stockInfoRepository.QueryFirst(x => x.LocationCode == location.LocationCode);
             if(stock == null)
             {
                 location.LocationStatus= (int)LocationEnum.Free;
+                _locationStatusChangeRecordRepository.AddLocationStatusChangeRecord(location, LastStatus, (int)StatusChangeTypeEnum.ManualOperation, 0);
                 BaseDal.UpdateData(location);
             }
             else

--
Gitblit v1.9.3