| | |
| | | public R liftUpdate(@RequestParam Integer liftNo, |
| | | @RequestParam Short workNo, |
| | | @RequestParam String pakMk){ |
| | | for (LiftSlave liftSlave : slaveProperties.getLift()) { |
| | | LiftThread liftThread = (LiftThread) SlaveConnection.get(SlaveType.Lift, liftSlave.getId()); |
| | | if (liftThread == null) { |
| | | return R.error("plc已掉线"); |
| | | } |
| | | LiftProtocol liftProtocol = liftThread.getLiftProtocol(); |
| | | if (liftProtocol == null) { |
| | | return R.error("plc已掉线"); |
| | | } |
| | | if (workNo != null) { |
| | | liftProtocol.setTaskNo(workNo); |
| | | } |
| | | if (pakMk != null) { |
| | | liftProtocol.setPakMk(pakMk.equals("Y")); |
| | | } |
| | | LiftThread liftThread = (LiftThread) SlaveConnection.get(SlaveType.Lift, liftNo); |
| | | if (liftThread == null) { |
| | | return R.error("plc已掉线"); |
| | | } |
| | | return R.error("plc已掉线"); |
| | | LiftProtocol liftProtocol = liftThread.getLiftProtocol(); |
| | | if (liftProtocol == null) { |
| | | return R.error("plc已掉线"); |
| | | } |
| | | if (workNo != null) { |
| | | liftProtocol.setTaskNo(workNo); |
| | | } |
| | | if (pakMk != null) { |
| | | liftProtocol.setPakMk(pakMk.equals("Y")); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/command/query") |