| Line 703... |
Line 703... |
| 703 |
|
703 |
|
| 704 |
public void rolloutMarginForStoreOnMonth(FofoStore store, LocalDate startOfMonth) throws ProfitMandiBusinessException {
|
704 |
public void rolloutMarginForStoreOnMonth(FofoStore store, LocalDate startOfMonth) throws ProfitMandiBusinessException {
|
| 705 |
int fofoId = store.getId();
|
705 |
int fofoId = store.getId();
|
| 706 |
|
706 |
|
| 707 |
PartnerType startOfPreviousMonthPartnerType = partnerTypeChangeService.getTypeOnDate(fofoId, startOfMonth);
|
707 |
PartnerType startOfPreviousMonthPartnerType = partnerTypeChangeService.getTypeOnDate(fofoId, startOfMonth);
|
| 708 |
PartnerType todayPartnerType = partnerTypeChangeService.getTypeOnMonth(fofoId, YearMonth.from(startOfMonth.atStartOfDay()));
|
708 |
PartnerType todayPartnerType = partnerTypeChangeService.getTypeOnMonth(fofoId, YearMonth.from(startOfMonth));
|
| 709 |
if (!startOfPreviousMonthPartnerType.nextPartnerTypes().contains(todayPartnerType)) {
|
709 |
if (!startOfPreviousMonthPartnerType.nextPartnerTypes().contains(todayPartnerType)) {
|
| 710 |
return;
|
710 |
return;
|
| 711 |
}
|
711 |
}
|
| 712 |
if (!startOfPreviousMonthPartnerType.equals(todayPartnerType)) {
|
712 |
if (!startOfPreviousMonthPartnerType.equals(todayPartnerType)) {
|
| 713 |
LOGGER.info("Partner Type has been changed for code {} from {} to {}", store.getCode(), startOfPreviousMonthPartnerType, todayPartnerType);
|
713 |
LOGGER.info("Partner Type has been changed for code {} from {} to {}", store.getCode(), startOfPreviousMonthPartnerType, todayPartnerType);
|
| Line 1109... |
Line 1109... |
| 1109 |
|
1109 |
|
| 1110 |
|
1110 |
|
| 1111 |
public void test() throws Exception {
|
1111 |
public void test() throws Exception {
|
| 1112 |
//System.out.println(tagListingRepository.getModelSchemesByCatalogIdsAndType(175135707, PartnerType.GOLD,Arrays.asList(1024715), LocalDateTime.now()));
|
1112 |
//System.out.println(tagListingRepository.getModelSchemesByCatalogIdsAndType(175135707, PartnerType.GOLD,Arrays.asList(1024715), LocalDateTime.now()));
|
| 1113 |
|
1113 |
|
| 1114 |
System.out.println(partnerTypeChangeService.getTypeOnDate(175138843, LocalDate.of(2025,06,30)));
|
1114 |
//System.out.println(partnerTypeChangeService.getTypeOnDate(175138843, LocalDate.of(2025,06,30)));
|
| 1115 |
System.out.println(partnerTypeChangeService.getTypeOnDate(175138843, LocalDate.of(2025,06,30).plusDays(1)));
|
1115 |
//System.out.println(partnerTypeChangeService.getTypeOnDate(175138843, LocalDate.of(2025,06,30).plusDays(1)));
|
| - |
|
1116 |
this.rolloutMarginForStoreOnMonth(fofoStoreRepository.selectByRetailerId(175138843), LocalDate.of(2025,6,1));
|
| 1116 |
//Utils.sendMailWithAttachments( mailSender,"amit.gupta@smartdukaan.com", null, "Hello World!", "Test Mail", null);
|
1117 |
//Utils.sendMailWithAttachments( mailSender,"amit.gupta@smartdukaan.com", null, "Hello World!", "Test Mail", null);
|
| 1117 |
//sdCreditService.updateRisk();
|
1118 |
//sdCreditService.updateRisk();
|
| 1118 |
/*PartnerType partnerType = partnerTypeChangeService.getTypeOnDate(175139309,
|
1119 |
/*PartnerType partnerType = partnerTypeChangeService.getTypeOnDate(175139309,
|
| 1119 |
YearMonth.of(2025, 5).atDay(1));
|
1120 |
YearMonth.of(2025, 5).atDay(1));
|
| 1120 |
System.out.println(partnerType);
|
1121 |
System.out.println(partnerType);
|