Package org.g4studio.core.metatype.impl

Examples of org.g4studio.core.metatype.impl.BaseDto


   * 删除参数信息
   *
   * @param pDto
   */
  public Dto deleteParamItem(Dto pDto){
    Dto dto = new BaseDto();
    String[] arrChecked = pDto.getAsString("strChecked").split(",");
    for(int i = 0; i < arrChecked.length; i++){
      dto.put("paramid", arrChecked[i]);
      g4Dao.delete("Param.deletParamItem", dto);
    }
    return null;
  }
View Full Code Here


   * 标签开始
   */
  public int doStartTag() throws JspException{
    Dao g4Dao = (Dao)SpringBeanLoader.getSpringBean("g4Dao");
    HttpServletRequest request = (HttpServletRequest)this.pageContext.getRequest();
    Dto grantDto = new BaseDto();
    grantDto.put("userid", request.getParameter("userid"));
    grantDto.put("authorizelevel", SystemConstants.AUTHORIZELEVEL_ACCESS);
    List grantedList = g4Dao.queryForList("ArmTagSupport.queryGrantedMenusByUserId", grantDto);
    List menuList = new ArrayList();
    String account = WebUtils.getSessionContainer(request).getUserInfo().getAccount();
    String developerAccount = WebUtils.getParamValue("DEFAULT_DEVELOP_ACCOUNT", request);
    String superAccount = WebUtils.getParamValue("DEFAULT_ADMIN_ACCOUNT", request);
    Dto qDto = new BaseDto();
    String userid = WebUtils.getSessionContainer(request).getUserInfo().getUserid();
    qDto.put("userid", userid);
    String userType = request.getParameter("usertype");
    if (userType.equals(SystemConstants.USERTYPE_ADMIN)) {
      qDto.put("menutype", SystemConstants.MENUTYPE_SYSTEM);
    }
    if (account.equalsIgnoreCase(developerAccount) || account.equalsIgnoreCase(superAccount)) {
      menuList = g4Dao.queryForList("ArmTagSupport.queryMenusForUserGrant", qDto);
    }else {
      menuList = g4Dao.queryForList("ArmTagSupport.queryMenusForGrant", qDto);
    }
    for(int i = 0; i < menuList.size(); i++){
      MenuVo menuVo = (MenuVo)menuList.get(i);
      if(checkGeant(grantedList, menuVo.getMenuid()).booleanValue()){
        menuVo.setChecked("true");
      }else {
        menuVo.setChecked("false");
      }
      if(menuVo.getParentid().equals("0")){
        menuVo.setIsRoot("true");
      }
      if(menuVo.getMenuid().length() < 6){
        menuVo.setExpanded("true");
      }
    }
    Dto dto = new BaseDto();
    dto.put("menuList", menuList);
    TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);
    DefaultTemplate template = new FileTemplate();
    template.setTemplateResource(TagHelper.getTemplatePath(getClass().getName()));
    StringWriter writer = engine.mergeTemplate(template, dto);
    try {
View Full Code Here

   * 删除角色
   * @param pDto
   * @return
   */
  public Dto deleteRoleItems(Dto pDto){
    Dto dto = new BaseDto();
    String[] arrChecked = pDto.getAsString("strChecked").split(",");
    for(int i = 0; i < arrChecked.length; i++){
      dto.put("roleid", arrChecked[i]);
      g4Dao.delete("Role.deleteEaroleAuthorizeInRoleManage", dto);
      g4Dao.delete("Role.deleteEauserauthorizeInRoleManage", dto);
      g4Dao.delete("Role.deleteEarolemenupartInRoleManage", dto);
      g4Dao.delete("Role.deleteEaroleInRoleManage", dto);
    }
View Full Code Here

   * @return
   */
  public ActionForward departmentInit(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    super.removeSessionAttribute(request, "deptid");
    Dto inDto = new BaseDto();
    String deptid = super.getSessionContainer(request).getUserInfo().getDeptid();
    inDto.put("deptid", deptid);
    Dto outDto = organizationService.queryDeptinfoByDeptid(inDto);
    request.setAttribute("rootDeptid", outDto.getAsString("deptid"));
    request.setAttribute("rootDeptname", outDto.getAsString("deptname"));
    return mapping.findForward("manageDepartmentView");
  }
View Full Code Here

   * @param
   * @return
   */
  public ActionForward departmentTreeInit(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    Dto dto = new BaseDto();
    String nodeid = request.getParameter("node");
    dto.put("parentid", nodeid);
    Dto outDto = organizationService.queryDeptItems(dto);
    write(outDto.getAsString("jsonString"), response);
    return mapping.findForward(null);
  }
View Full Code Here

  public ActionForward deleteDeptItems(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    String strChecked = request.getParameter("strChecked");
    String type = request.getParameter("type");
    String deptid = request.getParameter("deptid");
    Dto inDto = new BaseDto();
    inDto.put("strChecked", strChecked);
    inDto.put("type", type);
    inDto.put("deptid", deptid);
    if (!isDemoMode(response)) {
      organizationService.deleteDeptItems(inDto);
      setOkTipMsg("部门数据删除成功", response);
    }
    return mapping.findForward(null);
View Full Code Here

   * @return
   */
  public ActionForward queryDeptinfoByDeptid(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    Dto inDto = new BaseDto();
    String deptid = super.getSessionContainer(request).getUserInfo().getDeptid();
    inDto.put("deptid", deptid);
    Dto outDto = organizationService.queryDeptinfoByDeptid(inDto);
    String jsonString = JsonHelper.encodeObject2Json(outDto);
    write(jsonString, response);
    return mapping.findForward(null);
  }
View Full Code Here

   * @return
   */
  public ActionForward deleteParamItems(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    String strChecked = request.getParameter("strChecked");
    Dto inDto = new BaseDto();
    inDto.put("strChecked", strChecked);
    if (!isDemoMode(response)) {
      paramService.deleteParamItem(inDto);
      setOkTipMsg("参数数据删除成功", response);
    }
    return mapping.findForward(null);
View Full Code Here

      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
      List paramList = g4Reader.queryForList("Resource.getParamList");
      getServlet().getServletContext().removeAttribute("EAPARAMLIST");
      getServlet().getServletContext().setAttribute("EAPARAMLIST", paramList);
    Dto outDto = new BaseDto();
    outDto.put("success", new Boolean(true));
    write(JsonHelper.encodeObject2Json(outDto), response);
    return mapping.findForward(null);
  }
View Full Code Here

   */
  public ActionForward killSession(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response) throws Exception {
    String strChecked = request.getParameter("strChecked");
    String[] sessionid = strChecked.split(",");
    Dto delDto = new BaseDto();
    String msg = "选中的会话已杀死!";
    for (int i = 0; i < sessionid.length; i++) {
      String seid = sessionid[i];
      delDto.put("sessionid", seid);
      if(!seid.equalsIgnoreCase(request.getSession().getId())){
        monitorService.deleteHttpSession(delDto);
        HttpSession session = SessionListener.getSessionByID(seid);
        if(G4Utils.isNotEmpty(seid)){
          SessionContainer sessionContainer =  (SessionContainer)session.getAttribute("SessionContainer");
View Full Code Here

TOP

Related Classes of org.g4studio.core.metatype.impl.BaseDto

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.