| Line 2241... |
Line 2241... |
| 2241 |
Set<String> brands = selectedCatalogItemMap.values().stream().map(x -> x.getBrand().toLowerCase())
|
2241 |
Set<String> brands = selectedCatalogItemMap.values().stream().map(x -> x.getBrand().toLowerCase())
|
| 2242 |
.collect(Collectors.toSet());
|
2242 |
.collect(Collectors.toSet());
|
| 2243 |
|
2243 |
|
| 2244 |
int warehouseId = poItemWarehouseModel.getWarehouseId();
|
2244 |
int warehouseId = poItemWarehouseModel.getWarehouseId();
|
| 2245 |
for (String brand : brands) {
|
2245 |
for (String brand : brands) {
|
| 2246 |
Map<Integer, Item> brandSpecificCatalogItemMap = selectedCatalogItemMap.entrySet().stream()
|
2246 |
List<String> modelNames = selectedCatalogItemMap.entrySet().stream()
|
| 2247 |
.filter(x -> x.getValue().getBrand().equals(brand)).collect(Collectors.toMap(x -> x.getKey(), x -> x.getValue()));
|
2247 |
.filter(x -> x.getValue().getBrand().equals(brand)).map(x -> x.getValue().getItemDescriptionNoColor()).collect(Collectors.toList());
|
| 2248 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
2248 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
| 2249 |
sendNotificationModel.setCampaignName("SendPo");
|
2249 |
sendNotificationModel.setCampaignName("SendPo");
|
| 2250 |
sendNotificationModel.setTitle(String.format(PO_TITLE_STRING));
|
2250 |
sendNotificationModel.setTitle(String.format(PO_TITLE_STRING));
|
| 2251 |
StringBuilder stringBuilder = new StringBuilder();
|
- |
|
| 2252 |
/*poItemWarehouseModel.getCatalogIds().stream().forEach(catalogId -> {
|
- |
|
| 2253 |
stringBuilder.append(selectedCatalogItemMap.get(catalogId).getItemDescription()).append("\n");
|
- |
|
| 2254 |
});*/
|
- |
|
| 2255 |
sendNotificationModel.setMessage(stringBuilder.toString());
|
2251 |
sendNotificationModel.setMessage(String.join(", ", modelNames));
|
| 2256 |
sendNotificationModel.setType("url");
|
2252 |
sendNotificationModel.setType("url");
|
| 2257 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
2253 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
|
| 2258 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
2254 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
| 2259 |
sendNotificationModel.setMessageType(MessageType.notification);
|
2255 |
sendNotificationModel.setMessageType(MessageType.notification);
|
| 2260 |
|
2256 |
|