| Line 492... |
Line 492... |
| 492 |
long pendingIndent = 0;
|
492 |
long pendingIndent = 0;
|
| 493 |
long tertiary = 0;
|
493 |
long tertiary = 0;
|
| 494 |
|
494 |
|
| 495 |
isAboveL1 = positions.stream().anyMatch(pos -> pos.getEscalationType() != EscalationType.L1);
|
495 |
isAboveL1 = positions.stream().anyMatch(pos -> pos.getEscalationType() != EscalationType.L1);
|
| 496 |
boolean isRBM = positions.stream().anyMatch(pos -> pos.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_RBM);
|
496 |
boolean isRBM = positions.stream().anyMatch(pos -> pos.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_RBM);
|
| - |
|
497 |
// RBM category: only L3 and above can see all stores
|
| - |
|
498 |
boolean isRbmL3OrAbove = positions.stream().anyMatch(pos ->
|
| - |
|
499 |
pos.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_RBM
|
| - |
|
500 |
&& pos.getEscalationType() != null
|
| - |
|
501 |
&& pos.getEscalationType() != EscalationType.L1
|
| - |
|
502 |
&& pos.getEscalationType() != EscalationType.L2);
|
| - |
|
503 |
// Other categories: L2 and above can see all stores
|
| - |
|
504 |
boolean isNonRbmL2OrAbove = positions.stream().anyMatch(pos ->
|
| - |
|
505 |
pos.getCategoryId() != ProfitMandiConstants.TICKET_CATEGORY_RBM
|
| - |
|
506 |
&& pos.getEscalationType() != null
|
| - |
|
507 |
&& pos.getEscalationType() != EscalationType.L1);
|
| 497 |
model.addAttribute("isRBM", isRBM);
|
508 |
model.addAttribute("isRBM", isRBM);
|
| 498 |
model.addAttribute("authEmail", email);
|
509 |
model.addAttribute("authEmail", email);
|
| 499 |
Set<Integer> fofoIds = new HashSet<>();
|
510 |
Set<Integer> fofoIds = new HashSet<>();
|
| 500 |
if (isAboveL1 && isRBM) {
|
511 |
if (isRbmL3OrAbove || isNonRbmL2OrAbove) {
|
| 501 |
fofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId()).collect(Collectors.toSet());
|
512 |
fofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId()).collect(Collectors.toSet());
|
| 502 |
} else {
|
513 |
} else {
|
| 503 |
fofoIds = csService1.getAuthFofoIds(email, true);
|
514 |
fofoIds = csService1.getAuthFofoIds(email, true);
|
| 504 |
}
|
515 |
}
|
| 505 |
|
516 |
|