From 79a7c2707011902ec4df62ed8a285fa2029a1782 Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期二, 24 十二月 2024 10:09:23 +0800
Subject: [PATCH] 1

---
 Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue                                                                        |   39 +
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json                                                        |    4 
 .gitignore                                                                                                                      |    8 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs                                        |  125 +++--
 Code Management/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task_Hty.js                                                        |   82 ++++
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs                                           |   12 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs                                                 |  130 ++++--
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs                                 |  147 ++++--
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs                                   |   24 -
 Code Management/WCS/WIDESEAWCS_Client/src/uitils/signalr.js                                                                     |    3 
 /dev/null                                                                                                                       |    0 
 Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/copilot-chat/bef6627e/sessions/0fd52b0d-b36f-4668-871f-5e1c1d23e2e3 |    0 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs                                 |  456 +++++++++++++---------
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs                            |    2 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Const/SysConfigKeyConst.cs                                              |    5 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json                                                        |    2 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Hub/ISimpleHub.cs                                                      |    7 
 Code Management/WMS/WIDESEA_WMSClient/src/api/http.js                                                                           |    4 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Service/INoticeService.cs                                              |    9 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Service/SignalrNoticeService.cs                                        |    7 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs                                       |    8 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs                                                  |   15 
 Code Management/WCS/WIDESEAWCS_Client/src/extension/basicinfo/Dt_needBarcode.js                                                 |   60 +++
 Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_BillGroupStock.vue                                         |    2 
 24 files changed, 778 insertions(+), 373 deletions(-)

diff --git a/.gitignore b/.gitignore
index c3f7b2a..2823dd4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1579,3 +1579,11 @@
 /Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm
 /Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
 /Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db
+/Code Management/.vs/Code Management/CopilotIndices/17.12.31.40377/CodeChunks.db
+/Code Management/.vs/Code Management/CopilotIndices/17.12.31.40377/CodeChunks.db-shm
+/Code Management/.vs/Code Management/CopilotIndices/17.12.31.40377/CodeChunks.db-wal
+/Code Management/.vs/Code Management/CopilotIndices/17.12.31.40377/SemanticSymbols.db
+/Code Management/.vs/Code Management/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm
+/Code Management/.vs/Code Management/CopilotIndices/17.12.31.40377/CodeChunks.db-wal
+/Code Management/.vs/Code Management/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
+/Code Management/.vs/slnx.sqlite
diff --git a/Code Management/.vs/slnx.sqlite b/Code Management/.vs/slnx.sqlite
deleted file mode 100644
index 9eff72b..0000000
--- a/Code Management/.vs/slnx.sqlite
+++ /dev/null
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/extension/basicinfo/Dt_needBarcode.js b/Code Management/WCS/WIDESEAWCS_Client/src/extension/basicinfo/Dt_needBarcode.js
new file mode 100644
index 0000000..d9e0fae
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/extension/basicinfo/Dt_needBarcode.js
@@ -0,0 +1,60 @@
+
+//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
+import gridBody from './extend/routerview.vue';
+import gridHeader from './extend/addrouters.vue';
+let extension = {
+    components: {
+      //鏌ヨ鐣岄潰鎵╁睍缁勪欢
+      gridHeader: gridHeader,
+      gridBody: gridBody,
+      gridFooter: '',
+      //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
+      modelHeader: '',
+      modelBody: '',
+      modelFooter: ''
+    },
+    tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
+    buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
+    methods: {
+       //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
+      onInit() {  
+        
+      },
+      onInited() {
+        //妗嗘灦鍒濆鍖栭厤缃悗
+        //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
+        //this.detailOptions.columns.forEach(column=>{ });
+      },
+      searchBefore(param) {
+        //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
+        //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
+        return true;
+      },
+      searchAfter(result) {
+        //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
+        return true;
+      },
+      addBefore(formData) {
+        //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫��
+        return true;
+      },
+      updateBefore(formData) {
+        //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d
+        return true;
+      },
+      rowClick({ row, column, event }) {
+        //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
+        // this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
+      },
+      modelOpenAfter(row) {
+        //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
+        //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
+        //(2)缁欏脊鍑烘璁剧疆榛樿鍊�
+        //(3)this.editFormFields.瀛楁='xxx';
+        //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊�
+        //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions)
+      }
+    }
+  };
+  export default extension;
+  
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task_Hty.js b/Code Management/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task_Hty.js
new file mode 100644
index 0000000..c130b04
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task_Hty.js
@@ -0,0 +1,82 @@
+
+//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
+import gridBody from './extend/taskExecuteDetail.vue'
+let extension = {
+    components: {
+        //鏌ヨ鐣岄潰鎵╁睍缁勪欢
+        gridHeader: '',
+        gridBody: gridBody,
+        gridFooter: '',
+        //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
+        modelHeader: '',
+        modelBody: '',
+        modelFooter: ''
+    },
+    tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
+    buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
+    methods: {
+        //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
+        onInit() {
+            // this.$Notice.success({ title: this.detailOptions.cnName + ',鏌ヨ缁撴灉', desc: '杩斿洖鐨勫璞★細' + JSON.stringify(data) });
+
+            // var previousButton = this.buttons.find((x) => x.value == "Previous");
+            // if (previousButton) previousButton.hidden = true;
+            // var nextButton = this.buttons.find((x) => x.value == "Next");
+            // if (nextButton) nextButton.hidden = true;
+            // var recoveryButton = this.buttons.find((x) => x.value == "TaskRecovery");
+            // if (recoveryButton) recoveryButton.hidden = true;
+
+            //鎵╁睍椤甸潰鍒濆鍖栨搷浣�
+            this.columns.push({
+                field: '鎿嶄綔',
+                title: '鎿嶄綔',
+                width: 70,
+                fixed: 'right',
+                align: 'center',
+                formatter: (row) => {
+                    return (
+                        '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">鏌ョ湅</i>'
+                    );
+                },
+                click: (row) => {
+                    this.$refs.gridBody.open(row);
+                }
+            });
+        },
+        onInited() {
+            //妗嗘灦鍒濆鍖栭厤缃悗
+            //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
+            //this.detailOptions.columns.forEach(column=>{ });
+        },
+        searchBefore(param) {
+            //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
+            //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
+            return true;
+        },
+        searchAfter(result) {
+            //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
+            return true;
+        },
+        addBefore(formData) {
+            //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫��
+            return true;
+        },
+        updateBefore(formData) {
+            //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d
+            return true;
+        },
+        rowClick({ row, column, event }) {
+            //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
+            // this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
+        },
+        modelOpenAfter(row) {
+            //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
+            //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
+            //(2)缁欏脊鍑烘璁剧疆榛樿鍊�
+            //(3)this.editFormFields.瀛楁='xxx';
+            //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊�
+            //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions)
+        }
+    }
+};
+export default extension;
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/uitils/signalr.js b/Code Management/WCS/WIDESEAWCS_Client/src/uitils/signalr.js
index 5534440..db2c4c7 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/uitils/signalr.js
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/uitils/signalr.js
@@ -95,6 +95,9 @@
     connection.on("LineData", (data) => {
       eventBus.emit("locationData", data);
     });
+    connection.on("Logs", (data) => {
+      eventBus.emit("Logs", data);
+    });
   };
 
   //椤甸潰閿�姣�
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue
index 2d83b3c..134ace2 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue
@@ -1,21 +1,38 @@
 <template>
   <div class="title"></div>
+  <el-container>
+    <el-header>鏃ュ織</el-header>
+    <el-main>
+      <el-card v-for="(log, index) in logs" :key="index" class="log-card" :style="{ color: log.color }">
+        <div :style="{ color: log.color }">{{ log.logEntry }}</div>
+        <div :style="{ color: log.color }">{{ log.time }}</div>
+      </el-card>
+    </el-main>
+  </el-container>
 </template>
 
 <script>
-import { ref, reactive } from 'vue'
-import eventBus from "../uitils/eventBus";
+import { ref, onMounted } from 'vue'
+import eventBus from "@/uitils/eventBus";
+
 export default {
   setup() {
+    const logs = ref([]);
+    onMounted(() => {
+      eventBus.on('Logs', eventData => {
+        if (logs.value.length > 500) {
+          logs.value = [];
+        }
+        const logEntry = "鏃ュ織淇℃伅锛�" + eventData.log
+        const time = "鏃堕棿锛�" + eventData.time 
+        logs.value.unshift({ logEntry: logEntry, time: time, color: eventData.color });
+        
+        // logs.value.unshift(logEntry);
+      });
+    });
     return {
+      logs
     }
-
-    eventBus.on('stackerData', eventData => {
-        console.log(eventData);
-    })
-    eventBus.on('locationData', eventData => {
-        console.log(eventData);
-    })
   }
 }
 </script>
@@ -27,4 +44,8 @@
   font-size: 28px;
   color: orange;
 }
+
+.log-card {
+  margin-bottom: 10px;
+}
 </style>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/copilot-chat/bef6627e/sessions/0fd52b0d-b36f-4668-871f-5e1c1d23e2e3 b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/copilot-chat/bef6627e/sessions/0fd52b0d-b36f-4668-871f-5e1c1d23e2e3
new file mode 100644
index 0000000..c22568e
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/copilot-chat/bef6627e/sessions/0fd52b0d-b36f-4668-871f-5e1c1d23e2e3
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Const/SysConfigKeyConst.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Const/SysConfigKeyConst.cs
index 5bdf7d0..6840c2e 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Const/SysConfigKeyConst.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Const/SysConfigKeyConst.cs
@@ -69,6 +69,9 @@
         /// </summary>
         public const string RequestOutTaskToBZ = "RequestOutTaskToBZ";
 
-
+        /// <summary>
+        /// 闈欑疆NG鍏ュ簱
+        /// </summary>
+        public const string RequestInBoundTaskNG = "RequestInBoundTaskNG";
     }
 }
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
index d5ed3be..4b93cc1 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -15,6 +15,8 @@
   //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True",
   //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   "ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+  "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True",
+  //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   //璺ㄥ煙
   "Cors": {
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Hub/ISimpleHub.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Hub/ISimpleHub.cs
index 2816628..f008564 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Hub/ISimpleHub.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Hub/ISimpleHub.cs
@@ -32,4 +32,11 @@
     /// <param name="context"></param>
     /// <returns></returns>
     Task LineData(object context);
+
+    /// <summary>
+    /// 绾夸綋鏁版嵁
+    /// </summary>
+    /// <param name="context"></param>
+    /// <returns></returns>
+    Task Logs(object context);
 }
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Service/INoticeService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Service/INoticeService.cs
index 5b969f8..f15bf2b 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Service/INoticeService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Service/INoticeService.cs
@@ -51,4 +51,13 @@
     /// <param name="message">閫氱煡鍐呭</param>
     /// <returns></returns>
     Task LineData(int? userId, List<string> clientIds, object message);
+
+    /// <summary>
+    /// 鏃ュ織娴佺▼鏁版嵁
+    /// </summary>
+    /// <param name="userId">鐢ㄦ埛ID</param>
+    /// <param name="clientIds">clientId鍒楄〃</param>
+    /// <param name="message">閫氱煡鍐呭</param>
+    /// <returns></returns>
+    Task Logs(List<string> clientIds, object message);
 }
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Service/SignalrNoticeService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Service/SignalrNoticeService.cs
index 3bbb94f..071468b 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Service/SignalrNoticeService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_SignalR/Service/SignalrNoticeService.cs
@@ -59,5 +59,12 @@
         await GetHubContext().Clients.Users(clientIds).LineData(message);
     }
 
+    /// <inheritdoc/>
+    public async Task Logs(List<string> clientIds, object message)
+    {
+        //鍙戦�佹秷鎭粰鐢ㄦ埛
+        await GetHubContext().Clients.Users(clientIds).Logs(message);
+    }
+
     #endregion MyRegion
 }
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
index bfa2c3b..f18b745 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -1,5 +1,4 @@
-锘�
-using AutoMapper;
+锘縰sing AutoMapper;
 using HslCommunication;
 using Mapster;
 using Microsoft.AspNetCore.Components.Routing;
