| | |
| | | */ |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private synchronized void autoPubTasks() { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().in("wrk_sts", Arrays.asList(1L, 11L))); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().in("wrk_sts", Arrays.asList(1L, 11L)).orderBy("io_pri",false).orderBy("appe_time", true)); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | | } |
| | |
| | | .eq("b_loc_no", wrkMast.getLocNo()) |
| | | .eq("freeze", 1)); |
| | | if (Cools.isEmpty(locAroundBind)) { |
| | | locAroundBind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>() |
| | | .eq("b_loc_no", wrkMast.getSourceLocNo()) |
| | | .eq("freeze", 1)); |
| | | if (!Cools.isEmpty(locAroundBind)) { |
| | | markPublishError(wrkMast.getWrkNo(), String.valueOf("源库位被冻结")); |
| | | continue; |
| | | } |
| | | } else { |
| | | markPublishError(wrkMast.getWrkNo(), String.valueOf("目标库位被冻结")); |
| | | continue; |
| | | } |
| | | locAroundBind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>() |
| | | .eq("b_loc_no", wrkMast.getSourceLocNo()) |
| | | .eq("freeze", 1)); |
| | | if (!Cools.isEmpty(locAroundBind)) { |
| | | markPublishError(wrkMast.getWrkNo(), String.valueOf("源库位被冻结")); |
| | | continue; |
| | | } |
| | | Integer crnNo = wrkMast.getCrnNo(); |