| Line 2... |
Line 2... |
| 2 |
|
2 |
|
| 3 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
3 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 4 |
import com.spice.profitmandi.dao.entity.fofo.MonthlyTarget;
|
4 |
import com.spice.profitmandi.dao.entity.fofo.MonthlyTarget;
|
| 5 |
import com.spice.profitmandi.dao.entity.inventory.RbmAchievements;
|
5 |
import com.spice.profitmandi.dao.entity.inventory.RbmAchievements;
|
| 6 |
import com.spice.profitmandi.dao.entity.inventory.RbmTargets;
|
6 |
import com.spice.profitmandi.dao.entity.inventory.RbmTargets;
|
| 7 |
import com.spice.profitmandi.dao.entity.logistics.PublicHolidays;
|
- |
|
| 8 |
import com.spice.profitmandi.dao.model.*;
|
7 |
import com.spice.profitmandi.dao.model.*;
|
| 9 |
import com.spice.profitmandi.dao.repository.catalog.RbmAchievementsRepository;
|
8 |
import com.spice.profitmandi.dao.repository.catalog.RbmAchievementsRepository;
|
| 10 |
import com.spice.profitmandi.dao.repository.catalog.RbmTargetsRepository;
|
9 |
import com.spice.profitmandi.dao.repository.catalog.RbmTargetsRepository;
|
| 11 |
import com.spice.profitmandi.dao.repository.fofo.MonthlyTargetRepository;
|
10 |
import com.spice.profitmandi.dao.repository.fofo.MonthlyTargetRepository;
|
| 12 |
import com.spice.profitmandi.dao.repository.logistics.PublicHolidaysRepository;
|
11 |
import com.spice.profitmandi.dao.repository.logistics.PublicHolidaysRepository;
|
| Line 118... |
Line 117... |
| 118 |
Object result = nativeQuery.getSingleResult();
|
117 |
Object result = nativeQuery.getSingleResult();
|
| 119 |
return result != null ? ((Number) result).intValue() : 0;
|
118 |
return result != null ? ((Number) result).intValue() : 0;
|
| 120 |
}
|
119 |
}
|
| 121 |
|
120 |
|
| 122 |
|
121 |
|
| - |
|
122 |
|
| 123 |
@Override
|
123 |
@Override
|
| 124 |
public List<RbmArrViewModel> getRbmTodayArr() throws Exception {
|
124 |
public List<RbmArrViewModel> getRbmTodayArr() throws Exception {
|
| 125 |
LocalDate todayDate = LocalDate.now();
|
125 |
LocalDate todayDate = LocalDate.now();
|
| 126 |
return getRbmTodayArr(todayDate);
|
126 |
return getRbmTodayArr(todayDate);
|
| 127 |
}
|
127 |
}
|
| Line 250... |
Line 250... |
| 250 |
LOGGER.info("warehouseRbmTargetModels {}", warehouseRbmTargetModels);
|
250 |
LOGGER.info("warehouseRbmTargetModels {}", warehouseRbmTargetModels);
|
| 251 |
List<TodayAchievedMovementModel> todayAchievedMovementModels = getMovementWiseAchievementByDate(todayDate, todayDate.plusDays(1));
|
251 |
List<TodayAchievedMovementModel> todayAchievedMovementModels = getMovementWiseAchievementByDate(todayDate, todayDate.plusDays(1));
|
| 252 |
|
252 |
|
| 253 |
List<MTDAchievedTargetModel> mtdAchievedTargetModels = getDateWiseAchievedTargetOfRbm(startDateOfMonthDay1, todayDate);
|
253 |
List<MTDAchievedTargetModel> mtdAchievedTargetModels = getDateWiseAchievedTargetOfRbm(startDateOfMonthDay1, todayDate);
|
| 254 |
|
254 |
|
| 255 |
int remainingWorkingDaysCount = getWorkingDaysCount(todayDate);
|
255 |
int remainingWorkingDaysCount = (int) getRemainingDaysInMonth(todayDate);
|
| 256 |
|
256 |
|
| 257 |
List<RbmTargets> todayRbmTargetsList = rbmTargetsRepository.selectTargetsByDates(todayDate.atStartOfDay(), todayDate.atTime(LocalTime.MAX));
|
257 |
List<RbmTargets> todayRbmTargetsList = rbmTargetsRepository.selectTargetsByDates(todayDate.atStartOfDay(), todayDate.atTime(LocalTime.MAX));
|
| 258 |
|
258 |
|
| 259 |
LOGGER.info("todayRbmTargetsList {}", todayRbmTargetsList);
|
259 |
LOGGER.info("todayRbmTargetsList {}", todayRbmTargetsList);
|
| 260 |
|
260 |
|
| Line 344... |
Line 344... |
| 344 |
List<WarehouseRbmTargetModel> warehouseRbmTargetModels = this.getWarehouseWiseRbmMonthlyTarget();
|
344 |
List<WarehouseRbmTargetModel> warehouseRbmTargetModels = this.getWarehouseWiseRbmMonthlyTarget();
|
| 345 |
|
345 |
|
| 346 |
List<MTDAchievedTargetModel> mtdAchievedTargetModels = getDateWiseAchievedTargetOfRbm(startDateOfMonthDay1, todayDate);
|
346 |
List<MTDAchievedTargetModel> mtdAchievedTargetModels = getDateWiseAchievedTargetOfRbm(startDateOfMonthDay1, todayDate);
|
| 347 |
|
347 |
|
| 348 |
|
348 |
|
| 349 |
int remainingWorkingDaysCount = getWorkingDaysCount(todayDate);
|
349 |
int remainingWorkingDaysCount = (int) getRemainingDaysInMonth(todayDate);
|
| 350 |
|
350 |
|
| 351 |
List<WarehouseMobileStockByMovementModel> warehouseMobileStockByMovementModels = getWarehouseMobileStockByMovement();
|
351 |
List<WarehouseMobileStockByMovementModel> warehouseMobileStockByMovementModels = getWarehouseMobileStockByMovement();
|
| 352 |
|
352 |
|
| 353 |
for (WarehouseRbmTargetModel rbmTarget : warehouseRbmTargetModels) {
|
353 |
for (WarehouseRbmTargetModel rbmTarget : warehouseRbmTargetModels) {
|
| 354 |
|
354 |
|