src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/core/netty/handle/PackageServerHandler.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/core/thread/SiemensDevpThread.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/views/crn.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
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); 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字段 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)) { 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 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> <!-- 源站/源库位 选择 -->