| | |
| | | devpThread.startSignal[i] = newSingle; |
| | | } |
| | | }else if (testMast == null && devpThread.startSignal[i] == 5){ |
| | | |
| | | SearchLocParam param = new SearchLocParam(); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/mobile/test/suspend/auth") |
| | | .setJson(JSON.toJSONString(param)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | //复位PLC信号,借用输送站点实体类 |
| | | StaProtocol staProtocol = new StaProtocol(); |
| | | staProtocol.setSiteId(i*2);//寄存器地址 |
| | | staProtocol.setStaNo(newSingle);//修改PLC寄存器地址值,5==>6 |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol)); |
| | | if(!result){ |
| | | log.error("更新测试信号失败===>>[channel:{},locNo:{},barcode:{}]", i+1, testMast.getLocNo(), testMast.getBarcode()); |
| | | // throw new CoolException("更新测试信号失败===>>" + i); |
| | | } else { |
| | | devpThread.startSignal[i] = newSingle; |
| | | } |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl+"/mobile/test/suspend/auth", JSON.toJSONString(param), response); |
| | | } |
| | | }else if (testMast == null && devpThread.startSignal[i] == 7){ |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("channel",(i+1))); |