| Line 13... |
Line 13... |
| 13 |
import java.util.LinkedHashMap;
|
13 |
import java.util.LinkedHashMap;
|
| 14 |
import java.util.List;
|
14 |
import java.util.List;
|
| 15 |
import java.util.Map;
|
15 |
import java.util.Map;
|
| 16 |
import java.util.Set;
|
16 |
import java.util.Set;
|
| 17 |
import java.util.stream.Collectors;
|
17 |
import java.util.stream.Collectors;
|
| - |
|
18 |
import java.util.stream.Stream;
|
| 18 |
|
19 |
|
| 19 |
import org.apache.logging.log4j.LogManager;
|
20 |
import org.apache.logging.log4j.LogManager;
|
| 20 |
import org.apache.logging.log4j.Logger;
|
21 |
import org.apache.logging.log4j.Logger;
|
| 21 |
import org.apache.poi.ss.usermodel.Cell;
|
22 |
import org.apache.poi.ss.usermodel.Cell;
|
| 22 |
import org.apache.poi.ss.usermodel.CellType;
|
23 |
import org.apache.poi.ss.usermodel.CellType;
|
| Line 361... |
Line 362... |
| 361 |
"FOFO ID", row.getCell(0).toString(), "TGLSTNG_VE_1010");
|
362 |
"FOFO ID", row.getCell(0).toString(), "TGLSTNG_VE_1010");
|
| 362 |
LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
|
363 |
LOGGER.error("Excel file parse error : ", profitMandiBusinessException);
|
| 363 |
throw profitMandiBusinessException;
|
364 |
throw profitMandiBusinessException;
|
| 364 |
}
|
365 |
}
|
| 365 |
List<Integer> targets = new ArrayList<>();
|
366 |
List<Integer> targets = new ArrayList<>();
|
| - |
|
367 |
long targetsSize = existingOffer.getTargetSlabs().get(0).getItemCriteriaPayouts().stream().flatMap(x->x.getPayoutSlabs().stream()).collect(Collectors.counting());
|
| 366 |
for (int cellNumber = 1; cellNumber <= existingOffer.getTargetSlabs().size(); cellNumber++) {
|
368 |
for (int cellNumber = 1; cellNumber <= targetsSize; cellNumber++) {
|
| 367 |
if (row.getCell(cellNumber) != null
|
369 |
if (row.getCell(cellNumber) != null
|
| 368 |
&& row.getCell(cellNumber).getCellTypeEnum() == CellType.NUMERIC) {
|
370 |
&& row.getCell(cellNumber).getCellTypeEnum() == CellType.NUMERIC) {
|
| 369 |
targets.add((int) row.getCell(cellNumber).getNumericCellValue());
|
371 |
targets.add((int) row.getCell(cellNumber).getNumericCellValue());
|
| 370 |
} else {
|
372 |
} else {
|
| 371 |
ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(
|
373 |
ProfitMandiBusinessException profitMandiBusinessException = new ProfitMandiBusinessException(
|