@@ -76,76 +75,110 @@
         /// <returns>杩斿洖澶勭悊缁撴灉</returns>
         public WebResponseContent ReceiveWMSTask([NotNull] List<WMSTaskDTO> taskDTOs)
         {
+            // 鍒涘缓涓�涓猈ebResponseContent瀵硅薄鐢ㄤ簬瀛樺偍杩斿洖缁撴灉
             WebResponseContent content = new WebResponseContent();
             try
             {
+                // 鍒涘缓涓�涓狣t_Task绫诲瀷鐨勫垪琛ㄧ敤浜庡瓨鍌ㄨ浆鎹㈠悗鐨勪换鍔℃暟鎹�
                 List<Dt_Task> tasks = new List<Dt_Task>();
+                // 閬嶅巻浼犲叆鐨刉MSTaskDTO鍒楄〃
                 foreach (var item in taskDTOs)
                 {
+                    // 鏌ヨ鏁版嵁搴撲腑鏄惁瀛樺湪鐩稿悓浠诲姟缂栧彿鎴栨墭鐩樼爜鐨勪换鍔★紝濡傛灉瀛樺湪鍒欒烦杩囧綋鍓嶅惊鐜�
                     if (BaseDal.QueryFirst(x => x.TaskNum == item.TaskNum || x.PalletCode == item.PalletCode) != null)
                     {
                         continue;
                     }
+                    // 灏哤MSTaskDTO瀵硅薄鏄犲皠涓篋t_Task瀵硅薄
                     Dt_Task task = _mapper.Map<Dt_Task>(item);
+                    // 璁剧疆浠诲姟鐨勫垱寤鸿�呬负"WMS"
                     task.Creater = "WMS";
+                    // 鍒ゆ柇浠诲姟绫诲瀷鏄惁涓哄嚭搴撲换鍔�
                     if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                     {
-                        if (task.TargetAddress == "002-021-001")
+                        // 鍒ゆ柇浠诲姟鐩爣鍦板潃鍜岃矾寰勬槸鍚︽弧瓒崇壒瀹氭潯浠�
+                        if (task.TargetAddress == "002-021-001" && task.Roadway.Contains("JZ") && task.TaskType == (int)TaskOutboundTypeEnum.OutTray)
                         {
+                            // 璁剧疆浠诲姟鐘舵�佷负鍑哄簱鏂板缓
                             task.TaskState = (int)TaskOutStatusEnum.OutNew;
+                            // 璁剧疆褰撳墠鍦板潃涓烘簮鍦板潃
                             task.CurrentAddress = item.SourceAddress;
+                            // 璁剧疆涓嬩竴涓湴鍧�涓虹洰鏍囧湴鍧�
+                            task.NextAddress = item.TargetAddress;
                         }
                         else
                         {
+                            // 鏌ヨ涓嬩竴涓矾鐢�
                             List<Dt_Router> routers = _routerService.QueryNextRoutes(item.RoadWay, item.TargetAddress);
                             if (routers.Count > 0)
                             {
+                                // 璁剧疆浠诲姟鐘舵�佷负鍑哄簱鏂板缓
                                 task.TaskState = (int)TaskOutStatusEnum.OutNew;
+                                // 璁剧疆褰撳墠鍦板潃涓烘簮鍦板潃
                                 task.CurrentAddress = item.SourceAddress;
+                                // 璁剧疆涓嬩竴涓湴鍧�涓虹涓�涓瓙浣嶇疆
                                 task.NextAddress = routers.FirstOrDefault().ChildPosi;
                             }
                             else
                             {
+                                // 鏌ヨ浠庢簮鍦板潃鍒扮洰鏍囧湴鍧�鐨勮矾鐢�
                                 routers = _routerService.QueryNextRoutes(item.SourceAddress, item.TargetAddress);
                                 if (routers.Count > 0)
                                 {
+                                    // 璁剧疆浠诲姟鐘舵�佷负鍑哄簱瀹屾垚
                                     task.TaskState = (int)TaskOutStatusEnum.SC_OutFinish;
+                                    // 璁剧疆褰撳墠鍦板潃涓烘簮鍦板潃
                                     task.CurrentAddress = item.SourceAddress;
+                                    // 璁剧疆涓嬩竴涓湴鍧�涓虹涓�涓瓙浣嶇疆
                                     task.NextAddress = routers.FirstOrDefault().ChildPosi;
                                 }
                             }
                         }
                     }
+                    // 鍒ゆ柇浠诲姟绫诲瀷鏄惁涓哄叆搴撲换鍔�
                     else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                     {
-                        if (task.SourceAddress == "1359-4")
+                        // 鍒ゆ柇婧愬湴鍧�鏄惁涓嶇瓑浜�"1359-4"
+                        if (task.SourceAddress != "1359-4")
                         {
-                            task.TaskState = (int)TaskInStatusEnum.InNew;
-                            task.CurrentAddress = item.SourceAddress;
-                        }
-                        else
-                        {
+                            // 鏌ヨ浠庢簮鍦板潃鍒扮洰鏍囧湴鍧�鐨勮矾鐢�
                             List<Dt_Router> routers = _routerService.QueryNextRoutes(item.SourceAddress, item.TargetAddress);
                             if (routers.Count > 0)
                             {
+                                // 璁剧疆浠诲姟鐘舵�佷负鍏ュ簱鏂板缓
                                 task.TaskState = (int)TaskInStatusEnum.InNew;
+                                // 璁剧疆褰撳墠鍦板潃涓烘簮鍦板潃
                                 task.CurrentAddress = item.SourceAddress;
+                                // 璁剧疆涓嬩竴涓湴鍧�涓虹涓�涓瓙浣嶇疆
                                 task.NextAddress = routers.FirstOrDefault().ChildPosi;
                             }
                         }
+                        else
+                        {
+                            // 璁剧疆褰撳墠鍦板潃涓�"002-021-001"
+                            task.CurrentAddress = "002-021-001";
+                            // 璁剧疆涓嬩竴涓湴鍧�涓虹洰鏍囧湴鍧�
+                            task.NextAddress = item.TargetAddress;
+                        }
                     }
+                    // 灏嗚浆鎹㈠悗鐨勪换鍔℃坊鍔犲埌浠诲姟鍒楄〃涓�
                     tasks.Add(task);
                 }
+                // 灏嗕换鍔″垪琛ㄦ坊鍔犲埌鏁版嵁搴撲腑
                 BaseDal.AddData(tasks);
 
+                // 娣诲姞浠诲姟鎵ц璇︽儏
                 _taskExecuteDetailService.AddTaskExecuteDetail(tasks.Select(x => x.TaskNum).ToList(), "鎺ユ敹WMS浠诲姟");
 
+                // 璁剧疆杩斿洖缁撴灉涓烘垚鍔�
                 content = WebResponseContent.Instance.OK("鎴愬姛");
             }
             catch (Exception ex)
             {
+                // 鎹曡幏寮傚父骞惰缃繑鍥炵粨鏋滀负閿欒淇℃伅
                 content = WebResponseContent.Instance.Error($"浠诲姟鎺ユ敹閿欒,閿欒淇℃伅:{ex.Message}");
             }
+            // 杩斿洖缁撴灉
             return content;
         }
 
@@ -166,14 +199,16 @@
                     return content.OK("褰撳墠鎵樼洏瀛樺湪浠诲姟");
                 }
 
-                var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
-                var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
-                var requestTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTask)?.ConfigValue;
-                if (wmsBase == null || requestTask == null)
+                var wmsIpAddrss = string.Empty;
+                var stationManager = _stationManagerRepository.QueryFirst(x => x.stationChildCode == sourceAddress);
+                if (stationManager.stationType == 5)
                 {
-                    throw new InvalidOperationException("WMS IP 鏈厤缃�");
+                    wmsIpAddrss = GetIpAddress(SysConfigKeyConst.WMSIP_BASE, SysConfigKeyConst.RequestInBoundTaskNG);
                 }
-                var wmsIpAddrss = wmsBase + requestTask;
+                else
+                {
+                    wmsIpAddrss = GetIpAddress(SysConfigKeyConst.WMSIP_BASE, SysConfigKeyConst.RequestTask);
+                }
 
                 var result = await HttpHelper.PostAsync(wmsIpAddrss, new { Position = sourceAddress, PalletCode = palletCode }.ToJsonString());
                 content = JsonConvert.DeserializeObject<WebResponseContent>(result);
@@ -192,8 +227,7 @@
                     _Task.TaskState = (int)TaskInStatusEnum.InNew;
                     _Task.CurrentAddress = task.SourceAddress;
                     _Task.NextAddress = station.stationNGChildCode;
-                    _Task.TargetAddress = station.stationNGLocation;
-                    _Task.Roadway = station.Roadway;
+                    _Task.TargetAddress = task.TargetAddress;
 
                     BaseDal.AddData(_Task);
                     _taskExecuteDetailService.AddTaskExecuteDetail(_Task.TaskNum, "鎺ユ敹WMS浠诲姟");
@@ -218,7 +252,7 @@
         /// <returns></returns>
         public Dt_Task QueryConveyorLineTask(string deviceNo, string currentAddress)
         {
-            return BaseDal.QueryFirst(x => (TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew || TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish) && x.CurrentAddress == currentAddress, TaskOrderBy);
+            return BaseDal.QueryFirst(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish)) && x.CurrentAddress == currentAddress, TaskOrderBy);
         }
 
         /// <summary>
@@ -229,7 +263,7 @@
         /// <returns></returns>
         public Dt_Task QueryNextConveyorLineTask(string deviceNo, string currentAddress)
         {
-            return BaseDal.QueryFirst(x => (TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew || TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish) && x.NextAddress == currentAddress, TaskOrderBy);
+            return BaseDal.QueryFirst(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish)) && x.NextAddress == currentAddress, TaskOrderBy);
         }
 
         /// <summary>
@@ -240,7 +274,7 @@
         /// <returns></returns>
         public Dt_Task QueryBarCodeConveyorLineTask(string Barcode, string currentAddress)
         {
-            return BaseDal.QueryFirst(x => (TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew || TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish) && x.CurrentAddress == currentAddress && x.PalletCode == Barcode, TaskOrderBy);
+            return BaseDal.QueryFirst(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.SC_OutFinish)) && x.CurrentAddress == currentAddress && x.PalletCode == Barcode, TaskOrderBy);
         }
 
         /// <summary>
@@ -265,11 +299,16 @@
             return BaseDal.QueryFirst(x => x.TaskNum == taskNum && x.CurrentAddress == currentAddress && (x.TaskState == (int)TaskInStatusEnum.Line_InFinish || x.TaskState == (int)TaskOutStatusEnum.Line_OutFinish), TaskOrderBy);
         }
 
+        /// <summary>
+        /// 鏍规嵁鎵樼洏鍙枫�佸綋鍓嶅湴鍧�鏌ヨ浠诲姟
+        /// </summary>
+        /// <param name="taskNum">浠诲姟鍙�</param>
+        /// <param name="currentAddress">褰撳墠鍦板潃</param>
+        /// <returns></returns>
         public Dt_Task QueryBarcodeTask(string barcode, string currentAddress)
         {
             return BaseDal.QueryFirst(x => x.PalletCode == barcode && x.CurrentAddress == currentAddress, TaskOrderBy);
         }
-
 
         /// <summary>
         /// 鏍规嵁浠诲姟鍙枫�佸綋鍓嶅湴鍧�鏌ヨ杈撻�佺嚎鏂板缓鐨勪换鍔�
@@ -291,7 +330,7 @@
         public Dt_Task? QuertStackerCraneTask(string deviceNo, TaskTypeGroup? taskTypeGroup = null)
         {
             if (taskTypeGroup == null)
-                return BaseDal.QueryFirst(x => x.Roadway == deviceNo && (TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.Line_InFinish || TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.OutNew), TaskOrderBy);
+                return BaseDal.QueryFirst(x => x.Roadway == deviceNo && ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.Line_InFinish) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.OutNew)), TaskOrderBy);
             if (taskTypeGroup.Value == TaskTypeGroup.InboundGroup)
                 return BaseDal.QueryFirst(x => x.Roadway == deviceNo && TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.Line_InFinish, TaskOrderBy);
             if (taskTypeGroup.Value == TaskTypeGroup.OutbondGroup)
