| Line 3... |
Line 3... |
| 3 |
import com.google.common.collect.Lists;
|
3 |
import com.google.common.collect.Lists;
|
| 4 |
import com.google.gson.Gson;
|
4 |
import com.google.gson.Gson;
|
| 5 |
import com.razorpay.Payment;
|
5 |
import com.razorpay.Payment;
|
| 6 |
import com.smartdukaan.cron.itelImeiActivation.ItelImeiActivationService;
|
6 |
import com.smartdukaan.cron.itelImeiActivation.ItelImeiActivationService;
|
| 7 |
import com.smartdukaan.cron.itelImeiActivation.TecnoImeiActivation;
|
7 |
import com.smartdukaan.cron.itelImeiActivation.TecnoImeiActivation;
|
| - |
|
8 |
import com.spice.profitmandi.common.enumuration.ActivationType;
|
| 8 |
import com.spice.profitmandi.common.enumuration.*;
|
9 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
| - |
|
10 |
import com.spice.profitmandi.common.enumuration.RechargeStatus;
|
| - |
|
11 |
import com.spice.profitmandi.common.enumuration.ReporticoProject;
|
| 9 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
12 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 10 |
import com.spice.profitmandi.common.model.*;
|
13 |
import com.spice.profitmandi.common.model.*;
|
| 11 |
import com.spice.profitmandi.common.services.ReporticoService;
|
14 |
import com.spice.profitmandi.common.services.ReporticoService;
|
| 12 |
import com.spice.profitmandi.common.services.mandii.AccountStatusResponseOut;
|
15 |
import com.spice.profitmandi.common.services.mandii.AccountStatusResponseOut;
|
| 13 |
import com.spice.profitmandi.common.services.mandii.EligibilityStatusEnum;
|
16 |
import com.spice.profitmandi.common.services.mandii.EligibilityStatusEnum;
|
| Line 34... |
Line 37... |
| 34 |
import com.spice.profitmandi.dao.entity.inventory.ReporticoCacheTable;
|
37 |
import com.spice.profitmandi.dao.entity.inventory.ReporticoCacheTable;
|
| 35 |
import com.spice.profitmandi.dao.entity.inventory.SaholicCIS;
|
38 |
import com.spice.profitmandi.dao.entity.inventory.SaholicCIS;
|
| 36 |
import com.spice.profitmandi.dao.entity.inventory.SaholicPOItem;
|
39 |
import com.spice.profitmandi.dao.entity.inventory.SaholicPOItem;
|
| 37 |
import com.spice.profitmandi.dao.entity.transaction.*;
|
40 |
import com.spice.profitmandi.dao.entity.transaction.*;
|
| 38 |
import com.spice.profitmandi.dao.entity.user.*;
|
41 |
import com.spice.profitmandi.dao.entity.user.*;
|
| 39 |
import com.spice.profitmandi.dao.entity.warehouse.BrandRegionMapping;
|
- |
|
| 40 |
import com.spice.profitmandi.dao.enumuration.auth.CollectionRemark;
|
42 |
import com.spice.profitmandi.dao.enumuration.auth.CollectionRemark;
|
| 41 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
43 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
| 42 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
44 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
| 43 |
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
|
45 |
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
|
| 44 |
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
|
46 |
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
|
| 45 |
import com.spice.profitmandi.dao.enumuration.fofo.PaymentStatus;
|
47 |
import com.spice.profitmandi.dao.enumuration.fofo.PaymentStatus;
|
| 46 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
48 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
| 47 |
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
|
49 |
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
|
| 48 |
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
|
50 |
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
|
| 49 |
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
|
51 |
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
|
| 50 |
import com.spice.profitmandi.dao.model.PartnerDetailModel;
|
- |
|
| 51 |
import com.spice.profitmandi.dao.model.SimpleCampaign;
|
52 |
import com.spice.profitmandi.dao.model.*;
|
| 52 |
import com.spice.profitmandi.dao.model.SimpleCampaignParams;
|
- |
|
| 53 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
53 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| 54 |
import com.spice.profitmandi.dao.repository.auth.PartnerCollectionRemarkRepository;
|
54 |
import com.spice.profitmandi.dao.repository.auth.PartnerCollectionRemarkRepository;
|
| 55 |
import com.spice.profitmandi.dao.repository.catalog.*;
|
55 |
import com.spice.profitmandi.dao.repository.catalog.*;
|
| 56 |
import com.spice.profitmandi.dao.repository.cs.*;
|
56 |
import com.spice.profitmandi.dao.repository.cs.*;
|
| 57 |
import com.spice.profitmandi.dao.repository.dtr.*;
|
57 |
import com.spice.profitmandi.dao.repository.dtr.*;
|
| Line 68... |
Line 68... |
| 68 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseInventoryItemRepository;
|
68 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseInventoryItemRepository;
|
| 69 |
import com.spice.profitmandi.dao.service.solr.FofoSolr;
|
69 |
import com.spice.profitmandi.dao.service.solr.FofoSolr;
|
| 70 |
import com.spice.profitmandi.service.NotificationService;
|
70 |
import com.spice.profitmandi.service.NotificationService;
|
| 71 |
import com.spice.profitmandi.service.PartnerInvestmentService;
|
71 |
import com.spice.profitmandi.service.PartnerInvestmentService;
|
| 72 |
import com.spice.profitmandi.service.PartnerStatsService;
|
72 |
import com.spice.profitmandi.service.PartnerStatsService;
|
| - |
|
73 |
import com.spice.profitmandi.service.PerformanceService;
|
| 73 |
import com.spice.profitmandi.service.integrations.CCAvenuePaymentService;
|
74 |
import com.spice.profitmandi.service.integrations.CCAvenuePaymentService;
|
| 74 |
import com.spice.profitmandi.service.integrations.RazorpayPaymentService;
|
75 |
import com.spice.profitmandi.service.integrations.RazorpayPaymentService;
|
| 75 |
import com.spice.profitmandi.service.integrations.bharti.model.BAGInsuranceModel;
|
76 |
import com.spice.profitmandi.service.integrations.bharti.model.BAGInsuranceModel;
|
| 76 |
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
|
77 |
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
|
| 77 |
import com.spice.profitmandi.service.inventory.AgeingModel;
|
78 |
import com.spice.profitmandi.service.inventory.AgeingModel;
|
| Line 132... |
Line 133... |
| 132 |
import java.time.format.DateTimeFormatter;
|
133 |
import java.time.format.DateTimeFormatter;
|
| 133 |
import java.time.temporal.ChronoField;
|
134 |
import java.time.temporal.ChronoField;
|
| 134 |
import java.time.temporal.ChronoUnit;
|
135 |
import java.time.temporal.ChronoUnit;
|
| 135 |
import java.util.*;
|
136 |
import java.util.*;
|
| 136 |
import java.util.Map.Entry;
|
137 |
import java.util.Map.Entry;
|
| 137 |
import java.util.stream.Collector;
|
- |
|
| 138 |
import java.util.stream.Collectors;
|
138 |
import java.util.stream.Collectors;
|
| 139 |
import java.util.stream.Stream;
|
139 |
import java.util.stream.Stream;
|
| 140 |
|
140 |
|
| 141 |
import static java.util.stream.Collectors.groupingBy;
|
141 |
import static java.util.stream.Collectors.groupingBy;
|
| 142 |
import static java.util.stream.Collectors.mapping;
|
142 |
import static java.util.stream.Collectors.mapping;
|
| Line 203... |
Line 203... |
| 203 |
|
203 |
|
| 204 |
@Autowired
|
204 |
@Autowired
|
| 205 |
private CsService csService;
|
205 |
private CsService csService;
|
| 206 |
|
206 |
|
| 207 |
@Autowired
|
207 |
@Autowired
|
| 208 |
RetailerBlockBrandsRepository retailerBlockBrandsRepository;
|
- |
|
| 209 |
|
- |
|
| 210 |
@Autowired
|
- |
|
| 211 |
private SaholicInventoryService saholicInventoryService;
|
208 |
private SaholicInventoryService saholicInventoryService;
|
| 212 |
|
209 |
|
| 213 |
@Autowired
|
210 |
@Autowired
|
| 214 |
private InsurancePolicyRepository insurancePolicyRepository;
|
211 |
private InsurancePolicyRepository insurancePolicyRepository;
|
| 215 |
|
212 |
|
| Line 262... |
Line 259... |
| 262 |
private SchemeService schemeService;
|
259 |
private SchemeService schemeService;
|
| 263 |
|
260 |
|
| 264 |
@Autowired
|
261 |
@Autowired
|
| 265 |
private ServiceConfigRepository serviceConfigRepository;
|
262 |
private ServiceConfigRepository serviceConfigRepository;
|
| 266 |
|
263 |
|
| - |
|
264 |
@Autowired
|
| - |
|
265 |
private RetailerBlockBrandsRepository retailerBlockBrandsRepository;
|
| - |
|
266 |
|
| 267 |
@Value("${delhivery.tracking.token}")
|
267 |
@Value("${delhivery.tracking.token}")
|
| 268 |
private String token;
|
268 |
private String token;
|
| 269 |
|
269 |
|
| 270 |
private static final String[] STOCK_AGEING_MAIL_LIST = new String[]{"uday.singh@smartudkaan.com", "mohinder.mutreja@smartdukaan.com", "ankit.bhatia@smartdukaan.com", "tarun.verma@smartdukaan.com", "kuldeep.kumar@smartdukaan.com", "manish.gupta@smartdukaan.com"};
|
270 |
private static final String[] STOCK_AGEING_MAIL_LIST = new String[]{"uday.singh@smartudkaan.com", "mohinder.mutreja@smartdukaan.com", "ankit.bhatia@smartdukaan.com", "tarun.verma@smartdukaan.com", "kuldeep.kumar@smartdukaan.com", "manish.gupta@smartdukaan.com"};
|
| 271 |
|
271 |
|
| Line 994... |
Line 994... |
| 994 |
|
994 |
|
| 995 |
public void test() throws Exception {
|
995 |
public void test() throws Exception {
|
| 996 |
System.out.println("Starting test");
|
996 |
System.out.println("Starting test");
|
| 997 |
//processScheme(LocalDate.of(2023,05, 02).atStartOfDay(), LocalDate.of(2023, 05, 6).atStartOfDay(), false);
|
997 |
//processScheme(LocalDate.of(2023,05, 02).atStartOfDay(), LocalDate.of(2023, 05, 6).atStartOfDay(), false);
|
| 998 |
//
|
998 |
//
|
| 999 |
for (String inv : Arrays.asList("DLWE066/2966","UPBLY175/1014","UPSRP547/16","UPSBL299/2620","UPSML508/76","UPBLY175/1015","UPBLY175/1013","UPMTR498/377","UPBUD432/122","UPAZM132/1443","UPETH173/2124","HRGN516/139","UPSRP547/36","UPCDL116/1172","UPSRP547/42","RJAMR522/36","RJBHW525/16","HRRHK424/78","HRRHK424/81","HRRHK424/84","HRRHK424/85","HRRHK424/83","HRRHK424/77","HRRHK424/76","HRRHK424/75","HRRHK424/73","HRRHK424/74","HRRHK424/45","HRKA135/3528","HRKN025/4479","UPAZM132/1460","UPBSR530/51","HRKN093/1434","HRRHK424/80","HRKA153/3823","HRFB402/534","UPETH173/2232","HRGN516/140","UPGBN590/10","RJJHU440/113","HRKN148/828","HRPHK245/617","HRKA256/170","UPBSR608/4","RJBHW445/3","UPSJP484/169","UPSJP484/169","UPSRP455/600","UPSRP455/599","RJJU518/546","HRKN184/669","UPMTR498/447","UPAMH419/232","UPMZR448/392","HRPW604/24","UPSML508/126","HRMWT562/38","HRKA395/221","UKAL569/69","UPMZR448/324","UPMTR532/153","UPMTR532/193", "HRKN025/4630")) {
|
999 |
for (String inv : Arrays.asList("DLWE066/2966", "UPBLY175/1014", "UPSRP547/16", "UPSBL299/2620", "UPSML508/76", "UPBLY175/1015", "UPBLY175/1013", "UPMTR498/377", "UPBUD432/122", "UPAZM132/1443", "UPETH173/2124", "HRGN516/139", "UPSRP547/36", "UPCDL116/1172", "UPSRP547/42", "RJAMR522/36", "RJBHW525/16", "HRRHK424/78", "HRRHK424/81", "HRRHK424/84", "HRRHK424/85", "HRRHK424/83", "HRRHK424/77", "HRRHK424/76", "HRRHK424/75", "HRRHK424/73", "HRRHK424/74", "HRRHK424/45", "HRKA135/3528", "HRKN025/4479", "UPAZM132/1460", "UPBSR530/51", "HRKN093/1434", "HRRHK424/80", "HRKA153/3823", "HRFB402/534", "UPETH173/2232", "HRGN516/140", "UPGBN590/10", "RJJHU440/113", "HRKN148/828", "HRPHK245/617", "HRKA256/170", "UPBSR608/4", "RJBHW445/3", "UPSJP484/169", "UPSJP484/169", "UPSRP455/600", "UPSRP455/599", "RJJU518/546", "HRKN184/669", "UPMTR498/447", "UPAMH419/232", "UPMZR448/392", "HRPW604/24", "UPSML508/126", "HRMWT562/38", "HRKA395/221", "UKAL569/69", "UPMZR448/324", "UPMTR532/153", "UPMTR532/193", "HRKN025/4630")) {
|
| 1000 |
System.out.println("Invoice - " + inv);
|
1000 |
System.out.println("Invoice - " + inv);
|
| 1001 |
orderService.reverseScheme(fofoOrderRepository.selectByInvoiceNumber(inv));
|
1001 |
orderService.reverseScheme(fofoOrderRepository.selectByInvoiceNumber(inv));
|
| 1002 |
}
|
1002 |
}
|
| 1003 |
|
1003 |
|
| 1004 |
//this.sendMailForSamsungRebilling();
|
1004 |
//this.sendMailForSamsungRebilling();
|
| 1005 |
/*List<PurchaseReturnItem> purchaseReturnItems = purchaseReturnItemRepository.selectPurchaseReturnByStatuses(Arrays.asList(PurchaseReturnStatus.DEBIT_NOTE_CREATED));
|
1005 |
/*List<PurchaseReturnItem> purchaseReturnItems = purchaseReturnItemRepository.selectPurchaseReturnByStatuses(Arrays.asList(PurchaseReturnStatus.DEBIT_NOTE_CREATED));
|
| Line 4267... |
Line 4267... |
| 4267 |
|
4267 |
|
| 4268 |
}
|
4268 |
}
|
| 4269 |
|
4269 |
|
| 4270 |
}
|
4270 |
}
|
| 4271 |
|
4271 |
|
| - |
|
4272 |
@Autowired
|
| - |
|
4273 |
private RetailerFilterRepository retailerFilterRepository;
|
| - |
|
4274 |
|
| - |
|
4275 |
@Autowired
|
| - |
|
4276 |
private PerformanceService performanceService;
|
| - |
|
4277 |
|
| - |
|
4278 |
|
| - |
|
4279 |
public void sendFilteredRetailerPerformance() throws Exception {
|
| - |
|
4280 |
RetailerFilterModel retailerFilterModel = performanceService.getRetailerFilterModel();
|
| - |
|
4281 |
|
| - |
|
4282 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getFofoRetailers(true);
|
| - |
|
4283 |
|
| - |
|
4284 |
|
| - |
|
4285 |
List<RetailerPeformanceFilterModel> partnersPerformance = performanceService.getPerformance(retailerFilterModel, customRetailers);
|
| - |
|
4286 |
|
| - |
|
4287 |
Map<Integer, RetailerPeformanceFilterModel> partnersPerformanceMap = new HashMap<>();
|
| - |
|
4288 |
|
| - |
|
4289 |
if (!partnersPerformance.isEmpty()) {
|
| - |
|
4290 |
partnersPerformanceMap = partnersPerformance.stream().collect(Collectors.toMap(x -> x.getFofoId(), x -> x));
|
| - |
|
4291 |
performanceService.sendPartnerPerformanceEmail(partnersPerformanceMap, retailerFilterModel, customRetailers);
|
| - |
|
4292 |
|
| - |
|
4293 |
}
|
| - |
|
4294 |
|
| - |
|
4295 |
|
| - |
|
4296 |
}
|
| - |
|
4297 |
|
| - |
|
4298 |
|
| 4272 |
}
|
4299 |
}
|
| 4273 |
// 2284'
|
4300 |
// 2284'
|
| 4274 |
|
4301 |
|