diff --git a/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java b/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java index ec438fa..fb1220b 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java +++ b/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java @@ -46,6 +46,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.*; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @Slf4j @@ -798,6 +799,7 @@ public class ScheduledTasks { iBaseLocationService.updateById(location); //根据货位拿到库存信息 + log.info("查找货位的货位:"+location.getId()); List sysStockDetailList = sysStockDetailMapper.getStockDetailByLocationId(String.valueOf(location.getId())); sysStockDetailList.stream().forEach(e -> { e.setOutQty(1); @@ -813,17 +815,19 @@ public class ScheduledTasks { if (inVehicheModel.equals("3LN") || inVehicheModel.equals("3UE")) { waitIssueEmpTaskNum[0]++; log.info("3LN出库成功任务数:" + waitIssueEmpTaskNum[0]); - } businDataTask.setTaskStatus(TaskStatusEnum.wait_callback.getValue()); businDataTask.setExceptionMsg(""); businDataTask.setUpdateTime(DateUtils.getNowDate()); if (ObjectUtils.isEmpty(redisTemplate.opsForValue().get("outbound:" + businDataTask.getId()))) { - redisTemplate.opsForValue().set("outbound:" + businDataTask.getId(), businDataTask.toString()); + redisTemplate.opsForValue().set("outbound:" + businDataTask.getId(), businDataTask.toString(),5, TimeUnit.MINUTES); } //拿到库存里的治具编号(不分体的每个保险杠在一个货位一个任务,分体的只有一个任务一个货位所以只随机拿到一个库存信息的治具号就可以) - businDataTask.setContainerId(sysStockDetailList.get(0).getContainerCode()); + if ((sysStockDetailList!=null && sysStockDetailList.size()>0)){ + businDataTask.setContainerId(sysStockDetailList.get(0).getContainerCode()); + } + if (!"5".equals(businDataTask.getTaskType())) { //根据过点时间更改out表里的状态信息 List businDataTaskGoods = iBusinDataTaskGoodsService.list(new LambdaQueryWrapper()