| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | vo.setSpeed(steProtocol.getSpeed()); // 速度 |
| | | vo.setCloser(steProtocol.getCloser()); // 近点距离 |
| | | vo.setPakMk(steProtocol.getPakMk()); // 作业标记 |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | |
| | | vo.setLev(basSte.getLev()); |
| | | vo.setCrnNo(basSte.getCrnNo()); |
| | | vo.setWorkNo(basSte.getWrkNo()); |
| | | vo.setPakMk(basSte.getPakMk()); |
| | | } |
| | | break; |
| | | } |
| | |
| | | @PostMapping("/detl/update") |
| | | @ManagerAuth |
| | | public R steUpdate(SteDataVo vo){ |
| | | |
| | | BasSte basSte = basSteService.selectById(vo.getSteNo()); |
| | | if (basSte == null) { |
| | | return R.error(); |
| | | } |
| | | // 获取穿梭车信息 |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, vo.getSteNo()); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol != null) { |
| | | throw new CoolException(vo.getSteNo() + "号穿梭车不在线,无法保存"); |
| | | } |
| | | if (!Cools.isEmpty(vo.getRow(), vo.getBay(), vo.getLev())) { |
| | | if (!steThread.modifyPosHandle(vo.getRow(), vo.getBay(), vo.getLev())) { |
| | | throw new CoolException("服务器错误"); |
| | | } |
| | | } |
| | | basSte.setPakMk(vo.getPakMk()); |
| | | basSte.setWrkNo(vo.getWorkNo()); |
| | | basSte.setCrnNo(vo.getCrnNo()); |
| | | basSte.setUpdateTime(new Date()); |
| | | if (!basSteService.updateById(basSte)) { |
| | | throw new CoolException("修改失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |