| Line 355... |
Line 355... |
| 355 |
isOk = partnerInvestmentService.isInvestmentOk(fofoStore.getId(), ProfitMandiConstants.MIN_INVESTMENT_PERCENTAGE,
|
355 |
isOk = partnerInvestmentService.isInvestmentOk(fofoStore.getId(), ProfitMandiConstants.MIN_INVESTMENT_PERCENTAGE,
|
| 356 |
ProfitMandiConstants.CUTOFF_INVESTMENT);
|
356 |
ProfitMandiConstants.CUTOFF_INVESTMENT);
|
| 357 |
if (fofoStore.getGraceCount() > 0) {
|
357 |
if (fofoStore.getGraceCount() > 0) {
|
| 358 |
fofoStore.setGraceDate(null);
|
358 |
fofoStore.setGraceDate(null);
|
| 359 |
fofoStore.setGraceCount(0);
|
359 |
fofoStore.setGraceCount(0);
|
| 360 |
fofoStoreRepository.persist(fofoStore);
|
- |
|
| 361 |
}
|
360 |
}
|
| 362 |
} catch (ProfitMandiBusinessException e) {
|
361 |
} catch (ProfitMandiBusinessException e) {
|
| 363 |
}
|
362 |
}
|
| 364 |
}
|
363 |
}
|
| 365 |
investments.put(fofoStore.getId(), isOk);
|
364 |
investments.put(fofoStore.getId(), isOk);
|
| Line 392... |
Line 391... |
| 392 |
isOk = partnerInvestmentService.isInvestmentOk(fofoStore.getId(), ProfitMandiConstants.MIN_INVESTMENT_PERCENTAGE,
|
391 |
isOk = partnerInvestmentService.isInvestmentOk(fofoStore.getId(), ProfitMandiConstants.MIN_INVESTMENT_PERCENTAGE,
|
| 393 |
ProfitMandiConstants.CUTOFF_INVESTMENT);
|
392 |
ProfitMandiConstants.CUTOFF_INVESTMENT);
|
| 394 |
if (fofoStore.getGraceCount() > 0) {
|
393 |
if (fofoStore.getGraceCount() > 0) {
|
| 395 |
fofoStore.setGraceDate(null);
|
394 |
fofoStore.setGraceDate(null);
|
| 396 |
fofoStore.setGraceCount(0);
|
395 |
fofoStore.setGraceCount(0);
|
| 397 |
//fofoStoreRepository.persist(fofoStore);
|
- |
|
| 398 |
}
|
396 |
}
|
| 399 |
} catch (ProfitMandiBusinessException e) {
|
397 |
} catch (ProfitMandiBusinessException e) {
|
| 400 |
}
|
398 |
}
|
| 401 |
}
|
399 |
}
|
| 402 |
investments.put(fofoStore.getId(), isOk);
|
400 |
investments.put(fofoStore.getId(), isOk);
|
| Line 460... |
Line 458... |
| 460 |
.contains(loginDetails.getEmailId())) {
|
458 |
.contains(loginDetails.getEmailId())) {
|
| 461 |
throw new ProfitMandiBusinessException("Access Denied", "Unauthorised Access",
|
459 |
throw new ProfitMandiBusinessException("Access Denied", "Unauthorised Access",
|
| 462 |
"You are not authorise to deactivate retailer");
|
460 |
"You are not authorise to deactivate retailer");
|
| 463 |
}
|
461 |
}
|
| 464 |
fofoStore.setActive(false);
|
462 |
fofoStore.setActive(false);
|
| 465 |
fofoStoreRepository.persist(fofoStore);
|
- |
|
| 466 |
LOGGER.info("inserted into InActiveFofoStore successfully");
|
463 |
LOGGER.info("inserted into InActiveFofoStore successfully");
|
| 467 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
464 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| 468 |
return "response";
|
465 |
return "response";
|
| 469 |
}
|
466 |
}
|
| 470 |
|
467 |
|
| Line 477... |
Line 474... |
| 477 |
"rahul.katyal@smartdukaan.com", "sm@smartdukaan.com").contains(loginDetails.getEmailId())) {
|
474 |
"rahul.katyal@smartdukaan.com", "sm@smartdukaan.com").contains(loginDetails.getEmailId())) {
|
| 478 |
throw new ProfitMandiBusinessException("Access Denied", "Unauthorised Access",
|
475 |
throw new ProfitMandiBusinessException("Access Denied", "Unauthorised Access",
|
| 479 |
"You are not authorise to activate retailer");
|
476 |
"You are not authorise to activate retailer");
|
| 480 |
}
|
477 |
}
|
| 481 |
fofoStore.setActive(true);
|
478 |
fofoStore.setActive(true);
|
| 482 |
fofoStoreRepository.persist(fofoStore);
|
- |
|
| 483 |
LOGGER.info("inserted into ActiveFofoStore successfully");
|
479 |
LOGGER.info("inserted into ActiveFofoStore successfully");
|
| 484 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
480 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| 485 |
return "response";
|
481 |
return "response";
|
| 486 |
}
|
482 |
}
|
| 487 |
|
483 |
|
| Line 505... |
Line 501... |
| 505 |
|
501 |
|
| 506 |
LOGGER.info("EndDate" + EndDate);
|
502 |
LOGGER.info("EndDate" + EndDate);
|
| 507 |
LOGGER.info("getActiveTimeStamp" + fofoStore.getActiveTimeStamp());
|
503 |
LOGGER.info("getActiveTimeStamp" + fofoStore.getActiveTimeStamp());
|
| 508 |
|
504 |
|
| 509 |
if (currentDate.isBefore(fofoStore.getActiveTimeStamp())) {
|
505 |
if (currentDate.isBefore(fofoStore.getActiveTimeStamp())) {
|
| 510 |
|
- |
|
| 511 |
fofoStore.setActive(true);
|
506 |
fofoStore.setActive(true);
|
| 512 |
fofoStoreRepository.persist(fofoStore);
|
- |
|
| 513 |
LOGGER.info("inserted into InActiveFofoStore successfully");
|
507 |
LOGGER.info("inserted into InActiveFofoStore successfully");
|
| 514 |
|
- |
|
| 515 |
}
|
508 |
}
|
| 516 |
|
509 |
|
| 517 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
510 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| 518 |
return "response";
|
511 |
return "response";
|
| 519 |
}
|
512 |
}
|
| Line 545... |
Line 538... |
| 545 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
538 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 546 |
if (Arrays.asList("kamini.sharma@smartdukaan.com", "tarun.verma@smartdukaan.com", "amit.gupta@smartdukaan.com",
|
539 |
if (Arrays.asList("kamini.sharma@smartdukaan.com", "tarun.verma@smartdukaan.com", "amit.gupta@smartdukaan.com",
|
| 547 |
"rahul.katyal@smartdukaan.com", "sm@smartdukaan.com", "mohit.gulati@smartdukaan.com").contains(loginDetails.getEmailId())) {
|
540 |
"rahul.katyal@smartdukaan.com", "sm@smartdukaan.com", "mohit.gulati@smartdukaan.com").contains(loginDetails.getEmailId())) {
|
| 548 |
fofoStore.setGraceDate(LocalDate.now().plusDays(2));
|
541 |
fofoStore.setGraceDate(LocalDate.now().plusDays(2));
|
| 549 |
fofoStore.setGraceCount(fofoStore.getGraceCount() + 1);
|
542 |
fofoStore.setGraceCount(fofoStore.getGraceCount() + 1);
|
| 550 |
fofoStoreRepository.persist(fofoStore);
|
- |
|
| 551 |
model.addAttribute("response1", mvcResponseSender.createResponseString(fofoStore.getGraceCount()));
|
543 |
model.addAttribute("response1", mvcResponseSender.createResponseString(fofoStore.getGraceCount()));
|
| 552 |
} else {
|
544 |
} else {
|
| 553 |
throw new ProfitMandiBusinessException("Access Denied", "Unauthorised Access",
|
545 |
throw new ProfitMandiBusinessException("Access Denied", "Unauthorised Access",
|
| 554 |
"You are not authorise to extend billing");
|
546 |
"You are not authorise to extend billing");
|
| 555 |
}
|
547 |
}
|
| Line 1151... |
Line 1143... |
| 1151 |
|
1143 |
|
| 1152 |
@RequestMapping(value = "/getAllPartnerPincode", method = RequestMethod.GET)
|
1144 |
@RequestMapping(value = "/getAllPartnerPincode", method = RequestMethod.GET)
|
| 1153 |
public String getAllPartnerPincode(HttpServletRequest request, Model model) throws Exception {
|
1145 |
public String getAllPartnerPincode(HttpServletRequest request, Model model) throws Exception {
|
| 1154 |
return "add-partner-pincode";
|
1146 |
return "add-partner-pincode";
|
| 1155 |
}
|
1147 |
}
|
| - |
|
1148 |
|
| 1156 |
}
|
1149 |
}
|
| 1157 |
|
1150 |
|