| Line 234... |
Line 234... |
| 234 |
private Map<String, Object> getSales(int fofoId) {
|
234 |
private Map<String, Object> getSales(int fofoId) {
|
| 235 |
|
235 |
|
| 236 |
Map<String, Object> salesMap = new LinkedHashMap<>();
|
236 |
Map<String, Object> salesMap = new LinkedHashMap<>();
|
| 237 |
LocalDateTime curDate = LocalDate.now().atStartOfDay();
|
237 |
LocalDateTime curDate = LocalDate.now().atStartOfDay();
|
| 238 |
int monthLength = LocalDate.now().lengthOfMonth();
|
238 |
int monthLength = LocalDate.now().lengthOfMonth();
|
| 239 |
Float todaySale = fofoOrderItemRepository.selectSumAmountGroupByRetailer(curDate, curDate.with(LocalTime.MAX),
|
239 |
Double todaySale = fofoOrderItemRepository.selectSumAmountGroupByRetailer(curDate, curDate.with(LocalTime.MAX),
|
| 240 |
fofoId, false).get(fofoId);
|
240 |
fofoId, false).get(fofoId);
|
| 241 |
Float mtdSale = fofoOrderItemRepository.selectSumAmountGroupByRetailer(curDate.withDayOfMonth(1),
|
241 |
Double mtdSale = fofoOrderItemRepository.selectSumAmountGroupByRetailer(curDate.withDayOfMonth(1),
|
| 242 |
curDate.with(LocalTime.MAX), fofoId, false).get(fofoId);
|
242 |
curDate.with(LocalTime.MAX), fofoId, false).get(fofoId);
|
| 243 |
Float lmtdSale = fofoOrderItemRepository.selectSumAmountGroupByRetailer(curDate.withDayOfMonth(1).minusMonths(1),
|
243 |
Double lmtdSale = fofoOrderItemRepository.selectSumAmountGroupByRetailer(curDate.withDayOfMonth(1).minusMonths(1),
|
| 244 |
curDate.with(LocalTime.MAX).minusMonths(1), fofoId, false).get(fofoId);
|
244 |
curDate.with(LocalTime.MAX).minusMonths(1), fofoId, false).get(fofoId);
|
| 245 |
|
245 |
|
| 246 |
List<PartnerTargetDetails> partnerTargetDetails = partnerTargetRepository
|
246 |
List<PartnerTargetDetails> partnerTargetDetails = partnerTargetRepository
|
| 247 |
.selectAllGeEqAndLeEqStartDateAndEndDate(LocalDateTime.now());
|
247 |
.selectAllGeEqAndLeEqStartDateAndEndDate(LocalDateTime.now());
|
| 248 |
if (partnerTargetDetails.isEmpty()) {
|
248 |
if (partnerTargetDetails.isEmpty()) {
|