no message
parent
66aab179db
commit
80b45283b4
|
|
@ -24,9 +24,10 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
|
@ -426,7 +427,7 @@ public class MlsServiceImpl implements MlsService {
|
||||||
if (inventoryListFuture.join().isEmpty()) {
|
if (inventoryListFuture.join().isEmpty()) {
|
||||||
throw new RuntimeException("无库存信息!");
|
throw new RuntimeException("无库存信息!");
|
||||||
}
|
}
|
||||||
|
List<String> errorMsgList = new ArrayList<>();
|
||||||
inventoryListFuture.thenAccept((result) -> {
|
inventoryListFuture.thenAccept((result) -> {
|
||||||
//目标点
|
//目标点
|
||||||
/*Point endPoint = redisObjectUtils.getObjectFromCache("ckjbk", () -> pointService.findByCode(null, BaseStatus.FREE, null, "出库接驳口", null),
|
/*Point endPoint = redisObjectUtils.getObjectFromCache("ckjbk", () -> pointService.findByCode(null, BaseStatus.FREE, null, "出库接驳口", null),
|
||||||
|
|
@ -441,7 +442,8 @@ public class MlsServiceImpl implements MlsService {
|
||||||
Point endPoint;
|
Point endPoint;
|
||||||
List<Point> pointList = pointRepository.findByAreaAndStatus("出库接驳口", BaseStatus.FREE);
|
List<Point> pointList = pointRepository.findByAreaAndStatus("出库接驳口", BaseStatus.FREE);
|
||||||
if (pointList.size() < 1) {
|
if (pointList.size() < 1) {
|
||||||
throw new RuntimeException("无空闲缓存位!");
|
errorMsgList.add(inv.getItemKey().getPropC1() + "标签分配无空闲缓存位!");
|
||||||
|
continue;
|
||||||
/* 出库接驳口无空闲库位,更新状态重新分配*/
|
/* 出库接驳口无空闲库位,更新状态重新分配*/
|
||||||
/*pointList = pointRepository.findByAreaAndStatus("出库接驳口", BaseStatus.USED);
|
/*pointList = pointRepository.findByAreaAndStatus("出库接驳口", BaseStatus.USED);
|
||||||
for (Point p : pointList) {
|
for (Point p : pointList) {
|
||||||
|
|
@ -507,6 +509,7 @@ public class MlsServiceImpl implements MlsService {
|
||||||
// 批量生成任务
|
// 批量生成任务
|
||||||
if (!taskToCreate.isEmpty()) {
|
if (!taskToCreate.isEmpty()) {
|
||||||
batchCreateOrUpdate.batchCreate(taskToCreate);
|
batchCreateOrUpdate.batchCreate(taskToCreate);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, executor);
|
}, executor);
|
||||||
|
|
@ -515,6 +518,10 @@ public class MlsServiceImpl implements MlsService {
|
||||||
executor.shutdown();
|
executor.shutdown();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!errorMsgList.isEmpty()) {
|
||||||
|
throw new RuntimeException(errorMsgList.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue