| Line 131... |
Line 131... |
| 131 |
sb.append("</table>");
|
131 |
sb.append("</table>");
|
| 132 |
|
132 |
|
| 133 |
|
133 |
|
| 134 |
List<WarehouseItemAgeingModel> warehouseAgeQtyModels = getAgeingModelsGtDays(startDate, endDate, 4);
|
134 |
List<WarehouseItemAgeingModel> warehouseAgeQtyModels = getAgeingModelsGtDays(startDate, endDate, 4);
|
| 135 |
|
135 |
|
| - |
|
136 |
Set<Integer> warehouseItemIdSet = warehouseAgeQtyModels.stream().map(WarehouseItemAgeingModel::getItemId).collect(Collectors.toSet());
|
| - |
|
137 |
Map<Integer, Float> warehouseItemDpMap = tagListingRepository.selectByItemIds(warehouseItemIdSet).entrySet().stream()
|
| - |
|
138 |
.collect(Collectors.toMap(x -> x.getKey(), x -> x.getValue().getSellingPrice()));
|
| - |
|
139 |
|
| 136 |
org.apache.commons.io.output.ByteArrayOutputStream byteArrayOutputStream = null;
|
140 |
org.apache.commons.io.output.ByteArrayOutputStream byteArrayOutputStream = null;
|
| 137 |
try {
|
141 |
try {
|
| 138 |
byteArrayOutputStream = FileUtil.getCSVByteStream(Arrays.asList("Vendor", "Category", "Brand", "Model", "Color",
|
142 |
byteArrayOutputStream = FileUtil.getCSVByteStream(Arrays.asList("Vendor", "Category", "Brand", "Model", "Color",
|
| 139 |
"Age", "Warehouse", "Grn On", "In Stock"),
|
143 |
"Age", "Warehouse", "Grn On", "In Stock", "DP"),
|
| 140 |
warehouseAgeQtyModels.stream().map(x -> x.toRow()).collect(Collectors.toList()));
|
144 |
warehouseAgeQtyModels.stream().map(x -> {
|
| - |
|
145 |
List<Object> row = new ArrayList<>(x.toRow());
|
| - |
|
146 |
row.add(warehouseItemDpMap.get(x.getItemId()));
|
| - |
|
147 |
return row;
|
| - |
|
148 |
}).collect(Collectors.toList()));
|
| 141 |
} catch (Exception e) {
|
149 |
} catch (Exception e) {
|
| 142 |
throw new RuntimeException(e);
|
150 |
throw new RuntimeException(e);
|
| 143 |
}
|
151 |
}
|
| 144 |
|
152 |
|
| 145 |
sb.append("</body></html>");
|
153 |
sb.append("</body></html>");
|
| Line 168... |
Line 176... |
| 168 |
|
176 |
|
| 169 |
List<AuthUser> categoryAuthUserList = csService.getAuthUserIds(ProfitMandiConstants.TICKET_CATEGORY_ABM, Arrays.asList(EscalationType.L1, EscalationType.L2, EscalationType.L3));
|
177 |
List<AuthUser> categoryAuthUserList = csService.getAuthUserIds(ProfitMandiConstants.TICKET_CATEGORY_ABM, Arrays.asList(EscalationType.L1, EscalationType.L2, EscalationType.L3));
|
| 170 |
List<String> categoryTeamMails = categoryAuthUserList.stream().map(x -> x.getEmailId()).collect(Collectors.toList());
|
178 |
List<String> categoryTeamMails = categoryAuthUserList.stream().map(x -> x.getEmailId()).collect(Collectors.toList());
|
| 171 |
|
179 |
|
| 172 |
List<String> allEmails = new ArrayList<>(Arrays.asList(
|
180 |
List<String> allEmails = new ArrayList<>(Arrays.asList(
|
| 173 |
"sm@smartdukaan.com",
|
- |
|
| 174 |
"raj.singh@smartdukaan.com",
|
181 |
"raj.singh@smartdukaan.com",
|
| 175 |
"ranu.rajput@smartdukaan.com",
|
182 |
"ranu.rajput@smartdukaan.com",
|
| 176 |
"tarun.verma@smartdukaan.com"
|
183 |
"tarun.verma@smartdukaan.com"
|
| 177 |
));
|
184 |
));
|
| 178 |
|
185 |
|