From 908e6d98a51ee5d0f219180625140012b845b8c1 Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期四, 25 五月 2023 09:04:13 +0800
Subject: [PATCH] 消防,BUG
---
src/main/webapp/views/crn.html | 21 ---------------------
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 5 +++--
src/main/java/com/zy/core/netty/handle/PackageServerHandler.java | 16 ++++++----------
src/main/java/com/zy/core/thread/SiemensDevpThread.java | 7 ++++---
src/main/resources/application.yml | 5 +++--
5 files changed, 16 insertions(+), 38 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 9e6a2d6..786bbc9 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -131,7 +131,7 @@
// // 鍏ュ嚭搴撴ā寮忓垽鏂�
// if ( inSta.getStaNo()==180 && devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; }
-
+ staProtocol.setPakMk(true);
// 鍒ゆ柇鏄惁婊¤冻鍏ュ簱鏉′欢
if (staProtocol.isAutoing() && staProtocol.isLoading()
&& staProtocol.isInEnable()
@@ -165,7 +165,8 @@
// }
try {
- String pack=barcode.substring(6);//pack鐮�
+ //String pack=barcode.substring(6);//pack鐮�
+ String pack="MJY0136 0200";
barcode=barcode.substring(0,6);//鎵樼洏鐮�
LocTypeDto locTypeDto = new LocTypeDto(staProtocol);
locTypeDto.setLocType1((short)1);
diff --git a/src/main/java/com/zy/core/netty/handle/PackageServerHandler.java b/src/main/java/com/zy/core/netty/handle/PackageServerHandler.java
index 8db7df1..faa5fdd 100644
--- a/src/main/java/com/zy/core/netty/handle/PackageServerHandler.java
+++ b/src/main/java/com/zy/core/netty/handle/PackageServerHandler.java
@@ -35,7 +35,7 @@
@Autowired
private MainServiceImpl mainService;
-
+ //娑堥槻蹇冭烦锛岀伀璀�
@Override
protected boolean channelRead0(ChannelHandlerContext ctx, ChPackage pac) {
FireDataType dataType = FireDataType.get(pac.getBytes()[1], pac.getBytes()[2]);
@@ -45,20 +45,16 @@
ChannelCache.setChannel(String.valueOf(fire3030.getNo()), ctx.channel());
Constant.errorMap.remove(fire3030.getNo());
LocMastService locMastService2 = SpringUtils.getBean(LocMastService.class);
- LocMast locMast2 = locMastService2.selectOne(new EntityWrapper<LocMast>().eq("loc_no","0101804"));
- if(null != locMast2) {
- locMast2.setChannel(10000);
- locMast2.setModiTime(new Date());
- locMastService2.update(locMast2, new EntityWrapper<LocMast>().eq("loc_no", "0101804"));
- }
break;
case FIRE_ALARM:
//娑堥槻IO鐐圭紪鍙�
// String fireNo = fire3030.getNo().toString() + fire3030.getLoop().toString() + fire3030.getPartNo().toString();
String fireNo =fire3030.getPartNo().toString(); //0100201 瀵瑰簲 30 31 0200201 瀵瑰簲 34 35
- String fireTime = "20" + fire3030.getYear() + "-" + fire3030.getMonth() + "-" + fire3030.getDay()
- + " " + fire3030.getHour() + ":" + fire3030.getMinute() + ":" + fire3030.getSeconds();
- Date dt = DateUtils.convert(fireTime);
+ int count=Integer.valueOf(fireNo)/2+Integer.valueOf(fireNo)%2;
+ fireNo=""+count;
+// String fireTime = "20" + fire3030.getYear() + "-" + fire3030.getMonth() + "-" + fire3030.getDay()
+// + " " + fire3030.getHour() + ":" + fire3030.getMinute() + ":" + fire3030.getSeconds();
+ Date dt = new Date();
LocMastService locMastService = SpringUtils.getBean(LocMastService.class);
if(null != locMastService){
//鎶ヨ淇″彿鏇存柊鍒板簱瀛樹富妗� fire_status瀛楁
diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
index cdaf315..fb79e72 100644
--- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -42,15 +42,16 @@
private Map<Integer, StaProtocol> station = new ConcurrentHashMap<>();
private short heartBeatVal = 1;
public static final ArrayList<Integer> staNos = new ArrayList<Integer>() {{
+ add(101);add(102);add(103);add(104);
add(201);add(202);add(203);add(204);add(205);add(206);
add(207);add(208);add(209);add(210);add(211);add(212);
- add(213);add(101);add(102);add(103);add(104);add(105);
+ add(213);add(105);
}};
/**
* 鏉$爜鏁伴噺
*/
- private int barcodeSize = 1;
+ private int barcodeSize = 2;
public IoModeType ioMode = IoModeType.NONE;
public int[][] startSignal = new int[48][2];
@@ -178,7 +179,7 @@
OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB100.190",(short)(barcodeSize*6));
if (result2.IsSuccess) {
for (int i = 0; i < barcodeSize; i++) {
- String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*6,6, "UTF-8");
+ String barcode =siemensS7Net.getByteTransform().TransString(result2.Content,i*6,6, "UTF-8");
// String barcode=new String(result2.Content,i*12,12);
BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, i + 1);
if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) {
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 00fc217..993d52c 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -9,6 +9,7 @@
datasource:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
url: jdbc:sqlserver://127.0.0.1:1433;databasename=zjfnasrs
+
username: sa
password: sa@123
mvc:
@@ -34,7 +35,7 @@
enable: false
wms:
- url: localhost:8080/fnwms
+ url: localhost:8081/fnwms
# 涓嬩綅鏈洪厤缃�
wcs-slave:
@@ -96,7 +97,7 @@
# 杈撻�佺嚎
devp[0]:
id: 1
- ip: 192.168.4.250
+ ip: 10.12.55.90
port: 102
rack: 0
slot: 0
diff --git a/src/main/webapp/views/crn.html b/src/main/webapp/views/crn.html
index 3999603..2fb9543 100644
--- a/src/main/webapp/views/crn.html
+++ b/src/main/webapp/views/crn.html
@@ -65,24 +65,6 @@
<!-- <span> </span>-->
<input id="crn2" disabled="disabled">
</div>
- <div class="crn-command-item">
- <label>3#</label>
- <button id="demoBtn-3" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>
- <!-- <span> </span>-->
- <input id="crn3" disabled="disabled">
- </div>
- <div class="crn-command-item">
- <label>4#</label>
- <button id="demoBtn-4" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>
- <!-- <span> </span>-->
- <input id="crn4" disabled="disabled">
- </div>
- <div class="crn-command-item">
- <label>5#</label>
- <button id="demoBtn-5" class="demoBtn" onclick="demoSwitch(this.id)"> - </button>
- <!-- <span> </span>-->
- <input id="crn5" disabled="disabled">
- </div>
</div>
<!-- 鍫嗗灈鏈虹姸鎬佷綅淇℃伅 -->
<div class="crn-state">
@@ -150,9 +132,6 @@
<div class="select-container">
<label><input type="radio" name="crnSelect" value="1" checked> 1鍙峰爢鍨涙満</label>
<label><input type="radio" name="crnSelect" value="2"> 2鍙峰爢鍨涙満</label>
- <label><input type="radio" name="crnSelect" value="3"> 3鍙峰爢鍨涙満</label>
- <label><input type="radio" name="crnSelect" value="4"> 4鍙峰爢鍨涙満</label>
- <label><input type="radio" name="crnSelect" value="5"> 5鍙峰爢鍨涙満</label>
</div>
</div>
<!-- 婧愮珯/婧愬簱浣� 閫夋嫨 -->
--
Gitblit v1.9.1