Subversion Repositories SmartDukaan

Rev

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

Rev 3269 Rev 3339
Line 53... Line 53...
53
    private long agentOpenTicketCount;
53
    private long agentOpenTicketCount;
54
    private long unassignedTicketCount;
54
    private long unassignedTicketCount;
55
    private long allTicketCount;
55
    private long allTicketCount;
56
    private long allOpenTicketCount;
56
    private long allOpenTicketCount;
57
    private long activityCount;
57
    private long activityCount;
-
 
58
    private long customerActivityCount;
58
 
59
 
59
    @Action("/")
60
    @Action("/")
60
    public String index() throws Exception {
61
    public String index() throws Exception {
61
        createServiceClients();
62
        createServiceClients();
62
        String returnValue = INPUT;
63
        String returnValue = INPUT;
63
 
64
 
64
        try {
65
        try {
65
            if (email == null) {
66
            if (email == null) {
66
                loadTicketCounts(crmServiceClient);
67
                loadTicketCounts(crmServiceClient);
-
 
68
                loadCustomerActivities(crmServiceClient);
67
                return returnValue;
69
                return returnValue;
68
            }
70
            }
69
 
71
 
70
            if (email != null && !email.isEmpty()) {
72
            if (email != null && !email.isEmpty()) {
71
                user = userContextServiceClient.getUserByEmail(email);
73
                user = userContextServiceClient.getUserByEmail(email);
Line 104... Line 106...
104
        }
106
        }
105
 
107
 
106
        return returnValue;
108
        return returnValue;
107
    }
109
    }
108
 
110
 
-
 
111
    private void loadCustomerActivities(Client crmServiceClient) throws TException {
-
 
112
        List<Activity> activities = crmServiceClient.getActivitiesByCreator(CRMConstants.ADMIN_AGENT_ID);
-
 
113
        if (activities != null) {
-
 
114
            customerActivityCount = activities.size();
-
 
115
        }
-
 
116
    }
-
 
117
 
109
    private void loadActivityDetails(Client crmServiceClient) throws TException {
118
    private void loadActivityDetails(Client crmServiceClient) throws TException {
110
        List<Activity> activities = crmServiceClient.getActivities(user.getUserId());
119
        List<Activity> activities = crmServiceClient.getActivities(user.getUserId());
111
        if (activities != null) {
120
        if (activities != null) {
112
            activityCount = activities.size();
121
            activityCount = activities.size();
113
        }
122
        }
Line 305... Line 314...
305
    }
314
    }
306
 
315
 
307
    public void setActivityCount(long activityCount) {
316
    public void setActivityCount(long activityCount) {
308
        this.activityCount = activityCount;
317
        this.activityCount = activityCount;
309
    }
318
    }
-
 
319
 
-
 
320
    public long getCustomerActivityCount() {
-
 
321
        return customerActivityCount;
-
 
322
    }
-
 
323
 
-
 
324
    public void setCustomerActivityCount(long customerActivityCount) {
-
 
325
        this.customerActivityCount = customerActivityCount;
-
 
326
    }
310
}
327
}
311
328