From 8b0d749cfbec8bf0afe71a8956bfeeed6f27cdfc Mon Sep 17 00:00:00 2001
From: chengsc <11752@DESKTOP-DS49RCP>
Date: 星期四, 16 一月 2025 15:32:30 +0800
Subject: [PATCH] Merge branch 'csc'

---
 Admin.NET/WCS.Application/PLC/PLCCommon.cs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Admin.NET/WCS.Application/PLC/PLCCommon.cs b/Admin.NET/WCS.Application/PLC/PLCCommon.cs
index 2cc7b0b..b862c2c 100644
--- a/Admin.NET/WCS.Application/PLC/PLCCommon.cs
+++ b/Admin.NET/WCS.Application/PLC/PLCCommon.cs
@@ -328,10 +328,11 @@
     /// <returns></returns>
     public static PLCUtil GetPlcIp(string startStation) 
     {
+        startStation = startStation.PadLeft(3, '0');
         string strIp = "";
         var conveyList1 = new List<string>() { "147", "145", "139", "137", "129", "127", "121", "119", "111", "109", "103", "101", "093", "091", "085", "083", "075", "073", "067", "065","033","039","044" ,"051","059"};
         var conveyList2 = new List<string>() { "205", "234", "252", "254", "260", "262", "270", "272", "278", "280", "288", "290", "294", "301", "307", "309", "315", "317", "325", "327", "331", "337" };
-        var conveyList3 = new List<string>() { "401", "402", "405", "406", "409", "410", "413", "414", "417", "418", "421", "422", "425", "426", "429", "430", "433", "434", "437", "438" };
+        var conveyList3 = new List<string>() { "401", "402", "405", "406", "409", "410", "413", "414", "417", "418", "421", "422", "425", "426", "429", "430", "433", "434", "437", "438", "440", "443" };
         if (conveyList1.Contains(startStation))
         {
             strIp = "10.18.51.110";
@@ -604,6 +605,8 @@
     /// <returns>璺烘満鑱旀満</returns>
     public static string GetRoadwayByStation(string StationNum)
     {
+        StationNum = StationNum.PadLeft(3, '0');
+
         string value = "";
         var conveyList1 = new List<string>() { "147", "145", "252", "254", "401", "402", };
         var conveyList2 = new List<string>() { "139", "137", "260", "262", "405", "406", };

--
Gitblit v1.8.0