|
|
|
|
@ -155,7 +155,8 @@ public class PipelineServiceImpl implements IPipelineService { |
|
|
|
|
taskType, |
|
|
|
|
startPos, |
|
|
|
|
endPos, |
|
|
|
|
type |
|
|
|
|
type, |
|
|
|
|
virtualShelves.getVirtualShelvesCode() |
|
|
|
|
); |
|
|
|
|
if (null == agvSchedulingTaskVO || !"0".equals(agvSchedulingTaskVO.getCode())) { |
|
|
|
|
log.error("调用AGV调度失败"); |
|
|
|
|
@ -217,11 +218,17 @@ public class PipelineServiceImpl implements IPipelineService { |
|
|
|
|
|
|
|
|
|
if (null != wcId) { |
|
|
|
|
// 尝试找空闲站点
|
|
|
|
|
String freeStationCode = findFreeStationCode(wcId); |
|
|
|
|
if (null != freeStationCode) { |
|
|
|
|
log.info("找到空闲站点:{},将物料箱送往该站点", freeStationCode); |
|
|
|
|
// TODO 调用AGV小车送往空闲站点
|
|
|
|
|
return true; |
|
|
|
|
Station station = findFreeStationCode(wcId); |
|
|
|
|
if (null != station) { |
|
|
|
|
log.info("找到空闲站点:{},将物料箱送往该站点", station.getStationCode()); |
|
|
|
|
|
|
|
|
|
String stationPosition = station.getStationPosition(); |
|
|
|
|
String taskType = agvTaskTypeUtil.getTaskType(Integer.parseInt(stationPosition)); |
|
|
|
|
|
|
|
|
|
boolean agvSchedulingTask = genAgvSchedulingTask |
|
|
|
|
(taskType, Station.PICKUP_CONVEYOR_LINE, station.getStationCode(), AgvConstant.EQUIPMENT_TYPE_AGV, task); |
|
|
|
|
|
|
|
|
|
return agvSchedulingTask; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -233,7 +240,7 @@ public class PipelineServiceImpl implements IPipelineService { |
|
|
|
|
/** |
|
|
|
|
* 查找空闲站点编码 |
|
|
|
|
*/ |
|
|
|
|
private String findFreeStationCode(Long wcId) { |
|
|
|
|
private Station findFreeStationCode(Long wcId) { |
|
|
|
|
List<Station> stationList = stationService.selectByWcId(wcId); |
|
|
|
|
if (CollectionUtils.isEmpty(stationList)) { |
|
|
|
|
return null; |
|
|
|
|
@ -248,7 +255,7 @@ public class PipelineServiceImpl implements IPipelineService { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return freeStations.get(0).getStationCode(); |
|
|
|
|
return freeStations.get(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|