| Line 42... |
Line 42... |
| 42 |
import com.smartdukaan.cron.scheduled.SamsungIMEIActivationService;
|
42 |
import com.smartdukaan.cron.scheduled.SamsungIMEIActivationService;
|
| 43 |
import com.smartdukaan.cron.scheduled.ScheduledTasks;
|
43 |
import com.smartdukaan.cron.scheduled.ScheduledTasks;
|
| 44 |
import com.spice.profitmandi.common.enumuration.ItemType;
|
44 |
import com.spice.profitmandi.common.enumuration.ItemType;
|
| 45 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
45 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 46 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
46 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| - |
|
47 |
import com.spice.profitmandi.common.model.ItemCompleteLedgerModel;
|
| 47 |
import com.spice.profitmandi.common.util.FileUtil;
|
48 |
import com.spice.profitmandi.common.util.FileUtil;
|
| 48 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
49 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
| 49 |
import com.spice.profitmandi.common.util.Utils;
|
50 |
import com.spice.profitmandi.common.util.Utils;
|
| 50 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
51 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
| - |
|
52 |
import com.spice.profitmandi.dao.entity.catalog.ItemCriteria;
|
| 51 |
import com.spice.profitmandi.dao.entity.catalog.Offer;
|
53 |
import com.spice.profitmandi.dao.entity.catalog.Offer;
|
| 52 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
54 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
| 53 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
55 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
| 54 |
import com.spice.profitmandi.dao.entity.dtr.PaymentOptionTransaction;
|
56 |
import com.spice.profitmandi.dao.entity.dtr.PaymentOptionTransaction;
|
| 55 |
import com.spice.profitmandi.dao.entity.fofo.CurrentInventorySnapshot;
|
57 |
import com.spice.profitmandi.dao.entity.fofo.CurrentInventorySnapshot;
|
| Line 161... |
Line 163... |
| 161 |
@Autowired
|
163 |
@Autowired
|
| 162 |
private SaholicInventorySnapshotRepository saholicInventorySnapshotRepository;
|
164 |
private SaholicInventorySnapshotRepository saholicInventorySnapshotRepository;
|
| 163 |
|
165 |
|
| 164 |
@Autowired
|
166 |
@Autowired
|
| 165 |
private CsService csService;
|
167 |
private CsService csService;
|
| 166 |
|
168 |
|
| 167 |
@Autowired
|
169 |
@Autowired
|
| 168 |
private ManualPaymentRequestRepository manualPaymentRequestRepository;
|
170 |
private ManualPaymentRequestRepository manualPaymentRequestRepository;
|
| 169 |
|
171 |
|
| 170 |
@Autowired
|
172 |
@Autowired
|
| 171 |
private OfferRepository offerRepository;
|
173 |
private OfferRepository offerRepository;
|
| Line 1350... |
Line 1352... |
| 1350 |
paymentType.setReferenceType(walletReferenceType);
|
1352 |
paymentType.setReferenceType(walletReferenceType);
|
| 1351 |
manualPaymentRequestRepository.persist(paymentType);
|
1353 |
manualPaymentRequestRepository.persist(paymentType);
|
| 1352 |
}
|
1354 |
}
|
| 1353 |
paymentType.setCounter(paymentType.getCounter() + 1);
|
1355 |
paymentType.setCounter(paymentType.getCounter() + 1);
|
| 1354 |
int reference = paymentType.getCounter();
|
1356 |
int reference = paymentType.getCounter();
|
| 1355 |
walletService.consumeAmountFromWallet(purchase.getFofoId(), reference, WalletReferenceType.OTHERS, "Invoice-NSLCK3350 was cancelled, hence all schemes were rolled back", (int)totalAmount, LocalDateTime.now());
|
1357 |
walletService.consumeAmountFromWallet(purchase.getFofoId(), reference, WalletReferenceType.OTHERS,
|
| - |
|
1358 |
"Invoice-NSLCK3350 was cancelled, hence all schemes were rolled back", (int) totalAmount,
|
| - |
|
1359 |
LocalDateTime.now());
|
| 1356 |
LOGGER.info("Total Deduction is around Rs. {}", totalAmount);
|
1360 |
LOGGER.info("Total Deduction is around Rs. {}", totalAmount);
|
| 1357 |
}
|
1361 |
}
|
| 1358 |
|
1362 |
|
| - |
|
1363 |
public void opporeno() {
|
| - |
|
1364 |
List<Integer> offerIds = Arrays.asList(270, 269, 267, 265, 264, 257, 253, 244, 243, 242, 241, 240, 239, 228,
|
| - |
|
1365 |
227, 226, 225);
|
| - |
|
1366 |
for (Integer offerId : offerIds) {
|
| - |
|
1367 |
Offer offer = offerRepository.selectById(offerId);
|
| - |
|
1368 |
com.spice.profitmandi.service.offers.ItemCriteria itemCriteria = gson.fromJson(offer.getItemCriteria(),
|
| - |
|
1369 |
com.spice.profitmandi.service.offers.ItemCriteria.class);
|
| - |
|
1370 |
if (itemCriteria.getExcludeCatalogIds().contains(1022950)) {
|
| - |
|
1371 |
System.out.println("Excludes reno");
|
| - |
|
1372 |
} else {
|
| - |
|
1373 |
System.out.println("Does not excludes reno.. excluding it");
|
| - |
|
1374 |
itemCriteria.getExcludeCatalogIds().add(1022950);
|
| - |
|
1375 |
offer.setItemCriteria(gson.toJson(itemCriteria));
|
| - |
|
1376 |
}
|
| - |
|
1377 |
|
| - |
|
1378 |
}
|
| - |
|
1379 |
}
|
| - |
|
1380 |
|
| 1359 |
}
|
1381 |
}
|
| 1360 |
|
1382 |
|
| 1361 |
//7015845171
|
1383 |
//7015845171
|
| 1362 |
|
1384 |
|