Subversion Repositories SmartDukaan

Rev

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

Rev 29052 Rev 29055
Line 18... Line 18...
18
	private ApplicableServiceType applicableType;
18
	private ApplicableServiceType applicableType;
19
	private boolean active;
19
	private boolean active;
20
	private int brandServiceId;
20
	private int brandServiceId;
21
	private String pbsNaComment;
21
	private String pbsNaComment;
22
	private String pbsPartnerStatusComment;
22
	private String pbsPartnerStatusComment;
23
	
23
 
24
	private int serviceId;
24
	private int serviceId;
25
	
-
 
26
	
25
 
27
	private String brand;
26
	private String brand;
28
	private String name;
27
	private String name;
29
	private String code;
28
	private String code;
30
	private ApplicableServiceType serviceApplicableType;
29
	private ApplicableServiceType serviceApplicableType;
31
	
30
 
32
	private LocalDateTime  serviceCodeCreateTimestamp;
31
	private LocalDateTime serviceCodeCreateTimestamp;
-
 
32
	private LocalDateTime psPendingCreateTimestamp;
33
	private String psNaComment;
33
	private String psNaComment;
34
	private String fofoCode;
34
	private String fofoCode;
35
	private LocalDateTime fofoactiveTimeStamp;
35
	private LocalDateTime fofoactiveTimeStamp;
36
	private LocalDateTime createTimestamp;
36
	private LocalDateTime createTimestamp;
37
	private LocalDateTime deploymentDate;
37
	private LocalDateTime deploymentDate;
Line 39... Line 39...
39
 
39
 
40
	private static final Logger LOGGER = LogManager.getLogger(FinanceServicesModel.class);
40
	private static final Logger LOGGER = LogManager.getLogger(FinanceServicesModel.class);
41
 
41
 
42
	static final List<String> paperFinanceServices = Arrays.asList("SAMSUNG SURE", "BAJAJ FINSERV", "HOME CREDIT",
42
	static final List<String> paperFinanceServices = Arrays.asList("SAMSUNG SURE", "BAJAJ FINSERV", "HOME CREDIT",
43
			"HDB", "CAPITAL FIRST");
43
			"HDB", "CAPITAL FIRST");
44
	
-
 
45
	
-
 
46
	
44
 
47
	public boolean getServiceStatusByCodeCreatedTimilines()   throws NullPointerException {
45
	public boolean getServiceStatusByCodeCreatedTimilines() throws NullPointerException {
48
		
46
 
49
		LocalDateTime timelineDate = 	this.getServiceCodeCreateTimestamp().plusDays(7);
47
		LocalDateTime timelineDate = this.getServiceCodeCreateTimestamp().plusDays(7);
50
		LocalDateTime currDate = LocalDate.now().atStartOfDay();
48
		LocalDateTime currDate = LocalDate.now().atStartOfDay();
51
		
49
 
52
		if (currDate.isBefore(timelineDate)) {
50
		if (currDate.isBefore(timelineDate)) {
53
			LOGGER.info("timeLinesDate");
51
			LOGGER.info("timeLinesDate");
54
			return true;
52
			return true;
55
		}
53
		}
56
		
54
 
57
		return false;
55
		return false;
58
	}
56
	}
59
	
-
 
60
 
57
 
