Subversion Repositories SmartDukaan

Rev

Rev 34880 | Rev 34903 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34880 Rev 34897
Line 159... Line 159...
159
 
159
 
160
    @Autowired
160
    @Autowired
161
    UserWalletHistoryRepository userWalletHistoryRepository;
161
    UserWalletHistoryRepository userWalletHistoryRepository;
162
 
162
 
163
    public void test() throws Exception {
163
    public void test() throws Exception {
164
        System.out.println("test start");
164
        generateBiReport();
165
        //partnerStatsService.getAllPartnerStats();
-
 
166
        this.rbmTargetService.getRemainingDaysInMonth(LocalDate.now().atStartOfDay().toLocalDate());
-
 
167
        this.rbmTargetService.getRemainingDaysInMonth(YearMonth.now().atDay(1));
-
 
168
        System.out.println("test end");
165
        System.out.println("test end");
169
 
166
 
170
    }
167
    }
171
 
168
 
172
    public void generateBiReport() throws Exception {
169
    public void generateBiReport() throws Exception {
Line 881... Line 878...
881
 
878
 
882
            float poValue = partnerDailyInvestmentMap.get(fofoId) != null ?  partnerDailyInvestmentMap.get(fofoId).getUnbilledAmount() : 0f;
879
            float poValue = partnerDailyInvestmentMap.get(fofoId) != null ?  partnerDailyInvestmentMap.get(fofoId).getUnbilledAmount() : 0f;
883
 
880
 
884
            float poAndBilledValue = (float) (currentMonthNetSecondary + poValue);
881
            float poAndBilledValue = (float) (currentMonthNetSecondary + poValue);
885
 
882
 
886
            double todayRequiredDrr = rbmTargetService.calculateFofoIdTodayTarget(fofoId, currentMonthNetSecondary,startOfToday.toLocalDate());
-
 
887
 
-
 
888
            double monthDay1Drr = rbmTargetService.calculateFofoIdTodayTarget(fofoId,0d,currentMonth.atDay(1));
883
            double monthDay1Drr = rbmTargetService.calculateFofoIdTodayTarget(fofoId,0d,currentMonth.atDay(1));
-
 
884
            double todayRequiredDrr = 0;
889
 
885
 
-
 
886
            if(monthDay1Drr != 0d){
-
 
887
                todayRequiredDrr = rbmTargetService.calculateFofoIdTodayTarget(fofoId, currentMonthNetSecondary,startOfToday.toLocalDate());
-
 
888
            }
890
 
889
 
891
            double gotDrrPercent = (todayRequiredDrr / monthDay1Drr) * 100;
890
            double gotDrrPercent = (todayRequiredDrr / monthDay1Drr) * 100;
892
 
891
 
893
            long drrPercentDisplay = Math.round(Math.abs(gotDrrPercent));
892
            long drrPercentDisplay = Math.round(Math.abs(gotDrrPercent));
894
 
893