自动化立体仓库 - WMS系统
#
zzgtfwq
5 天以前 8ea4c0fa09a08ec40e5f453bcde0fc7397b15b0d
#
4个文件已修改
107 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Utils.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/web/WcsController.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -119,7 +119,12 @@
//        List<String> matnrs = param.getList().stream().map(FullStoreParam.MatCodeStore::getMatnr).distinct().collect(Collectors.toList());
//        List<String> batchs = param.getList().stream().map(FullStoreParam.MatCodeStore::getBatch).distinct().collect(Collectors.toList());
        FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(param.getList().get(0));
        StartupDto dto = commonService.getLocNo(1, param.getDevpNo(), findLocNoAttributeVo,locTypeDto);
        StartupDto dto = null;
        try{
            dto = commonService.getLocNo(1, param.getDevpNo(), findLocNoAttributeVo,locTypeDto);
        } catch (Exception e){
            throw new CoolException("查询库位失败!!==》"+e.getMessage());
        }
        if (Cools.isEmpty(dto)){
            throw new CoolException("查询库位失败!!==》startupFullPutStore ==》 commonService.getLocNo");
        }
@@ -658,8 +663,15 @@
        // 检索库位
        LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo);
        FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo();
        StartupDto dto = commonService.getLocNo( 10, devpNo, findLocNoAttributeVo, locTypeDto);
        StartupDto dto = null;
        try{
            dto = commonService.getLocNo( 10, devpNo, findLocNoAttributeVo, locTypeDto);
        } catch (Exception e){
            throw new CoolException("查询库位失败!!==》"+e.getMessage());
        }
        if (Cools.isEmpty(dto)){
            throw new CoolException("查询库位失败!!==》startupFullPutStore ==》 commonService.getLocNo");
        }
        int workNo = dto.getWorkNo();
        Date now = new Date();
        // 生成工作档
src/main/java/com/zy/asrs/utils/Utils.java
@@ -357,6 +357,13 @@
        return false;
    }
    public static boolean BooleanWhsTypeSta(Integer whsType) {
        if (whsType == 1 || whsType == 2 || whsType == 5 || whsType==3 || whsType==4 || whsType == 9) {
            return true;
        }
        return false;
    }
    public static boolean BooleanWhsTypeSta(RowLastno rowLastno, Integer staDescId) {//站点路径更新
        if (rowLastno.getPointSwitch().equals("Y") && staDescId != 11 && staDescId != 111) {
            return true;
@@ -384,7 +391,8 @@
    public static int[] LocNecessaryParameters(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        switch (rowLastno.getTypeId()) {
            case 1://经典双伸库位
                return LocNecessaryParametersDoubleExtension(rowLastno, curRow, crnNumber); //已完善
                return LocNecessaryParametersDoubleExtension9(rowLastno, curRow, crnNumber); //已完善
//                return LocNecessaryParametersDoubleExtension(rowLastno, curRow, crnNumber); //已完善
            case 2://经典单伸库位(2排货架)
                return LocNecessaryParametersDoubleExtension2(rowLastno, curRow, crnNumber); //已完善
            case 3://经典单双伸库位  左单右双(小单大双)
@@ -397,11 +405,61 @@
                return LocNecessaryParametersDoubleExtension6(rowLastno, curRow, crnNumber); //已完善
            case 7://平库  CTU库
                return LocNecessaryParametersDoubleExtension7(rowLastno, curRow, crnNumber); //已完善
            case 9://前双伸 后左单右双(小单大双)  港投定制
                return LocNecessaryParametersDoubleExtension9(rowLastno, curRow, crnNumber); //已完善
            default:
                return LocNecessaryParametersMove(rowLastno, curRow, crnNumber);//moveCrnNo
        }
    }
    public static int[] LocNecessaryParametersDoubleExtension9(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        necessaryParameters[0] = crnNumber; // 轮询次数
        //满板正常入库
        if (curRow.equals(14)) {
            necessaryParameters[1] = 1;    //curRow   最深库位排
            necessaryParameters[2] = 1;     //crnNo     堆垛机号
            necessaryParameters[3] = 2;    //nearRow  最浅库位排
        } else if (curRow.equals(11)) {
            necessaryParameters[1] = 4;    //curRow   最深库位排
            necessaryParameters[2] = 1;     //crnNo     堆垛机号
            necessaryParameters[3] = 3;    //nearRow  最浅库位排
        } else if (curRow.equals(10)) {
            necessaryParameters[1] = 14;    //curRow   最深库位排
            necessaryParameters[2] = 4;     //crnNo     堆垛机号
            necessaryParameters[3] = 13;    //nearRow  最浅库位排
        } else if (curRow.equals(9)) {
            necessaryParameters[1] = 11;    //curRow   最深库位排
            necessaryParameters[2] = 4;     //crnNo     堆垛机号
            necessaryParameters[3] = 12;    //nearRow  最浅库位排
        } else if (curRow.equals(8)) {
            necessaryParameters[1] = 10;    //curRow   最深库位排
            necessaryParameters[2] = 3;     //crnNo     堆垛机号
            necessaryParameters[3] = 10;    //nearRow  最浅库位排
        } else if (curRow.equals(5)) {
            necessaryParameters[1] = 9;    //curRow   最深库位排
            necessaryParameters[2] = 3;     //crnNo     堆垛机号
            necessaryParameters[3] = 9;    //nearRow  最浅库位排
        } else if (curRow.equals(4)) {
            necessaryParameters[1] = 8;    //curRow   最深库位排
            necessaryParameters[2] = 2;     //crnNo     堆垛机号
            necessaryParameters[3] = 7;    //nearRow  最浅库位排
        } else if (curRow.equals(1)) {
            necessaryParameters[1] = 5;    //curRow   最深库位排
            necessaryParameters[2] = 2;     //crnNo     堆垛机号
            necessaryParameters[3] = 6;    //nearRow  最浅库位排
        } else {
            necessaryParameters[1] = 1;    //curRow   最深库位排
            necessaryParameters[2] = 1;     //crnNo     堆垛机号
            necessaryParameters[3] = 2;    //nearRow  最浅库位排
        }
        return necessaryParameters;
    }
    //经典双伸库位
    public static int[] LocNecessaryParametersDoubleExtension(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
src/main/java/com/zy/common/service/CommonService.java
@@ -152,7 +152,8 @@
            }
        } catch (Exception e) {
            log.error("站点={} 未查询到对应的规则", sourceStaNo);
            log.error("站点={} 未查询到对应的规则"+e.getMessage(), sourceStaNo);
            throw new CoolException(sourceStaNo+"站点, 未查询到对应的规则"+e.getMessage());
        }
        return null;
    }
