Subversion Repositories SmartDukaan

Rev

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

Rev 33624 Rev 33630
Line 191... Line 191...
191
    @RequestMapping(value = "/generateLoi", method = RequestMethod.GET)
191
    @RequestMapping(value = "/generateLoi", method = RequestMethod.GET)
192
    public String generateLoi(HttpServletRequest request, @RequestParam int loiId, Model model) throws ProfitMandiBusinessException {
192
    public String generateLoi(HttpServletRequest request, @RequestParam int loiId, Model model) throws ProfitMandiBusinessException {
193
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
193
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
194
        int authId = authRepository.selectByEmailOrMobile(loginDetails.getEmailId()).getId();
194
        int authId = authRepository.selectByEmailOrMobile(loginDetails.getEmailId()).getId();
195
        LoiForm loiForm = loiFormRepository.selectById(loiId);
195
        LoiForm loiForm = loiFormRepository.selectById(loiId);
-
 
196
        String filledBy = authRepository.selectByEmailOrMobile(loiForm.getFilledBy()).getFullName();
196
        loiForm.setLoiGeneratedBy(authId);
197
        loiForm.setLoiGeneratedBy(authId);
197
        loiForm.setLoiGeneratedOn(LocalDateTime.now());
198
        loiForm.setLoiGeneratedOn(LocalDateTime.now());
198
        loiForm.setStatus(LoiStatus.LOI_GENERATED);
199
        loiForm.setStatus(LoiStatus.LOI_GENERATED);
199
        BrandFee brandFee = brandFeeRepository.selectById(1);
200
        BrandFee brandFee = brandFeeRepository.selectById(1);
200
        BrandFee givenFee = brandFeeRepository.selectById(loiForm.getBrandFeeId());
201
        BrandFee givenFee = brandFeeRepository.selectById(loiForm.getBrandFeeId());
Line 205... Line 206...
205
        model.addAttribute("brandFee", brandFee);
206
        model.addAttribute("brandFee", brandFee);
206
        model.addAttribute("givenFee", givenFee);
207
        model.addAttribute("givenFee", givenFee);
207
        model.addAttribute("brandFeeCollection", brandFeeCollection);
208
        model.addAttribute("brandFeeCollection", brandFeeCollection);
208
        model.addAttribute("address", address);
209
        model.addAttribute("address", address);
209
        model.addAttribute("pod", loiForm);
210
        model.addAttribute("pod", loiForm);
-
 
211
        model.addAttribute("filledBy", filledBy);
210
        return "auto-Loi";
212
        return "auto-Loi";
211
 
213
 
212
    }
214
    }
213
 
215
 
214
    @RequestMapping(value = "/saveLoiDoc", method = RequestMethod.POST)
216
    @RequestMapping(value = "/saveLoiDoc", method = RequestMethod.POST)