| Line 1131... |
Line 1131... |
| 1131 |
|
1131 |
|
| 1132 |
throw new Exception();
|
1132 |
throw new Exception();
|
| 1133 |
|
1133 |
|
| 1134 |
}
|
1134 |
}
|
| 1135 |
|
1135 |
|
| 1136 |
public void sendDailySalesReportNotificationToPartner()
|
1136 |
public void sendDailySalesReportNotificationToPartner(Integer fofoIdInt)
|
| 1137 |
throws ProfitMandiBusinessException, MessagingException, IOException {
|
1137 |
throws ProfitMandiBusinessException, MessagingException, IOException {
|
| 1138 |
LocalDateTime now = LocalDateTime.now();
|
1138 |
LocalDateTime now = LocalDateTime.now();
|
| 1139 |
LocalDateTime from = LocalDateTime.of(now.getYear(), now.getMonth(), now.getDayOfMonth(), 00, 00);
|
1139 |
LocalDateTime from = LocalDateTime.of(now.getYear(), now.getMonth(), now.getDayOfMonth(), 00, 00);
|
| 1140 |
Map<Integer, Double> salesByFofoIdMap = new HashMap<>();
|
1140 |
Map<Integer, Double> salesByFofoIdMap = new HashMap<>();
|
| - |
|
1141 |
List<Integer> fofoIds = null;
|
| - |
|
1142 |
if(fofoIdInt==null) {
|
| - |
|
1143 |
fofoIds = Arrays.asList(fofoIdInt);
|
| - |
|
1144 |
} else {
|
| 1141 |
List<Integer> fofoIds = fofoStoreRepository.selectAll().stream().filter(x->x.isActive()).map(x->x.getId()).collect(Collectors.toList());
|
1145 |
fofoIds = fofoStoreRepository.selectAll().stream().filter(x->x.isActive()).map(x->x.getId()).collect(Collectors.toList());
|
| - |
|
1146 |
}
|
| 1142 |
List<PartnerTargetDetails> partnerTargetDetails = partnerTargetRepository
|
1147 |
List<PartnerTargetDetails> partnerTargetDetails = partnerTargetRepository
|
| 1143 |
.selectAllGeEqAndLeEqStartDateAndEndDate(now);
|
1148 |
.selectAllGeEqAndLeEqStartDateAndEndDate(now);
|
| 1144 |
DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("h a");
|
1149 |
DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("h a");
|
| 1145 |
|
1150 |
|
| 1146 |
Map<Integer, Float> dailyTarget = new HashMap<>();
|
1151 |
Map<Integer, Float> dailyTarget = new HashMap<>();
|