Subversion Repositories SmartDukaan

Rev

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

Rev 23819 Rev 23855
Line 35... Line 35...
35
import com.spice.profitmandi.common.model.SchemeModel;
35
import com.spice.profitmandi.common.model.SchemeModel;
36
import com.spice.profitmandi.common.util.ExcelUtils;
36
import com.spice.profitmandi.common.util.ExcelUtils;
37
import com.spice.profitmandi.common.util.StringUtils;
37
import com.spice.profitmandi.common.util.StringUtils;
38
import com.spice.profitmandi.common.web.util.ResponseSender;
38
import com.spice.profitmandi.common.web.util.ResponseSender;
39
import com.spice.profitmandi.dao.entity.catalog.Scheme;
39
import com.spice.profitmandi.dao.entity.catalog.Scheme;
40
import com.spice.profitmandi.dao.entity.dtr.Role;
-
 
41
import com.spice.profitmandi.dao.entity.fofo.SchemeItem;
40
import com.spice.profitmandi.dao.entity.fofo.SchemeItem;
42
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
-
 
43
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
41
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
44
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
42
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
45
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
43
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
46
import com.spice.profitmandi.dao.repository.fofo.PurchaseRepository;
44
import com.spice.profitmandi.dao.repository.fofo.PurchaseRepository;
47
import com.spice.profitmandi.dao.repository.fofo.SchemeItemRepository;
45
import com.spice.profitmandi.dao.repository.fofo.SchemeItemRepository;
Line 273... Line 271...
273
			@RequestParam(name = ProfitMandiConstants.SCHEME_ID) int schemeId, Model model)
271
			@RequestParam(name = ProfitMandiConstants.SCHEME_ID) int schemeId, Model model)
274
			throws ProfitMandiBusinessException {
272
			throws ProfitMandiBusinessException {
275
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
273
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
276
		Scheme scheme = schemeService.getSchemeById(schemeId);
274
		Scheme scheme = schemeService.getSchemeById(schemeId);
277
		model.addAttribute("scheme", scheme);
275
		model.addAttribute("scheme", scheme);
278
		model.addAttribute("roleIds", loginDetails.getRoleIds());
276
		model.addAttribute("isFofoAdmin", roleManager.isAdmin(loginDetails.getRoleIds()));
279
		return "scheme-details";
277
		return "scheme-details";
280
	}
278
	}
281
 
279
 
282
	@RequestMapping(value = "/activeSchemeById", method = RequestMethod.PUT)
280
	@RequestMapping(value = "/activeSchemeById", method = RequestMethod.PUT)
283
	public String activeSchemeById(HttpServletRequest request,
281
	public String activeSchemeById(HttpServletRequest request,