| 24383 |
amit.gupta |
1 |
package com.spice.profitmandi.dao.repository.cs;
|
|
|
2 |
|
| 24439 |
govind |
3 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 24417 |
govind |
4 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
|
|
5 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
| 29927 |
amit.gupta |
6 |
import com.spice.profitmandi.dao.entity.cs.*;
|
| 27393 |
amit.gupta |
7 |
import com.spice.profitmandi.dao.entity.fofo.ActivityType;
|
| 32923 |
ranu |
8 |
import com.spice.profitmandi.dao.enumuration.auth.CollectionRemark;
|
| 26978 |
tejbeer |
9 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
| 32923 |
ranu |
10 |
import com.spice.profitmandi.dao.model.ActivityMediaModel;
|
| 34905 |
ranu |
11 |
import com.spice.profitmandi.dao.model.FofoAbmReportingModel;
|
| 33161 |
ranu |
12 |
import com.spice.profitmandi.dao.model.FofoRBMReportingModel;
|
| 30003 |
tejbeer |
13 |
import com.spice.profitmandi.dao.model.FofoReportingModel;
|
| 35920 |
ranu |
14 |
import org.springframework.cache.annotation.Cacheable;
|
| 29927 |
amit.gupta |
15 |
import org.springframework.stereotype.Service;
|
| 24383 |
amit.gupta |
16 |
|
| 29927 |
amit.gupta |
17 |
import java.util.List;
|
|
|
18 |
import java.util.Map;
|
|
|
19 |
import java.util.Set;
|
|
|
20 |
|
| 24383 |
amit.gupta |
21 |
@Service
|
|
|
22 |
public interface CsService {
|
| 34921 |
ranu |
23 |
int getAuthUserIdWithoutTicketAssignee(int categoryId, EscalationType escalationType, int fofoId) throws ProfitMandiBusinessException;
|
|
|
24 |
|
| 31762 |
tejbeer |
25 |
// Sends happy code to customer
|
|
|
26 |
void addActivity(Ticket ticket, Activity activity);
|
| 24500 |
govind |
27 |
|
| 31762 |
tejbeer |
28 |
void createTicket(int fofoId, int categoryId, int subcategoryId, String message) throws ProfitMandiBusinessException;
|
| 24500 |
govind |
29 |
|
| 32923 |
ranu |
30 |
void createTicket(int fofoId, int categoryId, int subcategoryId, String message, int createdByAuthId) throws ProfitMandiBusinessException;
|
|
|
31 |
|
| 36210 |
ranu |
32 |
void createTicket(int fofoId, int categoryId, int subcategoryId, String message, int createdByAuthId, EscalationType targetEscalation) throws ProfitMandiBusinessException;
|
|
|
33 |
|
| 32923 |
ranu |
34 |
void createTicketWithMedia(int fofoId, int categoryId, int subcategoryId, String message, int createdByAuthId, ActivityMediaModel selectedRecording) throws ProfitMandiBusinessException;
|
|
|
35 |
|
| 36210 |
ranu |
36 |
void createTicketWithMedia(int fofoId, int categoryId, int subcategoryId, String message, int createdByAuthId, ActivityMediaModel selectedRecording, EscalationType targetEscalation) throws ProfitMandiBusinessException;
|
|
|
37 |
|
| 33204 |
ranu |
38 |
TicketActivityMedia createMediaActivity(ActivityMediaModel selectedRecording);
|
|
|
39 |
|
|
|
40 |
void addMediaActivity(Ticket ticket, TicketActivityMedia activity);
|
|
|
41 |
|
| 32923 |
ranu |
42 |
void createTicketRemarkEscalation(int fofoId, int authId, int categoryId, int subcategoryId, String message, CollectionRemark remark) throws ProfitMandiBusinessException;
|
|
|
43 |
|
| 31762 |
tejbeer |
44 |
void addPartnerToRegion(int regionId, List<Integer> fofoIds);
|
| 24500 |
govind |
45 |
|
| 31762 |
tejbeer |
46 |
Map<Integer, TicketSubCategory> getSubCategoryIdAndSubCategoryMap(List<Integer> subCategoryIds);
|
| 24500 |
govind |
47 |
|
| 31762 |
tejbeer |
48 |
Map<Integer, TicketCategory> getSubCategoryIdAndCategoryMap(List<Integer> subCategoryIds);
|
| 24500 |
govind |
49 |
|
|
|
50 |
|
| 31762 |
tejbeer |
51 |
Map<Integer, AuthUser> getAuthUserIdAndAuthUserMap(List<TicketAssigned> ticketAssigneds);
|
| 24500 |
govind |
52 |
|
| 33244 |
ranu |
53 |
Map<Integer, CustomRetailer> getPartnerByFofoIds(List<Ticket> tickets) throws ProfitMandiBusinessException;
|
| 24500 |
govind |
54 |
|
| 31762 |
tejbeer |
55 |
List<TicketCategory> getAllTicketCategotyFromSubCategory();
|
| 24500 |
govind |
56 |
|
| 31762 |
tejbeer |
57 |
Map<Integer, AuthUser> getAuthUserIdAndAuthUserMapUsingPositions(List<Position> positions);
|
| 25721 |
tejbeer |
58 |
|
| 31762 |
tejbeer |
59 |
Map<Integer, TicketCategory> getCategoryIdAndCategoryUsingPositions(List<Position> positions);
|
| 25721 |
tejbeer |
60 |
|
| 31762 |
tejbeer |
61 |
Map<Integer, Region> getRegionIdAndRegionMap(List<Position> positions);
|
| 24500 |
govind |
62 |
|
| 33244 |
ranu |
63 |
Map<Integer, List<CustomRetailer>> getRegionPartners(List<Position> position) throws ProfitMandiBusinessException;
|
| 25721 |
tejbeer |
64 |
|
| 33244 |
ranu |
65 |
Map<Integer, List<CustomRetailer>> getPositionCustomRetailerMap(List<Position> position) throws ProfitMandiBusinessException;
|
| 25721 |
tejbeer |
66 |
|
| 31762 |
tejbeer |
67 |
Map<Integer, AuthUser> getTicketIdAndAuthUserMapUsingTickets(List<Ticket> tickets);
|
| 25721 |
tejbeer |
68 |
|
| 35683 |
ranu |
69 |
void updateTicket(int categoryId, int subCategoryId, Ticket ticket, int authUserId, EscalationType escalationType, ActivityMediaModel recording,int currentUserId) throws ProfitMandiBusinessException;
|
| 31762 |
tejbeer |
70 |
void updateTicket(int categoryId, int subCategoryId, Ticket ticket, int authUserId, EscalationType escalationType) throws ProfitMandiBusinessException;
|
| 25721 |
tejbeer |
71 |
|
| 33244 |
ranu |
72 |
Map<String, Set<String>> getAuthUserPartnerEmailMapping() throws ProfitMandiBusinessException;
|
| 26298 |
tejbeer |
73 |
|
| 33244 |
ranu |
74 |
Map<String, Set<Integer>> getAuthUserPartnerIdMapping() throws ProfitMandiBusinessException;
|
| 25721 |
tejbeer |
75 |
|
| 33244 |
ranu |
76 |
Map<Integer, List<Integer>> getAuthUserIdPartnerIdMapping() throws ProfitMandiBusinessException;
|
| 28377 |
tejbeer |
77 |
|
| 33244 |
ranu |
78 |
List<String> getAuthUserByPartnerId(int fofoId) throws ProfitMandiBusinessException;
|
| 26978 |
tejbeer |
79 |
|
| 34082 |
ranu |
80 |
Map<Integer, List<Integer>> authUserpartnerIdMap(int authId, int categoryId);
|
|
|
81 |
|
| 33244 |
ranu |
82 |
List<AuthUser> getAuthUserIdByPartnerId(int fofoId) throws ProfitMandiBusinessException;
|
| 26298 |
tejbeer |
83 |
|
| 33244 |
ranu |
84 |
List<AuthUser> getAuthUserIdByPartnerId(int fofoId, EscalationType... escalationTypes) throws ProfitMandiBusinessException;
|
| 33041 |
ranu |
85 |
|
| 33244 |
ranu |
86 |
Map<EscalationType, String> getAuthUserAndEsclationTypeByPartnerId(int fofoId) throws ProfitMandiBusinessException;
|
| 27078 |
amit.gupta |
87 |
|
| 33244 |
ranu |
88 |
Map<Integer, List<Integer>> getL2L1Mapping() throws ProfitMandiBusinessException;
|
| 28908 |
tejbeer |
89 |
|
| 33244 |
ranu |
90 |
int getAuthUserId(int categoryId, EscalationType escalationType, int fofoId) throws ProfitMandiBusinessException;
|
| 28908 |
tejbeer |
91 |
|
| 31762 |
tejbeer |
92 |
List<AuthUser> getAuthUserIds(int categoryId, List<EscalationType> escalationType);
|
| 27124 |
amit.gupta |
93 |
|
| 31762 |
tejbeer |
94 |
List<AuthUser> getAuthUserByCategoryId(int categoryId);
|
| 27205 |
amit.gupta |
95 |
|
| 35683 |
ranu |
96 |
void assignTicket(Ticket ticket,int currentUserId) throws ProfitMandiBusinessException;
|
|
|
97 |
|
| 31762 |
tejbeer |
98 |
void assignTicket(Ticket ticket) throws ProfitMandiBusinessException;
|
| 27545 |
tejbeer |
99 |
|
| 31762 |
tejbeer |
100 |
Map<Integer, List<AuthUser>> getAssignedAuthList(List<Ticket> tickets);
|
| 27205 |
amit.gupta |
101 |
|
| 33244 |
ranu |
102 |
Map<EscalationType, AuthUser> getAuthUserAndEsclationByPartnerId(int fofoId) throws ProfitMandiBusinessException;
|
| 29296 |
manish |
103 |
|
| 35394 |
amit |
104 |
// Batch method to fetch auth user escalations for all fofoIds at once
|
|
|
105 |
Map<Integer, Map<EscalationType, AuthUser>> getAuthUserAndEsclationByPartnerIds(Set<Integer> fofoIds) throws ProfitMandiBusinessException;
|
|
|
106 |
|
| 31762 |
tejbeer |
107 |
Activity createActivity(ActivityType activityType, String message, int createdBy);
|
| 30003 |
tejbeer |
108 |
|
| 31762 |
tejbeer |
109 |
List<AuthUser> getAuthUserByCategoryId(int categoryId, EscalationType escalationType);
|
| 31152 |
tejbeer |
110 |
|
| 33244 |
ranu |
111 |
Map<Integer, FofoReportingModel> getPartnerIdSalesHeaders() throws ProfitMandiBusinessException;
|
| 31152 |
tejbeer |
112 |
|
| 34905 |
ranu |
113 |
Map<Integer, FofoAbmReportingModel> getPartnerIdABMHeaders() throws ProfitMandiBusinessException;
|
|
|
114 |
|
| 33244 |
ranu |
115 |
Map<Integer, FofoRBMReportingModel> getPartnerIdRBMHeaders() throws ProfitMandiBusinessException;
|
| 33161 |
ranu |
116 |
|
| 35920 |
ranu |
117 |
@Cacheable(value = "authUserEmailInactivePartnerIdMapping", cacheManager = "thirtyMinsTimeOutCacheManager")
|
|
|
118 |
Map<String, Set<Integer>> getAuthUserInactivePartnerIdMapping() throws ProfitMandiBusinessException;
|
|
|
119 |
|
| 33244 |
ranu |
120 |
Map<String, Set<Integer>> getAuthUserPartnerIdMappingByCategoryIds(List<Integer> categoryIds, boolean activeOnly) throws ProfitMandiBusinessException;
|
| 31762 |
tejbeer |
121 |
|
| 35394 |
amit |
122 |
/**
|
|
|
123 |
* Batch method to get BM/ASM/RBM auth user IDs for all fofoIds at once.
|
|
|
124 |
* Returns Map<fofoId, Map<role, authUserId>> where role is "BM", "ASM", or "RBM".
|
|
|
125 |
*/
|
|
|
126 |
Map<Integer, Map<String, Integer>> getBmAsmRbmAuthUserIdsByFofoIds(Set<Integer> fofoIds) throws ProfitMandiBusinessException;
|
| 31762 |
tejbeer |
127 |
|
| 35635 |
ranu |
128 |
Map<Integer, Boolean> getUnreadStatusForTickets(List<Ticket> tickets, int userId, TicketReadStatus.UserType userType);
|
| 35626 |
amit |
129 |
|
| 35635 |
ranu |
130 |
void markTicketAsRead(int ticketId, int userId, TicketReadStatus.UserType userType);
|
| 35626 |
amit |
131 |
|
|
|
132 |
Map<Integer, Activity> getLastActivitiesForTickets(List<Integer> ticketIds);
|
|
|
133 |
|
| 35639 |
amit |
134 |
Map<Integer, Activity> getLastMessageActivitiesForTickets(List<Integer> ticketIds);
|
|
|
135 |
|
| 35626 |
amit |
136 |
void notifyPartnerOfExternalCommunication(Ticket ticket, Activity activity);
|
|
|
137 |
|
| 24500 |
govind |
138 |
}
|