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