| | |
| | | import com.zy.asrs.wcs.common.domain.BaseParam; |
| | | import com.zy.asrs.wcs.common.domain.KeyValVo; |
| | | import com.zy.asrs.wcs.common.domain.PageParam; |
| | | import com.zy.asrs.wcs.core.domain.param.ShuttleMoveLocParam; |
| | | import com.zy.asrs.wcs.core.domain.param.ShuttleOperatorParam; |
| | | import com.zy.asrs.wcs.core.entity.BasShuttle; |
| | | import com.zy.asrs.wcs.core.entity.Motion; |
| | |
| | | @PreAuthorize("hasAuthority('core:basShuttle:operator')") |
| | | @PostMapping("/basShuttle/moveLoc") |
| | | @Transactional |
| | | public synchronized R shuttleMoveLoc(@RequestParam Integer shuttleNo, |
| | | @RequestParam Integer moveType, |
| | | @RequestParam Integer xStart, |
| | | @RequestParam Integer xTarget, |
| | | @RequestParam Integer yStart, |
| | | @RequestParam Integer yTarget) { |
| | | public synchronized R shuttleMoveLoc(@RequestBody ShuttleMoveLocParam param) { |
| | | DeviceType deviceType = deviceTypeService.getOne(new LambdaQueryWrapper<DeviceType>() |
| | | .eq(DeviceType::getFlag, String.valueOf(SlaveType.Shuttle)) |
| | | .eq(DeviceType::getStatus, 1) |
| | |
| | | .eq(Device::getDeviceType, deviceType.getId()) |
| | | .eq(Device::getStatus, 1) |
| | | .eq(Device::getHostId, getHostId()) |
| | | .eq(Device::getDeviceNo, shuttleNo)); |
| | | .eq(Device::getDeviceNo, param.getShuttleNo())); |
| | | if (device == null) { |
| | | return R.error(); |
| | | } |
| | |
| | | } |
| | | |
| | | shuttleProtocol.setMoveLoc(true);//开启跑库 |
| | | shuttleProtocol.setMoveType(moveType); |
| | | shuttleProtocol.setXStart(xStart); |
| | | shuttleProtocol.setXTarget(xTarget); |
| | | shuttleProtocol.setXCurrent(xStart); |
| | | shuttleProtocol.setYStart(yStart); |
| | | shuttleProtocol.setYTarget(yTarget); |
| | | shuttleProtocol.setYCurrent(yStart); |
| | | shuttleProtocol.setMoveType(param.getMoveType()); |
| | | shuttleProtocol.setXStart(param.getStartX()); |
| | | shuttleProtocol.setXTarget(param.getTargetX()); |
| | | shuttleProtocol.setXCurrent(param.getStartX()); |
| | | shuttleProtocol.setYStart(param.getStartY()); |
| | | shuttleProtocol.setYTarget(param.getTargetY()); |
| | | shuttleProtocol.setYCurrent(param.getStartY()); |
| | | return R.ok(); |
| | | } |
| | | |