自动化立体仓库 - WMS系统
zyh
7 天以前 c47395fe29493062a3f0bc2cf1d02a2946b20b88
src/main/java/com/zy/common/service/CommonService.java
@@ -170,11 +170,31 @@
            throw new CoolException("入库请求库位失败:路径不存在" + staDescId +"," + sourceStaNo);
        }
        Short locType1 = 1;
        LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_sts", "O").eq("loc_type1", locType1).orderBy("lev1").orderBy("bay1").orderBy("row1"));
        if (locMast == null) {
            log.error("入库请求库位失败:无库位" + locType1);
            throw new CoolException("入库请求库位失败:无库位" + locType1);
        LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>()
                .eq("loc_sts", "O")
                .eq("loc_type1", locTypeDto.getLocType1())
                .eq("loc_type2", locTypeDto.getLocType2())
                .orderBy("lev1")
                .orderBy("bay1")
                .orderBy("row1"));
        if (locMast == null && locTypeDto.getLocType1() ==1) {
            LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>()
                    .eq("loc_sts", "O")
                    .eq("loc_type1", locTypeDto.getLocType1() + 1)
                    .eq("loc_type2", locTypeDto.getLocType2())
                    .orderBy("lev1")
                    .orderBy("bay1")
                    .orderBy("row1"));
            if (locMast1 == null){
                log.error("入库请求库位失败:无库位" + locTypeDto.getLocType1());
                throw new CoolException("入库请求库位失败:无库位" + locTypeDto.getLocType1());
            }else {
                locMast =locMast1;
            }
        }else if (locMast ==null){
            log.error("入库请求库位失败:无库位" + locTypeDto.getLocType1());
            throw new CoolException("入库请求库位失败:无库位" + locTypeDto.getLocType1());
        }
        StartupDto startupDto = new StartupDto();