@@ -308,9 +347,9 @@
         public Dt_Task QueryStackerCraneTask(string deviceNo, string currentAddress = "")
         {
             if (string.IsNullOrEmpty(currentAddress))
-                return BaseDal.QueryFirst(x => x.Roadway == deviceNo && (TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.Line_InFinish || TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.OutNew), TaskOrderBy);
+                return BaseDal.QueryFirst(x => x.Roadway == deviceNo && ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.Line_InFinish) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.OutNew)), TaskOrderBy);
             else
-                return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.CurrentAddress == currentAddress && (TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.Line_InFinish || TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.OutNew), TaskOrderBy);
+                return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.CurrentAddress == currentAddress && ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.Line_InFinish) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.OutNew)), TaskOrderBy);
         }
 
         /// <summary>
@@ -472,8 +511,8 @@
 
                     if (task.TaskState == (int)TaskInStatusEnum.Line_InFinish)
                     {
-
                         #region 鍏ュ簱璋冪敤鎺ュ彛鑾峰彇璐т綅鍦板潃
+
                         // TODO: 璋冪敤鎺ュ彛鑾峰彇璐т綅鍦板潃
                         // 鍒涘缓璇锋眰瀵硅薄
                         var taskDto = new RequestTaskDto()
@@ -509,12 +548,11 @@
                         task.CurrentAddress = task.NextAddress;
                         task.NextAddress = taskResult.TargetAddress;
                         task.TargetAddress = task.NextAddress;
-                        #endregion
 
+                        #endregion 鍏ュ簱璋冪敤鎺ュ彛鑾峰彇璐т綅鍦板潃
                     }
                     else if (task.TaskState == (int)TaskInStatusEnum.SC_InFinish)
                     {
-
                         task.ModifyDate = DateTime.Now;
                         task.Modifier = "System";
 
@@ -541,7 +579,8 @@
 
                 _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, App.User.UserId > 0 ? $"浜哄伐鎵嬪姩灏嗕换鍔$姸鎬佷粠銆恵oldState}銆戣烦杞埌銆恵task.TaskState}銆�" : $"绯荤粺鑷姩娴佺▼锛屼换鍔$姸鎬佷粠銆恵oldState}銆戣浆鍒般�恵task.TaskState}銆�");
 
-                #region  鏇存柊浠诲姟鐘舵��
+                #region 鏇存柊浠诲姟鐘舵��
+
                 // 鑾峰彇WMSip鍦板潃
                 var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                 var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
@@ -554,7 +593,8 @@
 
                 var result = HttpHelper.PostAsync(wmsIpAddress, new { TaskNum = task.TaskNum, TaskState = task.TaskState }.ToJsonString()).Result;
                 content = JsonConvert.DeserializeObject<WebResponseContent>(result);
-                #endregion
+
+                #endregion 鏇存柊浠诲姟鐘舵��
 
                 content = WebResponseContent.Instance.OK();
             }
@@ -614,6 +654,7 @@
                 if (task == null) return WebResponseContent.Instance.Error($"鏈壘鍒拌浠诲姟淇℃伅,浠诲姟鍙�:銆恵taskNum}銆�");
 
                 #region WMS鍚屾浠诲姟瀹屾垚
+
                 var keys = new Dictionary<string, object>()
                 {
                     {"taskNum", taskNum}
@@ -640,7 +681,8 @@
                     }
                 }
                 task.ExceptionMessage += "   " + content.Message;
-                #endregion
+
+                #endregion WMS鍚屾浠诲姟瀹屾垚
 
                 if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting)
                 {
@@ -678,7 +720,6 @@
                         _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"鍫嗗灈鏈哄嚭搴撳畬鎴�");
                     }
 
-
                     //鏆備笉鑰冭檻澶氫釜鍑哄簱鍙�
                 }
                 else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup && task.TaskState == (int)TaskInStatusEnum.SC_InExecuting)
@@ -707,21 +748,6 @@
                 {
                     throw new Exception($"浠诲姟绫诲瀷閿欒,鏈壘鍒拌浠诲姟绫诲瀷,浠诲姟鍙�:銆恵taskNum}銆�,浠诲姟绫诲瀷:銆恵task.TaskType}銆�");
                 }
-
-
-                #region  鏇存柊浠诲姟鐘舵��
-
-                //var updateTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.UpdateTask)?.ConfigValue;
-                //if (wmsBase == null || updateTask == null)
-                //{
-                //    throw new InvalidOperationException("WMS IP 鏈厤缃�");
-                //}
-                //wmsIpAddress = wmsBase + updateTask;
-
-                //result = HttpHelper.PostAsync(wmsIpAddress, new { TaskNum = task.TaskNum, TaskState = task.TaskState }.ToJsonString()).Result;
-                //content = JsonConvert.DeserializeObject<WebResponseContent>(result);
-                #endregion
-                //content = WebResponseContent.Instance.OK();
             }
             catch (Exception ex)
             {
@@ -829,5 +855,17 @@
         {
             return BaseDal.QueryFirst(x => x.PalletCode == barcode && x.NextAddress == nextAddress && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting), TaskOrderBy);
         }
+
+        private string GetIpAddress(string baseIp, string name)
+        {
+            var configz = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
+            var wcsBasez = configz.Where(x => x.ConfigKey == baseIp).FirstOrDefault()?.ConfigValue;
+            var address = configz.Where(x => x.ConfigKey == name).FirstOrDefault()?.ConfigValue;
+            if (wcsBasez == null || address == null)
+            {
+                throw new InvalidOperationException("WMS IP 鏈厤缃�");
+            }
+            return wcsBasez + address;
+        }
     }
 }
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
index 8352fc6..7e0cec8 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -1,5 +1,6 @@
 锘縰sing AutoMapper;
 using HslCommunication;
+using NetTaste;
 using Newtonsoft.Json;
 using Quartz;
 using SqlSugar;
@@ -43,6 +44,10 @@
         private readonly ICacheService _cacheService;
         private readonly INoticeService _noticeService;
 
+        private static List<string>? userTokenIds;
+        private static List<int>? userIds;
+
+
         public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService)
         {
             _taskService = taskService;
@@ -61,83 +66,142 @@
         public async Task Execute(IJobExecutionContext context)
         {
             string jobName = context.JobDetail.Key.Name;
-            if (MemoryLockManager.TryAcquireLock(jobName))
+            //if (MemoryLockManager.TryAcquireLock(jobName))
+            //{
+            try
             {
-                try
+                // 浠嶫obDataMap涓幏鍙栦紶閫掔殑鍙傛暟
+                CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams");
+                if (conveyorLine != null)
                 {
-                    CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams");
-                    if (conveyorLine != null)
-                    {
-                        List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode);
-                        var tasks = childDeviceCodes.Select(childDeviceCode => ProcessDeviceAsync(conveyorLine, childDeviceCode)).ToList();
-                        await Task.WhenAll(tasks);
+                    // 鏌ヨ鎵�鏈夊瓙璁惧鐨勪綅缃�
+                    List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode);
+                    // 骞惰澶勭悊姣忎釜瀛愯澶�
+                    var tasks = childDeviceCodes.Select(childDeviceCode => ProcessDeviceAsync(conveyorLine, childDeviceCode)).ToList();
+                    await Task.WhenAll(tasks);
 
-                        List<Dt_StationManager> stationManagers = _stationManagerService.GetAllStationByDeviceCode(conveyorLine.DeviceCode);
-                        foreach (var station in stationManagers)
+                    // 鑾峰彇鎵�鏈夌珯鐐圭鐞嗗櫒
+                    List<Dt_StationManager> stationManagers = _stationManagerService.GetAllStationByDeviceCode(conveyorLine.DeviceCode);
+                    foreach (var station in stationManagers)
+                    {
+                        if (station.stationType == 11)
                         {
-                            if (station.stationType == 11)
+                            // 璇诲彇浠诲姟鍛戒护鍜岃澶囧懡浠�
+                            ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(station.stationChildCode);
+                            ConveyorLineTaskCommandWrite commandWrite = conveyorLine.ReadCustomer<ConveyorLineTaskCommandWrite>(station.stationChildCode, "DeviceCommand");
+                            if (command != null && commandWrite != null)
                             {
-                                ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(station.stationChildCode);
-                                ConveyorLineTaskCommandWrite commandWrite = conveyorLine.ReadCustomer<ConveyorLineTaskCommandWrite>(station.stationChildCode, "DeviceCommand");
-                                if (command != null && commandWrite != null)
+                                // 灏嗕氦浜掍俊鍙疯浆鎹负甯冨皵鏁扮粍
+                                var structs = BitConverter.GetBytes(commandWrite.WriteInteractiveSignal).Reverse().ToArray().ToBoolArray();
+                                if (structs[0] == true)
                                 {
-                                    var structs = BitConverter.GetBytes(commandWrite.WriteInteractiveSignal).Reverse().ToArray().ToBoolArray();
-                                    if (structs[0] == true)
+                                    // 杈撳嚭璀﹀憡淇℃伅
+                                    ConsoleHelper.WriteWarningLine($"銆恵conveyorLine.DeviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵station.stationChildCode}銆戠┖鎵樼洏璇锋眰鎵爜鍏ュ簱");
+                                    // 澶勭悊鍏ュ簱璇锋眰
+                                    NGRequestTaskInbound(conveyorLine, command, station.stationChildCode, 0, station.stationLocation);
+                                }
+                                else
+                                {
+                                    // 鍙戦�佸畬鎴愪俊鍙�
+                                    ConveyorLineSendFinish(conveyorLine, station.stationChildCode, 0, false);
+                                }
+                            }
+                        }
+                        else if (station.stationType == 5)
+                        {
+                            // 璇诲彇浠诲姟鍛戒护鍜岃澶囧懡浠�
+                            ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(station.stationChildCode);
+                            ConveyorLineTaskCommandWrite commandWrite = conveyorLine.ReadCustomer<ConveyorLineTaskCommandWrite>(station.stationChildCode, "DeviceCommand");
+                            if (command != null && commandWrite != null)
+                            {
+                                // 灏嗕氦浜掍俊鍙疯浆鎹负甯冨皵鏁扮粍
+                                var structs = BitConverter.GetBytes(commandWrite.WriteInteractiveSignal).Reverse().ToArray().ToBoolArray();
+                                if (structs[0] == true)
+                                {
+                                    // 妫�鏌ユ槸鍚﹀瓨鍦ㄤ换鍔�
+                                    if (_taskRepository.QueryData(x => x.SourceAddress == station.stationChildCode).Count() > 0)
                                     {
-                                        ConsoleHelper.WriteWarningLine($"銆恵conveyorLine.DeviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵station.stationChildCode}銆戠┖鎵樼洏璇锋眰鎵爜鍏ュ簱");
-                                        NGRequestTaskInbound(conveyorLine, command, station.stationChildCode, 0, station.stationLocation);
+                                        return;
                                     }
-                                    else
-                                    {
-                                        ConveyorLineSendFinish(conveyorLine, station.stationChildCode, 0, false);
-                                    }
+                                    // 杈撳嚭璀﹀憡淇℃伅
+                                    ConsoleHelper.WriteWarningLine($"銆恵conveyorLine.DeviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵station.stationChildCode}銆戝紓甯稿彛璇锋眰鎵爜鍏ュ簱");
+                                    // 澶勭悊鏂颁换鍔�
+                                    await HandleNewTaskAsync(conveyorLine, command, station.stationChildCode, 0);
+                                }
+                                else
+                                {
+                                    // 鍙戦�佸畬鎴愪俊鍙�
+                                    ConveyorLineSendFinish(conveyorLine, station.stationChildCode, 0, false);
                                 }
                             }
                         }
                     }
                 }
-                catch (Exception ex)
-                {
-                    Console.Out.WriteLine(nameof(CommonConveyorLineJob) + ":" + ex.ToString());
-                }
-                finally
-                {
-                    MemoryLockManager.ReleaseLock(jobName);
-                }
             }
-            else
+            catch (Exception ex)
             {
-                ConsoleHelper.WriteErrorLine($"[CommonConveyorLineJob]銆恵jobName}銆戜换鍔″凡琚攣瀹氾紝鏃犳硶澶勭悊");
+                // 杈撳嚭寮傚父淇℃伅
+                Console.Out.WriteLine(nameof(CommonConveyorLineJob) + ":" + ex.ToString());
             }
+            //    finally
+            //    {
+            //        MemoryLockManager.ReleaseLock(jobName);
+            //    }
+            // }
+            // else
+            // {
+            //     ConsoleHelper.WriteErrorLine($"[CommonConveyorLineJob]銆恵jobName}銆戜换鍔″凡琚攣瀹氾紝鏃犳硶澶勭悊");
+            // }
             return;
         }
 
         private Task ProcessDeviceAsync(CommonConveyorLine conveyorLine, string childDeviceCode)
         {
+            // 璇诲彇浠诲姟鍛戒护鍜岃澶囧懡浠�
             ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode);
             ConveyorLineTaskCommandWrite commandWrite = conveyorLine.ReadCustomer<ConveyorLineTaskCommandWrite>(childDeviceCode, "DeviceCommand");
             if (command != null && commandWrite != null)
             {
+
                 #region 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇
 
-                var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken");
-                if (tokenInfos != null && tokenInfos.Any())
+                // 鑾峰彇缂撳瓨涓殑鐢ㄦ埛淇℃伅
+                if (userTokenIds == null && userIds == null)
                 {
-                    var userTokenIds = tokenInfos.Select(x => x.Token_ID).ToList();
-                    var userIds = tokenInfos.Select(x => x.UserId).ToList();
+                    var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken");
+                    if (tokenInfos != null && tokenInfos.Any())
+                    {
+                        userTokenIds = tokenInfos.Select(x => x.Token_ID).ToList();
+                        userIds = tokenInfos.Select(x => x.UserId).ToList();
 
+                        // 鏋勯�犻�氱煡鏁版嵁
+                        object obj = new
+                        {
+                            command,
+                            commandWrite
+                        };
+                        // 鍙戦�侀�氱煡
+                        _noticeService.LineData(userIds.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, childDeviceCode, data = obj });
+                    }
+                }
+                else
+                {
+                    // 鏋勯�犻�氱煡鏁版嵁
                     object obj = new
                     {
                         command,
                         commandWrite
                     };
+                    // 鍙戦�侀�氱煡
                     _noticeService.LineData(userIds.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, childDeviceCode, data = obj });
                 }
 
                 #endregion 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇
 
