| | |
| | | .eq("in_enable", "Y") |
| | | .eq("status", 1); |
| | | |
| | | if (hasConfig) { |
| | | wrapper.in("crn_no", allowedCrnNos); |
| | | } |
| | | |
| | | if (currentCircleTaskCrnNo != null) { |
| | | currentCircleTaskCrnNo = currentCircleTaskCrnNo + 1; |
| | | BasCrnp basCrnp = basCrnpService.selectOne(new EntityWrapper<BasCrnp>() |
| | |
| | | |
| | | enabledCrnps.sort(Comparator.comparingInt(o -> map.getOrDefault(o.getCrnNo(), 0))); |
| | | |
| | | List<Integer> recommendList = new ArrayList<>(); |
| | | List<Integer> baseRowList = new ArrayList<>(); |
| | | for (BasCrnp basCrnp : enabledCrnps) { |
| | | List<List<Integer>> rowList = basCrnp.getControlRows$(); |
| | | for (List<Integer> rows : rowList) { |
| | | list.addAll(rows); |
| | | if(allowedCrnNos.contains(basCrnp.getCrnNo())) { |
| | | recommendList.addAll(rows); |
| | | }else { |
| | | baseRowList.addAll(rows); |
| | | } |
| | | } |
| | | } |
| | | |
| | | list.addAll(recommendList); |
| | | list.addAll(baseRowList); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | Wrapper<BasDualCrnp> wrapper = new EntityWrapper<BasDualCrnp>() |
| | | .eq("in_enable", "Y") |
| | | .eq("status", 1); |
| | | |
| | | if (hasConfig) { |
| | | wrapper.in("crn_no", allowedCrnNos); |
| | | } |
| | | |
| | | HashMap<Integer, Integer> map = new HashMap<>(); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<>()); |
| | |
| | | |
| | | enabledCrnps.sort(Comparator.comparingInt(o -> map.getOrDefault(o.getCrnNo(), 0))); |
| | | |
| | | List<Integer> recommendList = new ArrayList<>(); |
| | | List<Integer> baseRowList = new ArrayList<>(); |
| | | for (BasDualCrnp basDualCrnp : enabledCrnps) { |
| | | List<List<Integer>> rowList = basDualCrnp.getControlRows$(); |
| | | for (List<Integer> rows : rowList) { |
| | | list.addAll(rows); |
| | | if(allowedCrnNos.contains(basDualCrnp.getCrnNo())) { |
| | | recommendList.addAll(rows); |
| | | }else { |
| | | baseRowList.addAll(rows); |
| | | } |
| | | } |
| | | } |
| | | |
| | | list.addAll(recommendList); |
| | | list.addAll(baseRowList); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |