From edacfca5a8e4e3abd4498eb81a34696b9ccd4c73 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 19 九月 2023 10:07:24 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java |   17 ++++++++++++++---
 src/main/webapp/views/console.html                              |   20 ++++++++++++++++++++
 src/main/webapp/views/shuttle.html                              |    2 +-
 3 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java b/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java
index 8d62e39..b0661ba 100644
--- a/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/NyShuttleProtocol.java
@@ -3,18 +3,17 @@
 import com.alibaba.fastjson.JSON;
 import com.core.common.SpringUtils;
 import com.zy.asrs.entity.BasShuttle;
+import com.zy.asrs.entity.BasShuttleErr;
+import com.zy.asrs.service.BasShuttleErrService;
 import com.zy.asrs.service.BasShuttleService;
 import com.zy.asrs.utils.Utils;
 import com.zy.common.utils.NavigatePositionConvert;
 import com.zy.core.News;
-import com.zy.core.enums.ShuttleErrorCodeType;
 import com.zy.core.enums.ShuttleProtocolStatusType;
 import com.zy.core.enums.ShuttleStatusType;
 import com.zy.core.model.command.ShuttleAssignCommand;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
-
-import java.util.List;
 
 /**
  * 鐗涚溂鍥涘悜绌挎杞�
@@ -414,6 +413,18 @@
         return JSON.toJSONString(this.getCoord());
     }
 
+    public String getErrCode$() {
+        if (this.getErrCode() == null) {
+            return "";
+        }
+        BasShuttleErrService basShuttleErrService = SpringUtils.getBean(BasShuttleErrService.class);
+        BasShuttleErr basShuttleErr = basShuttleErrService.selectById(this.getErrCode());
+        if (basShuttleErr == null) {
+            return this.getErrCode().toString();
+        }
+        return basShuttleErr.getErrName();
+    }
+
     public void setPoint(NyShuttlePointClass point) {
         String locNo = NavigatePositionConvert.nyXyzToLocNo(point.getX(), point.getY(), point.getZ());
         this.point = point;
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index 15e0e2e..6182599 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -77,6 +77,7 @@
 					</div>
 					<div>
 						<el-button @click="testMove()">娴嬭瘯绉诲姩杞�</el-button>
+						<el-button @click="resetMap()">閲嶇疆鍦板浘</el-button>
 					</div>
 				</div>
 			</div>
@@ -371,6 +372,7 @@
 								for (let i = 1; i < data.length - 1; i++) {
 									tmp.push(data[i])
 								}
+								console.log(tmp)
 								this.map = tmp
 							}
 						})
@@ -638,6 +640,24 @@
 							}
 						}
 						return data;//杩斿洖灏忚溅鍙烽泦鍚�
+					},
+					resetMap() {
+						//閲嶇疆鍦板浘
+						let that = this
+						$.ajax({
+							url:baseUrl+"/console/map/resetMap/auth",
+							headers:{
+								'token': localStorage.getItem('token')
+							},
+							data:{},
+							method:'get',
+							success:function (res) {
+								that.$message({
+									message: '閲嶇疆瀹屾垚',
+									type: 'success'
+								});
+							}
+						})
 					}
 				}
 			})
diff --git a/src/main/webapp/views/shuttle.html b/src/main/webapp/views/shuttle.html
index eaf588b..1a882a4 100644
--- a/src/main/webapp/views/shuttle.html
+++ b/src/main/webapp/views/shuttle.html
@@ -315,7 +315,7 @@
                         setVal(tr.children("td").eq(11), table[i-1].runDir2$);
                         setVal(tr.children("td").eq(12), table[i-1].chargState$);
                         setVal(tr.children("td").eq(13), table[i-1].errState$);
-                        setVal(tr.children("td").eq(14), table[i-1].errCode);
+                        setVal(tr.children("td").eq(14), table[i-1].errCode$);
                         setVal(tr.children("td").eq(15), table[i-1].suspendState$);
                     }
                 } else if (res.code === 403){

--
Gitblit v1.9.1