Subversion Repositories SmartDukaan

Rev

Rev 35618 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35618 Rev 37145
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.cs;
1
package com.spice.profitmandi.dao.entity.cs;
2
 
2
 
3
import com.spice.profitmandi.dao.entity.fofo.ActivityType;
3
import com.spice.profitmandi.dao.entity.fofo.ActivityType;
-
 
4
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
4
 
5
 
5
import javax.persistence.*;
6
import javax.persistence.*;
6
import java.time.LocalDateTime;
7
import java.time.LocalDateTime;
7
import java.time.format.DateTimeFormatter;
8
import java.time.format.DateTimeFormatter;
8
 
9
 
Line 20... Line 21...
20
				+ " from Ticket t  left join  TicketSubCategory tbc on t.subCategoryId  = tbc.id left join TicketCategory tc on tbc.categoryId = tc.id where t.closeTimestamp > :startDate and t.fofoId = :fofoId"),
21
				+ " from Ticket t  left join  TicketSubCategory tbc on t.subCategoryId  = tbc.id left join TicketCategory tc on tbc.categoryId = tc.id where t.closeTimestamp > :startDate and t.fofoId = :fofoId"),
21
 
22
 
22
})
23
})
23
public class Ticket {
24
public class Ticket {
24
 
25
 
25
	public int getL4AuthUser() {
-
 
26
		return l4AuthUser;
-
 
27
	}
-
 
28
 
-
 
29
	public void setL4AuthUser(int l4AuthUser) {
-
 
30
		this.l4AuthUser = l4AuthUser;
-
 
31
	}
-
 
32
 
-
 
33
	// Escalation thresholds in WORKING days (excludes weekends)
26
	// Escalation thresholds in WORKING days (excludes weekends)
34
	public static final int L2_ESCALATION_WORKING_DAYS = 3;   // L1 -> L2 after 3 working days
27
	public static final int L2_ESCALATION_WORKING_DAYS = 3;   // L1 -> L2 after 3 working days
35
	public static final int L3_ESCALATION_WORKING_DAYS = 3;   // L2 -> L3 after 3 more working days (6 total)
28
	public static final int L3_ESCALATION_WORKING_DAYS = 3;   // L2 -> L3 after 3 more working days (6 total)
36
	public static final int FINAL_ESCALATION_WORKING_DAYS = 2; // L3 -> Final after 2 more working days (8 total)
29
	public static final int FINAL_ESCALATION_WORKING_DAYS = 2; // L3 -> Final after 2 more working days (8 total)
37
 
30
 
Line 61... Line 54...
61
	private LocalDateTime updateTimestamp;
54
	private LocalDateTime updateTimestamp;
62
 
55
 
63
	@Column(name = "close_timestamp")
56
	@Column(name = "close_timestamp")
64
	private LocalDateTime closeTimestamp;
57
	private LocalDateTime closeTimestamp;
65
 
58
 
66
	@Column(name = "l1_auth_user")
59
	@Column(name = "current_assignee_id")
67
	private int l1AuthUser;
60
	private int currentAssigneeId;
68
 
61
 
69
	@Column(name = "l2_auth_user")
62
	@Column(name = "current_manager_id")
70
	private int l2AuthUser;
63
	private int currentManagerId;
71
 
64
 
72
	@Column(name = "l3_auth_user")
65
	@Column(name = "current_escalation_level")
73
	private int l3AuthUser;
-
 
74
 
-
 
75
	@Column(name = "l4_auth_user")
66
	@Enumerated(EnumType.STRING)
76
	private int l4AuthUser;
67
	private EscalationType currentEscalationLevel;
77
 
-
 
78
	@Column(name = "l5_auth_user")
-
 
79
	private int l5AuthUser;
-
 
80
 
68
 
81
	@Column(name = "happy_code")
69
	@Column(name = "happy_code")
82
	private String happyCode;
70
	private String happyCode;
83
 
71
 
84
	@Column(name = "assignment_id")
72
	@Column(name = "assignment_id")
Line 191... Line 179...
191
 
179
 
192
	public void setCloseTimestamp(LocalDateTime closeTimestamp) {
180
	public void setCloseTimestamp(LocalDateTime closeTimestamp) {
193
		this.closeTimestamp = closeTimestamp;
181
		this.closeTimestamp = closeTimestamp;
194
	}
182
	}
195
 
183
 
196
	public int getL1AuthUser() {
184
	public int getCurrentAssigneeId() {
197
		return l1AuthUser;
185
		return currentAssigneeId;
198
	}
186
	}
199
 
187
 
200
	public void setL1AuthUser(int l1AuthUser) {
188
	public void setCurrentAssigneeId(int currentAssigneeId) {
201
		this.l1AuthUser = l1AuthUser;
189
		this.currentAssigneeId = currentAssigneeId;
202
	}
190
	}
203
 
191
 
204
	public int getL2AuthUser() {
192
	public int getCurrentManagerId() {
205
		return l2AuthUser;
193
		return currentManagerId;
206
	}
194
	}
207
 
195
 
208
	public void setL2AuthUser(int l2AuthUser) {
196
	public void setCurrentManagerId(int currentManagerId) {
209
		this.l2AuthUser = l2AuthUser;
197
		this.currentManagerId = currentManagerId;
210
	}
198
	}
211
 
199
 
212
	public int getL3AuthUser() {
200
	public EscalationType getCurrentEscalationLevel() {
213
		return l3AuthUser;
201
		return currentEscalationLevel;
214
	}
202
	}
215
 
203
 
216
	public void setL3AuthUser(int l3AuthUser) {
204
	public void setCurrentEscalationLevel(EscalationType currentEscalationLevel) {
217
		this.l3AuthUser = l3AuthUser;
205
		this.currentEscalationLevel = currentEscalationLevel;
218
	}
206
	}
219
 
207
 
220
	public String getHappyCode() {
208
	public String getHappyCode() {
221
		return happyCode;
209
		return happyCode;
222
	}
210
	}
Line 243... Line 231...
243
 
231
 
244
	public static int getFinalescalationdays() {
232
	public static int getFinalescalationdays() {
245
		return FinalEscalationDays;
233
		return FinalEscalationDays;
246
	}
234
	}
247
 
235
 
248
	public int getL5AuthUser() {
-
 
249
		return l5AuthUser;
-
 
250
	}
-
 
251
 
-
 
252
	public void setL5AuthUser(int l5AuthUser) {
-
 
253
		this.l5AuthUser = l5AuthUser;
-
 
254
	}
-
 
255
 
-
 
256
	@Override
236
	@Override
257
	public int hashCode() {
237
	public int hashCode() {
258
		final int prime = 31;
238
		final int prime = 31;
259
		int result = 1;
239
		int result = 1;
260
		result = prime * result + assignmentId;
240
		result = prime * result + assignmentId;
261
		result = prime * result + ((closeTimestamp == null) ? 0 : closeTimestamp.hashCode());
241
		result = prime * result + ((closeTimestamp == null) ? 0 : closeTimestamp.hashCode());
262
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
242
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
263
		result = prime * result + fofoId;
243
		result = prime * result + fofoId;
264
		result = prime * result + ((happyCode == null) ? 0 : happyCode.hashCode());
244
		result = prime * result + ((happyCode == null) ? 0 : happyCode.hashCode());
265
		result = prime * result + id;
245
		result = prime * result + id;
266
		result = prime * result + l1AuthUser;
246
		result = prime * result + currentAssigneeId;
267
		result = prime * result + l2AuthUser;
247
		result = prime * result + currentManagerId;
268
		result = prime * result + l3AuthUser;
-
 
269
		result = prime * result + l4AuthUser;
-
 
270
		result = prime * result + l5AuthUser;
248
		result = prime * result + ((currentEscalationLevel == null) ? 0 : currentEscalationLevel.hashCode());
271
		result = prime * result + ((lastActivity == null) ? 0 : lastActivity.hashCode());
249
		result = prime * result + ((lastActivity == null) ? 0 : lastActivity.hashCode());
272
		result = prime * result + lastActivityId;
250
		result = prime * result + lastActivityId;
273
		result = prime * result + firstActivityId;
251
		result = prime * result + firstActivityId;
274
		result = prime * result + subCategoryId;
252
		result = prime * result + subCategoryId;
275
		result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
253
		result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
Line 304... Line 282...
304
				return false;
282
				return false;
305
		} else if (!happyCode.equals(other.happyCode))
283
		} else if (!happyCode.equals(other.happyCode))
306
			return false;
284
			return false;
307
		if (id != other.id)
285
		if (id != other.id)
308
			return false;
286
			return false;
309
		if (l1AuthUser != other.l1AuthUser)
-
 
310
			return false;
-
 
311
		if (l2AuthUser != other.l2AuthUser)
-
 
312
			return false;
-
 
313
		if (l3AuthUser != other.l3AuthUser)
287
		if (currentAssigneeId != other.currentAssigneeId)
314
			return false;
288
			return false;
315
		if (l4AuthUser != other.l4AuthUser)
289
		if (currentManagerId != other.currentManagerId)
316
			return false;
290
			return false;
317
		if (l5AuthUser != other.l5AuthUser)
291
		if (currentEscalationLevel != other.currentEscalationLevel)
318
			return false;
292
			return false;
319
		if (lastActivity != other.lastActivity)
293
		if (lastActivity != other.lastActivity)
320
			return false;
294
			return false;
321
		if (lastActivityId != other.lastActivityId)
295
		if (lastActivityId != other.lastActivityId)
322
			return false;
296
			return false;
Line 339... Line 313...
339
				", fofoId=" + fofoId +
313
				", fofoId=" + fofoId +
340
				", subCategoryId=" + subCategoryId +
314
				", subCategoryId=" + subCategoryId +
341
				", createTimestamp=" + createTimestamp +
315
				", createTimestamp=" + createTimestamp +
342
				", updateTimestamp=" + updateTimestamp +
316
				", updateTimestamp=" + updateTimestamp +
343
				", closeTimestamp=" + closeTimestamp +
317
				", closeTimestamp=" + closeTimestamp +
344
				", l1AuthUser=" + l1AuthUser +
318
				", currentAssigneeId=" + currentAssigneeId +
345
				", l2AuthUser=" + l2AuthUser +
319
				", currentManagerId=" + currentManagerId +
346
				", l3AuthUser=" + l3AuthUser +
-
 
347
				", l4AuthUser=" + l4AuthUser +
-
 
348
				", l5AuthUser=" + l5AuthUser +
320
				", currentEscalationLevel=" + currentEscalationLevel +
349
				", happyCode='" + happyCode + '\'' +
321
				", happyCode='" + happyCode + '\'' +
350
				", assignmentId=" + assignmentId +
322
				", assignmentId=" + assignmentId +
351
				", lastActivity=" + lastActivity +
323
				", lastActivity=" + lastActivity +
352
				", lastActivityId=" + lastActivityId +
324
				", lastActivityId=" + lastActivityId +
353
				", firstActivityId=" + firstActivityId +
325
				", firstActivityId=" + firstActivityId +