61
	public boolean getServiceStatusByCodeTimeStamp() throws NullPointerException {
58
	public boolean getServiceStatusByCodeTimeStamp() throws NullPointerException {
62
 
59
 
63
		LOGGER.info("thisName" + this.getName());
60
		LOGGER.info("thisName" + this.getName());
64
		LOGGER.info("fofoThis" + this.getFofoId());
61
		LOGGER.info("fofoThis" + this.getFofoId());
Line 117... Line 114...
117
				LocalDateTime minDate = null;
114
				LocalDateTime minDate = null;
118
				LocalDateTime currDate = LocalDate.now().atStartOfDay();
115
				LocalDateTime currDate = LocalDate.now().atStartOfDay();
119
				if (this.getDeploymentDate() != null && this.getPayDate() != null) {
116
				if (this.getDeploymentDate() != null && this.getPayDate() != null) {
120
					minDate = this.getDeploymentDate().isBefore(this.getPayDate()) ? this.getDeploymentDate()
117
					minDate = this.getDeploymentDate().isBefore(this.getPayDate()) ? this.getDeploymentDate()
121
							: this.getPayDate();
118
							: this.getPayDate();
-
 
119
					LocalDateTime endDate = minDate.plusDays(15);
-
 
120
					LOGGER.info("endDate" + endDate);
-
 
121
					if (currDate.isBefore(endDate)) {
122
 
122
 
123
					if (currDate.isBefore(minDate)) {
-
 
124
						LOGGER.info("MONEYTrue");
-
 
125
						return true;
123
						return true;
126
					}
124
					}
127
 
125
 
128
					else {
126
					else {
129
 
127
 
130
						return false;
128
						return false;
131
					}
129
					}
132
 
130
 
133
				}
131
				}
134
 
132
 
135
				else if (this.getPayDate() == null && this.getPayDate() == null) {
133
				else if (this.getPayDate() == null && this.getDeploymentDate() == null) {
136
 
134
 
137
					return false;
135
					return true;
138
				}
136
				}
139
 
137
 
140
				else if (this.getPayDate() == null) {
138
				else if (this.getPayDate() == null) {
141
					minDate = this.getDeploymentDate();
139
					minDate = this.getDeploymentDate();
-
 
140
					LocalDateTime endDate = minDate.plusDays(15);
142
					if (currDate.isBefore(minDate)) {
141
					if (currDate.isBefore(endDate)) {
143
						LOGGER.info("MONEYTrue");
142
						
144
						return true;
143
						return true;
145
					}
144
					}
146
 
145
 
147
					else {
146
					else {
148
 
147
 
149
						return false;
148
						return false;
150
					}
149
					}
151
				} else {
150
				} else {
152
					minDate = this.getPayDate();
151
					minDate = this.getPayDate();
-
 
152
					LocalDateTime endDate = minDate.plusDays(15);
153
					if (currDate.isBefore(minDate)) {
153
					if (currDate.isBefore(endDate)) {
154
						LOGGER.info("MONEYTrue");
154
						
155
						return true;
155
						return true;
156
					}
156
					}
157
 
157
 
158
					else {
158
					else {
159
 
159
 
Line 280... Line 280...
280
	}
280
	}
281
 
281
 
282
	public static Logger getLogger() {
282
	public static Logger getLogger() {
283
		return LOGGER;
283
		return LOGGER;
284
	}
284
	}
285
	
-
 
286
	
-
 
287
	
-
 
288
 
285
 
289
	public String getPbsNaComment() {
286
	public String getPbsNaComment() {
290
		return pbsNaComment;
287
		return pbsNaComment;
291
	}
288
	}
292
 
289
 
293
 
-
 
294
	public void setPbsNaComment(String pbsNaComment) {
290
	public void setPbsNaComment(String pbsNaComment) {
295
		this.pbsNaComment = pbsNaComment;
291
		this.pbsNaComment = pbsNaComment;
296
	}
292
	}
297
 
293
 
298
 
-
 
299
	public String getPbsPartnerStatusComment() {
294
	public String getPbsPartnerStatusComment() {
300
		return pbsPartnerStatusComment;
295
		return pbsPartnerStatusComment;
301
	}
296
	}
302
 
297
 
303
 
-
 
304
	public void setPbsPartnerStatusComment(String pbsPartnerStatusComment) {
298
	public void setPbsPartnerStatusComment(String pbsPartnerStatusComment) {
305
		this.pbsPartnerStatusComment = pbsPartnerStatusComment;
299
		this.pbsPartnerStatusComment = pbsPartnerStatusComment;
306
	}
300
	}
307
 
301
 
308
 
-
 
309
	
-
 
310
	public String getPsNaComment() {
302
	public String getPsNaComment() {
311
		return psNaComment;
303
		return psNaComment;
312
	}
304
	}
313
 
305
 
314
 
-
 
315
	public void setPsNaComment(String psNaComment) {
306
	public void setPsNaComment(String psNaComment) {
316
		this.psNaComment = psNaComment;
307
		this.psNaComment = psNaComment;
317
	}
308
	}
318
 
309
 
319
 
-
 
320
	public LocalDateTime getServiceCodeCreateTimestamp() {
310
	public LocalDateTime getServiceCodeCreateTimestamp() {
321
		return serviceCodeCreateTimestamp;
311
		return serviceCodeCreateTimestamp;
322
	}
312
	}
323
 
313
 
324
	public void setServiceCodeCreateTimestamp(LocalDateTime serviceCodeCreateTimestamp) {
314
	public void setServiceCodeCreateTimestamp(LocalDateTime serviceCodeCreateTimestamp) {
325
		this.serviceCodeCreateTimestamp = serviceCodeCreateTimestamp;
315
		this.serviceCodeCreateTimestamp = serviceCodeCreateTimestamp;
326
	}
316
	}
327
 
317
 
328
	
-
 
329
 
-
 
330
	public LocalDateTime getFofoactiveTimeStamp() {
318
	public LocalDateTime getFofoactiveTimeStamp() {
331
		return fofoactiveTimeStamp;
319
		return fofoactiveTimeStamp;
332
	}
320
	}
333
 
321
 
334
 
-
 
335
	public void setFofoactiveTimeStamp(LocalDateTime fofoactiveTimeStamp) {
322
	public void setFofoactiveTimeStamp(LocalDateTime fofoactiveTimeStamp) {
336
		this.fofoactiveTimeStamp = fofoactiveTimeStamp;
323
		this.fofoactiveTimeStamp = fofoactiveTimeStamp;
337
	}
324
	}
-
 
325
	
-
 
326
	
-
 
327
	
-
 
328
 
-
 
329
	public LocalDateTime getPsPendingCreateTimestamp() {
-
 
330
		return psPendingCreateTimestamp;
-
 
331
	}
338
 
332
 
-
 
333
	public void setPsPendingCreateTimestamp(LocalDateTime psPendingCreateTimestamp) {
-
 
334
		this.psPendingCreateTimestamp = psPendingCreateTimestamp;
-
 
335
	}
339
 
336
 
340
	@Override
337
	@Override
341
	public String toString() {
338
	public String toString() {
342
		return "FinanceServicesModel [fofoId=" + fofoId + ", partnerStatusType=" + partnerStatusType
339
		return "FinanceServicesModel [fofoId=" + fofoId + ", partnerStatusType=" + partnerStatusType
343
				+ ", applicableType=" + applicableType + ", active=" + active + ", brandServiceId=" + brandServiceId
340
				+ ", applicableType=" + applicableType + ", active=" + active + ", brandServiceId=" + brandServiceId
344
				+ ", pbsNaComment=" + pbsNaComment + ", pbsPartnerStatusComment=" + pbsPartnerStatusComment
341
				+ ", pbsNaComment=" + pbsNaComment + ", pbsPartnerStatusComment=" + pbsPartnerStatusComment
345
				+ ", serviceId=" + serviceId + ", brand=" + brand + ", name=" + name + ", code=" + code
342
				+ ", serviceId=" + serviceId + ", brand=" + brand + ", name=" + name + ", code=" + code
346
				+ ", serviceApplicableType=" + serviceApplicableType + ", serviceCodeCreateTimestamp="
343
				+ ", serviceApplicableType=" + serviceApplicableType + ", serviceCodeCreateTimestamp="
347
				+ serviceCodeCreateTimestamp + ", psNaComment=" + psNaComment + ", fofoCode=" + fofoCode
344
				+ serviceCodeCreateTimestamp + ", psPendingCreateTimestamp=" + psPendingCreateTimestamp
-
 
345
				+ ", psNaComment=" + psNaComment + ", fofoCode=" + fofoCode + ", fofoactiveTimeStamp="
348
				+ ", fofoactiveTimeStamp=" + fofoactiveTimeStamp + ", createTimestamp=" + createTimestamp
346
				+ fofoactiveTimeStamp + ", createTimestamp=" + createTimestamp + ", deploymentDate=" + deploymentDate
349
				+ ", deploymentDate=" + deploymentDate + ", payDate=" + payDate + "]";
347
				+ ", payDate=" + payDate + "]";
350
	}
348
	}
351
 
349
 
-
 
350
	public FinanceServicesModel(int fofoId, PartnerStatusType partnerStatusType, ApplicableServiceType applicableType,
-
 
351
			boolean active, int brandServiceId, String pbsNaComment, String pbsPartnerStatusComment, int serviceId,
-
 
352
			String brand, String name, String code, ApplicableServiceType serviceApplicableType,
-
 
353
			LocalDateTime serviceCodeCreateTimestamp, LocalDateTime psPendingCreateTimestamp, String psNaComment,
-
 
354
			String fofoCode, LocalDateTime fofoactiveTimeStamp, LocalDateTime createTimestamp) {
-
 
355
		super();
-
 
356
		this.fofoId = fofoId;
-
 
357
		this.partnerStatusType = partnerStatusType;
-
 
358
		this.applicableType = applicableType;
-
 
359
		this.active = active;
-
 
360
		this.brandServiceId = brandServiceId;
-
 
361
		this.pbsNaComment = pbsNaComment;
-
 
362
		this.pbsPartnerStatusComment = pbsPartnerStatusComment;
-
 
363
		this.serviceId = serviceId;
-
 
364
		this.brand = brand;
-
 
365
		this.name = name;
-
 
366
		this.code = code;
-
 
367
		this.serviceApplicableType = serviceApplicableType;
-
 
368
		this.serviceCodeCreateTimestamp = serviceCodeCreateTimestamp;
-
 
369
		this.psPendingCreateTimestamp = psPendingCreateTimestamp;
-
 
370
		this.psNaComment = psNaComment;
-
 
371
		this.fofoCode = fofoCode;
-
 
372
		this.fofoactiveTimeStamp = fofoactiveTimeStamp;
-
 
373
		this.createTimestamp = createTimestamp;
-
 
374
	}
352
 
375
 
353
	public FinanceServicesModel(int fofoId, PartnerStatusType partnerStatusType, ApplicableServiceType applicableType,
376
	public FinanceServicesModel(int fofoId, PartnerStatusType partnerStatusType, ApplicableServiceType applicableType,
354
			boolean active, int brandServiceId, String pbsNaComment, String pbsPartnerStatusComment, int serviceId,
377
			boolean active, int brandServiceId, String pbsNaComment, String pbsPartnerStatusComment, int serviceId,
355
			String brand, String name, String code, ApplicableServiceType serviceApplicableType,
378
			String brand, String name, String code, ApplicableServiceType serviceApplicableType,
356
			LocalDateTime serviceCodeCreateTimestamp, String psNaComment, String fofoCode,
379
			LocalDateTime serviceCodeCreateTimestamp, String psNaComment, String fofoCode,
Line 373... Line 396...
373
		this.fofoCode = fofoCode;
396
		this.fofoCode = fofoCode;
374
		this.fofoactiveTimeStamp = fofoactiveTimeStamp;
397
		this.fofoactiveTimeStamp = fofoactiveTimeStamp;
375
		this.createTimestamp = createTimestamp;
398
		this.createTimestamp = createTimestamp;
376
	}
399
	}
377
 
400
 
378
 
-
 
379
	
-
 
380
 
-
 
381
	
-
 
382
	
-
 
383
 
-
 
384
}
401
}
385
402