| Line 428... |
Line 428... |
| 428 |
List<List<? extends Serializable>> rows = new ArrayList<>();
|
428 |
List<List<? extends Serializable>> rows = new ArrayList<>();
|
| 429 |
for (ImeiDropSummaryModel imeiDropSummaryModel : imeiDropSummaryModelList) {
|
429 |
for (ImeiDropSummaryModel imeiDropSummaryModel : imeiDropSummaryModelList) {
|
| 430 |
rows.add(this.getRow(imeiDropSummaryModel));
|
430 |
rows.add(this.getRow(imeiDropSummaryModel));
|
| 431 |
}
|
431 |
}
|
| 432 |
return FileUtil.getCSVByteStream(Arrays.asList("IMEI Number", "Store Name", "Store Code", "Item ID", "Brand",
|
432 |
return FileUtil.getCSVByteStream(Arrays.asList("IMEI Number", "Store Name", "Store Code", "Item ID", "Brand",
|
| 433 |
"Model Name", "Model Number", "Color", "Last Scanned"), rows);
|
433 |
"Model Name", "Model Number", "Color", "Last Scanned", "Vendor Name"), rows);
|
| 434 |
}
|
434 |
}
|
| 435 |
|
435 |
|
| 436 |
private List<? extends Serializable> getRow(ImeiDropSummaryModel imeiDropSummaryModel) {
|
436 |
private List<? extends Serializable> getRow(ImeiDropSummaryModel imeiDropSummaryModel) {
|
| 437 |
List<Serializable> row = new ArrayList<>();
|
437 |
List<Serializable> row = new ArrayList<>();
|
| 438 |
row.add(imeiDropSummaryModel.getSerialNumber());
|
438 |
row.add(imeiDropSummaryModel.getSerialNumber());
|
| Line 442... |
Line 442... |
| 442 |
row.add(imeiDropSummaryModel.getBrand());
|
442 |
row.add(imeiDropSummaryModel.getBrand());
|
| 443 |
row.add(imeiDropSummaryModel.getModelName());
|
443 |
row.add(imeiDropSummaryModel.getModelName());
|
| 444 |
row.add(imeiDropSummaryModel.getModelNumber());
|
444 |
row.add(imeiDropSummaryModel.getModelNumber());
|
| 445 |
row.add(imeiDropSummaryModel.getColor());
|
445 |
row.add(imeiDropSummaryModel.getColor());
|
| 446 |
row.add(FormattingUtils.formatReporitcoDate(imeiDropSummaryModel.getLastScanned()));
|
446 |
row.add(FormattingUtils.formatReporitcoDate(imeiDropSummaryModel.getLastScanned()));
|
| - |
|
447 |
row.add(imeiDropSummaryModel.getVendorName());
|
| 447 |
return row;
|
448 |
return row;
|
| 448 |
}
|
449 |
}
|
| 449 |
|
450 |
|
| 450 |
private boolean validatePriceDrop(PriceDropModel priceDropModel) throws ProfitMandiBusinessException {
|
451 |
private boolean validatePriceDrop(PriceDropModel priceDropModel) throws ProfitMandiBusinessException {
|
| 451 |
if (priceDropModel.getMop() > 0 && priceDropModel.getDp() > 0 && priceDropModel.getTp() > 0) {
|
452 |
if (priceDropModel.getMop() > 0 && priceDropModel.getDp() > 0 && priceDropModel.getTp() > 0) {
|