@@ -375,7 +376,7 @@
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                    .eq("row1", nearRow)
                    .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())
                    .orderBy("lev1", true).orderBy("bay1", false));
                    .orderBy("lev1", true).orderBy("bay1", true));
            for (LocMast locMast1 : locMasts) {
                if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                    continue;
@@ -440,7 +441,7 @@
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                    .eq("row1", nearRow)
                    .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())
                    .orderBy("lev1", true).orderBy("bay1", false));
                    .orderBy("lev1", true).orderBy("bay1", true));
            for (LocMast locMast1 : locMasts) {
                if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                    continue;
src/main/java/com/zy/common/web/WcsController.java
@@ -398,7 +398,16 @@
        List<String> batchs = waitPakins.stream().map(WaitPakin::getBatch).distinct().collect(Collectors.toList());
        FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(matnrs.get(0), batchs.get(0));
//        FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(waitPakins.get(0));
        StartupDto dto = commonService.getLocNo( 1, devpNo,findLocNoAttributeVo, locTypeDto);
        StartupDto dto = null;
        try{
            dto = commonService.getLocNo( 1, devpNo,findLocNoAttributeVo, locTypeDto);
        } catch (Exception e){
            throw new CoolException("查询库位失败!!==》"+e.getMessage());
        }
        if (Cools.isEmpty(dto)){
            throw new CoolException("查询库位失败!!==》startupFullPutStore ==》 commonService.getLocNo");
        }
        int workNo = dto.getWorkNo();
        Date now = new Date();
        // 生成工作档
@@ -474,8 +483,15 @@
        BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true);
        // 检索库位
        FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo();
        StartupDto dto = commonService.getLocNo( 10, devpNo, findLocNoAttributeVo, locTypeDto);
        StartupDto dto = null;
        try{
            dto = commonService.getLocNo( 10, devpNo, findLocNoAttributeVo, locTypeDto);
        } catch (Exception e){
            throw new CoolException("查询库位失败!!==》"+e.getMessage());
        }
        if (Cools.isEmpty(dto)){
            throw new CoolException("查询库位失败!!==》startupFullPutStore ==》 commonService.getLocNo");
        }
        int workNo = dto.getWorkNo();
        // 生成工作档
        WrkMast wrkMast = new WrkMast();