/** 查询 */ public ActionForward queryAdcOvertimeItemForManage( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { BaseActionForm aForm = (BaseActionForm) form; Dto dto = aForm.getParamAsDto(request); String deptid = request.getParameter("deptid"); if (G4Utils.isNotEmpty(deptid)) { setSessionAttribute(request, "deptid", deptid); } if (!G4Utils.isEmpty(request.getParameter("firstload"))) { dto.put("deptid", super.getSessionContainer(request).getUserInfo().getDeptid()); } else { dto.put("deptid", super.getSessionAttribute(request, "deptid")); } dto.put("cascadeid", organizationService.queryCascadeidByDeptid(dto.getAsInteger("deptid"))); dto.remove("deptid"); super.setSessionAttribute(request, "QUERYADCOVERTIMEITEM_QUERYDTO", dto); List items = g4Reader.queryForPage("AdcOvertime.queryAdcOvertimeItemForManage", dto); Integer pageCount = (Integer) g4Reader.queryForObject("AdcOvertime.queryAdcOvertimeItemForManageForPageCount", dto); String jsonString = JsonHelper.encodeList2PageJson(items, pageCount, G4Constants.FORMAT_DateTime); write(jsonString, response); return mapping.findForward(null); }
/** * 保存用户自定义桌面背景 * * @param * @return */ public ActionForward saveUserBackground( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { Dto dto = new BaseDto(); String background = request.getParameter("background"); dto.put("userid", super.getSessionContainer(request).getUserInfo().getUserid()); dto.put("background", background); Dto outDto = organizationService.saveUserBackground(dto); String jsonString = JsonHelper.encodeObject2Json(outDto); write(jsonString, response); return mapping.findForward(null); }
/** 初始化 */ public ActionForward adcOvertimeDetailInit( 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")); UserInfoVo userInfoVo = getSessionContainer(request).getUserInfo(); request.setAttribute("login_account", userInfoVo.getAccount()); return mapping.findForward("reportAdcOvertimeDetailView"); }
/** * 保存用户自定义布局 * * @param * @return */ public ActionForward saveUserLayout( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { Dto dto = new BaseDto(); String layout = request.getParameter("layout"); dto.put("userid", super.getSessionContainer(request).getUserInfo().getUserid()); dto.put("layout", layout); Dto outDto = organizationService.saveUserLayout(dto); UserInfoVo userInfoVo = getSessionContainer(request).getUserInfo(); userInfoVo.setLayout(layout); getSessionContainer(request).setUserInfo(userInfoVo); String jsonString = JsonHelper.encodeObject2Json(outDto); write(jsonString, response); return mapping.findForward(null); }