no message

main
HUOJIN\92525 2026-02-05 16:32:43 +08:00
parent 34f54a830b
commit be5abcb717
2 changed files with 8 additions and 5 deletions

View File

@ -694,9 +694,9 @@ public class ScanTrayProcessor {
* *
* @param movePoints * @param movePoints
*/ */
public void buildMoveTask(List<Point> movePoints) { public List<Task> buildMoveTask(List<Point> movePoints) {
if(CollectionUtils.isEmpty(movePoints)){ if(CollectionUtils.isEmpty(movePoints)){
return; return new ArrayList<>();
} }
//定义去重集合,缓存已处理过的容器编码,避免单次调用内重复生成任务 //定义去重集合,缓存已处理过的容器编码,避免单次调用内重复生成任务
Set<Long> processedStock = new HashSet<>(); Set<Long> processedStock = new HashSet<>();
@ -751,7 +751,8 @@ public class ScanTrayProcessor {
//移位的库位是否需要移位 //移位的库位是否需要移位
List<Point> movePointsForInbound = getMovePointsForInbound(toPoint); List<Point> movePointsForInbound = getMovePointsForInbound(toPoint);
if (CollectionUtils.isNotEmpty(movePointsForInbound)) { if (CollectionUtils.isNotEmpty(movePointsForInbound)) {
buildMoveTask(movePointsForInbound); List<Task> recursiveTasks = buildMoveTask(movePointsForInbound);
moveList.addAll(recursiveTasks);
} }
log.info("生成移位任务:{}- 容器:{} - 库位:{} - 库存数量:{}", taskNo, stock.getStockCode(), fromPoint.getPointCode(), inv.getQuantity()); log.info("生成移位任务:{}- 容器:{} - 库位:{} - 库存数量:{}", taskNo, stock.getStockCode(), fromPoint.getPointCode(), inv.getQuantity());
} catch (Exception e) { } catch (Exception e) {
@ -764,6 +765,7 @@ public class ScanTrayProcessor {
if (CollectionUtils.isNotEmpty(moveList)) { if (CollectionUtils.isNotEmpty(moveList)) {
batchUtil.saveBatchTask(moveList); batchUtil.saveBatchTask(moveList);
} }
return moveList;
} }

View File

@ -997,9 +997,10 @@ public class AllocateProcessor {
//移位的库位是否需要移位 //移位的库位是否需要移位
List<Point> movePointsForInbound = getMovePointsForOutbound(toPoint); List<Point> movePointsForInbound = getMovePointsForOutbound(toPoint);
if (CollectionUtils.isNotEmpty(movePointsForInbound)) { if (CollectionUtils.isNotEmpty(movePointsForInbound)) {
buildMoveTask(toPoint.getPointCode(),movePointsForInbound,processedStock); List<Task> recursiveTasks = buildMoveTask(toPoint.getPointCode(), movePointsForInbound, processedStock);
moveList.addAll(recursiveTasks);
} }
log.info("生成移位任务:{}- 容器:{} - 库位:{} - 库存数量:{}", taskNo, stock.getStockCode(), fromPoint.getPointCode(), inv.getQuantity());
} catch (Exception e) { } catch (Exception e) {
throw e; throw e;
} }