| Line 53... |
Line 53... |
| 53 |
import com.spice.profitmandi.dao.enumuration.transaction.SchemePayoutStatus;
|
53 |
import com.spice.profitmandi.dao.enumuration.transaction.SchemePayoutStatus;
|
| 54 |
import com.spice.profitmandi.dao.model.*;
|
54 |
import com.spice.profitmandi.dao.model.*;
|
| 55 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
55 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| 56 |
import com.spice.profitmandi.dao.repository.auth.PartnerCollectionRemarkRepository;
|
56 |
import com.spice.profitmandi.dao.repository.auth.PartnerCollectionRemarkRepository;
|
| 57 |
import com.spice.profitmandi.dao.repository.catalog.*;
|
57 |
import com.spice.profitmandi.dao.repository.catalog.*;
|
| 58 |
import com.spice.profitmandi.dao.repository.cs.*;
|
58 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
| - |
|
59 |
import com.spice.profitmandi.dao.repository.cs.PartnerRegionRepository;
|
| - |
|
60 |
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
|
| - |
|
61 |
import com.spice.profitmandi.dao.repository.cs.TicketRepository;
|
| 59 |
import com.spice.profitmandi.dao.repository.dtr.*;
|
62 |
import com.spice.profitmandi.dao.repository.dtr.*;
|
| 60 |
import com.spice.profitmandi.dao.repository.fofo.*;
|
63 |
import com.spice.profitmandi.dao.repository.fofo.*;
|
| 61 |
import com.spice.profitmandi.dao.repository.inventory.*;
|
64 |
import com.spice.profitmandi.dao.repository.inventory.*;
|
| 62 |
import com.spice.profitmandi.dao.repository.transaction.*;
|
65 |
import com.spice.profitmandi.dao.repository.transaction.*;
|
| 63 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
66 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| Line 130... |
Line 133... |
| 130 |
import java.time.temporal.ChronoField;
|
133 |
import java.time.temporal.ChronoField;
|
| 131 |
import java.time.temporal.ChronoUnit;
|
134 |
import java.time.temporal.ChronoUnit;
|
| 132 |
import java.util.*;
|
135 |
import java.util.*;
|
| 133 |
import java.util.Map.Entry;
|
136 |
import java.util.Map.Entry;
|
| 134 |
import java.util.stream.Collectors;
|
137 |
import java.util.stream.Collectors;
|
| 135 |
import java.util.stream.IntStream;
|
- |
|
| 136 |
import java.util.stream.Stream;
|
138 |
import java.util.stream.Stream;
|
| 137 |
|
139 |
|
| 138 |
import static java.util.stream.Collectors.groupingBy;
|
140 |
import static java.util.stream.Collectors.groupingBy;
|
| 139 |
import static java.util.stream.Collectors.mapping;
|
141 |
import static java.util.stream.Collectors.mapping;
|
| 140 |
|
142 |
|
| 141 |
|
143 |
|
| 142 |
@Component
|
144 |
@Component
|
| 143 |
@Transactional(rollbackFor = Throwable.class)
|
145 |
@Transactional(rollbackFor = Throwable.class)
|
| 144 |
public class ScheduledTasks {
|
146 |
public class ScheduledTasks {
|
| 145 |
|
147 |
|
| 146 |
@Value("${oxigen.recharge.transaction.url}")
|
- |
|
| 147 |
private String oxigenRechargeTransactionUrl;
|
- |
|
| 148 |
|
- |
|
| 149 |
@Value("${oxigen.recharge.enquiry.url}")
|
148 |
@Value("${oxigen.recharge.enquiry.url}")
|
| 150 |
private String oxigenRechargeEnquiryUrl;
|
149 |
private String oxigenRechargeEnquiryUrl;
|
| 151 |
|
150 |
|
| 152 |
@Autowired
|
151 |
@Autowired
|
| 153 |
PurchaseMigration purchaseMigration;
|
152 |
PurchaseMigration purchaseMigration;
|
| 154 |
|
153 |
|
| 155 |
@Autowired
|
154 |
@Autowired
|
| 156 |
SmartPingService smartPingService;
|
155 |
SmartPingService smartPingService;
|
| 157 |
|
156 |
|
| 158 |
@Autowired
|
- |
|
| 159 |
private RegionRepository regionRepository;
|
- |
|
| 160 |
|
157 |
|
| 161 |
@Autowired
|
158 |
@Autowired
|
| 162 |
private ServiceConfigService serviceConfigService;
|
159 |
private ServiceConfigService serviceConfigService;
|
| 163 |
|
160 |
|
| 164 |
@Autowired
|
161 |
@Autowired
|
| Line 179... |
Line 176... |
| 179 |
ItelImeiActivationService itelImeiActivationService;
|
176 |
ItelImeiActivationService itelImeiActivationService;
|
| 180 |
|
177 |
|
| 181 |
@Autowired
|
178 |
@Autowired
|
| 182 |
private PartnerTypeChangeService partnerTypeChangeService;
|
179 |
private PartnerTypeChangeService partnerTypeChangeService;
|
| 183 |
|
180 |
|
| 184 |
@Autowired
|
- |
|
| 185 |
private ActivatedImeiRepository activatedImeiRepository;
|
- |
|
| 186 |
|
- |
|
| 187 |
@Autowired
|
- |
|
| 188 |
private LineItemRepository lineItemRepository;
|
- |
|
| 189 |
|
181 |
|
| 190 |
@Autowired
|
182 |
@Autowired
|
| 191 |
private LeadRepository leadRepository;
|
183 |
private LeadRepository leadRepository;
|
| 192 |
|
184 |
|
| 193 |
@Autowired
|
185 |
@Autowired
|
| Line 1028... |
Line 1020... |
| 1028 |
for (FofoOrder fofoOrder : fofoOrders) {
|
1020 |
for (FofoOrder fofoOrder : fofoOrders) {
|
| 1029 |
orderService.processScratchOffer(fofoOrder);
|
1021 |
orderService.processScratchOffer(fofoOrder);
|
| 1030 |
}
|
1022 |
}
|
| 1031 |
}
|
1023 |
}
|
| 1032 |
public void test() throws Exception {
|
1024 |
public void test() throws Exception {
|
| - |
|
1025 |
//fofoSolr.populateTagItems();
|
| - |
|
1026 |
System.out.println(smartPingService.getAllAgentsByEmail());
|
| 1033 |
//System.out.println(psiSmartService.getRegistrationEndPoint("9990381569"));
|
1027 |
//System.out.println(psiSmartService.getRegistrationEndPoint("9990381569"));
|
| 1034 |
migrateValentine();
|
1028 |
//migrateValentine();
|
| 1035 |
//Map<Integer, List<Offer>> offerMap = offerRepository.selectAllPublishedMapByPartner(YearMonth.now());
|
1029 |
//Map<Integer, List<Offer>> offerMap = offerRepository.selectAllPublishedMapByPartner(YearMonth.now());
|
| 1036 |
//LOGGER.info("Offers - {}", offerMap.entrySet().stream().filter(x->x.getKey()==168118414).flatMap(x->x.getValue().stream().map(y->y.getId())).collect(Collectors.toList()));
|
1030 |
//LOGGER.info("Offers - {}", offerMap.entrySet().stream().filter(x->x.getKey()==168118414).flatMap(x->x.getValue().stream().map(y->y.getId())).collect(Collectors.toList()));
|
| 1037 |
//bluedartAuthService.getAuthToken();
|
1031 |
//bluedartAuthService.getAuthToken();
|
| 1038 |
//bluedartService.getAirwayBillNo()
|
1032 |
//bluedartService.getAirwayBillNo()
|
| 1039 |
/*transactionRelatedTasks.reverseRTO(Arrays.asList(
|
1033 |
/*transactionRelatedTasks.reverseRTO(Arrays.asList(
|
| Line 1083... |
Line 1077... |
| 1083 |
//Create return
|
1077 |
//Create return
|
| 1084 |
//this.updatePartnerLimit();
|
1078 |
//this.updatePartnerLimit();
|
| 1085 |
//creditNoteService.sendCnMails(YearMonth.now().minusMonths(2));
|
1079 |
//creditNoteService.sendCnMails(YearMonth.now().minusMonths(2));
|
| 1086 |
//orderService.createMissingScratchOffers();
|
1080 |
//orderService.createMissingScratchOffers();
|
| 1087 |
LocalDateTime debitNoteDate = LocalDate.of(2023, Month.SEPTEMBER, 30).atStartOfDay();
|
1081 |
LocalDateTime debitNoteDate = LocalDate.of(2023, Month.SEPTEMBER, 30).atStartOfDay();
|
| 1088 |
System.out.println(smartPingService.getAllAgents());
|
1082 |
System.out.println(smartPingService.getAllAgentsByAgentId());
|
| 1089 |
Map<Integer, Set<String>> fofoIdImeiReturnMap = new LinkedHashMap<>();
|
1083 |
Map<Integer, Set<String>> fofoIdImeiReturnMap = new LinkedHashMap<>();
|
| 1090 |
fofoIdImeiReturnMap.put(167996137, new HashSet<>(Arrays.asList("357415663618188", "357415663627767", "866399066670844", "866399066672022", "866399066715284", "866399066718205", "866399066721126", "866399066725069", "869350065039538", "869350065061318", "869350065067596", "869350065068016", "869350065068974", "869350065086794", "869350065090317", "869350065094558", "869350065098435", "869350065136177", "869350065155391")));
|
1084 |
fofoIdImeiReturnMap.put(167996137, new HashSet<>(Arrays.asList("357415663618188", "357415663627767", "866399066670844", "866399066672022", "866399066715284", "866399066718205", "866399066721126", "866399066725069", "869350065039538", "869350065061318", "869350065067596", "869350065068016", "869350065068974", "869350065086794", "869350065090317", "869350065094558", "869350065098435", "869350065136177", "869350065155391")));
|
| 1091 |
purchaseReturnService.processReturn(fofoIdImeiReturnMap, debitNoteDate);
|
1085 |
purchaseReturnService.processReturn(fofoIdImeiReturnMap, debitNoteDate);
|
| 1092 |
|
1086 |
|
| 1093 |
}
|
1087 |
}
|