| Line 80... |
Line 80... |
| 80 |
import java.util.Map.Entry;
|
80 |
import java.util.Map.Entry;
|
| 81 |
import java.util.stream.Collectors;
|
81 |
import java.util.stream.Collectors;
|
| 82 |
|
82 |
|
| 83 |
import static in.shop2020.model.v1.order.OrderStatus.*;
|
83 |
import static in.shop2020.model.v1.order.OrderStatus.*;
|
| 84 |
|
84 |
|
| - |
|
85 |
|
| 85 |
@Controller
|
86 |
@Controller
|
| 86 |
@Transactional(rollbackOn = Throwable.class)
|
87 |
@Transactional(rollbackOn = Throwable.class)
|
| 87 |
public class DashboardController {
|
88 |
public class DashboardController {
|
| 88 |
|
89 |
|
| 89 |
List<String> emails = Arrays.asList("kamini.sharma@smartdukaan.com", "neeraj.gupta@smartdukaan.com",
|
90 |
List<String> emails = Arrays.asList("kamini.sharma@smartdukaan.com", "neeraj.gupta@smartdukaan.com",
|
| Line 2179... |
Line 2180... |
| 2179 |
partnerMonthSaleMap = partnerMonthlySaleModels.stream()
|
2180 |
partnerMonthSaleMap = partnerMonthlySaleModels.stream()
|
| 2180 |
.collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.toMap(
|
2181 |
.collect(Collectors.groupingBy(x -> x.getFofoId(), Collectors.toMap(
|
| 2181 |
x -> YearMonth.parse(x.getYearMonth(), dateTimeFormatter), x -> (double) x.getAmount())));
|
2182 |
x -> YearMonth.parse(x.getYearMonth(), dateTimeFormatter), x -> (double) x.getAmount())));
|
| 2182 |
}
|
2183 |
}
|
| 2183 |
|
2184 |
|
| 2184 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getFofoRetailerUserId(fofoIds);
|
2185 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers().entrySet().stream()
|
| - |
|
2186 |
.filter(x -> fofoIds.contains(x.getKey()))
|
| - |
|
2187 |
.collect(Collectors.toMap(x -> x.getKey(), x -> x.getValue()));
|
| 2185 |
|
2188 |
|
| 2186 |
model.addAttribute("customRetailerMap", customRetailerMap);
|
2189 |
model.addAttribute("customRetailerMap", customRetailerMap);
|
| 2187 |
|
2190 |
|
| 2188 |
model.addAttribute("customRetailerMap", customRetailerMap);
|
2191 |
model.addAttribute("customRetailerMap", customRetailerMap);
|
| 2189 |
|
2192 |
|
| Line 2219... |
Line 2222... |
| 2219 |
Collectors.groupingBy(x -> YearMonth.from(x.getCreateTimestamp()),
|
2222 |
Collectors.groupingBy(x -> YearMonth.from(x.getCreateTimestamp()),
|
| 2220 |
Collectors.summingDouble(x -> Math.round(x.getTotalAmount().doubleValue())))));
|
2223 |
Collectors.summingDouble(x -> Math.round(x.getTotalAmount().doubleValue())))));
|
| 2221 |
|
2224 |
|
| 2222 |
LOGGER.info("orders" + orders);
|
2225 |
LOGGER.info("orders" + orders);
|
| 2223 |
|
2226 |
|
| 2224 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getFofoRetailerUserId(fofoIds);
|
2227 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers().entrySet().stream()
|
| 2225 |
|
- |
|
| - |
|
2228 |
.filter(x -> fofoIds.contains(x.getKey()))
|
| - |
|
2229 |
.collect(Collectors.toMap(x -> x.getKey(), x -> x.getValue()));
|
| 2226 |
model.addAttribute("customRetailerMap", customRetailerMap);
|
2230 |
model.addAttribute("customRetailerMap", customRetailerMap);
|
| 2227 |
|
2231 |
|
| 2228 |
model.addAttribute("customRetailerMap", customRetailerMap);
|
2232 |
model.addAttribute("customRetailerMap", customRetailerMap);
|
| 2229 |
|
2233 |
|
| 2230 |
model.addAttribute("partnerMonthPurchaseMap", partnerMonthPurchaseMap);
|
2234 |
model.addAttribute("partnerMonthPurchaseMap", partnerMonthPurchaseMap);
|