| | |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.NyShuttleOperaResult; |
| | | import com.zy.common.model.enums.NavigationMapType; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.NyHttpUtils; |
| | | import com.zy.common.utils.NyShuttleOperaUtils; |
| | |
| | | ArrayList<JSONObject> list = new ArrayList<>(); |
| | | List<BasShuttle> shuttles = basShuttleService.selectList(new EntityWrapper<BasShuttle>().orderBy("shuttle_no")); |
| | | for (BasShuttle basShuttle : shuttles) { |
| | | // 表格行 |
| | | JSONObject baseObj = new JSONObject(); |
| | | baseObj.put("shuttleNo", basShuttle.getShuttleNo()); |
| | | list.add(baseObj); |
| | | // 获取四向穿梭车信息 |
| | | NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, basShuttle.getShuttleNo()); |
| | | if (shuttleThread == null) { |
| | |
| | | JSONObject shuttleData = JSON.parseObject(JSON.toJSONString(shuttleProtocol)); |
| | | if (shuttleProtocol == null || shuttleProtocol.getShuttleNo()==null) { |
| | | if (shuttleData != null) { |
| | | list.add(shuttleData); |
| | | baseObj.putAll(shuttleData); |
| | | } |
| | | continue; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | list.add(shuttleData); |
| | | baseObj.putAll(shuttleData); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | |
| | | assignCommand.setNodes(result.getNodes()); |
| | | } else if (shuttleTaskModeType == ShuttleTaskModeType.MOVE_LOC_NO) { |
| | | //移动到目标库位 |
| | | NyShuttleOperaResult result = NyShuttleOperaUtils.getStartToTargetCommands(shuttleSlave.getId(), assignCommand.getTaskNo().intValue(), shuttleProtocol.getCurrentLocNo(), param.getDistLocNo()); |
| | | Integer mapType = NavigationMapType.NORMAL.id; |
| | | if (shuttleProtocol.getLiftPosition() == 2) { |
| | | mapType = NavigationMapType.DFX.id; |
| | | } |
| | | NyShuttleOperaResult result = NyShuttleOperaUtils.getStartToTargetCommands(shuttleSlave.getId(), assignCommand.getTaskNo().intValue(), shuttleProtocol.getCurrentLocNo(), param.getDistLocNo(), mapType); |
| | | if (result == null) { |
| | | throw new CoolException("路径计算失败"); |
| | | } |