| Line 213... |
Line 213... |
| 213 |
throws Exception {
|
213 |
throws Exception {
|
| 214 |
|
214 |
|
| 215 |
PriceDropImeisModel priceDropImeisModel = new PriceDropImeisModel();
|
215 |
PriceDropImeisModel priceDropImeisModel = new PriceDropImeisModel();
|
| 216 |
|
216 |
|
| 217 |
// This call is used to persit imeis to pricedrop imeis in case its not there.
|
217 |
// This call is used to persit imeis to pricedrop imeis in case its not there.
|
| - |
|
218 |
//This should be called while creating price drop.
|
| 218 |
priceDropService.priceDropStatus(priceDropId);
|
219 |
//priceDropService.priceDropStatus(priceDropId);
|
| 219 |
|
220 |
|
| 220 |
List<String> pendingImeis = new ArrayList<>();
|
221 |
List<String> pendingImeis = new ArrayList<>();
|
| 221 |
List<String> approvedImeis = new ArrayList<>();
|
222 |
List<String> approvedImeis = new ArrayList<>();
|
| 222 |
List<String> rejectedImeis = new ArrayList<>();
|
223 |
List<String> rejectedImeis = new ArrayList<>();
|
| 223 |
List<PriceDropIMEI> priceDropImeis = priceDropIMEIRepository.selectByPriceDropId(priceDropId);
|
224 |
List<PriceDropIMEI> priceDropImeis = priceDropIMEIRepository.selectByPriceDropId(priceDropId);
|
| Line 314... |
Line 315... |
| 314 |
priceDrop.setAmount(oldDp - newDp);
|
315 |
priceDrop.setAmount(oldDp - newDp);
|
| 315 |
priceDrop.setNewDp(newDp);
|
316 |
priceDrop.setNewDp(newDp);
|
| 316 |
priceDrop.setCreatedOn(LocalDateTime.now());
|
317 |
priceDrop.setCreatedOn(LocalDateTime.now());
|
| 317 |
priceDrop.setCatalogItemId(currentItem.getCatalogItemId());
|
318 |
priceDrop.setCatalogItemId(currentItem.getCatalogItemId());
|
| 318 |
priceDropRepository.persist(priceDrop);
|
319 |
priceDropRepository.persist(priceDrop);
|
| - |
|
320 |
priceDropService.priceDropStatus(priceDrop.getId());
|
| 319 |
response = true;
|
321 |
response = true;
|
| 320 |
} else {
|
322 |
} else {
|
| 321 |
throw new ProfitMandiBusinessException("Price Drop", priceDropModel.getPd(),
|
323 |
throw new ProfitMandiBusinessException("Price Drop", priceDropModel.getPd(),
|
| 322 |
"Price Drop Should be greater than 0");
|
324 |
"Price Drop Should be greater than 0");
|
| 323 |
}
|
325 |
}
|