自动化立体仓库 - WMS系统
#
whycq
2024-06-19 396ba47655c284755b317bf0f24585310809d56a
src/main/java/com/zy/asrs/task/AutoMoveScheduler.java
@@ -63,7 +63,7 @@
                .andNew().eq("io_type",108)
                        .andNew()
                        .eq("crn_no",2).or().eq("crn_no",3)
                        .orderBy("appe_time",true)
                        .orderBy("io_pri",false).orderBy("appe_time",true)
                );
        if (agvWrkMastList.isEmpty()) {
            return;
@@ -110,6 +110,7 @@
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 22)
                .andNew().eq("io_type",111)
                .orderBy("io_pri",false)
                .orderBy("appe_time",true)
        );
        if (agvWrkMastList.isEmpty()) {
@@ -118,6 +119,27 @@
        for (AgvWrkMast agvWrkMast : agvWrkMastList) {
            try{
                autoMoveHandler.start3(agvWrkMast);
            } catch (Exception e){
                log.error("工作号"+agvWrkMast.getWrkNo()+"调拨出库,处理失败:===》异常原因:"+e.getMessage());
            }
        }
    }
    @Scheduled(cron = "0/2 * * * * ? ")
    private void execute4(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 22)
                .andNew().eq("io_type",114)
                .orderBy("io_pri",false)
                .orderBy("appe_time",true)
        );
        if (agvWrkMastList.isEmpty()) {
            return;
        }
        for (AgvWrkMast agvWrkMast : agvWrkMastList) {
            try{
                autoMoveHandler.start4(agvWrkMast);
            } catch (Exception e){
                log.error("工作号"+agvWrkMast.getWrkNo()+"调拨出库,处理失败:===》异常原因:"+e.getMessage());
            }
@@ -158,7 +180,8 @@
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 214)
                .eq("loc_no","")
                .eq("io_type",113));
                .eq("io_type",113)
                .orderBy("io_pri",false));
        if (agvWrkMastList.isEmpty()) {
            return;
        }
@@ -197,8 +220,8 @@
     * 库位-接驳点  库位-吸塑车间
     * 每层最大 在 回库数量限制5条
     * 优先选择先到接驳位(接驳位可入) 后选择直接回库
     * 2楼或3楼站点可入信号全部没有,代表走电梯自动搬运模式
     */
    @Scheduled(cron = "0/2 * * * * ? ")
    private void autoEmptyBack4(){
        // 查询 不为1楼的空货架
@@ -219,11 +242,29 @@
        }
    }
    private boolean determineFloorConnection(Integer floor){
        try{
            List<AgvBasDevp> agvBasDevps = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().eq("floor", floor).like("dev_no", "DB_"));
            if (!agvBasDevps.isEmpty()){
                for (AgvBasDevp agvBasDevp:agvBasDevps){
                    if (agvBasDevp.getInEnable().equals("Y")){
                        return false;
                    }
                }
                return true;
            }
        }catch (Exception e){
            log.error("判断当前楼层接驳位是否全部关闭,异常"+e.getMessage());
        }
        return false;
    }
    /**
     * 站点是否自动
     * 自动: 生成 109 自动回流
     * 手动: 生成 113 手动回流
     * 优先选择先到接驳位(接驳位可入) 后选择直接回库
     *
     */
    @Scheduled(cron = "0/2 * * * * ? ")
    private void autoEmptyBack5(){