| Line 744... |
Line 744... |
| 744 |
}
|
744 |
}
|
| 745 |
}
|
745 |
}
|
| 746 |
return partnerTargetModels;
|
746 |
return partnerTargetModels;
|
| 747 |
}
|
747 |
}
|
| 748 |
|
748 |
|
| 749 |
public static void writeDailySaleReportVsTarget(Map<Integer, Float> targetValues, Map<Integer, Double> saleValues,
|
749 |
public static void writeDailySaleReportVsTarget(String targetName,Map<Integer, Float> targetValues, Map<Integer, Double> saleValues,
|
| 750 |
Map<Integer, CustomRetailer> fofoIdsAndCustomRetailer, Map<Integer, String> fofoIdsAndSlabNames,
|
750 |
Map<Integer, CustomRetailer> fofoIdsAndCustomRetailer, Map<Integer, String> fofoIdsAndSlabNames,
|
| 751 |
Map<Integer, Double> monthlyTargetAchievementPercentage, Map<Integer, Float> dailyAverageSale,
|
751 |
Map<Integer, Double> monthlyTargetAchievementPercentage, Map<Integer, Float> dailyAverageSale,
|
| 752 |
Map<Integer, Double> remainingMonthlyTargets, Map<Integer, Double> todayAchievements,
|
752 |
Map<Integer, Double> remainingMonthlyTargets, Map<Integer, Double> todayAchievements,
|
| 753 |
List<Integer> fofoIds,
|
753 |
List<Integer> fofoIds,
|
| 754 |
Map<Integer, String> salesHeadNameAndFofoIdMap, OutputStream outputStream) {
|
754 |
Map<Integer, String> salesHeadNameAndFofoIdMap, OutputStream outputStream) {
|
| Line 758... |
Line 758... |
| 758 |
|
758 |
|
| 759 |
SXSSFSheet sheet = workbook.createSheet("DailySaleReports");
|
759 |
SXSSFSheet sheet = workbook.createSheet("DailySaleReports");
|
| 760 |
sheet.trackAllColumnsForAutoSizing();
|
760 |
sheet.trackAllColumnsForAutoSizing();
|
| 761 |
|
761 |
|
| 762 |
Row rowHeader = sheet.createRow(0);
|
762 |
Row rowHeader = sheet.createRow(0);
|
| - |
|
763 |
Cell cellTarget = rowHeader.createCell(0);
|
| - |
|
764 |
cellTarget.setCellValue("Target Name");
|
| 763 |
Cell cellBusiness = rowHeader.createCell(0);
|
765 |
Cell cellBusiness = rowHeader.createCell(1);
|
| 764 |
cellBusiness.setCellValue("Business Manager");
|
766 |
cellBusiness.setCellValue("Business Manager");
|
| 765 |
Cell cellAssistant = rowHeader.createCell(1);
|
767 |
Cell cellAssistant = rowHeader.createCell(2);
|
| 766 |
cellAssistant.setCellValue("Assistant Manager");
|
768 |
cellAssistant.setCellValue("Assistant Manager");
|
| 767 |
Cell cellFOfoId = rowHeader.createCell(2);
|
769 |
Cell cellFOfoId = rowHeader.createCell(3);
|
| 768 |
cellFOfoId.setCellValue("FoFoId");
|
770 |
cellFOfoId.setCellValue("FoFoId");
|
| 769 |
Cell cellStoreName = rowHeader.createCell(3);
|
771 |
Cell cellStoreName = rowHeader.createCell(4);
|
| 770 |
cellStoreName.setCellValue("Store Name");
|
772 |
cellStoreName.setCellValue("Store Name");
|
| 771 |
Cell cellTargetValue = rowHeader.createCell(4);
|
773 |
Cell cellTargetValue = rowHeader.createCell(5);
|
| 772 |
cellTargetValue.setCellValue("Target Value");
|
774 |
cellTargetValue.setCellValue("Target Value");
|
| 773 |
Cell cellDailyTarget = rowHeader.createCell(5);
|
775 |
Cell cellDailyTarget = rowHeader.createCell(6);
|
| 774 |
cellDailyTarget.setCellValue("Daily Target");
|
776 |
cellDailyTarget.setCellValue("Daily Target");
|
| 775 |
Cell cellTodayAchievement = rowHeader.createCell(6);
|
777 |
Cell cellTodayAchievement = rowHeader.createCell(7);
|
| 776 |
cellTodayAchievement.setCellValue("Today's Sale");
|
778 |
cellTodayAchievement.setCellValue("Today's Sale");
|
| 777 |
Cell cellMonthlySaleValue = rowHeader.createCell(7);
|
779 |
Cell cellMonthlySaleValue = rowHeader.createCell(8);
|
| 778 |
cellMonthlySaleValue.setCellValue("Total Sale");
|
780 |
cellMonthlySaleValue.setCellValue("Total Sale");
|
| 779 |
Cell cellMonthlySaleValuePercentage = rowHeader.createCell(8);
|
781 |
Cell cellMonthlySaleValuePercentage = rowHeader.createCell(9);
|
| 780 |
cellMonthlySaleValuePercentage.setCellValue("Total Sale%");
|
782 |
cellMonthlySaleValuePercentage.setCellValue("Total Sale%");
|
| 781 |
Cell cellRemainingTarget = rowHeader.createCell(9);
|
783 |
Cell cellRemainingTarget = rowHeader.createCell(10);
|
| 782 |
cellRemainingTarget.setCellValue("Remaining");
|
784 |
cellRemainingTarget.setCellValue("Remaining");
|
| 783 |
Cell cellEligibility = rowHeader.createCell(10);
|
785 |
Cell cellEligibility = rowHeader.createCell(11);
|
| 784 |
cellEligibility.setCellValue("Eligibility");
|
786 |
cellEligibility.setCellValue("Eligibility");
|
| 785 |
Font font = workbook.createFont();
|
787 |
Font font = workbook.createFont();
|
| 786 |
CellStyle cellStyle = workbook.createCellStyle();
|
788 |
CellStyle cellStyle = workbook.createCellStyle();
|
| 787 |
font.setBold(true);
|
789 |
font.setBold(true);
|
| 788 |
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
790 |
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
| Line 795... |
Line 797... |
| 795 |
}
|
797 |
}
|
| 796 |
int rownum = 1;
|
798 |
int rownum = 1;
|
| 797 |
for (Integer fofoId : fofoIds) {
|
799 |
for (Integer fofoId : fofoIds) {
|
| 798 |
Row row = sheet.createRow(rownum++);
|
800 |
Row row = sheet.createRow(rownum++);
|
| 799 |
int cellnum = 0;
|
801 |
int cellnum = 0;
|
| - |
|
802 |
Cell cellTargetName = row.createCell(cellnum++);
|
| - |
|
803 |
if (!targetName.isEmpty()) {
|
| - |
|
804 |
cellTargetName.setCellValue(targetValues.get(targetName));
|
| - |
|
805 |
} else {
|
| - |
|
806 |
cellTargetName.setCellValue("");
|
| - |
|
807 |
}
|
| 800 |
Cell cellBusinessManager = row.createCell(cellnum++);
|
808 |
Cell cellBusinessManager = row.createCell(cellnum++);
|
| 801 |
if (salesHeadNameAndFofoIdMap.get(fofoId) != null) {
|
809 |
if (salesHeadNameAndFofoIdMap.get(fofoId) != null) {
|
| 802 |
if (salesHeadNameAndFofoIdMap.get(fofoId).equals("Kamal")) {
|
810 |
if (salesHeadNameAndFofoIdMap.get(fofoId).equals("Kamal")) {
|
| 803 |
cellBusinessManager.setCellValue("Mohinder");
|
811 |
cellBusinessManager.setCellValue("Mohinder");
|
| 804 |
} else {
|
812 |
} else {
|