#
Junjie
2024-08-17 b591d3396c94e0ca3496d2bac280d106438c75e9
zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/LocUtils.java
@@ -80,7 +80,7 @@
    }
    //获取推荐库位(满托盘)
    public List<Loc> getSuggestLoc(Long taskType, Long matId, String batch, Integer locTypeHeight) {
    public List<Loc> getSuggestLoc(Long taskType, Long matId, String batch, Integer locTypeHeight, List<Integer> laneRowList) {
        //满托盘
        List<Loc> locs = new ArrayList<>();
        LocTypeHeightType locTypeHeightType = LocTypeHeightType.get(locTypeHeight);
@@ -109,6 +109,11 @@
            queryWrapper.le(Loc::getLev1, suggestLocRule.getTargetLev());
            queryWrapper.eq(Loc::getLocStsId, LocStsType.O.val());
            queryWrapper.in(Loc::getId, locIdList);
            if (laneRowList != null && !laneRowList.isEmpty()) {
                queryWrapper.in(Loc::getRow1, laneRowList);
            }
            List<Loc> list = locService.list(queryWrapper);
            if (!list.isEmpty()) {
                locs.addAll(list);
@@ -118,7 +123,7 @@
    }
    //获取全局库位(完整巷道)
    public List<Loc> getGlobalLoc(Long taskType, Integer locTypeHeight) {
    public List<Loc> getGlobalLoc(Long taskType, Integer locTypeHeight, List<Integer> laneRowList) {
        List<Loc> locs = new ArrayList<>();
        LocTypeHeightType locTypeHeightType = LocTypeHeightType.get(locTypeHeight);
        if (locTypeHeightType == null) {
@@ -132,6 +137,11 @@
        LambdaQueryWrapper<Loc> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Loc::getLocStsId, LocStsType.O.val());
        queryWrapper.in(Loc::getId, locIdList);
        if (laneRowList != null && !laneRowList.isEmpty()) {
            queryWrapper.in(Loc::getRow1, laneRowList);
        }
        List<Loc> list = locService.list(queryWrapper);
        if (!list.isEmpty()) {
            locs.addAll(list);
@@ -270,7 +280,7 @@
    }
    //获取推荐库位(空托盘)
    public List<Loc> getSuggestEmptyLoc(Long taskType, Integer locTypeHeight) {
    public List<Loc> getSuggestEmptyLoc(Long taskType, Integer locTypeHeight, List<Integer> laneRowList) {
        List<Loc> locs = new ArrayList<>();
        //空托盘
        List<SuggestLocRule> suggestLocRules = suggestLocRuleService.list(new LambdaQueryWrapper<SuggestLocRule>().eq(SuggestLocRule::getLocType, 0));
@@ -283,6 +293,11 @@
            queryWrapper.ge(Loc::getLev1, suggestLocRule.getStartLev());
            queryWrapper.le(Loc::getLev1, suggestLocRule.getTargetLev());
            queryWrapper.eq(Loc::getLocStsId, LocStsType.O.val());
            if (laneRowList != null && !laneRowList.isEmpty()) {
                queryWrapper.in(Loc::getRow1, laneRowList);
            }
            List<Loc> list = locService.list(queryWrapper);
            if (!list.isEmpty()) {
                locs.addAll(list);
@@ -292,7 +307,7 @@
    }
    //获取全局库位(完整巷道)
    public List<Loc> getGlobalEmptyLoc(Long taskType, Integer locTypeHeight) {
    public List<Loc> getGlobalEmptyLoc(Long taskType, Integer locTypeHeight, List<Integer> laneRowList) {
        List<Loc> locs = new ArrayList<>();
        LocTypeHeightType locTypeHeightType = LocTypeHeightType.get(locTypeHeight);
        if (locTypeHeightType == null) {
@@ -306,6 +321,11 @@
        LambdaQueryWrapper<Loc> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Loc::getLocStsId, LocStsType.O.val());
        queryWrapper.in(Loc::getId, locIdList);
        if (laneRowList != null && !laneRowList.isEmpty()) {
            queryWrapper.in(Loc::getRow1, laneRowList);
        }
        List<Loc> list = locService.list(queryWrapper);
        if (!list.isEmpty()) {
            locs.addAll(list);