+                // 灏嗕氦浜掍俊鍙疯浆鎹负甯冨皵鏁扮粍
                 var writeInteractiveSignal = commandWrite.WriteInteractiveSignal;
                 var structs = BitConverter.GetBytes(writeInteractiveSignal).Reverse().ToArray().ToBoolArray();
+                // 鑾峰彇璁惧鍗忚璇︽儏
                 List<DeviceProtocolDetailDTO>? deviceProtocolDetails = conveyorLine.DeviceProtocolDetailDTOs.Where(x => x.DeviceProParamName == nameof(ConveyorLineTaskCommand.InteractiveSignal)).ToList();
 
                 if (deviceProtocolDetails != null)
@@ -147,116 +211,48 @@
                         int itemValue = item.ProtocalDetailValue.ObjToInt();
                         if (structs[itemValue] == true)
                         {
-                            var numRead = itemValue;
-                            var numWrite = itemValue + 1;
-                            ConsoleHelper.WriteWarningLine($"銆恵conveyorLine.DeviceName}銆戙�恵childDeviceCode}銆戙�恵numRead.ToString()}銆戜綅杈撻�佺嚎璇诲彇淇″彿锛氥�恵structs[itemValue]}銆� 銆恵numWrite}銆戜綅WCS鍐欏叆淇″彿锛氥�恵structs[itemValue + 1]}銆�");
-                            if (structs[itemValue + 1] != structs[itemValue])
+                            // 鑾峰彇澶勭悊鏂规硶
+                            MethodInfo? method = GetType().GetMethod(item.ProtocolDetailType);
+                            if (method != null)
                             {
-                                MethodInfo? method = GetType().GetMethod(item.ProtocolDetailType);
-                                if (method != null)
-                                {
-                                    command.InteractiveSignal = writeInteractiveSignal;
-                                    method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, itemValue });
-                                }
+                                command.InteractiveSignal = writeInteractiveSignal;
+                                // 璋冪敤澶勭悊鏂规硶
+                                method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, itemValue });
                             }
                         }
                         else
                         {
+                            // 鍙戦�佸畬鎴愪俊鍙�
                             ConveyorLineSendFinish(conveyorLine, childDeviceCode, itemValue, false);
                         }
                     }
                 }
 
+                // 鏌ヨ骞冲彴淇℃伅
                 Platform platform = _platFormRepository.QueryFirst(x => x.PLCCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
                 if (platform != null && !string.IsNullOrEmpty(platform.Location))
                 {
                     var strings = platform.Location.Split(',').ToList();
                     foreach (var ite in strings)
                     {
+                        // 璇诲彇浠诲姟鍛戒护
                         ConveyorLineTaskCommand command1 = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(ite);
                         if (command1.InteractiveSignal != 2)
                         {
                             command.InteractiveSignal = writeInteractiveSignal;
                             int count = strings.Count;
+                            // 鑾峰彇澶勭悊鏂规硶
                             MethodInfo? method = GetType().GetMethod(platform.ExecutionMethod);
                             if (method != null)
                             {
                                 command.InteractiveSignal = commandWrite.WriteInteractiveSignal;
+                                // 璋冪敤澶勭悊鏂规硶
                                 method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, count, platform });
                             };
                         }
                     }
                 }
 
-                #region
-                //var structs = BitConverter.GetBytes(commandWrite.WriteInteractiveSignal).Reverse().ToArray().ToBoolArray();
-
-                //List<DeviceProtocolDetailDTO>? deviceProtocolDetails = conveyorLine.DeviceProtocolDetailDTOs.Where(x => x.DeviceProParamName == nameof(ConveyorLineTaskCommand.InteractiveSignal)).ToList();
-
-                //if (deviceProtocolDetails != null)
-                //{
-                //    foreach (var item in deviceProtocolDetails)
-                //    {
-                //        if (structs[item.ProtocalDetailValue.ObjToInt()] == true)
-                //        {
-                //            MethodInfo? method = GetType().GetMethod(item.ProtocolDetailType);
-                //            if (method != null)
-                //            {
-                //                var numRead = item.ProtocalDetailValue.ObjToInt();
-                //                var numWrite = item.ProtocalDetailValue.ObjToInt() + 1;
-                //                ConsoleHelper.WriteWarningLine($"銆恵conveyorLine.DeviceName}銆戙�恵childDeviceCode}銆戙�恵numRead.ToString()}銆戜綅杈撻�佺嚎璇诲彇淇″彿锛氥�恵structs[item.ProtocalDetailValue.ObjToInt()]}銆� 銆恵numWrite}銆戜綅WCS鍐欏叆淇″彿锛氥�恵structs[item.ProtocalDetailValue.ObjToInt() + 1]}銆�");
-                //                if (structs[item.ProtocalDetailValue.ObjToInt() + 1] != structs[item.ProtocalDetailValue.ObjToInt()])
-                //                {
-                //                    command.InteractiveSignal = commandWrite.WriteInteractiveSignal;
-                //                    method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, item.ProtocalDetailValue.ObjToInt() });
-                //                }
-                //            }
-                //        }
-                //        else
-                //        {
-                //            ConveyorLineSendFinish(conveyorLine, childDeviceCode, item.ProtocalDetailValue.ObjToInt(), false);
-                //        }
-                //    }
-                //}
-
-                //Platform platform = _platFormRepository.QueryFirst(x => x.PLCCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
-                //if (platform != null)
-                //{
-                //    if (command.InteractiveSignal != 2)
-                //    {
-                //        MethodInfo? method = GetType().GetMethod(platform.ExecutionMethod);
-                //        if (method != null)
-                //        {
-                //            command.InteractiveSignal = commandWrite.WriteInteractiveSignal;
-                //            int count = string.IsNullOrEmpty(platform.Location) ? 0 + 1 : platform.Location.Split(',').Count() + 1;
-                //            method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, count, platform });
-                //        }
-                //    }
-                //    else
-                //    {
-                //        if (platform.Location != null && platform.Location != "")
-                //        {
-                //            var strings = platform.Location.Split(',').ToList();
-                //            foreach (var ite in strings)
-                //            {
-                //                //int index = strings.FindIndex(p => p == ite);
-                //                ConveyorLineTaskCommand command1 = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(ite);
-                //                if (command1.InteractiveSignal != 2)
-                //                {
-                //                    MethodInfo? method = GetType().GetMethod(platform.ExecutionMethod);
-                //                    if (method != null)
-                //                    {
-                //                        command.InteractiveSignal = commandWrite.WriteInteractiveSignal;
-                //                        //int count = strings.Count - index;
-                //                        int count = strings.Count;
-                //                        method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, count, platform });
-                //                    }
-                //                }
-                //            }
-                //        }
-                //    }
-                //}
-                #endregion
             }
             return Task.CompletedTask;
         }
@@ -270,44 +266,62 @@
         /// <param name="command">璇诲彇鐨勮姹備俊鎭�</param>
         /// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param>
         /// <param name="ProtocalDetailValue">绾夸綋褰撳墠bool璇诲彇鍋忕Щ鍦板潃</param>
-        public void RequestInbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
+        public async Task RequestInbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
         {
             try
             {
-                ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�");
+                // 杈撳嚭璀﹀憡淇℃伅锛岃〃绀轰换鍔″凡鍒拌揪瀛愯澶囧苟璇锋眰鎵爜鍏ュ簱
+                var log = $"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�";
+                ConsoleHelper.WriteWarningLine(log);
+                // 鍙戦�侀�氱煡
+                await _noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" });
+                WriteInfo(conveyorLine.DeviceName, log);
 
+                // 鏌ヨ鏉$爜瀵瑰簲鐨勪换鍔�
                 var task = _taskService.QueryBarCodeConveyorLineTask(command.Barcode, childDeviceCode);
                 if (task != null)
                 {
+                    // 濡傛灉浠诲姟绫诲瀷鏄嚭搴撴垨鍑烘墭鐩橈紝鍒欏鐞嗗嚭搴撲换鍔�
                     if (task.TaskType == (int)TaskOutboundTypeEnum.OutTray || task.TaskType == (int)TaskOutboundTypeEnum.Outbound)
                     {
                         HandleTaskOut(conveyorLine, command, childDeviceCode, ProtocalDetailValue, task);
                     }
                     else
                     {
+                        // 鑾峰彇浠诲姟鐨勪笅涓�鐩爣鍦板潃
                         var next = task.NextAddress;
+                        // 灏嗕换鍔℃槧灏勪负鍛戒护
                         var taskCommand = MapTaskCommand(task, command);
+                        // 鎭㈠浠诲姟鐨勪笅涓�鐩爣鍦板潃
                         task.NextAddress = next;
+                        // 鍙戦�佸懡浠ゅ埌瀛愯澶�
                         conveyorLine.SendCommand(taskCommand, childDeviceCode);
 
+                        // 杈撳嚭璀﹀憡淇℃伅锛岃〃绀轰换鍔″凡鍒拌揪瀛愯澶囧苟璇锋眰鎵爜鍏ュ簱锛屼笅涓�鐩爣鍦板潃
                         ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�,涓嬩竴鐩爣鍦板潃銆恵taskCommand.TargetAddress}銆�");
 
+                        // 鍙戦�佷换鍔″畬鎴愰�氱煡
                         ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+                        // 鏇存柊浠诲姟鐘舵�佷负涓嬩竴鐘舵��
                         _taskService.UpdateTaskStatusToNext(task);
                     }
                 }
                 else
                 {
+                    // 濡傛灉浠诲姟涓虹┖涓旀潯鐮佷笉涓�"NoRead"涓旀潯鐮佷笉涓虹┖锛屽垯澶勭悊鏂颁换鍔�
                     if (task == null && command.Barcode != "NoRead" && command.Barcode.IsNotEmptyOrNull())
                     {
+                        // 鏌ヨ鏉$爜瀵瑰簲鐨勪换鍔�
                         task = _taskService.QueryBarcodeTask(command.Barcode, childDeviceCode);
                         if (task == null)
-                            HandleNewTask(conveyorLine, command, childDeviceCode, ProtocalDetailValue);
+                            // 寮傛澶勭悊鏂颁换鍔�
+                            await HandleNewTaskAsync(conveyorLine, command, childDeviceCode, ProtocalDetailValue);
                     }
                 }
             }
             catch (Exception ex)
             {
+                // 鎹曡幏骞惰緭鍑哄紓甯镐俊鎭�
                 Console.Out.WriteLine(ex.ToString());
             }
         }
