From 770531b9645ed712be426346148387f165d39773 Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期一, 23 十二月 2024 17:25:45 +0800
Subject: [PATCH] 添加日志功能,更新SignalR接口,优化前端日志展示逻辑

---
 Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue                                        |   39 +++++-
 .gitignore                                                                                      |    8 +
 Code Management/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task_Hty.js                        |   82 +++++++++++++
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs                 |    3 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs   |    2 
 Code Management/WCS/WIDESEAWCS_Client/src/uitils/signalr.js                                     |    3 
 /dev/null                                                                                       |    0 
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |  106 +++++++++++------
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json                        |    4 
 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_Core/BaseServices/ServiceBase.cs                  |   15 ++
 Code Management/WCS/WIDESEAWCS_Client/src/extension/basicinfo/Dt_needBarcode.js                 |   60 ++++++++++
 Code Management/WCS/WIDESEAWCS_Client/src/api/http.js                                           |    4 
 Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_BillGroupStock.vue         |    2 
 17 files changed, 294 insertions(+), 61 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/api/http.js b/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
index 5c21539..bd5780f 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
@@ -12,8 +12,8 @@
 let loadingInstance;
 let loadingStatus = false;
 if (process.env.NODE_ENV == 'development') {
-    // axios.defaults.baseURL = 'http://127.0.0.1:9291/';
-    axios.defaults.baseURL = 'http://192.168.5.251:9291/';
+    axios.defaults.baseURL = 'http://127.0.0.1:9291/';
+    // axios.defaults.baseURL = 'http://192.168.5.251:9291/';
 }
 else if (process.env.NODE_ENV == 'debug') {
     axios.defaults.baseURL = 'http://127.0.0.1:8098/';
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/WIDESEAWCS_Server/appsettings.json b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
index 44f23f1..8b3e578 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -12,9 +12,9 @@
   "MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
   //杩炴帴瀛楃涓�
   //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
-  //"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=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",
+  //"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": {
     "PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О
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 9ba2a5b..f18b745 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -227,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浠诲姟");
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 71047ab..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;
@@ -42,6 +43,10 @@
         private readonly IDt_StationManagerRepository _stationManagerRepository;
         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)
         {
@@ -157,15 +162,30 @@
             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
                     {
@@ -191,20 +211,13 @@
                         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
@@ -239,6 +252,7 @@
                         }
                     }
                 }
+
             }
             return Task.CompletedTask;
         }
@@ -252,12 +266,16 @@
         /// <param name="command">璇诲彇鐨勮姹備俊鎭�</param>
         /// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param>
         /// <param name="ProtocalDetailValue">绾夸綋褰撳墠bool璇诲彇鍋忕Щ鍦板潃</param>
-        public async Task RequestInboundAsync(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);
@@ -675,7 +693,7 @@
 
         #endregion 妫�娴嬬┖鐩樺疄鐩樹换鍔�
 
-        #region 鍖栨垚NG鍙e叆搴�
+        #region 璁惧NG鍙e叆搴�
 
         public void NGRequestTaskInbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue, string TargetAddress)
         {
@@ -706,36 +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
-                };
+                    return;
+                }
 
-                var next = dt_Task.NextAddress;
-                var taskCommand = MapTaskCommand(dt_Task, command);
-                dt_Task.NextAddress = next;
+                if (result1.SerialNos.Count <= 0)
+                {
+                    // 绌烘墭鐩樺叆搴撻�昏緫
+                    Dt_Task dt_Task = new Dt_Task()
+                    {
+                        TargetAddress = TargetAddress,
+                        PalletCode = command.Barcode,
+                        NextAddress = TargetAddress,
+                        TaskNum = 0
+                    };
 
-                conveyorLine.SendCommand(taskCommand, childDeviceCode);
+                    var next = dt_Task.NextAddress;
+                    var taskCommand = MapTaskCommand(dt_Task, command);
+                    dt_Task.NextAddress = next;
 
-                ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+                    conveyorLine.SendCommand(taskCommand, childDeviceCode);
+
+                    ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+                }
+                else
+                {
+                    conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, 1000, childDeviceCode);
+
+                    ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+                }
             }
             else
             {
-                conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, 1000, 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 2b7eb3a..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
@@ -202,7 +202,6 @@
         /// </summary>
         private async Task RequestWmsTask(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
         {
-
             var content = await _taskService.RequestWMSTask(command.Barcode, childDeviceCode);
             if (content.Status)
             {
@@ -211,7 +210,6 @@
                 {
                     if (task.SourceAddress == "1059-4")
                     {
-
                         //conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, "1000", childDeviceCode);
 
                         ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵task.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵task.PalletCode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�(瀹炵洏),涓嬩竴鐩爣鍦板潃銆恵1000}銆�");
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
                 {

--
Gitblit v1.9.3