| Line 136... |
Line 136... |
| 136 |
|
136 |
|
| 137 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
137 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 138 |
String email = loginDetails.getEmailId();
|
138 |
String email = loginDetails.getEmailId();
|
| 139 |
|
139 |
|
| 140 |
AuthUser authUser = authRepository.selectByEmailOrMobile(email);
|
140 |
AuthUser authUser = authRepository.selectByEmailOrMobile(email);
|
| 141 |
List<Position> positions = positionRepository.selectAll(authUser.getId());
|
141 |
List<Position> positions = positionRepository.selectAllByAuthUserId(authUser.getId());
|
| 142 |
|
142 |
|
| 143 |
List<Position> warehousePositions = positions.stream().filter(x -> x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_WAREHOUSE).collect(Collectors.toList());
|
143 |
List<Position> warehousePositions = positions.stream().filter(x -> x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_WAREHOUSE).collect(Collectors.toList());
|
| 144 |
Set<CustomRetailer> positionRetailers = new HashSet<>();
|
144 |
Set<CustomRetailer> positionRetailers = new HashSet<>();
|
| 145 |
csService.getPositionCustomRetailerMap(warehousePositions).values().forEach(customRetailers -> {
|
145 |
csService.getPositionCustomRetailerMap(warehousePositions).values().forEach(customRetailers -> {
|
| 146 |
positionRetailers.addAll(customRetailers);
|
146 |
positionRetailers.addAll(customRetailers);
|
| Line 205... |
Line 205... |
| 205 |
|
205 |
|
| 206 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
206 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 207 |
String email = loginDetails.getEmailId();
|
207 |
String email = loginDetails.getEmailId();
|
| 208 |
|
208 |
|
| 209 |
AuthUser authUser = authRepository.selectByEmailOrMobile(email);
|
209 |
AuthUser authUser = authRepository.selectByEmailOrMobile(email);
|
| 210 |
List<Position> positions = positionRepository.selectAll(authUser.getId());
|
210 |
List<Position> positions = positionRepository.selectAllByAuthUserId(authUser.getId());
|
| 211 |
|
211 |
|
| 212 |
List<Position> warehousePositions = positions.stream().filter(x -> x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_WAREHOUSE).collect(Collectors.toList());
|
212 |
List<Position> warehousePositions = positions.stream().filter(x -> x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_WAREHOUSE).collect(Collectors.toList());
|
| 213 |
List<Integer> authWarehouseIds = null;
|
213 |
List<Integer> authWarehouseIds = null;
|
| 214 |
if (warehousePositions.stream().filter(x -> EscalationType.L2.isGreaterThanEqualTo(x.getEscalationType())).count() > 0) {
|
214 |
if (warehousePositions.stream().filter(x -> EscalationType.L2.isGreaterThanEqualTo(x.getEscalationType())).count() > 0) {
|
| 215 |
authWarehouseIds = new ArrayList<>(ProfitMandiConstants.WAREHOUSE_MAP.keySet());
|
215 |
authWarehouseIds = new ArrayList<>(ProfitMandiConstants.WAREHOUSE_MAP.keySet());
|