public ActionForward TaskRemove2( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { WorkTaskDisposeModel model = (WorkTaskDisposeModel) form; // Integer page = request.getParameter(Constants.DefaultPageParamFlag) == null ? 1: // Integer.parseInt(request.getParameter(Constants.DefaultPageParamFlag)); // int startIndex = (page - 1) * Constants.DefaultPageSize; // request.setAttribute("page", page); try { // model.setTaskDisposeType(null); model = workTaskDisposeService.get(request.getParameter("id")); model.setStatus(WorkTaskDisposeModel.EStatus.CLOSE.getValue()); workTaskDisposeService.saveOrUpdate(model); // workTaskDisposeService.remove(request.getParameter("id")); // request.setAttribute("task.page", workTaskDisposeService.getRecentWorkTaskDispose(model, // request.getParameter("staffNo"), // request.getParameter("time"), Constants.DefaultMaximumPageSize, startIndex, null, true)); // 记录log // eventService.traceSystemEvent(getMessageFromResource( // request, "system.event.text.maintain_task_remove", new Object[]{model.getId()})); } catch (ServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); log.debug("task remove err" + e.getMessage()); } return new ActionForward("/admin/affair/daily_govern_work/dayNumOff=0", true); }
public ActionForward TaskOperStatus( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { WorkTaskDisposeModel model = (WorkTaskDisposeModel) form; Integer page = request.getParameter(Constants.DefaultPageParamFlag) == null ? 1 : Integer.parseInt(request.getParameter(Constants.DefaultPageParamFlag)); int startIndex = (page - 1) * Constants.DefaultPageSize; request.setAttribute("page", page); try { if (model.getTaskDisposeType() == -1) model.setTaskDisposeType(null); model.setStatus(null); WorkTaskDisposeModel operModel = workTaskDisposeService.get(request.getParameter("id")); if (operModel.getStatus() == WorkTaskDisposeModel.EStatus.OPEN.getValue()) operModel.setStatus(WorkTaskDisposeModel.EStatus.CLOSE.getValue()); else operModel.setStatus(WorkTaskDisposeModel.EStatus.OPEN.getValue()); workTaskDisposeService.saveOrUpdate(operModel); request.setAttribute( "task.page", workTaskDisposeService.getRecentWorkTaskDispose( model, request.getParameter("staffNo"), request.getParameter("time"), Constants.DefaultMaximumPageSize, startIndex, null, true)); // 记录log eventService.traceSystemEvent( getMessageFromResource( request, "system.event.text.maintain_task_operStatus", new Object[] {model.getId()})); } catch (ServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); log.debug("notice remove err" + e.getMessage()); } return mapping.findForward("task_datagrid"); }