/** 新增阈值全量同步 */ public ActionForward saveCacheContor( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { CommonActionForm aForm = (CommonActionForm) form; Dto inDto = aForm.getParamAsDto(request); // String account = request.getParameter("account"); String account = WebUtils.getSessionContainer(request).getUserInfo().getAccount(); Dto dto = new BaseDto(); inDto.put("account", account); dto.put("account", account); Dto userDto = organizationService.getUserInfo(dto); UserInfoVo userInfo = (UserInfoVo) userDto.get("userInfo"); inDto.put("oper_id", userInfo.getUserid()); inDto.put("dept_id", userInfo.getDeptid()); inDto.put("operpassword", userInfo.getOperpassword()); Dto outDto = adsService.saveCacheContor(inDto); String jsonString = JsonHelper.encodeObject2Json(outDto); write(jsonString, response); return mapping.findForward(null); }
/** * 修改广告 V1.0.00.14 * * @param * @return */ public ActionForward updateAds( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { log.info("更新广告操作"); CommonActionForm aForm = (CommonActionForm) form; Dto inDto = aForm.getParamAsDto(request); String id = inDto.getAsString("id"); log.info("查询此广告是否存在 id =" + id); Integer totalCount = (Integer) urmReader.queryForObject("SignalingLoadNumConfig.getNameByUpdate", inDto); log.info("数据库中存在该广告的条数为:" + totalCount); inDto.put("sum", totalCount); String account = WebUtils.getSessionContainer(request).getUserInfo().getAccount(); Dto dto = new BaseDto(); dto.put("account", account); Dto userDto = organizationService.getUserInfo(dto); UserInfoVo user = (UserInfoVo) userDto.get("userInfo"); inDto.put("oper_id", user.getUserid()); inDto.put("dept_id", user.getDeptid()); Dto outDto = adsService.updateAds(inDto); String retString = JsonHelper.encodeObject2Json(outDto); write(retString, response); setOkTipMsg("广告修改成功", response); return mapping.findForward(null); }
/** 获取所有区域的area_id和region_id组合 */ public ActionForward queryURMkey( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { CommonActionForm aForm = (CommonActionForm) form; Dto inDto = aForm.getParamAsDto(request); List qamResList = urmReader.queryForList("Network.getAreaRegion", inDto); List list = new ArrayList(); if (qamResList.size() > 0) { for (int i = 0; i < qamResList.size(); i++) { Dto outDto = (Dto) qamResList.get(i); String area_id = outDto.getAsString("area_id"); String sg_id = outDto.getAsString("sg_id"); String area_sg = area_id + "_" + sg_id; Dto dto = new BaseDto(); dto.put("area_sg", area_sg); list.add(dto); } } String jsonStrList = JsonHelper.encodeList2PageJson(list, list.size(), null); write(jsonStrList, response); return mapping.findForward(null); }
public ActionForward queryResourceByAds( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { CommonActionForm aForm = (CommonActionForm) form; String strChecked = request.getParameter("strChecked"); String[] strCheckeds = strChecked.split(","); List list = new ArrayList(); int sum = 0; for (int i = 0; i < strCheckeds.length; i++) { Dto inDto = aForm.getParamAsDto(request); inDto.put("network_code", strCheckeds[i]); List qamResList = urmReader.queryForList("Network.queryResourceByNetwork", inDto); Integer totalCount = (Integer) urmReader.queryForObject("Network.queryResourceByNetworkCount", inDto); List rfResList = urmReader.queryForList("Network.queryRfResourceByNetwork", inDto); Integer total = (Integer) urmReader.queryForObject("Network.queryRfResourceByNetworkCount", inDto); list.addAll(qamResList); list.addAll(rfResList); sum += totalCount; sum += total; } String jsonStrList = JsonHelper.encodeList2PageJson(list, sum, null); write(jsonStrList, response); return mapping.findForward(null); }
/** 定向到选择页面 */ public ActionForward initSelectParamcode( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { CommonActionForm aForm = (CommonActionForm) form; Dto inDto = aForm.getParamAsDto(request); request.setAttribute("protype", inDto.getAsString("protype")); return mapping.findForward("CmdPraseSelectInit"); }
/** 更新 */ public ActionForward updateItem( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { CommonActionForm aForm = (CommonActionForm) form; Dto inDto = aForm.getParamAsDto(request); Dto outDto = this.cmdPraseService.updateItem(inDto); String jsonString = JsonHelper.encodeObject2Json(outDto); response.getWriter().write(jsonString); return mapping.findForward(null); }
/** 查询 */ public ActionForward queryItems( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { CommonActionForm aForm = (CommonActionForm) form; Dto inDto = aForm.getParamAsDto(request); Dto outDto = this.cmdPraseService.queryItems(inDto); String jsonStrList = outDto.getAsString("jsonStrList"); response.getWriter().write(jsonStrList); return mapping.findForward(null); }
/** * 查询网络区域 * * @param * @return */ public ActionForward queryAds( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { CommonActionForm aForm = (CommonActionForm) form; Dto inDto = aForm.getParamAsDto(request); List qamResList = urmReader.queryForPage("SignalingLoadNumConfig.getAdsListForPage", inDto); Integer totalCount = (Integer) urmReader.queryForObject("SignalingLoadNumConfig.getAdsListForPageCount", inDto); String jsonStrList = JsonHelper.encodeList2PageJson(qamResList, totalCount, null); write(jsonStrList, response); return mapping.findForward(null); }
/** 页面初始化 */ public ActionForward init( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { CommonActionForm aForm = (CommonActionForm) form; Dto inDto = aForm.getParamAsDto(request); String forward = inDto.getAsString("forward"); if ("mng".equals(forward)) { // 管理主页面 tab主页 return mapping.findForward("CmdPraseMngInit"); } else if ("main".equals(forward)) { // 策略主表 return mapping.findForward("CmdPraseMainInit"); } else if ("sub".equals(forward)) { // 策略从表 return mapping.findForward("CmdPraseSubInit"); } return null; }