@@ -322,6 +336,7 @@
         /// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param>
         public void RequestInNextAddress(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode)
         {
+            ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傚叆搴撲笅涓�鍦板潃");
             Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
             if (task != null)
             {
@@ -361,7 +376,10 @@
             {
                 if (command.Barcode == task.PalletCode && childDeviceCode == task.NextAddress)
                 {
-                    ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍏ュ簱瀹屾垚,涓嬩竴鐩爣鍦板潃銆愮瓑寰呭垎閰嶈揣浣嶃��");
+                    //conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, "1000", childDeviceCode);
+
+                    ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍏ュ簱瀹屾垚,涓嬩竴鐩爣鍦板潃銆愮瓑寰呭垎閰嶈揣浣�,骞跺啓鍏�1000銆�");
+
                     ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
 
                     if (task.TaskType == (int)TaskInboundTypeEnum.InNG)
@@ -399,31 +417,40 @@
         /// <param name="ProtocalDetailValue">绾夸綋褰撳墠bool璇诲彇鍋忕Щ鍦板潃</param>
         public void RequestOutbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
         {
+            // 鏌ヨ杈撻�佺嚎浠诲姟锛屾牴鎹緭閫佺嚎璁惧鍜屽瓙璁惧浠g爜鑾峰彇浠诲姟淇℃伅
             var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode);
+
+            // 杈撳嚭鎴愬姛淇℃伅锛屽寘鎷緭閫佺嚎鍚嶇О銆佷换鍔″彿銆佹墭鐩樻潯鐮佸拰瀛愯澶囦唬鐮侊紝浠ュ強浠诲姟淇℃伅
             ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎璇锋眰鍑哄簱,task{task.ToJsonString()}");
+
+            // 濡傛灉浠诲姟涓嶄负绌猴紝鍒欐墽琛屼互涓嬫搷浣�
             if (task != null)
             {
-                //if (command.Barcode == task.PalletCode)
+                // 鑾峰彇浠诲姟鐨勪笅涓�鐩爣鍦板潃
+                var next = task.NextAddress;
+
+                // 灏嗕换鍔″懡浠ゆ槧灏勫埌褰撳墠浠诲姟
+                var taskCommand = MapTaskCommand(task, command);
+
+                // 鎭㈠浠诲姟鐨勪笅涓�鐩爣鍦板潃
+                task.NextAddress = next;
+
+                // 杈撳嚭鎴愬姛淇℃伅锛屽寘鎷緭閫佺嚎鍚嶇О銆佷换鍔″彿銆佹墭鐩樻潯鐮併�佸瓙璁惧浠g爜鍜屼笅涓�鐩爣鍦板潃
+                ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎璇锋眰鍑哄簱,涓嬩竴鐩爣鍦板潃銆恵taskCommand.TargetAddress}銆�");
+
+                // 鍚戣緭閫佺嚎鍙戦�佸懡浠�
+                conveyorLine.SendCommand(taskCommand, childDeviceCode);
+
+                // 瀹屾垚杈撻�佺嚎鍙戦�佷换鍔★紝骞舵洿鏂颁换鍔$姸鎬�
+                ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+
+                // 鏇存柊浠诲姟鐘舵�佸埌涓嬩竴涓姸鎬�
+                _taskService.UpdateTaskStatusToNext(task);
+
+                // 濡傛灉浠诲姟鐨勭洰鏍囧湴鍧�鏄�"1020-1"锛屽垯鍐嶆鏇存柊浠诲姟鐘舵�佸埌涓嬩竴涓姸鎬�
+                if (task.TargetAddress == "1020-1")
                 {
-                    //task.NextAddress = task.NextAddress.Replace("-1", "");
-                    //ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(task);
-                    //taskCommand.InteractiveSignal = command.InteractiveSignal;
-
-                    //ConveyorLineTaskCommand taskCommand = MapTaskCommand(task, command);
-
-                    var next = task.NextAddress;
-                    var taskCommand = MapTaskCommand(task, command);
-                    task.NextAddress = next;
-
-                    ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎璇锋眰鍑哄簱,涓嬩竴鐩爣鍦板潃銆恵taskCommand.TargetAddress}銆�");
-
-                    conveyorLine.SendCommand(taskCommand, childDeviceCode);
-                    ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
                     _taskService.UpdateTaskStatusToNext(task);
-                    if (task.TargetAddress == "1020-1")
-                    {
-                        _taskService.UpdateTaskStatusToNext(task);
-                    }
                 }
             }
         }
@@ -436,26 +463,40 @@
         /// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param>
         public void RequestOutNextAddress(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
         {
+            // 鎵撳嵃鎴愬姛鏃ュ織锛屾樉绀哄綋鍓嶈澶囧悕绉般�佷换鍔″彿銆佹墭鐩樻潯鐮佷互鍙婅姹傚嚭搴撲笅涓�鍦板潃鐨勫瓙璁惧浠g爜
+            ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎璇锋眰鍑哄簱涓嬩竴鍦板潃");
+
+            // 鏌ヨ姝e湪鎵ц鐨勮緭閫佺嚎浠诲姟锛屾牴鎹换鍔″彿鍜屽瓙璁惧浠g爜鑾峰彇浠诲姟淇℃伅
             Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
+
+            // 濡傛灉浠诲姟瀛樺湪
             if (task != null)
             {
+                // 妫�鏌ヤ换鍔′腑鐨勬墭鐩樻潯鐮佹槸鍚︿笌鍛戒护涓殑鎵樼洏鏉$爜涓�鑷�
                 if (command.Barcode == task.PalletCode)
                 {
+                    // 鏇存柊浠诲姟鐨勪綅缃俊鎭紝骞惰幏鍙栨洿鏂板悗鐨勪换鍔″璞�
                     Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
+
+                    // 濡傛灉鏇存柊鍚庣殑浠诲姟瀵硅薄涓嶄负绌�
                     if (newTask != null)
                     {
-                        //ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(newTask);
-                        //taskCommand.InteractiveSignal = command.InteractiveSignal;
-
-                        //ConveyorLineTaskCommand taskCommand = MapTaskCommand(newTask, command);
-
+                        // 鑾峰彇涓嬩竴鐩爣鍦板潃
                         var next = newTask.NextAddress;
+
+                        // 灏嗘柊浠诲姟瀵硅薄鏄犲皠涓轰换鍔″懡浠ゅ璞�
                         var taskCommand = MapTaskCommand(newTask, command);
+
+                        // 鎭㈠鏂颁换鍔″璞$殑涓嬩竴鐩爣鍦板潃
                         newTask.NextAddress = next;
 
+                        // 鎵撳嵃鎴愬姛鏃ュ織锛屾樉绀哄綋鍓嶈澶囧悕绉般�佷换鍔″彿銆佹墭鐩樻潯鐮併�佸瓙璁惧浠g爜浠ュ強涓嬩竴鐩爣鍦板潃
                         ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎璇锋眰鍑哄簱涓嬩竴鍦板潃,涓嬩竴鐩爣鍦板潃銆恵taskCommand.TargetAddress}銆�");
 
+                        // 鍙戦�佷换鍔″懡浠ゅ埌瀛愯澶�
                         conveyorLine.SendCommand(taskCommand, childDeviceCode);
+
+                        // 鏍囪杈撻�佺嚎鍙戦�佷换鍔″畬鎴�
                         ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
                     }
                 }
@@ -470,34 +511,63 @@
         /// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param>
         public void ConveyorLineOutFinish(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
         {
+            // 鎵撳嵃鎴愬姛淇℃伅锛岃〃绀烘墭鐩樺凡鍒拌揪鎸囧畾杈撻�佺嚎骞跺畬鎴愬嚭搴�
+            ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine.DeviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍑哄簱瀹屾垚");
+
+            // 鏌ヨ姝e湪鎵ц鐨勮緭閫佺嚎浠诲姟
             var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
+
+            // 濡傛灉浠诲姟瀛樺湪
             if (task != null)
             {
+                // 濡傛灉浠诲姟涓殑鎵樼洏鏉$爜涓庡懡浠や腑鐨勬墭鐩樻潯鐮佷竴鑷�
                 if (command.Barcode == task.PalletCode)
                 {
+                    // 鍒涘缓涓�涓┖鐨刉ebResponseContent瀵硅薄
                     WebResponseContent content = new WebResponseContent();
-                    //ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(task);
-                    //taskCommand.InteractiveSignal = command.InteractiveSignal;
-                    //ConveyorLineTaskCommand taskCommand = MapTaskCommand(task, command);
 
+                    // 淇濆瓨浠诲姟鐨勪笅涓�鐩爣鍦板潃
                     var next = task.NextAddress;
+                    // 灏嗕换鍔℃槧灏勪负鍛戒护
                     var taskCommand = MapTaskCommand(task, command);
+                    // 鎭㈠浠诲姟鐨勪笅涓�鐩爣鍦板潃
                     task.NextAddress = next;
 
+                    // 濡傛灉浠诲姟鐨勬墭鐩樻潯鐮佷笌鍛戒护涓殑鎵樼洏鏉$爜涓嶄竴鑷存垨鑰呬换鍔″娉ㄤ负"NG"
                     if (task.PalletCode != command.Barcode || task.Remark == "NG")
                     {
+                        // 鏌ヨ鐩爣鍦板潃鐨勫閲�
                         var NGAddress = _platFormRepository.QueryFirst(x => x.PlatCode == task.TargetAddress).Capacity;
+                        // 璁剧疆鍛戒护鐨勭洰鏍囧湴鍧�涓篘G鍦板潃
                         taskCommand.TargetAddress = NGAddress;
                     }
                     else
                     {
+                        // 璁剧疆鍛戒护鐨勭洰鏍囧湴鍧�涓�1000
                         taskCommand.TargetAddress = 1000;
                     }
 
+                    // 鎵撳嵃鎴愬姛淇℃伅锛岃〃绀烘墭鐩樺凡鍒拌揪鎸囧畾杈撻�佺嚎骞跺畬鎴愬嚭搴擄紝涓嬩竴鐩爣鍦板潃宸茬‘瀹�
                     ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine.DeviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍑哄簱瀹屾垚,涓嬩竴鐩爣鍦板潃銆恵taskCommand.TargetAddress}銆�");
+                    // 鍙戦�佸懡浠ゅ埌杈撻�佺嚎
                     conveyorLine.SendCommand(taskCommand, childDeviceCode);
+                    // 瀹屾垚杈撻�佺嚎鍙戦��
                     ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+                    // 鏇存柊浠诲姟鐘舵�佸埌涓嬩竴涓姸鎬�
                     content = _taskService.UpdateTaskStatusToNext(task);
+                }
+                else
+                {
+                    // 鏌ヨ鐩爣鍦板潃鐨勫閲�
+                    var NGAddress = _platFormRepository.QueryFirst(x => x.PlatCode == task.TargetAddress).Capacity;
+                    // 鎵撳嵃鎴愬姛淇℃伅锛岃〃绀烘墭鐩樺凡鍒拌揪鎸囧畾杈撻�佺嚎骞跺畬鎴愬嚭搴擄紝涓嬩竴鐩爣鍦板潃宸茬‘瀹�
+                    ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine.DeviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍑哄簱瀹屾垚,涓嬩竴鐩爣鍦板潃銆恵NGAddress}銆�");
+                    // 璁剧疆杈撻�佺嚎鐨勭洰鏍囧湴鍧�涓篘G鍦板潃
+                    conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, NGAddress, childDeviceCode);
+                    // 瀹屾垚杈撻�佺嚎鍙戦��
+                    ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+                    // 鏇存柊浠诲姟鐘舵�佸埌涓嬩竴涓姸鎬�
+                    _taskService.UpdateTaskStatusToNext(task);
                 }
             }
         }
@@ -513,10 +583,21 @@
         /// <param name="value">鍊�</param>
         public void ConveyorLineSendFinish(CommonConveyorLine conveyorLine, string childDeviceCode, int ProtocalDetailValue, bool value)
         {
+            // 浠巆onveyorLine涓殑DeviceProDTOs鍒楄〃涓煡鎵剧涓�涓鍚堟潯浠剁殑DeviceProDTO瀵硅薄
+            // 鏉′欢鏄疍eviceProParamType绛変簬DeviceCommand锛屼笖DeviceChildCode绛変簬childDeviceCode
+            // 鏌ユ壘缁撴灉鎸塂eviceProOffset鍗囧簭鎺掑垪
             DeviceProDTO? devicePro = conveyorLine.DeviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand) && x.DeviceChildCode == childDeviceCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
+
+            // 灏哾evicePro鐨凞eviceProAddress鎸�'.'鍒嗗壊鎴愬瓧绗︿覆鏁扮粍x
             string[] x = devicePro.DeviceProAddress.Split('.');
+
+            // 灏嗘暟缁剎鐨勬渶鍚庝竴涓厓绱犳浛鎹负ProtocalDetailValue鍔�1鍚庣殑瀛楃涓插舰寮�
             x[x.Length - 1] = (ProtocalDetailValue + 1).ToString();
+
+            // 灏嗕慨鏀瑰悗鐨勬暟缁剎閲嶆柊鎷兼帴鎴愬瓧绗︿覆锛屼綔涓烘柊鐨凞eviceProAddress
             string DeviceProAddress = string.Join(".", x);
+
+            // 浣跨敤conveyorLine鐨凜ommunicator瀵硅薄鐨刉rite鏂规硶锛屽皢value鍐欏叆鏂扮殑DeviceProAddress鍦板潃
             conveyorLine.Communicator.Write(DeviceProAddress, value);
         }
 
