#
Junjie
2024-01-11 901b2ab3e0e7c592602848cfa256f34c5b0c7bb8
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/CommonService.java
@@ -82,7 +82,7 @@
     * 检索库位号
     */
    @Transactional
    public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) {
    public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, Long hostId, LocTypeDto locTypeDto, int times) {
        // 目标库位
        LocMast locMast = null;
@@ -108,7 +108,7 @@
//        }
        //搜索整个空库位组
        locMast = getLocNoStepSingle(locTypeDto, staDescId, sourceStaNo);
        locMast = getLocNoStepSingle(locTypeDto, staDescId, sourceStaNo, hostId);
        if (locMast != null) {
            //找到库位,返回dto
            return getLocNoStep6(staDescId, sourceStaNo, locMast);//返回dto
@@ -244,18 +244,19 @@
    }
    // 搜索单品(整个库位组)
    private LocMast getLocNoStepSingle(LocTypeDto locTypeDto, Integer staDescId, Integer sourceStaNo) {
    private LocMast getLocNoStepSingle(LocTypeDto locTypeDto, Integer staDescId, Integer sourceStaNo, Long hostId) {
        LocMast locMast = null;
        // 获取目标站
        LambdaQueryWrapper<StaDesc> wrapper = new LambdaQueryWrapper<StaDesc>()
                .eq(StaDesc::getTypeNo, staDescId)
                .eq(StaDesc::getStnNo, sourceStaNo);
                .eq(StaDesc::getStnNo, sourceStaNo)
                .eq(StaDesc::getHostId, hostId);
        StaDesc staDesc = staDescService.getOne(wrapper);
        if (staDesc == null) {
            throw new CoolException("入库路径不存在");
        }
        List<LocMast> locMasts = locMastService.list(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocSts, "O"));//搜索货物
        List<LocMast> locMasts = locMastService.list(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocSts, "O").eq(LocMast::getHostId, hostId));//搜索货物
        if (locMasts == null) {
            return null;