From d76e413d03a9e8645afe33d7573e60eed0fc8d8f Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期四, 26 十二月 2024 14:25:54 +0800
Subject: [PATCH] 添加记录完成时间和修改日期的属性赋值

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs |   32 +++++++++++++++++++++++++-------
 1 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
index 5ccc088..587b9ad 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
@@ -1,4 +1,5 @@
-锘縰sing WIDESEA_DTO;
+锘縰sing WIDESEA_Common;
+using WIDESEA_DTO;
 
 namespace WIDESEA_StorageBasicService;
 
@@ -82,7 +83,26 @@
         }
     }
 
-    
+    public override WebResponseContent UpdateData(SaveModel saveModel)
+    {
+        int id = saveModel.MainData["id"].ObjToInt();
+        int status = saveModel.MainData["locationStatus"].ObjToInt();
+        var location = BaseDal.QueryFirst(x => x.Id == id);
+
+        LocationChangeRecordDto changeRecordDto = new LocationChangeRecordDto()
+        {
+            AfterStatus = status,
+            BeforeStatus = location.LocationStatus,
+            TaskNum = 0,
+            LocationId = id,
+            LocationCode = location.LocationCode,
+            ChangeType = (int)StatusChangeTypeEnum.ManualOperation
+        };
+
+        _locationStatusChangeRecordRepository.AddStatusChangeRecord(changeRecordDto);
+
+        return base.UpdateData(saveModel);
+    }
 
     #region 鍒涘缓鍘熷璐т綅鏁版嵁
 
@@ -99,7 +119,7 @@
     {
         string[] chineseNumbers = new string[] { "闆�", "涓�", "浜�", "涓�", "鍥�", "浜�", "鍏�", "涓�", "鍏�", "涔�" };
         var locationList = new List<DtLocationInfo>();
-        for (int line = 1; line <= x; line++)
+        for (int line = 3; line <= x; line++)
         {
             for (int column = 1; column <= y; column++)
             {
@@ -115,7 +135,7 @@
                         LocationType = locType,
                         Remark = "",
                         Depth = locType > 1 ? (((line - 1) % 4) + 1) == 2 || (((line - 1) % 4) + 1) == 3 ? 1 : 2 : 1,
-                        RoadwayNo = locType > 1 ? $"SC{((line - 1) / 4) + 1}" : $"SC{((line - 1) / 2) + 1}",
+                        RoadwayNo = locType > 1 ? $"JZSC{((line - 1) / 4) + 1}" : $"JZSC{((line - 1) / 2) + 1}",
                         LocationStatus = LocationEnum.Free.ObjToInt(),
                         AreaId = areaId,
                         Creater = "systeam",
@@ -225,7 +245,7 @@
                 SourceAddress = originalLocationID,
                 TaskNum = taskNo,
                 TargetAddress = emptyLocation.LocationCode,
-                TaskState = InTaskStatusEnum.RelocationNew.ObjToInt(),
+                //TaskState = TaskInStatusEnum.RelocationNew.ObjToInt(),
                 TaskType = TaskTypeEnum.RelocationIn.ObjToInt(),
             };
 
@@ -304,8 +324,6 @@
     }
 
     #endregion 鍒涘缓鍒濆璐т綅鏂规硶
-
-    
 
     #endregion 鍐呴儴鏂规硶
 }
\ No newline at end of file

--
Gitblit v1.9.3