Subversion Repositories SmartDukaan

Rev

Rev 3088 | Rev 3168 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3088 Rev 3137
Line 130... Line 130...
130
    {
130
    {
131
        return agentHandler.getPermissionsForRoleName(roleName);
131
        return agentHandler.getPermissionsForRoleName(roleName);
132
    }
132
    }
133
 
133
 
134
    public List<Ticket> getAssignedTickets(long agentId) throws TException {
134
    public List<Ticket> getAssignedTickets(long agentId) throws TException {
135
        // TODO Auto-generated method stub
135
        List<Ticket> tickets = new ArrayList<Ticket>();
-
 
136
 
-
 
137
        for (in.shop2020.crm.domain.Ticket ticket : ticketHandler.getAssignedTickets(agentId)) {
136
        return null;
138
            tickets.add(ticket.getThriftTicket());
137
    }
139
        }
138
 
140
 
139
    public List<Ticket> getOpenTickets() throws TException {
-
 
140
        // TODO Auto-generated method stub
-
 
141
        return null;
141
        return tickets;
142
    }
142
    }
143
 
143
 
144
    public List<Agent> getAllAgents() throws TException {
144
    public List<Agent> getAllAgents() throws TException {
145
        List<Agent> agents = new ArrayList<Agent>();
145
        List<Agent> agents = new ArrayList<Agent>();
146
 
146
 
Line 154... Line 154...
154
    public void updatePasswordForAgent(String agentEmailId, String password)
154
    public void updatePasswordForAgent(String agentEmailId, String password)
155
            throws TException
155
            throws TException
156
    {
156
    {
157
        agentHandler.updatePasswordForAgent(agentEmailId, password);
157
        agentHandler.updatePasswordForAgent(agentEmailId, password);
158
    }
158
    }
-
 
159
 
-
 
160
    public List<Ticket> getUnassignedTickets() throws TException {
-
 
161
        List<Ticket> tickets = new ArrayList<Ticket>();
-
 
162
 
-
 
163
        for (in.shop2020.crm.domain.Ticket ticket : ticketHandler.getUnassignedTickets()) {
-
 
164
            tickets.add(ticket.getThriftTicket());
-
 
165
        }
-
 
166
 
-
 
167
        return tickets;
-
 
168
    }
-
 
169
 
-
 
170
    public List<Ticket> getAllTickets(long agentId) throws TException {
-
 
171
        List<in.shop2020.crm.domain.Ticket> tickets = ticketHandler.getAssignedTickets(agentId);
-
 
172
 
-
 
173
        for (in.shop2020.crm.domain.Agent agent : agentHandler.getReportees(agentId)) {
-
 
174
            tickets.addAll(ticketHandler.getAssignedTickets(agent.getId()));
-
 
175
        }
-
 
176
 
-
 
177
        List<Ticket> ttickets = new ArrayList<Ticket>();
-
 
178
 
-
 
179
        for (in.shop2020.crm.domain.Ticket ticket : tickets) {
-
 
180
            ttickets.add(ticket.getThriftTicket());
-
 
181
        }
-
 
182
 
-
 
183
        return ttickets;
-
 
184
    }
159
}
185
}