| Line 69... |
Line 69... |
| 69 |
private static final Logger LOGGER = LogManager.getLogger(CsController.class);
|
69 |
private static final Logger LOGGER = LogManager.getLogger(CsController.class);
|
| 70 |
|
70 |
|
| 71 |
private static final String ACTIVITY_SUBJECT = "Message related ticketId#%s";
|
71 |
private static final String ACTIVITY_SUBJECT = "Message related ticketId#%s";
|
| 72 |
private static final String PARTNER_RESOLVED_TICKET_MAIL = "Dear Partner , we have resolved your ticket # %s , request to kindly accept the same. In case you still have any concerns regarding the same pls click on %s so that we can help you.Regards\nSmartdukaan";
|
72 |
private static final String PARTNER_RESOLVED_TICKET_MAIL = "Dear Partner , we have resolved your ticket # %s , request to kindly accept the same. In case you still have any concerns regarding the same pls click on %s so that we can help you.Regards\nSmartdukaan";
|
| 73 |
private static final String PARTNER_REOPEN = "Dear Partner , Your ticket # %s has been re-opened as per your confirmation & we are committed to resolve it on priority.Regards\nSmartdukaan";
|
73 |
private static final String PARTNER_REOPEN = "Dear Partner , Your ticket # %s has been re-opened as per your confirmation & we are committed to resolve it on priority.Regards\nSmartdukaan";
|
| 74 |
private static final String INTERNAL_REOPEN_MAIL = "Hi, Pls note that the ticket # %s has been re-opened by %s , pls respond on priority.";
|
74 |
private static final String INTERNAL_REOPEN_MAIL = "Team, Pls note that the Ticket Id %s has been re-opened by %s , pls respond on priority";
|
| 75 |
private static final String INTERNAL_REOPEN_ACTIVITY_MESSAGE = "Hi,My ticket is not resolved yet,so I am reopenning ticket";
|
75 |
private static final String INTERNAL_REOPEN_ACTIVITY_MESSAGE = "Hi,My ticket is not resolved yet,so I have reopened it";
|
| 76 |
|
76 |
|
| 77 |
@Autowired
|
77 |
@Autowired
|
| 78 |
JavaMailSender mailSender;
|
78 |
JavaMailSender mailSender;
|
| 79 |
|
79 |
|
| 80 |
@Autowired
|
80 |
@Autowired
|
| Line 683... |
Line 683... |
| 683 |
AuthUser authUser = authRepository.selectByEmailOrMobile(loginDetails.getEmailId());
|
683 |
AuthUser authUser = authRepository.selectByEmailOrMobile(loginDetails.getEmailId());
|
| 684 |
List<Ticket> tickets = null;
|
684 |
List<Ticket> tickets = null;
|
| 685 |
Map<Integer, List<AuthUser>> authUserListMap = null;
|
685 |
Map<Integer, List<AuthUser>> authUserListMap = null;
|
| 686 |
if (loginDetails.getEmailId().equals("amandeep.singh@smartdukaan.com")) {
|
686 |
if (loginDetails.getEmailId().equals("amandeep.singh@smartdukaan.com")) {
|
| 687 |
tickets = ticketRepository.selectAll(offset, limit, Optional.empty());
|
687 |
tickets = ticketRepository.selectAll(offset, limit, Optional.empty());
|
| 688 |
authUserListMap = csService.getAuthUserList(tickets, authUser);
|
688 |
authUserListMap = csService.getAssignedAuthList(tickets);
|
| 689 |
size = ticketRepository.selectAllCount();
|
689 |
size = ticketRepository.selectAllCount();
|
| 690 |
} else {
|
690 |
} else {
|
| 691 |
if (ticketSearchType == null) {
|
691 |
if (ticketSearchType == null) {
|
| 692 |
if (ticketStatus.equals(TicketStatus.RESOLVED)) {
|
692 |
if (ticketStatus.equals(TicketStatus.RESOLVED)) {
|
| 693 |
tickets = ticketRepository.selectAllManagerTicket(authUser.getId(), sortOrder, Optional.empty(),
|
693 |
tickets = ticketRepository.selectAllManagerTicket(authUser.getId(), sortOrder, Optional.empty(),
|
| Line 712... |
Line 712... |
| 712 |
size = ticketRepository.selectAllCountByManagerTicket(authUser.getId(),
|
712 |
size = ticketRepository.selectAllCountByManagerTicket(authUser.getId(),
|
| 713 |
Optional.of(TicketStatus.CLOSED.equals(ticketStatus)), ticketSearchType, searchTerm);
|
713 |
Optional.of(TicketStatus.CLOSED.equals(ticketStatus)), ticketSearchType, searchTerm);
|
| 714 |
}
|
714 |
}
|
| 715 |
|
715 |
|
| 716 |
}
|
716 |
}
|
| 717 |
authUserListMap = csService.getAuthUserList(tickets, authUser);
|
717 |
authUserListMap = csService.getAssignedAuthList(tickets);
|
| 718 |
|
718 |
|
| 719 |
if (tickets.size() > 0) {
|
719 |
if (tickets.size() > 0) {
|
| 720 |
Map<Integer, CustomRetailer> fofoIdsAndCustomRetailer = csService.getPartnerByFofoIds(tickets);
|
720 |
Map<Integer, CustomRetailer> fofoIdsAndCustomRetailer = csService.getPartnerByFofoIds(tickets);
|
| 721 |
model.addAttribute("fofoIdsAndCustomRetailer", fofoIdsAndCustomRetailer);
|
721 |
model.addAttribute("fofoIdsAndCustomRetailer", fofoIdsAndCustomRetailer);
|
| 722 |
}
|
722 |
}
|
| Line 744... |
Line 744... |
| 744 |
model.addAttribute("subCategoryIdAndSubCategoryMap", subCategoryIdAndSubCategoryMap);
|
744 |
model.addAttribute("subCategoryIdAndSubCategoryMap", subCategoryIdAndSubCategoryMap);
|
| 745 |
return "managerTicket";
|
745 |
return "managerTicket";
|
| 746 |
}
|
746 |
}
|
| 747 |
|
747 |
|
| 748 |
@GetMapping(value = "/cs/managerTicket-paginated")
|
748 |
@GetMapping(value = "/cs/managerTicket-paginated")
|
| 749 |
public String getL2L3AndL4TicketsPaginated(HttpServletRequest request,
|
749 |
public String getManagerTicketsPaginated(HttpServletRequest request,
|
| 750 |
@RequestParam(name = "orderby", defaultValue = "DESCENDING") SortOrder sortOrder,
|
750 |
@RequestParam(name = "orderby", defaultValue = "DESCENDING") SortOrder sortOrder,
|
| 751 |
@RequestParam(name = "ticketStatus", defaultValue = "OPENED") TicketStatus ticketStatus,
|
751 |
@RequestParam(name = "ticketStatus", defaultValue = "OPENED") TicketStatus ticketStatus,
|
| 752 |
@RequestParam(name = "ticketSearchType", defaultValue = "") TicketSearchType ticketSearchType,
|
752 |
@RequestParam(name = "ticketSearchType", defaultValue = "") TicketSearchType ticketSearchType,
|
| 753 |
@RequestParam(name = "searchTerm", defaultValue = "0") int searchTerm,
|
753 |
@RequestParam(name = "searchTerm", defaultValue = "0") int searchTerm,
|
| 754 |
@RequestParam(name = "offset", defaultValue = "0") int offset,
|
754 |
@RequestParam(name = "offset", defaultValue = "0") int offset,
|
| Line 758... |
Line 758... |
| 758 |
AuthUser authUser = authRepository.selectByEmailOrMobile(loginDetails.getEmailId());
|
758 |
AuthUser authUser = authRepository.selectByEmailOrMobile(loginDetails.getEmailId());
|
| 759 |
Map<Integer, List<AuthUser>> authUserListMap = null;
|
759 |
Map<Integer, List<AuthUser>> authUserListMap = null;
|
| 760 |
List<Ticket> tickets = null;
|
760 |
List<Ticket> tickets = null;
|
| 761 |
if (loginDetails.getEmailId().equals("amandeep.singh@smartdukaan.com")) {
|
761 |
if (loginDetails.getEmailId().equals("amandeep.singh@smartdukaan.com")) {
|
| 762 |
tickets = ticketRepository.selectAll(offset, limit, Optional.empty());
|
762 |
tickets = ticketRepository.selectAll(offset, limit, Optional.empty());
|
| 763 |
authUserListMap = csService.getAuthUserList(tickets, authUser);
|
763 |
authUserListMap = csService.getAssignedAuthList(tickets);
|
| 764 |
} else {
|
764 |
} else {
|
| 765 |
if (ticketSearchType == null) {
|
765 |
if (ticketSearchType == null) {
|
| 766 |
if (ticketStatus.equals(TicketStatus.RESOLVED)) {
|
766 |
if (ticketStatus.equals(TicketStatus.RESOLVED)) {
|
| 767 |
tickets = ticketRepository.selectAllManagerTicket(authUser.getId(), sortOrder, Optional.empty(),
|
767 |
tickets = ticketRepository.selectAllManagerTicket(authUser.getId(), sortOrder, Optional.empty(),
|
| 768 |
null, searchTerm, offset, limit);
|
768 |
null, searchTerm, offset, limit);
|
| Line 782... |
Line 782... |
| 782 |
Optional.of(TicketStatus.CLOSED.equals(ticketStatus)), ticketSearchType, searchTerm, offset,
|
782 |
Optional.of(TicketStatus.CLOSED.equals(ticketStatus)), ticketSearchType, searchTerm, offset,
|
| 783 |
limit);
|
783 |
limit);
|
| 784 |
}
|
784 |
}
|
| 785 |
|
785 |
|
| 786 |
}
|
786 |
}
|
| 787 |
authUserListMap = csService.getAuthUserList(tickets, authUser);
|
787 |
authUserListMap = csService.getAssignedAuthList(tickets);
|
| 788 |
if (tickets.size() > 0) {
|
788 |
if (tickets.size() > 0) {
|
| 789 |
Map<Integer, CustomRetailer> fofoIdsAndCustomRetailer = csService.getPartnerByFofoIds(tickets);
|
789 |
Map<Integer, CustomRetailer> fofoIdsAndCustomRetailer = csService.getPartnerByFofoIds(tickets);
|
| 790 |
model.addAttribute("fofoIdsAndCustomRetailer", fofoIdsAndCustomRetailer);
|
790 |
model.addAttribute("fofoIdsAndCustomRetailer", fofoIdsAndCustomRetailer);
|
| 791 |
}
|
791 |
}
|
| 792 |
}
|
792 |
}
|