@@ -529,19 +610,24 @@
         /// <param name="command">璇诲彇鐨勮姹備俊鎭�</param>
         /// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param>
         /// <param name="index">绾夸綋褰撳墠bool璇诲彇鍋忕Щ鍦板潃</param>
+        // 瀹氫箟涓�涓紓姝ユ柟娉曪紝鐢ㄤ簬澶勭悊绌烘墭鐩樿繑鍥炰换鍔�
         public async void EmptyTrayReturn(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int index, Platform platform)
         {
             try
             {
+                // 瀹氫箟浠诲姟绫诲瀷鏋氫妇鍙橀噺
                 TaskOutboundTypeEnum taskOutboundTypeEnum;
+                // 鏍规嵁骞冲彴绫诲瀷璁剧疆浠诲姟绫诲瀷鏋氫妇
                 if (platform.PlatformType.Contains("OutTray"))
                     taskOutboundTypeEnum = TaskOutboundTypeEnum.OutTray;
                 else
                     taskOutboundTypeEnum = TaskOutboundTypeEnum.Outbound;
+                // 璋冪敤妫�鏌ュ苟鍒涘缓浠诲姟鐨勬柟娉�
                 await CheckAndCreateTask(taskOutboundTypeEnum, childDeviceCode, index, platform.Stacker, platform);
             }
             catch (Exception)
             {
+                // 鎹曡幏骞跺拷鐣ュ紓甯�
             }
         }
 
@@ -550,38 +636,44 @@
         /// </summary>
         private async Task CheckAndCreateTask(TaskOutboundTypeEnum taskType, string childDeviceCode, int index, string roadWay, Platform platform)
         {
+            // 鏌ヨ鏁版嵁搴撲腑宸叉湁鐨勪换鍔�
             var tasks = _taskRepository.QueryData(x => x.TaskType == (int)taskType && x.TargetAddress == childDeviceCode);
+            // 濡傛灉宸叉湁浠诲姟鏁伴噺灏忎簬鎸囧畾绱㈠紩
             if (tasks.Count < index)
             {
-                //ConsoleHelper.WriteErrorLine($"銆恵childDeviceCode}銆戣姹傘�恵taskType.ToString()}銆戜换鍔�,宸叉湁銆恵taskType.ToString()}銆戜换鍔°�恵tasks.Count}銆�,鏈�澶氭嫢鏈夈�恵index - 1}銆�");
+                // 璋冪敤WMS鑾峰彇鍑哄簱浠诲姟
 
                 #region 璋冪敤WMS鑾峰彇鍑哄簱浠诲姟
 
+                // 瀹氫箟WMS浠诲姟鏁版嵁浼犺緭瀵硅薄
                 WMSTaskDTO taskDTO = new WMSTaskDTO();
 
-                // 鑾峰彇WMSip鍦板潃
+                // 鑾峰彇WMS IP鍦板潃閰嶇疆
                 var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                 var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
                 var requestTrayOutTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTrayOutTask)?.ConfigValue;
+                // 濡傛灉WMS IP鍦板潃鏈厤缃紝鎶涘嚭寮傚父
                 if (wmsBase == null || requestTrayOutTask == null)
                 {
                     throw new InvalidOperationException("WMS IP 鏈厤缃�");
                 }
                 var wmsIpAddress = wmsBase + requestTrayOutTask;
 
+                // 鍙戦�丠TTP POST璇锋眰鑾峰彇浠诲姟鏁版嵁
                 var result = await HttpHelper.PostAsync(wmsIpAddress, new { position = childDeviceCode, tag = (int)taskType, areaCdoe = roadWay, platform.ProductionLine }.ToJsonString());
-                //var result = await HttpHelper.PostAsync("http://localhost:5000/api/Task/RequestTrayOutTaskAsync", dynamic.ToJsonString());
-
+                // 瑙f瀽杩斿洖鐨凧SON鏁版嵁
                 WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result);
 
-                // 妫�鏌ョ姸鎬佸苟杩斿洖
+                // 妫�鏌ヨ繑鍥炵姸鎬侊紝濡傛灉澶辫触鍒欒繑鍥�
                 if (!content.Status)
                     return;
 
+                // 瑙f瀽浠诲姟鏁版嵁
                 taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString());
 
                 #endregion 璋冪敤WMS鑾峰彇鍑哄簱浠诲姟
 
+                // 鍒涘缓骞跺彂閫佷换鍔�
                 CreateAndSendTask(taskDTO);
             }
         }
@@ -601,7 +693,7 @@
 
         #endregion 妫�娴嬬┖鐩樺疄鐩樹换鍔�
 
-        #region 鍖栨垚NG鍙e叆搴�
+        #region 璁惧NG鍙e叆搴�
 
         public void NGRequestTaskInbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue, string TargetAddress)
         {
@@ -632,50 +724,44 @@
             WriteInfo("鍏ョ珯鏍¢獙", $"銆恵childDeviceCode}銆戝叆绔欐牎楠岃繑鍥炲弬鏁般�恵result}銆�");
             ResultTrayCellsStatus result1 = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(result);
 
-            var serialNosError = result1.SerialNos.Where(x => x.SerialNoStatus != 1).ToList();
-            if (serialNosError.Count > 0)
+            if (result1.Success)
             {
-                return;
-            }
 
-            if (result1.SerialNos.Count <= 0)
-            {
-                // 绌烘墭鐩樺叆搴撻�昏緫
-                Dt_Task dt_Task = new Dt_Task()
+                var serialNosError = result1.SerialNos.Where(x => x.SerialNoStatus != 1).ToList();
+                if (serialNosError.Count > 0)
                 {
-                    TargetAddress = TargetAddress,
-                    PalletCode = command.Barcode,
-                    NextAddress = TargetAddress,
-                    TaskNum = 0
-                };
-                //ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(dt_Task);
-                //taskCommand.InteractiveSignal = command.InteractiveSignal;
+                    return;
+                }
 
-                //ConveyorLineTaskCommand taskCommand = MapTaskCommand(dt_Task, command);
+                if (result1.SerialNos.Count <= 0)
+                {
+                    // 绌烘墭鐩樺叆搴撻�昏緫
+                    Dt_Task dt_Task = new Dt_Task()
+                    {
+                        TargetAddress = TargetAddress,
+                        PalletCode = command.Barcode,
+                        NextAddress = TargetAddress,
+                        TaskNum = 0
+                    };
 
-                var next = dt_Task.NextAddress;
-                var taskCommand = MapTaskCommand(dt_Task, command);
-                dt_Task.NextAddress = next;
+                    var next = dt_Task.NextAddress;
+                    var taskCommand = MapTaskCommand(dt_Task, command);
+                    dt_Task.NextAddress = next;
 
-                conveyorLine.SendCommand(taskCommand, childDeviceCode);
+                    conveyorLine.SendCommand(taskCommand, childDeviceCode);
 
-                ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+                    ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+                }
+                else
+                {
+                    conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, 1000, childDeviceCode);
+
+                    ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+                }
             }
             else
             {
-                // 绌烘墭鐩樺叆搴撻�昏緫
-                Dt_Task dt_Task = new Dt_Task()
-                {
-                    TargetAddress = TargetAddress,
-                    PalletCode = command.Barcode,
-                    NextAddress = "1000",
-                    TaskNum = 0
-                };
-                ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(dt_Task);
-                taskCommand.InteractiveSignal = command.InteractiveSignal;
-                conveyorLine.SendCommand(taskCommand, childDeviceCode);
 
-                ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
             }
         }
 
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
index 7fd4c81..c8cfb1b 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
@@ -50,7 +50,7 @@
         /// <summary>
         /// 澶勭悊鏂颁换鍔�
         /// </summary>
