From 4501ec94feef7504a8b43859983254ce3ae7dbd1 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 28 六月 2023 14:11:34 +0800
Subject: [PATCH] #
---
src/main/webapp/views/console.html | 4
src/main/webapp/static/js/console.js | 18 ++
src/main/webapp/static/css/render.css | 9 +
src/main/webapp/static/js/console.map.js | 262 ++++++++++++++++++++++++++++++++++++++-----
src/main/webapp/static/js/common.js | 2
pom.xml | 2
src/main/resources/application.yml | 54 +++++++-
7 files changed, 305 insertions(+), 46 deletions(-)
diff --git a/pom.xml b/pom.xml
index 072cf2d..cdaca70 100644
--- a/pom.xml
+++ b/pom.xml
@@ -185,7 +185,7 @@
</dependencies>
<build>
- <finalName>kdywcs</finalName>
+ <finalName>jmwcs</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index e258910..241fd32 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -8,7 +8,7 @@
name: @pom.build.finalName@
datasource:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
- url: jdbc:sqlserver://10.10.10.200:1433;databasename=kdyasrs
+ url: jdbc:sqlserver://127.0.0.1:1433;databasename=jxjmasrs
# url: jdbc:sqlserver://192.168.4.15:1433;databasename=nbjfasrs
username: sa
password: sa@123
@@ -35,7 +35,7 @@
enable: false
wms:
- url: localhost:8080/kdywms
+ url: localhost:8080/jmwms
# 涓嬩綅鏈洪厤缃�
wcs-slave:
@@ -60,22 +60,60 @@
devpPlcId: ${wcs-slave.devp[0].id}
staNo: 102
row: 1
- bay: 25
+ bay: 1
lev: 1
# 鍫嗗灈鏈哄叆搴撶珯鐐�2
crnInStn[1]:
devpPlcId: ${wcs-slave.devp[0].id}
staNo: 105
row: 1
- bay: 26
+ bay: 1
lev: 1
# 鍫嗗灈鏈哄嚭搴撶珯鐐�1
crnOutStn[0]:
devpPlcId: ${wcs-slave.devp[0].id}
staNo: 102
row: 1
- bay: 25
+ bay: 1
lev: 1
+ # 鍫嗗灈鏈哄嚭搴撶珯鐐�2
+ crnOutStn[1]:
+ devpPlcId: ${wcs-slave.devp[0].id}
+ staNo: 105
+ row: 1
+ bay: 1
+ lev: 1
+ # 鍫嗗灈鏈�2
+ crn[1]:
+ id: 1
+ ip: 10.10.10.120
+ port: 102
+ rack: 0
+ slot: 0
+ # 鍋忕Щ閲忥紝褰撳爢鍨涙満绔欑偣鍒楀彿=1鏃讹紝鍋忕Щ閲�=2
+ offset: 2
+ demo: false
+ # 鍫嗗灈鏈哄叆搴撶珯1
+ crnInStn[0]:
+ devpPlcId: ${wcs-slave.devp[0].id}
+ staNo: 102
+ row: 1
+ bay: 1
+ lev: 5
+ # 鍫嗗灈鏈哄叆搴撶珯鐐�2
+ crnInStn[1]:
+ devpPlcId: ${wcs-slave.devp[0].id}
+ staNo: 105
+ row: 1
+ bay: 1
+ lev: 5
+ # 鍫嗗灈鏈哄嚭搴撶珯鐐�1
+ crnOutStn[0]:
+ devpPlcId: ${wcs-slave.devp[0].id}
+ staNo: 102
+ row: 1
+ bay: 1
+ lev: 5
# 鍫嗗灈鏈哄嚭搴撶珯鐐�2
crnOutStn[1]:
devpPlcId: ${wcs-slave.devp[0].id}
@@ -126,16 +164,18 @@
barcode: ${wcs-slave.barcode[1].id}
backSta: 103
led: ${wcs-slave.led[1].id}
- # 鏉$爜鎵弿浠�1 宸︿笅 1妤煎紑濮�,111
+
+ # 鏉$爜鎵弿浠�1
barcode[0]:
id: 1
ip: 10.10.10.3
port: 51236
- # 鏉$爜鎵弿浠�2, 114
+ # 鏉$爜鎵弿浠�2
barcode[1]:
id: 2
ip: 10.10.10.4
port: 51236
+
# LED1
led[0]:
id: 1
diff --git a/src/main/webapp/static/css/render.css b/src/main/webapp/static/css/render.css
index 808914a..a3e42cd 100644
--- a/src/main/webapp/static/css/render.css
+++ b/src/main/webapp/static/css/render.css
@@ -98,6 +98,15 @@
box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, 0.5), 7px 7px 20px 0px rgba(0, 0, 0, 0.1),
4px 4px 5px 0px rgba(0, 0, 0, 0.1);
}
+.barcode {
+ position: absolute;
+ color: #a19c9c;
+ border: 1px solid rgb(108,167,168);
+ cursor: pointer;
+ text-align: center;
+ background-color: rgb(157, 217, 162);
+ font-size: 10px;
+}
/* 16 */
.btn-16 {
border: none;
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index a19120b..0022325 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -1,4 +1,4 @@
-var baseUrl = "/kdywcs";
+var baseUrl = "/jmwcs";
// 璧嬪��
function setVal(el, val) {
diff --git a/src/main/webapp/static/js/console.js b/src/main/webapp/static/js/console.js
index f065a74..99b18e8 100644
--- a/src/main/webapp/static/js/console.js
+++ b/src/main/webapp/static/js/console.js
@@ -9,8 +9,10 @@
track = '',
tracks = '',
stn = '',
+ barcode = '',
stns = '',
stnArr = [],
+ barcodeArr = [],
floorBtn = '',
floorBtns = '',
floorBtnss = '',
@@ -160,6 +162,7 @@
for (let i = 0; i < areas.length;i++) {
let stnss = areas[i].stns
+ let barcodes = areas[i].barcode
let floor = areas[i].text
floorId = areas[i].id
var position = (i+1)*100
@@ -174,6 +177,7 @@
var index = i
var n = 1
stnArr[index] = ''
+ barcodeArr[index] = ''
total[index] = ''
for (let j = 0; j < stnss.length; j++) {
if (stnss[j].type == "stn") {
@@ -198,9 +202,19 @@
}
}
+ console.log(areas[i].barcode)
+ for (let k = 0; k < barcodes.length; k++) {
+ barcode = "<div class='barcode' id='" + barcodes[k].id +
+ "'style='width:" + barcodes[k].width +
+ "px;height: " + barcodes[k].height +
+ "px;line-height: " + barcodes[k].height +
+ "px;top: "+ barcodes[k].top +
+ "px;left: "+ barcodes[k].left + "px'>" + "</div>"
+ barcodeArr[i] = barcodeArr[i] + barcode
+ }
}
- floorInfo = racks + rackDescs + tracks + crns + stnArr[0] + floorBtnss
+ floorInfo = racks + rackDescs + tracks + crns + stnArr[0] + floorBtnss + barcodeArr[0]
$(".main-part").append(floorInfo)
$("#line-total").html(total[0])
@@ -209,7 +223,7 @@
}
function changFloor(e) {
$(".main-part").empty() // 娓呯┖鑺傜偣
- floorInfo = racks + stnArr[e] +rackDescs + crns + tracks + floorBtnss
+ floorInfo = racks + stnArr[e] +rackDescs + crns + tracks + floorBtnss + barcodeArr[e]
$(".main-part").append(floorInfo)
$("#line-total").empty()
$("#line-total").html(total[e])
diff --git a/src/main/webapp/static/js/console.map.js b/src/main/webapp/static/js/console.map.js
index c6e80bc..90904d2 100644
--- a/src/main/webapp/static/js/console.map.js
+++ b/src/main/webapp/static/js/console.map.js
@@ -1,31 +1,51 @@
mapInfo = {
- "mapName": "NBJFWCS",
+ "mapName": "JXJMWCS",
"rackCount": 18,
"crnCount": 7,
"stbCount": 77,
- "hpPosition": 1,
+ "hpPosition": 0,
"minBayNo": 2,
- "floors": 1,
+ "floors": 2,
"racks": [
{
"type": "rack",
"id": "rack1",
- "top": 324,
- "left": 208,
- "width": 1600,
+ "top": 296,
+ "left": 370,
+ "width": 1200,
"height": 26,
- "minBayNo": 2,
- "maxBayNo": 56
+ "minBayNo": 1,
+ "maxBayNo": 15
},
{
"type": "rack",
"id": "rack2",
- "top": 386,
- "left": 208,
- "width": 1600,
+ "top": 375,
+ "left": 370,
+ "width": 1200,
"height": 26,
- "minBayNo": 2,
- "maxBayNo": 56
+ "minBayNo": 1,
+ "maxBayNo": 15
+ },
+ {
+ "type": "rack",
+ "id": "rack3",
+ "top": 403,
+ "left": 370,
+ "width": 1200,
+ "height": 26,
+ "minBayNo": 1,
+ "maxBayNo": 15
+ },
+ {
+ "type": "rack",
+ "id": "rack4",
+ "top": 470,
+ "left": 370,
+ "width": 1200,
+ "height": 26,
+ "minBayNo": 1,
+ "maxBayNo": 15
},
],
"rackDescs": [
@@ -53,17 +73,35 @@
"type": "track",
"id": "lb_track1",
"text": "",
- "top": 370,
- "left": 154,
- "width": 1700,
+ "top": 346,
+ "left": 300,
+ "width": 1300,
"height": 2
},
{
"type": "crane",
"id": "crn-1",
"text": "1",
- "top": 358,
- "left": 805,
+ "top": 334,
+ "left": 1417,
+ "width": 93,
+ "height": 22
+ },
+ {
+ "type": "track",
+ "id": "lb_track2",
+ "text": "",
+ "top": 452,
+ "left": 300,
+ "width": 1300,
+ "height": 2
+ },
+ {
+ "type": "crane",
+ "id": "crn-2",
+ "text": "2",
+ "top": 440,
+ "left": 1417,
"width": 93,
"height": 22
},
@@ -92,8 +130,8 @@
"type": "stn",
"id": "site-105",
"text": "105",
- "top": 386,
- "left": 1007,
+ "top": 403,
+ "left": 193,
"width": 78,
"height": 24
},
@@ -101,17 +139,17 @@
"type": "stn",
"id": "site-102",
"text": "102",
- "top": 386,
- "left": 1087,
- "width": 78,
+ "top": 377,
+ "left": 273,
+ "width": 95,
"height": 24
},
{
"type": "stn",
"id": "site-104",
"text": "104",
- "top": 412,
- "left": 1007,
+ "top": 377,
+ "left": 193,
"width": 78,
"height": 24
},
@@ -119,17 +157,17 @@
"type": "stn",
"id": "site-101",
"text": "101",
- "top": 412,
- "left": 1087,
- "width": 78,
+ "top": 403,
+ "left": 273,
+ "width": 95,
"height": 24
},
{
"type": "stn",
"id": "site-103",
"text": "103",
- "top": 438,
- "left": 1007,
+ "top": 429,
+ "left": 193,
"width": 78,
"height": 24
},
@@ -137,14 +175,172 @@
"type": "stn",
"id": "site-100",
"text": "100",
- "top": 438,
- "left": 1087,
+ "top": 477,
+ "left": 193,
"width": 78,
"height": 24
},
+ {
+ "type": "stn",
+ "id": "site-110",
+ "text": "110",
+ "top": 376,
+ "left": 1512,
+ "width": 78,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-111",
+ "text": "111",
+ "top": 403,
+ "left": 1512,
+ "width": 78,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-112",
+ "text": "112",
+ "top": 376,
+ "left": 1592,
+ "width": 78,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-113",
+ "text": "113",
+ "top": 403,
+ "left": 1592,
+ "width": 78,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-114",
+ "text": "114",
+ "top": 376,
+ "left": 1672,
+ "width": 78,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-115",
+ "text": "115",
+ "top": 403,
+ "left": 1672,
+ "width": 78,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-116",
+ "text": "116",
+ "top": 350,
+ "left": 1672,
+ "width": 78,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-117",
+ "text": "117",
+ "top": 324,
+ "left": 1672,
+ "width": 78,
+ "height": 24
+ },
+ ],
+ "barcode": [
+ {
+ "type": "barcode",
+ "id": "barcode-1",
+ "text": "",
+ "top": 454,
+ "left": 192,
+ "width": 78,
+ "height": 20
+ }
]
},
-
+ {
+ "type": "floor",
+ "id": "page_floor1",
+ "text": "5F",
+ "top": 4,
+ "left": 22,
+ "width": 1819,
+ "height": 668,
+ "stns": [
+ {
+ "type": "stn",
+ "id": "site-505",
+ "text": "505",
+ "top": 403,
+ "left": 193,
+ "width": 78,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-502",
+ "text": "502",
+ "top": 377,
+ "left": 273,
+ "width": 95,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-504",
+ "text": "504",
+ "top": 377,
+ "left": 193,
+ "width": 78,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-501",
+ "text": "501",
+ "top": 403,
+ "left": 273,
+ "width": 95,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-503",
+ "text": "503",
+ "top": 429,
+ "left": 193,
+ "width": 78,
+ "height": 24
+ },
+ {
+ "type": "stn",
+ "id": "site-500",
+ "text": "500",
+ "top": 477,
+ "left": 193,
+ "width": 78,
+ "height": 24
+ },
+ ],
+ "barcode": [
+ {
+ "type": "barcode",
+ "id": "barcode-2",
+ "text": "",
+ "top": 454,
+ "left": 192,
+ "width": 78,
+ "height": 20
+ }
+ ]
+ },
]
}
]
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index b3148e3..e79c633 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -604,7 +604,7 @@
var offSet = 0;
unit = -28.5;
- offSet = 1710; //145
+ offSet = 276; //145
// crnEl.animate({left: offSet + 'px'}, 1000);
@@ -634,7 +634,7 @@
if (res.code === 200) {
var barcodes = res.data;
for (var i = 0; i < barcodes.length; i++) {
- $("#code-decoder-data-" + barcodes[i].barcodeId).html(barcodes[i].codeValue);
+ $("#barcode-"+barcodes[i].barcodeId).html(barcodes[i].codeValue ? barcodes[i].codeValue : "--");
}
} else if (res.code === 403) {
parent.location.href = baseUrl + "/login";
--
Gitblit v1.9.1