自动化立体仓库 - WMS系统
#
tqs
2024-05-31 5e4d17f6a07256743a7708d8a3f5ee63fddbb040
#
1个文件已修改
137 ■■■■ 已修改文件
src/main/java/com/zy/asrs/task/AutoMoveScheduler.java 137 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/AutoMoveScheduler.java
@@ -51,7 +51,7 @@
    }
    /**
     * 自动调拨任务,从1楼调拨到2楼,
     * 自动调拨任务,从1楼调拨到2楼,3楼
     * wrkSts 22.调拨待分配
     * ioType 108.自动调拨
     * crnNo :2目标楼层
@@ -79,32 +79,38 @@
    }
//    @Scheduled(cron = "0/2 * * * * ? ")
    private void execute5(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 22)
                .andNew().eq("io_type",108)
                .eq("crn_no",3)
                .orderBy("appe_time",true)
        );
        if (agvWrkMastList.isEmpty()) {
            return;
        }
        for (AgvWrkMast agvWrkMast : agvWrkMastList) {
            try{
                autoMoveHandler.start2(agvWrkMast);
            } catch (Exception e){
                log.error("工作号"+agvWrkMast.getWrkNo()+"调拨出库,处理失败:===》异常原因:"+e.getMessage());
            }
        }
//    private void execute5(){
//        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
//                .eq("wrk_sts", 22)
//                .andNew().eq("io_type",108)
//                .eq("crn_no",3)
//                .orderBy("appe_time",true)
//        );
//        if (agvWrkMastList.isEmpty()) {
//            return;
//        }
//        for (AgvWrkMast agvWrkMast : agvWrkMastList) {
//            try{
//                autoMoveHandler.start2(agvWrkMast);
//            } catch (Exception e){
//                log.error("工作号"+agvWrkMast.getWrkNo()+"调拨出库,处理失败:===》异常原因:"+e.getMessage());
//            }
//        }
//
//    }
    }
    // 调拨出库
    /**
     * 手动调拨任务(不走电梯流转,人工搬运),从1楼调拨到2、3楼,
     * wrkSts 22.调拨待分配
     * ioType 111.手动调拨
     */
    @Scheduled(cron = "0/2 * * * * ? ")
    private void execute3(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 22)
                .andNew().eq("io_type",111)
                .orderBy("appe_time",true)
        );
        if (agvWrkMastList.isEmpty()) {
            return;
@@ -119,27 +125,33 @@
    }
    // 空板自动回库  库位-接驳点
    //@Scheduled(cron = "0/2 * * * * ? ")
    private void autoEmptyBack(){
        // 查询 不为1楼的空货架
        List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(
                new EntityWrapper<AgvLocMast>()
                        .ne("floor", 1)
                        .eq("loc_sts","D")
                        .eq("loc_type1",3));
        if (agvLocMasts.isEmpty()) {
            return;
        }
        for (AgvLocMast agvLocMast : agvLocMasts) {
            try{
                autoMoveHandler.autoEmptyBack(agvLocMast);
            } catch (Exception e){
                log.error("库位号"+agvLocMast.getLocNo()+"空板自动回库  库位-接驳点,处理失败:===》异常原因:"+e.getMessage());
            }
        }
    }
    // 空板自动回库  接驳点 - 1楼库位
//    // 空板自动回库  库位-接驳点
//    //@Scheduled(cron = "0/2 * * * * ? ")
//    private void autoEmptyBack(){
//        // 查询 不为1楼的空货架
//        List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(
//                new EntityWrapper<AgvLocMast>()
//                        .ne("floor", 1)
//                        .eq("loc_sts","D")
//                        .eq("loc_type1",3));
//        if (agvLocMasts.isEmpty()) {
//            return;
//        }
//        for (AgvLocMast agvLocMast : agvLocMasts) {
//            try{
//                autoMoveHandler.autoEmptyBack(agvLocMast);
//            } catch (Exception e){
//                log.error("库位号"+agvLocMast.getLocNo()+"空板自动回库  库位-接驳点,处理失败:===》异常原因:"+e.getMessage());
//            }
//        }
//    }
    /**
     * 手工作业不通过电梯时,空板从2、3楼接驳位人工搬运到1楼接驳位以后,
     * 回流到1楼接驳位,1楼接驳点 - 1楼库位
     * wrkSts 214.空料架回流待分配
     * ioType 113.空托盘手动回流
     */
    @Scheduled(cron = "0/2 * * * * ? ")
    private void autoEmptyBack3(){
        // 工作档为201 且 入出库类型为109
@@ -159,33 +171,34 @@
        }
    }
    // 空板自动回库
//    @Scheduled(cron = "0/2 * * * * ? ")
    private void autoEmptyBack2(){
        // 查询 不为1楼的空货架
        List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(
                new EntityWrapper<AgvLocMast>()
                        .ne("floor", 1)
                        .eq("loc_sts","D")
                        .eq("loc_type1",3));
        if (agvLocMasts.isEmpty()) {
            return;
        }
        for (AgvLocMast agvLocMast : agvLocMasts) {
            try{
                autoMoveHandler.autoEmptyBack2(agvLocMast);
            } catch (Exception e){
                log.error("库位号"+agvLocMast.getLocNo()+"空板自动回库,处理失败:===》异常原因:"+e.getMessage());
            }
        }
    }
//    // 空板自动回库
////    @Scheduled(cron = "0/2 * * * * ? ")
//    private void autoEmptyBack2(){
//        // 查询 不为1楼的空货架
//        List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(
//                new EntityWrapper<AgvLocMast>()
//                        .ne("floor", 1)
//                        .eq("loc_sts","D")
//                        .eq("loc_type1",3));
//        if (agvLocMasts.isEmpty()) {
//            return;
//        }
//        for (AgvLocMast agvLocMast : agvLocMasts) {
//            try{
//                autoMoveHandler.autoEmptyBack2(agvLocMast);
//            } catch (Exception e){
//                log.error("库位号"+agvLocMast.getLocNo()+"空板自动回库,处理失败:===》异常原因:"+e.getMessage());
//            }
//        }
//    }
    /**
     * 空板自动回库
     * 空板自动回库(通过电梯),2、3楼库位的箱壳空料架,直接回流到1楼库位
     * 库位-接驳点  库位-吸塑车间
     * 每层最大 在 回库数量限制5条
     * 优先选择先到接驳位(接驳位可入) 后选择直接回库
     */
    @Scheduled(cron = "0/2 * * * * ? ")
    private void autoEmptyBack4(){
        // 查询 不为1楼的空货架