/** * 保存中继站信息 操作权限:73001 * * @param mapping ActionMapping * @param request HttpServletRequest * @param strKey String * @param args Map * @return ActionForward * @throws Exception */ public ActionForward add( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // TODO Auto-generated method stub if (!CheckPower.checkPower(request.getSession(), "73001")) { return mapping.findForward("powererror"); } baseBo = new RepeaterStationBO(); RepeaterStationBean bean = (RepeaterStationBean) form; String operationCode = baseBo.insertRepeaterStation(bean); String url = request.getContextPath() + "/station_info.do?method="; if (ExecuteCode.EXIST_STATION_ERR_CODE.equals(operationCode)) { return super.forwardErrorPageWithUrl(mapping, request, "ExistStationError", url + "addForm"); } if (ExecuteCode.FAIL_CODE.equals(operationCode)) { return super.forwardErrorPageWithUrl(mapping, request, "FailCode", url + "addForm"); } if (ExecuteCode.SUCCESS_CODE.equals(operationCode)) { return super.forwardInfoPageWithUrl( mapping, request, "SuccessCode", url + "list&reset_query=1"); } return mapping.findForward(""); }
/** * 删除中继站信息 操作权限:73003 * * @param mapping ActionMapping * @param request HttpServletRequest * @param strKey String * @param args Map * @return ActionForward * @throws Exception */ public ActionForward del( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // TODO Auto-generated method stub if (!CheckPower.checkPower(request.getSession(), "73003")) { return mapping.findForward("powererror"); } baseBo = new RepeaterStationBO(); RepeaterStationBean bean = new RepeaterStationBean(); bean.setTid(request.getParameter("station_id")); String operationCode = baseBo.deleteRepeaterStation(bean); String url = request.getContextPath() + "/station_info.do?method=list"; if (ExecuteCode.NOT_EXIST_STATION_ERR_CODE.equals(operationCode)) { return super.forwardErrorPageWithUrl(mapping, request, "NotExistStationError", url); } if (ExecuteCode.EXIST_PLAN_ERR_CODE.equals(operationCode)) { return super.forwardErrorPageWithUrl(mapping, request, "StationExistPlanError", url); } if (ExecuteCode.FAIL_CODE.equals(operationCode)) { return super.forwardErrorPageWithUrl(mapping, request, "FailCode", url); } if (ExecuteCode.SUCCESS_CODE.equals(operationCode)) { return super.forwardInfoPageWithUrl(mapping, request, "SuccessCode", url); } return mapping.findForward(""); }