Subversion Repositories SmartDukaan

Rev

Rev 23568 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23568 Rev 37405
Line 30... Line 30...
30
	private static final Logger LOGGER = LogManager.getLogger(RegisterController.class);
30
	private static final Logger LOGGER = LogManager.getLogger(RegisterController.class);
31
	
31
	
32
	private static final String DOCUMENT_STORE = "/hsps-docs/";
32
	private static final String DOCUMENT_STORE = "/hsps-docs/";
33
	
33
	
34
	@Autowired
34
	@Autowired
-
 
35
	private com.spice.profitmandi.dao.repository.inventory.StateRepository stateRepository;
-
 
36
 
-
 
37
	@Autowired
35
	private DocumentRepository documentRepository;
38
	private DocumentRepository documentRepository;
36
 
39
 
37
	@Autowired
40
	@Autowired
38
	private CookiesProcessor cookiesProcessor;
41
	private CookiesProcessor cookiesProcessor;
39
	
42
	
Line 44... Line 47...
44
	public String registerIndex(HttpServletResponse response, HttpServletRequest request, Model model) throws Throwable{
47
	public String registerIndex(HttpServletResponse response, HttpServletRequest request, Model model) throws Throwable{
45
		LoginDetails details = cookiesProcessor.getCookiesObject(request);
48
		LoginDetails details = cookiesProcessor.getCookiesObject(request);
46
		FofoForm form = mongoClient.getFofoForm(details.getEmailId());
49
		FofoForm form = mongoClient.getFofoForm(details.getEmailId());
47
		if (form == null) {
50
		if (form == null) {
48
			model.addAttribute("email", details.getEmailId());
51
			model.addAttribute("email", details.getEmailId());
-
 
52
			model.addAttribute("stateNames", this.stateNames());
49
			return "fofo-form";
53
			return "fofo-form";
50
		} else {
54
		} else {
51
			cookiesProcessor.removeCookies(request, response);
55
			cookiesProcessor.removeCookies(request, response);
52
			return "fofo-thankyou";
56
			return "fofo-thankyou";
53
		}
57
		}
Line 224... Line 228...
224
        ff.setChequeCopy(moveDocument(getChequeCopy()));
228
        ff.setChequeCopy(moveDocument(getChequeCopy()));
225
        ff.setUtr(utr);
229
        ff.setUtr(utr);
226
        ff.set_id(_id);
230
        ff.set_id(_id);
227
        return ff;
231
        return ff;
228
	}*/
232
	}*/
-
 
233
 
-
 
234
	/** State list for the form dropdowns, from inventory.statemaster - never hardcoded in the view. */
-
 
235
	private java.util.List<String> stateNames() {
-
 
236
		return stateRepository.selectAll().stream().map(com.spice.profitmandi.dao.entity.inventory.State::getName)
-
 
237
				.sorted().collect(java.util.stream.Collectors.toList());
-
 
238
	}
229
}
239
}