自动化立体仓库 - WMS系统
#
Administrator
2 天以前 fa3303ec0e60325f7e0cafeac8fe9a2a7de0652c
src/main/java/com/zy/asrs/task/WorkMastScheduler.java
@@ -80,11 +80,12 @@
     */
    @Scheduled(cron = "0/3 * * * * ? ")
    private synchronized void autoPubTasks() {
        List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().in("wrk_sts", Arrays.asList(1L, 11L)).orderBy("io_pri",false).orderBy("appe_time", true));
        for (int i = 1 ;i<=4;i++){
            List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("crn_no",i).in("wrk_sts", 1L, 11L).orderBy("io_pri",false).orderBy("appe_time", true));
        if (wrkMasts.isEmpty()) {
            return;
                continue;
        }
        Collections.shuffle(wrkMasts);
//            Collections.shuffle(wrkMasts);
        for (WrkMast wrkMast : wrkMasts) {
            try {
                //查看下发任务是否为冻结库位,是冻结库位则跳过下发任务
@@ -108,7 +109,7 @@
                if(wrkMast.getIoType()==101&&!Cools.isEmpty(wrkMast.getLocNo())){
                    LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("crn_no", crnNo).eq("loc_no", wrkMast.getLocNo()));
                    if (!Cools.isEmpty(locMast)) {
                        List<WrkMast> wrkMasts1 = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).in("wrk_sts", Arrays.asList(12L,13L,14L)));
                            List<WrkMast> wrkMasts1 = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).in("wrk_sts", 12L,13L,14L));
                        if (!wrkMasts1.isEmpty()) {
                            continue;
                        }
@@ -177,6 +178,8 @@
        }
    }
    }
    private boolean isSuccess(R r) {
        return r != null && "200".equals(String.valueOf(r.get("code")));
    }