| Line 397... |
Line 397... |
| 397 |
List<Integer> regionIds = partnerRegionRepository.selectByfofoId(fofoId).stream().map(x -> x.getRegionId()).collect(Collectors.toList());
|
397 |
List<Integer> regionIds = partnerRegionRepository.selectByfofoId(fofoId).stream().map(x -> x.getRegionId()).collect(Collectors.toList());
|
| 398 |
// Add all Partner regions id
|
398 |
// Add all Partner regions id
|
| 399 |
regionIds.add(ALL_PARTNERS_REGION);
|
399 |
regionIds.add(ALL_PARTNERS_REGION);
|
| 400 |
LOGGER.info("Escalation Type {}, Region Ids {}", escalationType, regionIds);
|
400 |
LOGGER.info("Escalation Type {}, Region Ids {}", escalationType, regionIds);
|
| 401 |
List<Integer> partnerPositionsIds = partnerPositionRepository.selectByRegionIdAndPartnerId(regionIds, Arrays.asList(0, fofoId)).stream().map(x -> x.getPositionId()).collect(Collectors.toList());
|
401 |
List<Integer> partnerPositionsIds = partnerPositionRepository.selectByRegionIdAndPartnerId(regionIds, Arrays.asList(0, fofoId)).stream().map(x -> x.getPositionId()).collect(Collectors.toList());
|
| - |
|
402 |
|
| 402 |
List<Position> positionAssignee = positions.stream().filter(x -> x.isTicketAssignee() && partnerPositionsIds.contains(x.getId())).collect(Collectors.toList());
|
403 |
List<Position> positionAssignee = positions.stream().filter(x -> x.isTicketAssignee() && partnerPositionsIds.contains(x.getId())).collect(Collectors.toList());
|
| 403 |
LOGGER.info("User List List {}", positions.stream().map(x -> x.getAuthUserId()).collect(Collectors.toList()));
|
404 |
LOGGER.info("User List List {}", positions.stream().map(x -> x.getAuthUserId()).collect(Collectors.toList()));
|
| 404 |
if (positionAssignee.size() > 0) {
|
405 |
if (positionAssignee.size() > 0) {
|
| 405 |
List<AuthUser> authUsers = authRepository.selectAllAuthUserByIds(
|
406 |
List<AuthUser> authUsers = authRepository.selectAllAuthUserByIds(
|
| 406 |
positions.stream().map(x -> x.getAuthUserId()).collect(Collectors.toList()));
|
407 |
positionAssignee.stream().map(x -> x.getAuthUserId()).collect(Collectors.toList()));
|
| 407 |
authUsers = authUsers.stream().filter(x -> x.isActive()).collect(Collectors.toList());
|
408 |
authUsers = authUsers.stream().filter(x -> x.isActive()).collect(Collectors.toList());
|
| 408 |
if (authUsers.size() > 0) {
|
409 |
if (authUsers.size() > 0) {
|
| 409 |
authUserId = authUsers.get(0).getId();
|
410 |
authUserId = authUsers.get(0).getId();
|
| 410 |
/*
|
411 |
/*
|
| 411 |
* Random rand = new Random(); authUserId =
|
412 |
* Random rand = new Random(); authUserId =
|
| Line 415... |
Line 416... |
| 415 |
}
|
416 |
}
|
| 416 |
return authUserId;
|
417 |
return authUserId;
|
| 417 |
|
418 |
|
| 418 |
}
|
419 |
}
|
| 419 |
|
420 |
|
| - |
|
421 |
|
| 420 |
@Override
|
422 |
@Override
|
| 421 |
public void addActivity(Ticket ticket, Activity activity) {
|
423 |
public void addActivity(Ticket ticket, Activity activity) {
|
| 422 |
activity.setTicketId(ticket.getId());
|
424 |
activity.setTicketId(ticket.getId());
|
| 423 |
ticket.setLastActivity(activity.getType());
|
425 |
ticket.setLastActivity(activity.getType());
|
| 424 |
ticket.setLastActivityId(activity.getId());
|
426 |
ticket.setLastActivityId(activity.getId());
|