| | |
| | | if (candidate == sourceCrnNo) { |
| | | continue; |
| | | } |
| | | Integer runingCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>() |
| | | .eq("io_type", 101).eq("crn_no",candidate) |
| | | .in("wrk_sts", Arrays.asList(2L, 3L, 4L, 11L, 12L))); |
| | | if(runingCount != null && runingCount > 5) {continue;} |
| | | // Integer runingCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>() |
| | | // .eq("io_type", 101).eq("crn_no",candidate) |
| | | // .in("wrk_sts", Arrays.asList(2L, 3L, 4L, 11L, 12L))); |
| | | // if(runingCount != null && runingCount > 3) {continue;} |
| | | Integer existCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>() |
| | | .eq("io_type", 101) |
| | | .eq("log_mk", "Y") |
| | | .eq("ove_mk", "N")); |
| | | int allow = 3 - (existCount == null ? 0 : existCount); |
| | | if (allow <= 0) { |
| | | continue; |
| | | } |
| | | Integer candidateEmpty = locMastService.selectCount(new EntityWrapper<LocMast>() |
| | | .eq("crn_no", candidate) |
| | | .eq("loc_sts", "O") |
| | |
| | | wrkMast.setIoTime(now); |
| | | wrkMast.setWrkSts(11L); |
| | | wrkMast.setIoType(101); |
| | | wrkMast.setIoPri(13D); |
| | | wrkMast.setIoPri(12D); |
| | | wrkMast.setCrnNo(sourceLoc.getCrnNo()); |
| | | wrkMast.setSourceLocNo(sourceLoc.getLocNo()); |
| | | wrkMast.setLocNo(targetLoc.getLocNo()); |
| | |
| | | wrkMast.setFullPlt("Y"); |
| | | wrkMast.setExitMk("N"); |
| | | wrkMast.setLogMk("Y"); |
| | | wrkMast.setEmptyMk("N"); |
| | | wrkMast.setPacked(null); |
| | | wrkMast.setOveMk("N"); |
| | | wrkMast.setAppeUser(userId); |