-        private async void HandleNewTask(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
+        private async Task HandleNewTaskAsync(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
         {
             var stationManager = _stationManagerRepository.QueryFirst(x => x.stationChildCode == childDeviceCode && x.stationPLC == conveyorLine.DeviceCode);
 
@@ -79,19 +79,6 @@
                 default:
                     break;
             }
-
-            //if ((conveyorLine.DeviceCode == "1003" && childDeviceCode == "1016") || (conveyorLine.DeviceCode == "1005" && childDeviceCode == "1048"))
-            //{
-            //    await CreateAndSendEmptyTrayTask(conveyorLine, command, childDeviceCode, ProtocalDetailValue);
-            //}
-            //else if ((conveyorLine.DeviceCode == "1001" && childDeviceCode == "1088") || (conveyorLine.DeviceCode == "1004" && childDeviceCode == "1339"))
-            //{
-            //    await RequestWmsTask(conveyorLine, command, childDeviceCode, ProtocalDetailValue);
-            //}
-            //else if ((conveyorLine.DeviceCode == "1001" && childDeviceCode == "1068"))
-            //{
-            //    ConveyorLineOutFinish(conveyorLine, command, childDeviceCode, ProtocalDetailValue);
-            //}
         }
 
         /// <summary>
@@ -221,18 +208,15 @@
                 var task = _taskService.QueryBarCodeConveyorLineTask(command.Barcode, childDeviceCode);
                 if (task != null)
                 {
-                    if (task.NextAddress.Contains("JZ"))
+                    if (task.SourceAddress == "1059-4")
                     {
-                        int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskInStatusEnum>();
-                        task.TaskState = nextStatus;
+                        //conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, "1000", childDeviceCode);
 
-                        ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵task.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵task.PalletCode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�(瀹炵洏),涓嬩竴鐩爣鍦板潃銆恵task.TargetAddress}銆�");
-                        _taskService.UpdateTaskStatusToNext(task);
+                        ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵task.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵task.PalletCode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�(瀹炵洏),涓嬩竴鐩爣鍦板潃銆恵1000}銆�");
                         ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
                     }
                     else
                     {
-                        //var taskCommand = MapTaskCommand(task, command);
                         var next = task.NextAddress;
                         var taskCommand = MapTaskCommand(task, command);
                         task.NextAddress = next;
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
index 748c23a..722251a 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -1,21 +1,15 @@
-锘縰sing Autofac.Core;
-using HslCommunication;
-using Mapster;
-using Newtonsoft.Json;
+锘縰sing Mapster;
 using Quartz;
 using System.Diagnostics.CodeAnalysis;
-using System.Threading.Tasks;
 using WIDESEAWCS_BasicInfoRepository;
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core.Caches;
 using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_Core.HttpContextUser;
-using WIDESEAWCS_DTO.MOM;
 using WIDESEAWCS_IProcessRepository;
 using WIDESEAWCS_ITaskInfo_HtyRepository;
 using WIDESEAWCS_ITaskInfoRepository;
 using WIDESEAWCS_ITaskInfoService;
-using WIDESEAWCS_Model;
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_QuartzJob;
 using WIDESEAWCS_QuartzJob.DeviceBase;
@@ -98,28 +92,25 @@
                     #region 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇
 
                     var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken");
-                    if (tokenInfos == null || !tokenInfos.Any())
+                    if (tokenInfos != null && tokenInfos.Any())
                     {
-                        //throw new Exception(commonStackerCrane.DeviceName + "缂撳瓨涓湭鎵惧埌Token缂撳瓨");
-                        return Task.CompletedTask;
-                    }
-                    var userTokenIds = tokenInfos?.Select(x => x.Token_ID).ToList();
-                    var userIds = tokenInfos?.Select(x => x.UserId).ToList();
+                        var userTokenIds = tokenInfos?.Select(x => x.Token_ID).ToList();
+                        var userIds = tokenInfos?.Select(x => x.UserId).ToList();
 
-                    object obj = new
-                    {
-                        commonStackerCrane.StackerCraneStatusDes,
-                        commonStackerCrane.StackerCraneAutoStatusDes,
-                        commonStackerCrane.StackerCraneWorkStatusDes,
-                        commonStackerCrane.DeviceCode,
-                        commonStackerCrane.DeviceName,
-                        commonStackerCrane.CurrentTaskNum,
-                        commonStackerCrane.LastTaskNum,
-                    };
-                    _noticeService.StackerData(userIds?.FirstOrDefault(), userTokenIds, new { commonStackerCrane.DeviceName, data = obj });
+                        object obj = new
+                        {
+                            commonStackerCrane.StackerCraneStatusDes,
+                            commonStackerCrane.StackerCraneAutoStatusDes,
+                            commonStackerCrane.StackerCraneWorkStatusDes,
+                            commonStackerCrane.DeviceCode,
+                            commonStackerCrane.DeviceName,
+                            commonStackerCrane.CurrentTaskNum,
+                            commonStackerCrane.LastTaskNum,
+                        };
+                        _noticeService.StackerData(userIds?.FirstOrDefault(), userTokenIds, new { commonStackerCrane.DeviceName, data = obj });
+                    }
 
                     #endregion 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇
-
                 }
             }
             catch (Exception ex)
@@ -321,7 +312,6 @@
             return null;
         }
 
-
         /// <summary>
         /// 鏌ユ壘鍏朵粬鍑哄簱浠诲姟鐨勮緟鍔╂柟娉曪紙鎺掗櫎鎸囧畾浠诲姟ID鐨勪换鍔★級
         /// </summary>
@@ -370,13 +360,21 @@
             stackerCraneTaskCommand.StartCommand = 1;
             if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//鍒ゆ柇鏄惁鏄叆搴撲换鍔�
             {
-                List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway);
-                if (routers.Count > 0)
+                if (task.SourceAddress == "1359-4" && task.Roadway.Contains("JZ"))
                 {
-                    stackerCraneTaskCommand.StartRow = Convert.ToInt16(routers.FirstOrDefault().SrmRow);
-                    stackerCraneTaskCommand.StartColumn = Convert.ToInt16(routers.FirstOrDefault().SrmColumn);
-                    stackerCraneTaskCommand.StartLayer = Convert.ToInt16(routers.FirstOrDefault().SrmLayer);
-
+                    string[] souredCodes = task.CurrentAddress.Split("-");
+                    if (souredCodes.Length == 3)
+                    {
+                        stackerCraneTaskCommand.StartRow = Convert.ToInt16(souredCodes[0]);
+                        stackerCraneTaskCommand.StartColumn = Convert.ToInt16(souredCodes[1]);
+                        stackerCraneTaskCommand.StartLayer = Convert.ToInt16(souredCodes[2]);
+                    }
+                    else
+                    {
+                        //鏁版嵁閰嶇疆閿欒
+                        _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍏ュ簱浠诲姟璧风偣閿欒锛岃捣鐐癸細銆恵task.CurrentAddress}銆�");
+                        return null;
+                    }
                     string[] targetCodes = task.NextAddress.Split("-");
                     if (targetCodes.Length == 3)
                     {
@@ -393,8 +391,32 @@
                 }
                 else
                 {
-                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鑾峰彇瀵瑰簲鐨勫爢鍨涙満鍙栬揣绔欏彴淇℃伅");
-                    return null;
+                    List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway);
+                    if (routers.Count > 0)
+                    {
+                        stackerCraneTaskCommand.StartRow = Convert.ToInt16(routers.FirstOrDefault().SrmRow);
+                        stackerCraneTaskCommand.StartColumn = Convert.ToInt16(routers.FirstOrDefault().SrmColumn);
+                        stackerCraneTaskCommand.StartLayer = Convert.ToInt16(routers.FirstOrDefault().SrmLayer);
+
+                        string[] targetCodes = task.NextAddress.Split("-");
+                        if (targetCodes.Length == 3)
+                        {
+                            stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]) % 2 != 0 ? (short)1 : (short)2;
+                            stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
+                            stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
+                        }
+                        else
+                        {
+                            //鏁版嵁閰嶇疆閿欒
+                            _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍏ュ簱浠诲姟缁堢偣閿欒锛岃捣鐐癸細銆恵task.NextAddress}銆�");
+                            return null;
+                        }
+                    }
+                    else
+                    {
+                        _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鑾峰彇瀵瑰簲鐨勫爢鍨涙満鍙栬揣绔欏彴淇℃伅");
+                        return null;
+                    }
                 }
             }
             else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
@@ -412,31 +434,45 @@
                 }
                 else
                 {
-                    List<Dt_Router> routers = _routerService.QueryNextRoutes(task.Roadway, task.TargetAddress);
-                    if (routers.Count > 0)
+                    if (task.TargetAddress == "002-021-001" && task.Roadway.Contains("JZ") && task.TaskType == (int)TaskOutboundTypeEnum.OutTray)
                     {
-                        stackerCraneTaskCommand.EndRow = Convert.ToInt16(routers.FirstOrDefault().SrmRow);
-                        stackerCraneTaskCommand.EndColumn = Convert.ToInt16(routers.FirstOrDefault().SrmColumn);
-                        stackerCraneTaskCommand.EndLayer = Convert.ToInt16(routers.FirstOrDefault().SrmLayer);
-
-                        string[] sourceCodes = task.CurrentAddress.Split("-");
-                        if (sourceCodes.Length == 3)
-                        {
-                            stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]) % 2 != 0 ? (short)1 : (short)2;
-                            stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
-                            stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
-                        }
-                        else
-                        {
-                            //鏁版嵁閰嶇疆閿欒
-                            _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍑哄簱浠诲姟璧风偣閿欒锛岃捣鐐癸細銆恵task.CurrentAddress}銆�");
-                            return null;
-                        }
+                        string[] endCodes = task.NextAddress.Split("-");
+                        stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]);
+                        stackerCraneTaskCommand.EndColumn = Convert.ToInt16(endCodes[1]);
+                        stackerCraneTaskCommand.EndLayer = Convert.ToInt16(endCodes[2]);
+                        string[] sourceCodes = task.SourceAddress.Split("-");
+                        stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]) % 2 != 0 ? (short)1 : (short)2;
+                        stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
+                        stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
                     }
                     else
                     {
-                        _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鑾峰彇瀵瑰簲鐨勫爢鍨涙満鏀捐揣绔欏彴淇℃伅");
-                        return null;
+                        List<Dt_Router> routers = _routerService.QueryNextRoutes(task.Roadway, task.TargetAddress);
+                        if (routers.Count > 0)
+                        {
+                            stackerCraneTaskCommand.EndRow = Convert.ToInt16(routers.FirstOrDefault().SrmRow);
+                            stackerCraneTaskCommand.EndColumn = Convert.ToInt16(routers.FirstOrDefault().SrmColumn);
+                            stackerCraneTaskCommand.EndLayer = Convert.ToInt16(routers.FirstOrDefault().SrmLayer);
+
+                            string[] sourceCodes = task.CurrentAddress.Split("-");
+                            if (sourceCodes.Length == 3)
+                            {
+                                stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]) % 2 != 0 ? (short)1 : (short)2;
+                                stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
+                                stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
+                            }
+                            else
+                            {
+                                //鏁版嵁閰嶇疆閿欒
+                                _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鍑哄簱浠诲姟璧风偣閿欒锛岃捣鐐癸細銆恵task.CurrentAddress}銆�");
+                                return null;
+                            }
+                        }
+                        else
+                        {
+                            _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鑾峰彇瀵瑰簲鐨勫爢鍨涙満鏀捐揣绔欏彴淇℃伅");
+                            return null;
+                        }
                     }
                 }
             }
@@ -471,6 +507,5 @@
             }
             return stackerCraneTaskCommand;
         }
