Subversion Repositories SmartDukaan

Rev

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

Rev 34149 Rev 34195
Line 137... Line 137...
137
            }
137
            }
138
        }
138
        }
139
        List<AuthUser> stateHeadList = csService.getAuthUserIds(ProfitMandiConstants.TICKET_CATEGORY_SALES, Arrays.asList(EscalationType.L2, EscalationType.L3));
139
        List<AuthUser> stateHeadList = csService.getAuthUserIds(ProfitMandiConstants.TICKET_CATEGORY_SALES, Arrays.asList(EscalationType.L2, EscalationType.L3));
140
        List<AuthUser> bdmList = csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES, EscalationType.L1);
140
        List<AuthUser> bdmList = csService.getAuthUserByCategoryId(ProfitMandiConstants.TICKET_CATEGORY_SALES, EscalationType.L1);
141
        List<BrandCommit> brandCommits = brandCommitRepository.selectAllActiveBrand();
141
        List<BrandCommit> brandCommits = brandCommitRepository.selectAllActiveBrand();
142
        List<BusinessType> businessTypes = Arrays.asList(BusinessType.Proprietorship, BusinessType.Partnership, BusinessType.Company);
-
 
143
        model.addAttribute("businessTypes", businessTypes);
142
        model.addAttribute("businessTypes", BusinessType.values());
144
        model.addAttribute("brandCommits", brandCommits);
143
        model.addAttribute("brandCommits", brandCommits);
145
        model.addAttribute("storeTypeFeePairs", storeTypeFeePairs);
144
        model.addAttribute("storeTypeFeePairs", storeTypeFeePairs);
146
        model.addAttribute("authUsersList", authUsersList);
145
        model.addAttribute("authUsersList", authUsersList);
147
        model.addAttribute("stateHeadList", stateHeadList);
146
        model.addAttribute("stateHeadList", stateHeadList);
148
        model.addAttribute("bdmList", bdmList);
147
        model.addAttribute("bdmList", bdmList);
Line 306... Line 305...
306
        String authEmail = loginDetails.getEmailId();
305
        String authEmail = loginDetails.getEmailId();
307
        BrandFeeCollection brandFeeCollection = brandFeeCollectionRepository.selectById(bfcId);
306
        BrandFeeCollection brandFeeCollection = brandFeeCollectionRepository.selectById(bfcId);
308
        brandFeeCollection.setApproverEmail(authEmail);
307
        brandFeeCollection.setApproverEmail(authEmail);
309
        brandFeeCollection.setPaymentStatus(feePaymentStatus);
308
        brandFeeCollection.setPaymentStatus(feePaymentStatus);
310
        brandFeeCollection.setDescription(description);
309
        brandFeeCollection.setDescription(description);
-
 
310
        brandFeeCollection.setApprovalTimeStamp(LocalDateTime.now());
311
        if (feePaymentStatus.equals(FeePaymentStatus.CONFIRM)) {
311
        if (feePaymentStatus.equals(FeePaymentStatus.CONFIRM)) {
312
            loiFormService.checkLoiDetailsCompletion(loiFormRepository.selectById(brandFeeCollection.getLoiFormId()));
312
            loiFormService.checkLoiDetailsCompletion(loiFormRepository.selectById(brandFeeCollection.getLoiFormId()));
313
        }
313
        }
314
        loiFormService.sendPaymentStatusMailToLoiFormFilledBy(brandFeeCollection);
314
        loiFormService.sendPaymentStatusMailToLoiFormFilledBy(brandFeeCollection);
315
        model.addAttribute("response1", mvcResponseSender.createResponseString(true));
315
        model.addAttribute("response1", mvcResponseSender.createResponseString(true));
Line 391... Line 391...
391
            loiForm.setLoiSignOtp(provideOtp);
391
            loiForm.setLoiSignOtp(provideOtp);
392
            loiForm.setLoiSignedOn(LocalDateTime.now());
392
            loiForm.setLoiSignedOn(LocalDateTime.now());
393
            model.addAttribute("response1", mvcResponseSender.createResponseString(true));
393
            model.addAttribute("response1", mvcResponseSender.createResponseString(true));
394
        } else {
394
        } else {
395
            throw new ProfitMandiBusinessException("Wrong OTP", "", "Your given Otp ->" + provideOtp + " is wrong , please check OTP and try again");
395
            throw new ProfitMandiBusinessException("Wrong OTP", "", "Your given Otp ->" + provideOtp + " is wrong , please check OTP and try again");
396
 
-
 
397
        }
396
        }
398
        return "response";
397
        return "response";
399
    }
398
    }
400
 
399
 
401
    @RequestMapping(value = "/saveLoiDoc", method = RequestMethod.POST)
400
    @RequestMapping(value = "/saveLoiDoc", method = RequestMethod.POST)