pang.jiabao
2025-03-01 a901007ba397a2492cac130372a76f8691ed6d36
ctu寻库位方法修改
3个文件已修改
64 ■■■■■ 已修改文件
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WorkServiceImpl.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/LocUtils.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wms/src/main/resources/application.yml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/WorkServiceImpl.java
@@ -3,7 +3,6 @@
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zy.asrs.framework.common.Cools;
import com.zy.asrs.framework.common.R;
import com.zy.asrs.framework.exception.CoolException;
import com.zy.asrs.wms.asrs.entity.*;
import com.zy.asrs.wms.asrs.entity.enums.*;
@@ -142,15 +141,16 @@
            }
            if (ruleDetl.getDetlType().equals(ShelvesRuleDetlType.COMPLETE.id)) {
                return locUtils.getGlobalEmptyLocToCtu(locTypeHeight);
                //从全局库位中获取(完整巷道)
                List<Loc> globalLoc = locUtils.getGlobalEmptyLoc(taskType, locTypeHeight, laneRowList, currentLev);
                //获取库位
                if (!globalLoc.isEmpty()) {
                    defaultLoc = locUtils.filterAllLoc(globalLoc);
                    if (defaultLoc != null) {
                        return defaultLoc;
                    }
                }
//                List<Loc> globalLoc = locUtils.getGlobalEmptyLoc(taskType, locTypeHeight, laneRowList, currentLev);
//                //获取库位
//                if (!globalLoc.isEmpty()) {
//                    defaultLoc = locUtils.filterAllLoc(globalLoc);
//                    if (defaultLoc != null) {
//                        return defaultLoc;
//                    }
//                }
            }
        }
@@ -240,15 +240,16 @@
            }
            if (ruleDetl.getDetlType().equals(ShelvesRuleDetlType.COMPLETE.id)) {
                return locUtils.getGlobalEmptyLocToCtu(locTypeHeight);
                //从全局库位中获取(完整巷道)
                List<Loc> globalLoc = locUtils.getGlobalLoc(taskType, locTypeHeight, laneRowList, currentLev);
                //获取库位
                if (!globalLoc.isEmpty()) {
                    defaultLoc = locUtils.filterAllLoc(globalLoc);
                    if (defaultLoc != null) {
                        return defaultLoc;
                    }
                }
//                List<Loc> globalLoc = locUtils.getGlobalLoc(taskType, locTypeHeight, laneRowList, currentLev);
//                //获取库位
//                if (!globalLoc.isEmpty()) {
//                    defaultLoc = locUtils.filterAllLoc(globalLoc);
//                    if (defaultLoc != null) {
//                        return defaultLoc;
//                    }
//                }
            }
        }
        return defaultLoc;
zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/LocUtils.java
@@ -357,4 +357,25 @@
        return locs;
    }
    // 重写ctu库获取库位
    public Loc getGlobalEmptyLocToCtu(Integer locTypeHeight) {
        LocTypeHeightType locTypeHeightType = LocTypeHeightType.get(locTypeHeight);
        if (locTypeHeightType == null) {
            throw new CoolException("库位高度类型异常");
        }
        //获取库位高度
        LocType locType = locTypeService.getOne(new LambdaQueryWrapper<LocType>().eq(LocType::getFlag, locTypeHeightType.flag));
        //符合库位高度的库位集合
        List<Long> locIdList = locTypeBindService.getLocIdListByType(locType);
        LambdaQueryWrapper<Loc> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.in(Loc::getId, locIdList);
        queryWrapper.eq(Loc::getLocStsId, LocStsType.O.val());
        queryWrapper.le(Loc::getRow1,4);
        queryWrapper.orderByAsc(Loc::getLev1,Loc::getBay1);
        queryWrapper.last("limit 1");
        return locService.getOne(queryWrapper);
    }
}
zy-asrs-wms/src/main/resources/application.yml
@@ -14,9 +14,9 @@
      connection-test-query: select 1
    driver-class-name: com.mysql.cj.jdbc.Driver
#    url: jdbc:mysql://127.0.0.1:3306/wms_dev_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    url: jdbc:mysql://127.0.0.1:3306/wms_dev_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    url: jdbc:mysql://127.0.0.1:3306/ycdsasrs?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    username: root
    password: 34821015
    password: 123456
#    url: jdbc:mysql://47.76.147.249:3306/wms_dev_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
#    username: wms_dev_test
#    password: smjPbTrkmTMEGKaD
@@ -41,7 +41,7 @@
  #  global-config:
  #    field-strategy: 0
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
    map-underscore-to-camel-case: true
    cache-enabled: true
  global-config:
@@ -63,7 +63,7 @@
#License相关配置
license:
  subject: wms_dev
  subject: ycdsasrs
  publicAlias: publicCert
  storePass: public_zhongyang_123456789
  licensePath: license.lic