自动化立体仓库 - WMS系统
#
zwl
2025-05-20 cb5092a38a5123bd9da452ad311b9323561802b1
#
2个文件已修改
19 ■■■■■ 已修改文件
src/main/java/com/zy/common/service/CommonService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/web/WcsController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java
@@ -548,6 +548,7 @@
     */
    public LocMast getLocNo2(WaitPakin waitPakin, Integer[] arr, Integer d, Integer locType, Integer locType1) {
        LocMast locMast = null;
        try {
        //一.查询入库货物是否是特殊摆放货物
        if (locType == 2) {
            //查找层标记的
@@ -639,15 +640,19 @@
            }
            //该层没有找到库位时进入递归换层找库位
            if (Cools.isEmpty(locMast)) {
                    ++d;
                if (d > 6) {
                    throw new CoolException("没有空库位");
                }
                if (d == 6 && locType == 2) {
                    return getLocNo2(waitPakin, arr, 0, 1, locType1);
                }
                return getLocNo2(waitPakin, arr, d++, locType, locType1);
                    return getLocNo2(waitPakin, arr, d, locType, locType1);
            }
        }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return locMast;
    }
src/main/java/com/zy/common/web/WcsController.java
@@ -194,6 +194,12 @@
            WaitPakin waitPakin1=new WaitPakin();
            waitPakin1.sync(wrkDetl);
            locMast1 =commonService.getLocNo2(waitPakin1,arr,0,type,1);
            if (locMast1 == null) {
                basDevp.setArea("未找到空库位");
                basDevpService.updateById(basDevp);
                throw new CoolException("未找到空库位");
            }
            //更新货物所在库位的深浅号
            wrkDetl.setSource(locMast1.getLocAttribute());
            wrkDetlService.update(wrkDetl,new EntityWrapper<WrkDetl>().eq("wrk_no", wrkDetl.getWrkNo()));
@@ -214,6 +220,12 @@
            int type=Cools.isEmpty(waitPakins.get(0).getBeBatch())?1:waitPakins.get(0).getBeBatch();
            // 检索库位
            locMast1 =commonService.getLocNo2(waitPakins.get(0),arr,0,type,1);
            if (locMast1 == null) {
                basDevp.setArea("未找到空库位");
                basDevpService.updateById(basDevp);
                throw new CoolException("未找到空库位");
            }
            int mbz=devpNo*10+Integer.valueOf(locMast1.getLocNo().substring(6));
            //正常入库
            workNo = commonService.getWorkNo(0);