Subversion Repositories SmartDukaan

Rev

Rev 36210 | Rev 36802 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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