| | |
| | | |
| | | @PostMapping("/detl/update") |
| | | @ManagerAuth(memo = "修改数据") |
| | | public R liftUpdate(@RequestParam Integer shuttleNo, |
| | | public R shuttleUpdate(@RequestParam Integer shuttleNo, |
| | | @RequestParam Short workNo, |
| | | @RequestParam String pakMk){ |
| | | for (ShuttleSlave shuttleSlave : slaveProperties.getShuttle()) { |
| | | ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttleSlave.getId()); |
| | | if (shuttleThread == null) { |
| | | return R.error("plc已掉线"); |
| | | } |
| | | ShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol(); |
| | | if (shuttleProtocol == null) { |
| | | return R.error("plc已掉线"); |
| | | } |
| | | if (workNo != null) { |
| | | shuttleProtocol.setTaskNo(workNo); |
| | | } |
| | | if (pakMk != null) { |
| | | shuttleProtocol.setPakMk(pakMk.equals("Y")); |
| | | } |
| | | ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttleNo); |
| | | if (shuttleThread == null) { |
| | | return R.error("plc已掉线"); |
| | | } |
| | | return R.error("plc已掉线"); |
| | | ShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol(); |
| | | if (shuttleProtocol == null) { |
| | | return R.error("plc已掉线"); |
| | | } |
| | | if (workNo != null) { |
| | | shuttleProtocol.setTaskNo(workNo); |
| | | } |
| | | if (pakMk != null) { |
| | | shuttleProtocol.setPakMk(pakMk.equals("Y")); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/runSpeed/{shuttleNo}") |