|
|
|
@ -179,9 +179,9 @@ public class ScheduledTasks { |
|
|
|
|
|
|
|
|
|
|
|
// @PostConstruct
|
|
|
|
// @PostConstruct
|
|
|
|
// @Scheduled(cron = "0/3 * * * * ? ")
|
|
|
|
// @Scheduled(cron = "0/3 * * * * ? ")
|
|
|
|
// @Scheduled(fixedRate = 200)
|
|
|
|
@Scheduled(fixedRate = 200) |
|
|
|
public void task() { |
|
|
|
public void task() { |
|
|
|
log.info("开始获取需要执行的任务"); |
|
|
|
// log.info("开始获取需要执行的任务");
|
|
|
|
//获取待下发任务数据
|
|
|
|
//获取待下发任务数据
|
|
|
|
BusinTaskQueryBo taskQueryBo = new BusinTaskQueryBo(); |
|
|
|
BusinTaskQueryBo taskQueryBo = new BusinTaskQueryBo(); |
|
|
|
List<BusinDataTaskVo> businDataTaskVos = new ArrayList<>(); |
|
|
|
List<BusinDataTaskVo> businDataTaskVos = new ArrayList<>(); |
|
|
|
@ -234,7 +234,7 @@ public class ScheduledTasks { |
|
|
|
taskQueryBo.setTaskType("22"); |
|
|
|
taskQueryBo.setTaskType("22"); |
|
|
|
List<BusinDataTaskVo> businDataTaskVo22 = iBusinDataTaskService.selectBusinDataTask1(taskQueryBo); |
|
|
|
List<BusinDataTaskVo> businDataTaskVo22 = iBusinDataTaskService.selectBusinDataTask1(taskQueryBo); |
|
|
|
businDataTaskVos.addAll(businDataTaskVo22); |
|
|
|
businDataTaskVos.addAll(businDataTaskVo22); |
|
|
|
|
|
|
|
log.info("要执行的任务信息:"+JsonUtil.toJSONString(businDataTaskVos)); |
|
|
|
for (BusinDataTaskVo businDataTaskVo : businDataTaskVos) { |
|
|
|
for (BusinDataTaskVo businDataTaskVo : businDataTaskVos) { |
|
|
|
doTask(businDataTaskVo); |
|
|
|
doTask(businDataTaskVo); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -387,7 +387,7 @@ public class ScheduledTasks { |
|
|
|
businDataTaskVo.setToLayer(locationVo.getLayer()); |
|
|
|
businDataTaskVo.setToLayer(locationVo.getLayer()); |
|
|
|
businDataTaskVo.setToRow(locationVo.getLocationRow()); |
|
|
|
businDataTaskVo.setToRow(locationVo.getLocationRow()); |
|
|
|
businDataTaskVo.setTunnel(tunnel); |
|
|
|
businDataTaskVo.setTunnel(tunnel); |
|
|
|
businDataTaskVo.setLocationId(locationVo.getId()); |
|
|
|
businDataTaskVo.setLocationId(locationId); |
|
|
|
//获取货位对应的巷道及巷道对应的设备信息
|
|
|
|
//获取货位对应的巷道及巷道对应的设备信息
|
|
|
|
pointQueryBo.setTunnel(tunnel); |
|
|
|
pointQueryBo.setTunnel(tunnel); |
|
|
|
pointQueryBo.setDirection("0"); |
|
|
|
pointQueryBo.setDirection("0"); |
|
|
|
@ -1895,7 +1895,7 @@ public class ScheduledTasks { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 空治具出库流程 |
|
|
|
* 空治具出库流程 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
// @Scheduled(cron = "0/5 * * * * ? ")
|
|
|
|
@Scheduled(cron = "0/5 * * * * ? ") |
|
|
|
public void exeEmptyContainerFromWare() { |
|
|
|
public void exeEmptyContainerFromWare() { |
|
|
|
if (ObjectUtils.isEmpty(redisTemplate.opsForValue().get(RedisConstant.out_empty_type))) { |
|
|
|
if (ObjectUtils.isEmpty(redisTemplate.opsForValue().get(RedisConstant.out_empty_type))) { |
|
|
|
log.info("暂未设置空治具出库"); |
|
|
|
log.info("暂未设置空治具出库"); |
|
|
|
@ -2071,6 +2071,8 @@ public class ScheduledTasks { |
|
|
|
} else if (businDataTaskVo.getWarehouseType().equals("2")) { |
|
|
|
} else if (businDataTaskVo.getWarehouseType().equals("2")) { |
|
|
|
randome = "P02"; |
|
|
|
randome = "P02"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Long locationId =0L; |
|
|
|
if ("P01".equals(randome)) { |
|
|
|
if ("P01".equals(randome)) { |
|
|
|
//根据车型分配库位 先判断该任务是否已经分配了货位
|
|
|
|
//根据车型分配库位 先判断该任务是否已经分配了货位
|
|
|
|
Result<BaseLocationVo> locationVoResult = null; |
|
|
|
Result<BaseLocationVo> locationVoResult = null; |
|
|
|
@ -2093,7 +2095,7 @@ public class ScheduledTasks { |
|
|
|
redisTemplate.opsForValue().set("randome", "P02"); |
|
|
|
redisTemplate.opsForValue().set("randome", "P02"); |
|
|
|
BaseLocationVo locationVo = locationVoResult.getData(); |
|
|
|
BaseLocationVo locationVo = locationVoResult.getData(); |
|
|
|
String tunnel = locationVo.getTunnel(); |
|
|
|
String tunnel = locationVo.getTunnel(); |
|
|
|
Long locationId = locationVo.getId(); |
|
|
|
locationId = locationVo.getId(); |
|
|
|
for (BusinDataTaskGoodsVo businDataTaskGoodsVo : businDataTaskGoodsVos) { |
|
|
|
for (BusinDataTaskGoodsVo businDataTaskGoodsVo : businDataTaskGoodsVos) { |
|
|
|
businDataTaskGoodsVo.setLocationId(locationId); |
|
|
|
businDataTaskGoodsVo.setLocationId(locationId); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2221,6 +2223,7 @@ public class ScheduledTasks { |
|
|
|
BusinDataTask businDataTask = new BusinDataTask(); |
|
|
|
BusinDataTask businDataTask = new BusinDataTask(); |
|
|
|
businDataTask.setId(businDataTaskVo.getId()); |
|
|
|
businDataTask.setId(businDataTaskVo.getId()); |
|
|
|
businDataTask.setTaskStatus(TaskStatusEnum.wait_callback.getValue()); |
|
|
|
businDataTask.setTaskStatus(TaskStatusEnum.wait_callback.getValue()); |
|
|
|
|
|
|
|
businDataTask.setLocationId(locationId); |
|
|
|
iBusinDataTaskService.updateById(businDataTask); |
|
|
|
iBusinDataTaskService.updateById(businDataTask); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|