feat(orderin): 入库判断是否113口的空托盘
This commit is contained in:
parent
9afd96fe86
commit
7190814c74
|
|
@ -27,6 +27,7 @@ import java.text.ParseException;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 四向车 api service 的实现
|
||||
|
|
@ -94,7 +95,7 @@ public class ContainerImplement implements ContainerService {
|
|||
}
|
||||
CreateInstoreTaskResponse success = new CreateInstoreTaskResponse();
|
||||
|
||||
// 判断是否为空托盘
|
||||
// 判断是否为有判断好 B0000001代表无托盘号
|
||||
if("B0000001".equals(request.getPalletNo())) {
|
||||
String virtualVehicleNo = WmsUtils.generateUUIDString();
|
||||
log.info("无托盘号,生成虚拟托盘号{}",virtualVehicleNo);
|
||||
|
|
@ -121,16 +122,18 @@ public class ContainerImplement implements ContainerService {
|
|||
return new CreateInstoreTaskResponse("400", "创建入库单失败");
|
||||
}
|
||||
/* 查找可用库位 */
|
||||
List<Location> canUseLocations = locationUtils.getNewLocation(2,appOrderIn);
|
||||
List<Location> canUseLocations = locationUtils.getNewLocation(2,appOrderIn).stream().filter(location -> location.getLayer() == 1).collect(Collectors.toList());
|
||||
if(canUseLocations.isEmpty()){
|
||||
log.info("无可用库位");
|
||||
return new CreateInstoreTaskResponse("400", "没有可用库位");
|
||||
}
|
||||
Location useLocation = locationUtils.checkCanUse(canUseLocations);
|
||||
if(useLocation == null) {
|
||||
// 筛选出可用区域为第一层的库位
|
||||
if(useLocation == null) {
|
||||
log.info("暂没有可以直接使用的库位,因为存在互锁的库位,请等待当前任务都执行完成后再试");
|
||||
return new CreateInstoreTaskResponse("400", "暂没有可以直接使用的库位,因为存在互锁的库位,请等待当前任务都执行完成后再试");
|
||||
}
|
||||
|
||||
Task newInTask = new Task();
|
||||
newInTask.setTaskId(String.valueOf(Calendar.getInstance().getTimeInMillis()));
|
||||
newInTask.setTaskGroup(UUID.randomUUID().toString());
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user