From deb1079692d620377c5cdee9ed02b59223a2206f Mon Sep 17 00:00:00 2001
From: 陈勇 <chenyong@hnkhzn.com>
Date: 星期二, 19 十一月 2024 10:21:05 +0800
Subject: [PATCH] 合并

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/WIDESEA_StoragIntegrationServices.csproj |    1 
 .gitignore                                                                                                       |    2 +
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs          |    7 ++-
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs                                           |   15 +++++++
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/MCSService.cs                        |    6 ++
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/ModifyAccessStatus.cs        |   32 ++++++++-------
 6 files changed, 44 insertions(+), 19 deletions(-)

diff --git a/.gitignore b/.gitignore
index f6a26e8..0383def 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1351,3 +1351,5 @@
 /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/obj/Debug/net6.0/staticwebassets.upToDateCheck.txt
 /Code Management/WMS/WIDESEA_WMSServer/LogLibrary/obj/Debug/net6.0/LogLibrary.csproj.CoreCompileInputs.cache
 /Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationServices/obj/Debug/net6.0/WIDESEA_IStoragIntegrationServices.csproj.FileListAbsolute.txt
+/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/WIDESEA_StoragIntegrationServices.csproj
+*.tmp
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs
index 24d78ad..778ab8f 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs
@@ -73,6 +73,21 @@
         FreeDisable = 4,
     }
 
+    public enum LocationState
+    {
+        /// <summary>
+        /// 鍏佽
+        /// </summary>
+        [Description("鍏佽")]
+        Allow = 1,
+
+        /// <summary>
+        /// 涓嶅厑璁�
+        /// </summary>
+        [Description("涓嶅厑璁�")]
+        NotAllow = 2
+    }
+
     #region 浠诲姟绫诲瀷
 
     /// <summary>
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/MCSService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/MCSService.cs
index 99d1fa7..6f67fa0 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/MCSService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/MCSService.cs
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEA_IServices;
 using WIDESEA_IStorageBasicRepository;
 using WIDESEA_IStorageTaskRepository;
 using WIDESEA_IStoragIntegrationServices;
@@ -14,13 +15,16 @@
         private readonly ILocationInfoRepository _locationRepository;
         private readonly IDt_TaskRepository _taskRepository;
         private readonly IStockInfoRepository _stockInfoRepository;
+        private readonly ISys_ConfigService _configService;
 
 
-        public MCSService(ILocationInfoRepository locationRepository,IDt_TaskRepository taskRepository,IStockInfoRepository stockInfoRepository)
+        public MCSService(ILocationInfoRepository locationRepository,IDt_TaskRepository taskRepository,IStockInfoRepository stockInfoRepository, ISys_ConfigService configService)
         {
             _locationRepository = locationRepository;
             _taskRepository = taskRepository;
             _stockInfoRepository = stockInfoRepository;
+            _configService = configService;
+
         }
     }
 }
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/ModifyAccessStatus.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/ModifyAccessStatus.cs
index 22c7dfd..8020c2b 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/ModifyAccessStatus.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/ModifyAccessStatus.cs
@@ -25,9 +25,9 @@
                 if (locationinfo != null)
                 {
                     //妫�娴嬫煖鎻愪緵鐨勮揣浣嶇姸鎬侊紝鍙湁wms鏈攣瀹氫笖鎻愪緵鐨勭姸鎬佷负鍏佽鎵嶅厑璁告斁璐�
-                    if (locationinfo.Remark != LocationStatusByCode(result.StateCode))
+                    if (locationinfo.Remark != result.StateCode.ToString())
                     {
-                        locationinfo.Remark = LocationStatusByCode(result.StateCode);
+                        locationinfo.Remark = result.StateCode.ToString();
                         _locationRepository.UpdateData(locationinfo);
                     }
                 }
@@ -41,18 +41,20 @@
                 return content.Error(ex.Message);
             }
         }
-        private static string LocationStatusByCode(int code)
-        {
-            string str = null;
-            switch (code)
-            {
-                case 1: str = "LocationState_Allows"; break;
-                case 2: str = "LocationState_NotAllows"; break;
-                //case 2: str = LocationState.LocationLock.ToString(); break;
-                default:
-                    str = "LocationState_NotAllows"; break;
-            }
-            return str;
-        }
+
+
+        //private static string LocationStatusByCode(int code)
+        //{
+        //    string str = null;
+        //    switch (code)
+        //    {
+        //        case 1: str = "LocationState_Allows"; break;
+        //        case 2: str = "LocationState_NotAllows"; break;
+        //        //case 2: str = LocationState.LocationLock.ToString(); break;
+        //        default:
+        //            str = "LocationState_NotAllows"; break;
+        //    }
+        //    return str;
+        //}
     }
 }
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
index 01ba41e..119658d 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
@@ -5,6 +5,7 @@
 using System.Text;
 using System.Threading.Tasks;
 using WIDESEA_Core;
+using WIDESEA_Core.Const;
 using WIDESEA_Core.Enums;
 using WIDESEA_Core.Helper;
 using WIDESEA_DTO;
@@ -51,7 +52,6 @@
                     TaskId = 0,
                 };
 
-
                 WMSTaskDTO taskDTO = new WMSTaskDTO
                 {
                     Id = 0,
@@ -65,10 +65,11 @@
                     TaskType = result.IsNG == 1 ? (int)TaskOutboundTypeEnum.OutNG : (int)TaskOutboundTypeEnum.Outbound,
                 };
 
-                var respon = HttpHelper.Post("http://localhost:9291/api/Task/ReceiveTask", JsonConvert.SerializeObject(taskDTO));
+                var sysConfig = _configService.GetByConfigKey(CateGoryConst.CONFIG_SYS_IPAddress, SysConfigConst.WCSIPAddress);
+                var respon = HttpHelper.Post(sysConfig.ConfigValue, JsonConvert.SerializeObject(taskDTO));
                 if (respon != null)
                 {
-                    
+
                 }
 
 
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/WIDESEA_StoragIntegrationServices.csproj b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/WIDESEA_StoragIntegrationServices.csproj
index d42e58e..0c382c9 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/WIDESEA_StoragIntegrationServices.csproj
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/WIDESEA_StoragIntegrationServices.csproj
@@ -10,6 +10,7 @@
     <ProjectReference Include="..\LogLibrary\LogLibrary.csproj" />
     <ProjectReference Include="..\WIDESEA_Common\WIDESEA_Common.csproj" />
     <ProjectReference Include="..\WIDESEA_IStoragIntegrationServices\WIDESEA_IStoragIntegrationServices.csproj" />
+    <ProjectReference Include="..\WIDESEA_Services\WIDESEA_Services.csproj" />
     <ProjectReference Include="..\WIDESEA_StorageBasicServices\WIDESEA_StorageBasicServices.csproj" />
   </ItemGroup>
 

--
Gitblit v1.9.3