Subversion Repositories SmartDukaan

Rev

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

Rev 32052 Rev 32053
Line 230... Line 230...
230
    @RequestMapping(value = "/getSanctionRequest", method = RequestMethod.GET)
230
    @RequestMapping(value = "/getSanctionRequest", method = RequestMethod.GET)
231
    public String getSanctionRequest(HttpServletRequest request, Model model) throws ProfitMandiBusinessException {
231
    public String getSanctionRequest(HttpServletRequest request, Model model) throws ProfitMandiBusinessException {
232
 
232
 
233
        List<SanctionRequest> sanctionRequests = sanctionRequestRepository.selectByDate(LocalDate.now());
233
        List<SanctionRequest> sanctionRequests = sanctionRequestRepository.selectByDate(LocalDate.now());
234
 
234
 
235
        List<Integer> authIds = sanctionRequests.stream().map(x -> x.getAuthId()).collect(Collectors.toList());
-
 
236
        Map<Integer, String> authMap = authRepository.selectAllAuthUserByIds(authIds).stream().collect(Collectors.toMap(x -> x.getId(), x -> x.getFullName()));
-
 
237
 
235
 
238
        if (!sanctionRequests.isEmpty()) {
236
        if (!sanctionRequests.isEmpty()) {
239
 
237
 
-
 
238
            List<Integer> authIds = sanctionRequests.stream().map(x -> x.getAuthId()).collect(Collectors.toList());
-
 
239
 
-
 
240
            Map<Integer, String> authMap = authRepository.selectAllAuthUserByIds(authIds).stream().collect(Collectors.toMap(x -> x.getId(), x -> x.getFullName()));
-
 
241
 
-
 
242
 
240
            List<Integer> fofoIds = sanctionRequests.stream().map(x -> x.getFofoId()).collect(Collectors.toList());
243
            List<Integer> fofoIds = sanctionRequests.stream().map(x -> x.getFofoId()).collect(Collectors.toList());
241
 
244
 
242
            Map<Integer, Long> partnerCreditDaysMap = new HashMap<>();
245
            Map<Integer, Long> partnerCreditDaysMap = new HashMap<>();
243
 
246
 
244
            Map<Integer, Integer> partnerActiveLoanMap = new HashMap<>();
247
            Map<Integer, Integer> partnerActiveLoanMap = new HashMap<>();
Line 272... Line 275...
272
 
275
 
273
            model.addAttribute("partnerDailyInvestmentMap", partnerDailyInvestmentMap);
276
            model.addAttribute("partnerDailyInvestmentMap", partnerDailyInvestmentMap);
274
            model.addAttribute("sdCreditRequirementMap", sdCreditRequirementMap);
277
            model.addAttribute("sdCreditRequirementMap", sdCreditRequirementMap);
275
 
278
 
276
            model.addAttribute("userWalletMap", userWalletMap);
279
            model.addAttribute("userWalletMap", userWalletMap);
-
 
280
            model.addAttribute("authMap", authMap);
-
 
281
 
277
 
282
 
278
        }
283
        }
279
 
284
 
280
        model.addAttribute("sanctionRequests", sanctionRequests);
285
        model.addAttribute("sanctionRequests", sanctionRequests);
281
        model.addAttribute("authMap", authMap);
-
 
282
 
286
 
283
        model.addAttribute("sanctionStatus", SanctionStatus.values());
287
        model.addAttribute("sanctionStatus", SanctionStatus.values());
284
        return "sanction-request";
288
        return "sanction-request";
285
 
289
 
286
    }
290
    }