| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.common.util;
|
1 |
package com.spice.profitmandi.common.util;
|
| 2 |
|
2 |
|
| 3 |
import java.io.IOException;
|
3 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 4 |
import java.io.InputStream;
|
- |
|
| 5 |
import java.io.OutputStream;
|
- |
|
| 6 |
import java.time.LocalDate;
|
4 |
import com.spice.profitmandi.common.model.*;
|
| 7 |
import java.time.LocalDateTime;
|
5 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
| 8 |
import java.time.LocalTime;
|
- |
|
| 9 |
import java.time.ZoneId;
|
- |
|
| 10 |
import java.util.ArrayList;
|
- |
|
| 11 |
import java.util.Arrays;
|
- |
|
| 12 |
import java.util.Date;
|
- |
|
| 13 |
import java.util.LinkedHashMap;
|
- |
|
| 14 |
import java.util.List;
|
- |
|
| 15 |
import java.util.Map;
|
- |
|
| 16 |
import java.util.Set;
|
- |
|
| 17 |
|
- |
|
| 18 |
import org.apache.logging.log4j.LogManager;
|
6 |
import org.apache.logging.log4j.LogManager;
|
| 19 |
import org.apache.logging.log4j.Logger;
|
7 |
import org.apache.logging.log4j.Logger;
|
| 20 |
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
8 |
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
| 21 |
import org.apache.poi.ss.usermodel.Cell;
|
- |
|
| 22 |
import org.apache.poi.ss.usermodel.CellStyle;
|
- |
|
| 23 |
import org.apache.poi.ss.usermodel.CellType;
|
- |
|
| 24 |
import org.apache.poi.ss.usermodel.Font;
|
- |
|
| 25 |
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
- |
|
| 26 |
import org.apache.poi.ss.usermodel.Row;
|
9 |
import org.apache.poi.ss.usermodel.*;
|
| 27 |
import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
|
10 |
import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
|
| 28 |
import org.apache.poi.ss.util.CellRangeAddress;
|
11 |
import org.apache.poi.ss.util.CellRangeAddress;
|
| 29 |
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
12 |
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
| 30 |
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
13 |
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
| 31 |
import org.apache.poi.xssf.usermodel.XSSFRow;
|
14 |
import org.apache.poi.xssf.usermodel.XSSFRow;
|
| 32 |
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
15 |
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
| 33 |
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
16 |
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
| 34 |
|
17 |
|
| 35 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
18 |
import java.io.IOException;
|
| 36 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
19 |
import java.io.InputStream;
|
| 37 |
import com.spice.profitmandi.common.model.InventoryItemAgingModel;
|
- |
|
| 38 |
import com.spice.profitmandi.common.model.InventoryItemAgingValue;
|
- |
|
| 39 |
import com.spice.profitmandi.common.model.ItemCompleteLedgerModel;
|
20 |
import java.io.OutputStream;
|
| 40 |
import com.spice.profitmandi.common.model.PartnerTargetModel;
|
21 |
import java.time.LocalDateTime;
|
| 41 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
- |
|
| 42 |
import com.spice.profitmandi.common.model.SchemeModel;
|
22 |
import java.time.ZoneId;
|
| 43 |
import com.spice.profitmandi.common.model.TagListingModel;
|
23 |
import java.util.*;
|
| 44 |
|
- |
|
| 45 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
- |
|
| 46 |
|
24 |
|
| 47 |
public class ExcelUtils {
|
25 |
public class ExcelUtils {
|
| 48 |
private static final String TAG_ID = "Tag Id";
|
26 |
private static final String TAG_ID = "Tag Id";
|
| 49 |
private static final String TAG_LABEL = "Tag Label";
|
27 |
private static final String TAG_LABEL = "Tag Label";
|
| 50 |
private static final String ITEM_ID = "Item Id";
|
28 |
private static final String ITEM_ID = "Item Id";
|
| Line 826... |
Line 804... |
| 826 |
}
|
804 |
}
|
| 827 |
|
805 |
|
| 828 |
Cell cellDailyTargetValue1 = row.createCell(cellnum++);
|
806 |
Cell cellDailyTargetValue1 = row.createCell(cellnum++);
|
| 829 |
if (targetIdAndtargetdailyAverageSaleMap.get(targetId) != null) {
|
807 |
if (targetIdAndtargetdailyAverageSaleMap.get(targetId) != null) {
|
| 830 |
String formatting = FormattingUtils
|
808 |
String formatting = FormattingUtils
|
| 831 |
.formatDecimalTwoDigits(targetIdAndtargetdailyAverageSaleMap.get(targetId));
|
809 |
.formatDecimal(targetIdAndtargetdailyAverageSaleMap.get(targetId));
|
| 832 |
cellDailyTargetValue1.setCellValue(formatting);
|
810 |
cellDailyTargetValue1.setCellValue(formatting);
|
| 833 |
} else {
|
811 |
} else {
|
| 834 |
cellDailyTargetValue1.setCellValue(0);
|
812 |
cellDailyTargetValue1.setCellValue(0);
|
| 835 |
}
|
813 |
}
|
| 836 |
Cell cellTodayAchieveMentSaleValue = row.createCell(cellnum++);
|
814 |
Cell cellTodayAchieveMentSaleValue = row.createCell(cellnum++);
|