-
     }
 }
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/api/http.js b/Code Management/WMS/WIDESEA_WMSClient/src/api/http.js
index 8a14d24..aa57a03 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/api/http.js
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/api/http.js
@@ -11,8 +11,8 @@
 let loadingInstance
 let loadingStatus = false
 if (process.env.NODE_ENV == 'development') {
-  axios.defaults.baseURL = 'http://localhost:5000/';
-  // axios.defaults.baseURL = 'http://192.168.20.251:5000/';
+  // axios.defaults.baseURL = 'http://localhost:5000/';
+  axios.defaults.baseURL = 'http://192.168.5.251:5000/';
 }
 else if (process.env.NODE_ENV == 'debug') {
   axios.defaults.baseURL = 'http://127.0.0.1:9991/';
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_BillGroupStock.vue b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_BillGroupStock.vue
index 426de9b..e558cd1 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_BillGroupStock.vue
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_BillGroupStock.vue
@@ -53,7 +53,7 @@
             [{ field: 'id', title: '搴撳瓨ID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
             { field: 'locationCode', title: '搴撲綅', type: 'string', width: 110, align: 'left',  },
             { field: 'palletCode', title: '鎵樼洏鏉$爜', type: 'string', width: 110, align: 'left', },
-            { field: 'isFull', title: '搴撳瓨绫诲瀷', type: 'bool', width: 110, align: 'left', bind: { key: "isFull", data: [] }, },
+            { field: 'isFull', title: '搴撳瓨绫诲瀷', type: 'bool', width: 110, align: 'left', bind: { key: "isFull", data: [{ key: false, value: '绌虹洏'},{ key: true, value: '瀹炵洏'}] }, },
             { field: 'linedProcessFeedbackTime', title: '宸ヨ壓寮�濮嬫椂闂�', type: 'string', width: 110, align: 'left',},
             { field: 'specialParameterDuration', title: '宸ヨ壓鏃堕暱', type: 'string', width: 110, align: 'left', sort: true },
             { field: 'outboundTime', title: '搴斿嚭搴撴椂闂�', type: 'string', width: 110, align: 'left', sort: true  },
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
index 6c10ac6..934d40c 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
@@ -130,9 +130,22 @@
                 if (expressionType == LinqExpressionType.Equal)
                 {
                     if (string.IsNullOrEmpty(where))
+                    {
+                        // 閽堝瀛楃涓茬被鍨嬬殑瀛楁浣跨敤妯$硦鏌ヨ
                         where += $"{searchParametersList[i].Name} like '%{searchParametersList[i].Value}%'";
+                    }
                     else
-                        where += $" and {searchParametersList[i].Name} = '{searchParametersList[i].Value}'";
+                    {
+                        // 閽堝甯冨皵绫诲瀷瀛楁杩涜绮剧‘鏌ヨ
+                        if (searchParametersList[i].Value.ToLower() == "true" || searchParametersList[i].Value.ToLower() == "false")
+                        {
+                            where += $" and {searchParametersList[i].Name} = {searchParametersList[i].Value.ToLower()}";
+                        }
+                        else
+                        {
+                            where += $" and {searchParametersList[i].Name} like '%{searchParametersList[i].Value}%'";
+                        }
+                    }
                 }
                 else
                 {
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs
index f92e3a5..557390a 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs
@@ -190,6 +190,14 @@
     Task<WebResponseContent> CreateAndSendOutboundTask(string locationCode, string palletCode);
 
     /// <summary>
+    /// 鎸囧畾浠诲姟鍑哄簱
+    /// </summary>
+    /// <param name="palletCode">鎵樼洏鍙�</param>
+    /// <param name="position">浣嶇疆</param>
+    /// <returns></returns>
+    Task<WebResponseContent> CreateAndSendInboundTask(string palletCode, string position);
+
+    /// <summary>
     /// 甯告俯琛ョ┖鎵樼洏鑷冲垎瀹�
     /// </summary>
     /// <param name="taskDTO"></param>
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index c940d53..d6eb132 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -1,6 +1,7 @@
 锘縰sing Mapster;
 using Masuit.Tools;
 using System.Text.RegularExpressions;
+using System.Threading.Tasks;
 using WIDESEA_Core.Const;
 using WIDESEA_DTO.MOM;
 using WIDESEA_DTO.WMS;
@@ -285,7 +286,7 @@
         WebResponseContent content = new WebResponseContent();
         try
         {
-            if (task.TaskType == (int)TaskInboundTypeEnum.InNG)
+            if (task.TaskType == (int)TaskInboundTypeEnum.InNG || task.TaskType == (int)TaskInboundTypeEnum.InQuality)
             {
                 task.TaskState = (int)TaskInStatusEnum.SC_InFinish;
                 // 鍒涘缓鍘嗗彶浠诲姟瀹炰緥妯″瀷
@@ -539,6 +540,7 @@
             case (int)TaskInboundTypeEnum.Inbound:
             case (int)TaskInboundTypeEnum.InTray:
             case (int)TaskInboundTypeEnum.InNG:
+            case (int)TaskInboundTypeEnum.InQuality:
                 LogFactory.GetLog("浠诲姟瀹屾垚").InfoFormat(true, "鍏ュ簱浠诲姟", "");
                 return await CompleteInboundTaskAsync(task);
 
@@ -1325,7 +1327,7 @@
 
     #region 闈欑疆寮傚父鍙e叆搴�
 
-    public async Task<WebResponseContent> CreateAndSendInboundTask(string locationCode, string palletCode, string position)
+    public async Task<WebResponseContent> CreateAndSendInboundTask(string palletCode, string position)
     {
         WebResponseContent content = new WebResponseContent();
         try
@@ -1334,65 +1336,82 @@
             var stockInfo = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == palletCode);
             if (stockInfo == null)
             {
+                var taskOld = BaseDal.QueryFirst(x => x.PalletCode == palletCode);
+                if (!taskOld.IsNullOrEmpty())
+                {// 鍒涘缓WMS浠诲姟
+                    WMSTaskDTO taskDTO = new WMSTaskDTO()
+                    {
+                        TaskNum = taskOld.TaskNum.Value,
+                        Grade = 1,
+                        PalletCode = taskOld.PalletCode,
+                        RoadWay = taskOld.Roadway,
+                        SourceAddress = taskOld.CurrentAddress,
+                        TargetAddress = taskOld.TargetAddress,
+                        TaskState = taskOld.TaskState.Value,
+                        Id = 0,
+                        TaskType = taskOld.TaskType,
+                    };
+                    return content.OK(data: taskDTO);
+                }
                 var area = _areaInfoRepository.QueryFirst(x => x.AreaID == 2);
                 var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == position);
                 TrayCellsStatusDto trayCells = CreateTrayCellsStatusDto(area, palletCode);
                 content = await GetTrayCellStatusAsync(trayCells);
                 if (!content.Status) return content;
 
+                ConsoleHelper.WriteErrorLine(content.ToJsonString());
                 var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString());
-                if (!result.Success)
+                if (result.SerialNos.Count > 0)
                 {
-                    if (result.SerialNos.Count <= 0)
+                    var location = await GetLocationDistributeAsync(station.Roadway);
+
+                    ConsoleHelper.WriteErrorLine(location.ToJsonString());
+                    // 鍒涘缓鏂颁换鍔″疄渚�
+                    var task = new Dt_Task
                     {
-                        var location = await GetLocationDistributeAsync(station.Roadway);
-                        // 鍒涘缓鏂颁换鍔″疄渚�
-                        var task = new Dt_Task
-                        {
-                            CurrentAddress = locationCode,
-                            Grade = 1,
-                            Roadway = station.Roadway,
-                            TargetAddress = location.LocationCode,
-                            Dispatchertime = DateTime.Now,
-                            MaterialNo = "",
-                            NextAddress = location.LocationCode,
-                            OrderNo = null,
-                            PalletCode = palletCode,
-                            SourceAddress = locationCode,
-                            TaskState = (int)TaskInStatusEnum.Line_InFinish,
-                            TaskType = (int)TaskInboundTypeEnum.Inbound,
-                            TaskNum = await BaseDal.GetTaskNo(),
-                            Creater = "Systeam"
-                        };
+                        CurrentAddress = station.stationLocation,
+                        Grade = 1,
+                        Roadway = station.Roadway,
+                        TargetAddress = location.LocationCode,
+                        Dispatchertime = DateTime.Now,
+                        MaterialNo = "",
+                        NextAddress = location.LocationCode,
+                        OrderNo = null,
+                        PalletCode = palletCode,
+                        SourceAddress = position,
+                        TaskState = (int)TaskInStatusEnum.Line_InFinish,
+                        TaskType = (int)TaskInboundTypeEnum.Inbound,
+                        TaskNum = await BaseDal.GetTaskNo(),
+                        Creater = "Systeam"
+                    };
 
-                        // 鍒涘缓WMS浠诲姟
-                        WMSTaskDTO taskDTO = new WMSTaskDTO()
-                        {
-                            TaskNum = task.TaskNum.Value,
-                            Grade = 1,
-                            PalletCode = task.PalletCode,
-                            RoadWay = task.Roadway,
-                            SourceAddress = task.SourceAddress,
-                            TargetAddress = task.Roadway,
-                            TaskState = task.TaskState.Value,
-                            Id = 0,
-                            TaskType = task.TaskType,
-                        };
+                    // 鍒涘缓WMS浠诲姟
+                    WMSTaskDTO taskDTO = new WMSTaskDTO()
+                    {
+                        TaskNum = task.TaskNum.Value,
+                        Grade = 1,
+                        PalletCode = task.PalletCode,
+                        RoadWay = task.Roadway,
+                        SourceAddress = task.SourceAddress,
+                        TargetAddress = task.TargetAddress,
+                        TaskState = task.TaskState.Value,
+                        Id = 0,
+                        TaskType = task.TaskType,
+                    };
 
-                        await _unitOfWorkManage.UseTranAsync(async () =>
-                        {
-                            // 娣诲姞浠诲姟鍒版暟鎹簱
-                            await BaseDal.AddDataAsync(task);
-                            // 鏇存柊搴撳瓨浣嶇疆鐘舵�佷负涓嶅彲鐢�
-                            location.LocationStatus = (int)LocationEnum.InStockDisable;
-                            await _locationRepository.UpdateDataAsync(location);
-                        });
+                    await _unitOfWorkManage.UseTranAsync(async () =>
+                    {
+                        // 娣诲姞浠诲姟鍒版暟鎹簱
+                        await BaseDal.AddDataAsync(task);
+                        // 鏇存柊搴撳瓨浣嶇疆鐘舵�佷负涓嶅彲鐢�
+                        location.LocationStatus = (int)LocationEnum.InStockDisable;
+                        await _locationRepository.UpdateDataAsync(location);
+                    });
 
-                        content.OK(data: taskDTO);
-                    }
-                    else
-                        content.Error(result.MOMMessage);
+                    content.OK(data: taskDTO);
                 }
+                else
+                    content.Error(result.MOMMessage);
             }
             else
             {
@@ -1690,6 +1709,14 @@
             var content = new WebResponseContent();
 
             // 鑾峰彇鐩爣鍦板潃鍜屾洿鏂颁换鍔$姸鎬�
+
+
+            input.Position = Regex.Replace(input.Position, @"-(\d+)", "");
+            if (Convert.ToInt32(input.Position) > 1999)
+            {
+                input.Position = (Convert.ToInt32(input.Position) - 1000).ToString();
+            }
+
             if (task.TaskType == (int)TaskInboundTypeEnum.InNG)
             {
                 // TODO 鏍规嵁宸烽亾鏌ユ壘瀵瑰簲NG鍙o紝鐜板湪榛樿鍘婚潤缃爢鍨涙満鐨勫紓甯稿彛璐т綅鍙�
@@ -1702,7 +1729,7 @@
             }
             else if (task.TaskType == (int)TaskInboundTypeEnum.InQuality)
             {
-                var stockInfo = _stockInfoRepository.QueryFirst(x => x.PalletCode == input.PalletCode);
+                var stockInfo = await _stockInfoRepository.QueryFirstNavAsync(x => x.PalletCode == input.PalletCode);
                 task.CurrentAddress = input.Position;
                 task.TargetAddress = stockInfo.LocationInfo.LocationCode;
                 task.NextAddress = stockInfo.LocationInfo.LocationCode;
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
index 611c289..ecc7227 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -44,7 +44,7 @@
         //var station = stationManagers.Select(x => x.stationChildCode).ToList();
 
         //// 鑾峰彇WCSip鍦板潃鐩稿叧閰嶇疆
-        //var wcsIpAddrss = GetWCSIpAddress();
+        var wcsIpAddrss = GetWCSIpAddress();
         //if (wcsIpAddrss == null)
         //{
         //    throw new InvalidOperationException("WCS IP 鏈厤缃�");
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
index 43b23b6..53d61a3 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
@@ -146,6 +146,18 @@
     }
 
     /// <summary>
+    /// 闈欑疆NG鍏ュ簱
+    /// </summary>
+    /// <param name="locationCode">璐т綅鍙�</param>
+    /// <param name="palletCode">鎵樼洏鍙�</param>
+    /// <returns></returns>
+    [HttpPost, AllowAnonymous, Route("RequestInBoundTaskNG")]
+    public async Task<WebResponseContent> RequestInBoundTaskNG([FromBody] RequestTaskDto input)
+    {
+        return await Service.CreateAndSendInboundTask(input.PalletCode, input.Position);
+    }
+
+    /// <summary>
     /// 甯告俯琛ョ┖鎵樼洏鑷冲垎瀹�
     /// </summary>
     /// <param name="input">璇锋眰鏁版嵁</param>
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
index 6a31190..e36aa41 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -10,9 +10,9 @@
   "MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
   //杩炴帴瀛楃涓�
   //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
-  //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+  "ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WMS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
-  "ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+  //"ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
   //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
 
   //璺ㄥ煙

--
Gitblit v1.9.3