| | |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | // 给305写关门 |
| | | BasDevp basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no", 305)); |
| | | // BasDevp basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no", 305)); |
| | | BasDevp basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no", param.getStaNo())); |
| | | if (basDevp.getWrkNo() != 0) { |
| | | WrkMast wrkMast = wrkMastService.selectById(basDevp.getWrkNo()); |
| | | if(wrkMast.getWhsType() != null && wrkMast.getWhsType() == 3) { |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1); |
| | | StaProtocol staProtocol305 = devpThread.getStation().get(305); |
| | | // StaProtocol staProtocol305 = devpThread.getStation().get(305); |
| | | StaProtocol staProtocol305 = devpThread.getStation().get(param.getStaNo()); |
| | | if (!staProtocol305.getIfCloseDoor()) { // 没请求关闭 |
| | | // 请求关闭 |
| | | if(!MessageQueue.offer(SlaveType.Devp, 1, new Task(3, 0))){ |
| | |
| | | staProtocol305.setOpenAskDoor(false); |
| | | wrkMast.setWhsType(4); |
| | | wrkMastService.updateById(wrkMast); |
| | | } else { |
| | | return R.ok("已经请求过关门:" + staProtocol305.getIfCloseDoor()); |
| | | } |
| | | } else { |
| | | return R.parse("请求关门异常,当前状态为:" + wrkMast.getWhsType()); |
| | | } |
| | | } else { |
| | | return R.parse("无任务"); |