自动化立体仓库 - WMS系统
#
whycq
2024-05-21 7e8c8abedab8d33ea5faff80545e566aa71306d6
src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java
@@ -41,17 +41,22 @@
    /*
    定时处理AGV工作档中工作状态为205.工作完成 且 (1.入库 || 53,拣料入库 || 57.盘点入库 || 10.空板入库 || 11.库格移载)的数据
    定时处理AGV工作档中工作状态为205.工作完成 且 (1.入库 || 53,拣料入库 || 57.盘点入库 || 10.空板入库 || 11.单层移库 || 12.跨层移库 || 108.自动调拨 || 109.手动调拨)的数据
     */
    @Scheduled(cron = "0/10 * * * * ? ")
    @Scheduled(cron = "0/3 * * * * ? ")
    public void excutePutwayWrk(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 205)
                .andNew().eq("io_type",53)
                .or().eq("io_type",1)
                .or().eq("io_type",57)
                .or().eq("io_type",58)
                .or().eq("io_type",10)
                .or().eq("io_type",11));
                .or().eq("io_type",11)
                .or().eq("io_type",12)
                .or().eq("io_type",108)
                .or().eq("io_type",109)
                .or().eq("io_type",112));
        if(!Cools.isEmpty(agvWrkMastList)){
            agvWrkMastList.stream().forEach(agvWrkMast -> {
                agvWrkMastHandler.completedPutWayWrk(agvWrkMast);
@@ -62,7 +67,7 @@
    /*
    定时处理AGV工作档中工作状态为206.出库完成 且 (101.出库 || 110.空板出库)
     */
    @Scheduled(cron = "0/10 * * * * ? ")
    @Scheduled(cron = "0/3 * * * * ? ")
    public void excuteCarryWrk(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 206)
@@ -75,10 +80,11 @@
        }
    }
    /*
    定时处理AGV工作档中工作状态为206.出库完成 且 (101.出库 || 110.空板出库)
     */
    @Scheduled(cron = "0/10 * * * * ? ")
    @Scheduled(cron = "0/3 * * * * ? ")
    public void excuteCarryWrk2(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                .eq("wrk_sts", 208)
@@ -96,7 +102,7 @@
    putaway:上架
    定时处理AGV工作档中工作状态为201.生成入库任务ID 且(出库类型为 53.拣料再入库 || 1.入库 || 10.空板入库栽 || 57.盘点再入库)的数据
     */
    @Scheduled(cron = "0/10 * * * * ? ")
    @Scheduled(cron = "0/3 * * * * ? ")
    public void startPutwayWrk(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectPage(new Page<>(1, 50)
                ,new EntityWrapper<AgvWrkMast>()
@@ -104,7 +110,13 @@
                .andNew().eq("io_type", 53)
                .or().eq("io_type", 1)
                .or().eq("io_type", 10)
                .or().eq("io_type", 57)).getRecords();
                .or().eq("io_type", 57)
                .or().eq("io_type", 58)
                .or().eq("io_type", 11)
                .or().eq("io_type", 12)
                .or().eq("io_type", 109)
                .or().eq("io_type", 108)
                .or().eq("io_type", 112)).getRecords();
        if(!Cools.isEmpty(agvWrkMastList)){
            agvWrkMastList.forEach(agvWrkMast -> {
@@ -118,10 +130,32 @@
    }
    /*
    putaway:上架
    定时处理AGV工作档中工作状态为201.生成入库任务ID 且(出库类型为 53.拣料再入库 || 1.入库 || 10.空板入库栽 || 57.盘点再入库)的数据
     */
    @Scheduled(cron = "0/3 * * * * ? ")
    public void startAllcationIn(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectPage(new Page<>(1, 50)
                ,new EntityWrapper<AgvWrkMast>()
                        .eq("wrk_sts", 211)
                        .andNew().eq("io_type", 112)).getRecords();
        if(!Cools.isEmpty(agvWrkMastList)){
            agvWrkMastList.forEach(agvWrkMast -> {
                try {
                    agvWrkMastHandler.startAllcationIn(agvWrkMast);
                } catch (IOException e) {
                    log.error(e.getMessage());
                }
            });
        }
    }
    /*
    carry:搬运,统指出库、移库、点到点搬运等
    定时处理AGV工作档中工作状态为21.生成出库任务 且(出库类型为 101.出库 || 103.拣料出库 || 11.库格移栽 || 110.空板出库 || 107.盘点出库)的数据
     */
    @Scheduled(cron = "0/10 * * * * ? ")
    @Scheduled(cron = "0/3 * * * * ? ")
    public void startCarryWrk(){
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectPage(new Page<>(1, 50)
                ,new EntityWrapper<AgvWrkMast>()
@@ -131,7 +165,8 @@
                        .or().eq("io_type", 103)
                        .or().eq("io_type", 11)
                        .or().eq("io_type", 110)
                        .or().eq("io_type", 107)).getRecords();
                        .or().eq("io_type", 107)
                        .or().eq("io_type", 108)).getRecords();
        if(!Cools.isEmpty(agvWrkMastList)){
            List<String> devNos = new ArrayList<>();
@@ -148,6 +183,14 @@
                    AgvWrkMast agvWrkMastWorking = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>()
                            .eq("loc_no", agvWrkMast.getLocNo())
                            .ge("wrk_sts", 202L));
                    if(!Cools.isEmpty(agvWrkMastWorking)){
                        return;
                    }
                    agvWrkMastWorking = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>()
                            .eq("source_loc_no",agvWrkMast.getLocNo())
                            .le("wrk_sts",204L));
                    if(!Cools.isEmpty(agvWrkMastWorking)){
                        return;
@@ -179,7 +222,7 @@
    /*
    自动生成空板出库任务
     */
    @Scheduled(cron = "0/10 * * * * ? ")
    @Scheduled(cron = "0/3 * * * * ? ")
    public void autoEmptyOut(){
        boolean packageEmptyAutoOUt = Cools.eq("Y",Parameter.get().getPackageEmptyAutoOUt());
        boolean mateEmptyAutoOut = Cools.eq("Y",Parameter.get().getMateEmptyAutoOut());