林豪 左 2 years ago
parent
commit
10bdd77fc9

+ 7 - 0
WCS.Service/Worker.cs

@@ -10,6 +10,7 @@ using WCS.Entity;
 using WCS.Entity.Protocol.BCR;
 using WCS.Entity.Protocol.Station;
 using WCS.Service.Systems;
+using WCS.WorkEngineering;
 
 namespace WCS.Service
 {
@@ -199,6 +200,12 @@ namespace WCS.Service
                     }
                 });
 
+                #region 初始化业务工程中的配置
+
+                WorkConfigHub.Init();
+
+                #endregion 初始化业务工程中的配置
+
                 #region 唤醒所有的世界
 
                 World.StartAll();

+ 3 - 3
WCS.WorkEngineering/WebApi/Controllers/WmsApi.cs

@@ -11,9 +11,9 @@ namespace WCS.WorkEngineering.WebApi.Controllers
 
     public static class WmsApi
     {
-        private static string Url = "http://192.168.249.150:8026";
+        public static string WMSUrl = null!;
 
-        private static string wareHouseId = "opphouse";
+        public static string wareHouseId = null!;
 
         /// <summary>
         /// 分配货位
@@ -25,7 +25,7 @@ namespace WCS.WorkEngineering.WebApi.Controllers
         /// <exception cref="Exception"></exception>
         public static I_WCS_GetWareCellResponse GetLocalIn(int wcsTaskNum, string tunnel, string device)
         {
-            var res = APICaller.CallApi2<I_WCS_GetWareCellResponse>(Url + "/api/Task/I_WCS_GetWareCell", new I_WCS_GetWareCellRequest
+            var res = APICaller.CallApi2<I_WCS_GetWareCellResponse>(WMSUrl + "/api/Task/I_WCS_GetWareCell", new I_WCS_GetWareCellRequest
             {
                 PickUpEquipmentNo = device,
                 TunnelNum = tunnel.Last().ToString(),

+ 4 - 13
WCS.WorkEngineering/WorkConfigHub.cs

@@ -1,25 +1,16 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using WCS.Core;
-using WCS.WorkEngineering.Extensions;
-
-namespace WCS.WorkEngineering
+namespace WCS.WorkEngineering
 {
     /// <summary>
     /// 业务工程配置信息
     /// </summary>
-    public static  class WorkConfigHub
+    public static class WorkConfigHub
     {
         /// <summary>
-        ///  初始化设备标识配置信息
+        ///  初始化业务工程
         /// </summary>
 
-        public static void InitDeviceFlag() 
+        public static void Init()
         {
-            //DeviceExtension.AddFlag();
         }
     }
 }