Merge remote-tracking branch 'gitbit/gzynwcs' into gzynwcs
| | |
| | | @TableField("pack_status") |
| | | private Integer packStatus; |
| | | |
| | | @ApiModelProperty(value= "通道") |
| | | private Integer channel; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | return ""; |
| | |
| | | newStatus = 0; |
| | | newSingle = 0;//测试复核,寄存器地址,8===>>0 |
| | | break; |
| | | case 11://入库前判断充电线是否放好 |
| | | olsStatus = 99; |
| | | newStatus = 0; |
| | | newSingle = 11;//不变 |
| | | break; |
| | | case 12://充电线放好 |
| | | olsStatus = 99; |
| | | newStatus = 0; |
| | | newSingle = 0;//测试复核,寄存器地址,12===>>0 |
| | | break; |
| | | } |
| | | |
| | | TestMast testMast = testMastService.selectOne(new EntityWrapper<TestMast>() |
| | |
| | | } |
| | | }else if (devpThread.startSignal[i] == 5){ |
| | | SearchLocParam param = new SearchLocParam(); |
| | | param.setBarcode(i+1+""); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/mobile/test/suspend/auth") |
| | |
| | | devpThread.startSignal[i] = newSingle; |
| | | } |
| | | }else if (devpThread.startSignal[i] == 8){ |
| | | |
| | | } |
| | | //复位PLC信号,借用输送站点实体类 |
| | | StaProtocol staProtocol = new StaProtocol(); |
| | | staProtocol.setSiteId(i*2);//寄存器地址 |
| | | staProtocol.setStaNo(newSingle);//修改PLC寄存器地址值,8==>0 |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol)); |
| | | if(!result){ |
| | | // log.error("更新库位紧急出库信号失败===>>[channel:{},locNo:{},barcode:{}]", i+1, locMast.getLocNo(), locMast.getBarcode()); |
| | | // throw new CoolException("更新测试信号失败===>>" + i); |
| | | } else { |
| | | devpThread.startSignal[i] = newSingle; |
| | | } |
| | | }else if (devpThread.startSignal[i] == 11){ |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("channel",(i+1))); |
| | | if (locMast.getLocSts().equals("O")){ |
| | | locMast.setLocSts("X"); |
| | | locMastService.update(locMast,new EntityWrapper<LocMast>() |
| | | .eq("channel",(i+1))); |
| | | } |
| | | }else if (devpThread.startSignal[i] == 12){ |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("channel",(i+1))); |
| | | if (locMast.getLocSts().equals("X")){ |
| | | locMast.setLocSts("O"); |
| | | locMastService.update(locMast,new EntityWrapper<LocMast>() |
| | | .eq("channel",(i+1))); |
| | | //复位PLC信号,借用输送站点实体类 |
| | | StaProtocol staProtocol = new StaProtocol(); |
| | | staProtocol.setSiteId(i*2);//寄存器地址 |
| | | staProtocol.setStaNo(newSingle);//修改PLC寄存器地址值,12==>0 |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol)); |
| | | if(!result){ |
| | | // log.error("更新库位紧急出库信号失败===>>[channel:{},locNo:{},barcode:{}]", i+1, locMast.getLocNo(), locMast.getBarcode()); |
| | | // throw new CoolException("更新测试信号失败===>>" + i); |
| | | } else { |
| | | devpThread.startSignal[i] = newSingle; |
| | | } |
| | | } |
| | | }else { } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | public enum FireDataType { |
| | | |
| | | HEARTBEAT(0x30, 0x30, "心跳信息"), |
| | | HEARTBEAT(0x36, 0x39, "心跳信息"), |
| | | |
| | | FIRE_ALARM(0x38, 0x30, "火警"), |
| | | |
| | |
| | | // System.out.println(byteBuf.refCnt()); |
| | | this.no = analyze(new byte[]{bytes[3], bytes[4]}); |
| | | this.loop = analyze(new byte[]{bytes[5], bytes[6]}); |
| | | this.partNo = analyze(new byte[]{bytes[7], bytes[8]}); |
| | | this.partNo = analyze(new byte[]{bytes[7], bytes[8]}); //0100201 对应 30 31 0200201 对应 34 35 |
| | | this.year = analyze(new byte[]{bytes[11], bytes[12]}); |
| | | this.month = analyze(new byte[]{bytes[13], bytes[14]}); |
| | | this.day = analyze(new byte[]{bytes[15], bytes[16]}); |
| | |
| | | case HEARTBEAT: |
| | | 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","01001804")); |
| | | if(null != locMast2) { |
| | | locMast2.setChannel(1000); |
| | | locMast2.setModiTime(new Date()); |
| | | locMastService2.update(locMast2, new EntityWrapper<LocMast>().eq("loc_no", "01001804")); |
| | | } |
| | | break; |
| | | case FIRE_ALARM: |
| | | //消防IO点编号 |
| | | String fireNo = fire3030.getNo().toString() + fire3030.getLoop().toString() + fire3030.getPartNo().toString(); |
| | | // 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); |
| | |
| | | //复位测试信号 |
| | | case 3: |
| | | StaProtocol staProtocol = (StaProtocol)task.getData(); |
| | | siemensS7Net.Write("DB200." + staProtocol.getSiteId(), staProtocol.getStaNo()); |
| | | siemensS7Net.Write("DB102.0" + staProtocol.getSiteId(), staProtocol.getStaNo()); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | <result column="mk" property="mk" /> |
| | | <result column="barcode" property="barcode" /> |
| | | <result column="ctn_no" property="ctnNo" /> |
| | | <result column="channel" property="channel" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | "floors": 1, |
| | | "racks": [{ |
| | | "type": "rack", |
| | | "id": "rack1", |
| | | "id": "rack2", |
| | | "top": 168, |
| | | "left": 463, |
| | | "width": 826, |
| | |
| | | "maxBayNo": 18 |
| | | }, { |
| | | "type": "rack", |
| | | "id": "rack2", |
| | | "id": "rack1", |
| | | "top": 226, |
| | | "left": 463, |
| | | "width": 826, |
| | |
| | | <script src="../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <style> |
| | | html{ |
| | | transform: scale(0.5) translate(-50%,-50%); |
| | | height: 200%; |
| | | width: 200%; |
| | | transform: scale(1) translate(0,0); |
| | | /*transform: scale(0.5) translate(-50%,-50%);*/ |
| | | height: 150%; |
| | | width: 150%; |
| | | } |
| | | |
| | | </style> |