Subversion Repositories SmartDukaan

Rev

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