解决空取问题

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

Loading…
Cancel
Save