/** * @Description : 查询未知区域预警列表 * * @return void * @author : wucm * @date : 2015年12月3日 下午7:21:25 */ public void queryWarnUnknownList() { this.toJSON(); String regionId = RequestParameterUtil.getRequestParammeter(this.getRequest(), "regionId"); WarnUnknownModule wModule = new WarnUnknownModule(); JSONArray j = wModule.queryWarnUnknownList(regionId); // 查询当前总共有多少预警信息 this.appendObject("result", j); }
/** @Description : 导出预警信息 */ public void exportWarnListToExcel() { this.toJSON(); this.init(); String warn_level_id = RequestParameterUtil.getRequestParammeter(this.getRequest(), "warn_level_ids"); String county_id = RequestParameterUtil.getRequestParammeter(this.getRequest(), "county_ids"); String unkregion_id = RequestParameterUtil.getRequestParammeter(this.getRequest(), "unkregion_ids"); String deal_state = RequestParameterUtil.getRequestParammeter(this.getRequest(), "deal_state"); String order_name = RequestParameterUtil.getRequestParammeter(this.getRequest(), "order_name"); String order_type = RequestParameterUtil.getRequestParammeter(this.getRequest(), "order_type"); HttpServletResponse response = this.getResponse().getHttpResponse(); // String area_id=session.getAreaId(); WarnUnknownModule wModule = new WarnUnknownModule(); CommonModule comModule = new CommonModule(); Map<String, String> scopeMap = comModule.queryUserScope(userId); List<String> allList = new ArrayList<String>(); for (String areaId : scopeMap.keySet()) { allList.add(areaId); } Map<String, Object> map = new HashMap<String, Object>(); boolean b = true; for (String _areaId : allList) { if (_areaId.equals(InitParam.DEPLOY_PROVINCE_ID)) { b = false; break; } } if (b) { map.put("region_list", allList); } if (warn_level_id != null && warn_level_id.length() > 0) { String[] warn_level_ids = warn_level_id.split(","); map.put("warn_level_ids", Arrays.asList(warn_level_ids)); } if (county_id != null && county_id.length() > 0) { String[] county_ids = county_id.split(","); map.put("county_ids", Arrays.asList(county_ids)); } if (unkregion_id != null && unkregion_id.length() > 0) { String[] unkregion_ids = unkregion_id.split(","); map.put("unkregion_ids", Arrays.asList(unkregion_ids)); } map.put("deal_state", deal_state); if ("e.city_name,c.county_name".equals(order_name)) { order_name = "e.city_name " + order_type + ",c.county_name"; map.put("order_name", order_name); } else { map.put("order_name", order_name); } map.put("order_type", order_type); JSONObject j = new JSONObject(); j = wModule.exportUnknownWarnToExcel(map); String fileName = j.getString("url"); DownloadAction d = new DownloadAction(); d.downFile(fileName, null, "0", response); }
/** * @Description : 查询预警列表--分页 * * @return void * @author : baowb */ public void queryWarnList() { this.toJSON(); this.init(); String curPage = RequestParameterUtil.getRequestParammeter(this.getRequest(), "curPage"); String pageSize = RequestParameterUtil.getRequestParammeter(this.getRequest(), "pageSize"); String warn_level_id = RequestParameterUtil.getRequestParammeter(this.getRequest(), "warn_level_ids"); String county_id = RequestParameterUtil.getRequestParammeter(this.getRequest(), "county_ids"); String unkregion_id = RequestParameterUtil.getRequestParammeter(this.getRequest(), "unkregion_ids"); String deal_state = RequestParameterUtil.getRequestParammeter(this.getRequest(), "deal_state"); String order_name = RequestParameterUtil.getRequestParammeter(this.getRequest(), "order_name"); String order_type = RequestParameterUtil.getRequestParammeter(this.getRequest(), "order_type"); CommonModule comModule = new CommonModule(); Map<String, String> scopeMap = comModule.queryUserScope(userId); List<String> allList = new ArrayList<String>(); for (String areaId : scopeMap.keySet()) { allList.add(areaId); } Map<String, Object> map = new HashMap<String, Object>(); if (warn_level_id != null && warn_level_id.length() > 0) { String[] warn_level_ids = warn_level_id.split(","); map.put("warn_level_ids", Arrays.asList(warn_level_ids)); } if (county_id != null && county_id.length() > 0) { String[] county_ids = county_id.split(","); map.put("county_ids", Arrays.asList(county_ids)); } if (unkregion_id != null && unkregion_id.length() > 0) { String[] unkregion_ids = unkregion_id.split(","); map.put("unkregion_ids", Arrays.asList(unkregion_ids)); } map.put("deal_state", deal_state); if ("e.city_name,c.county_name".equals(order_name)) { order_name = "e.city_name " + order_type + ",c.county_name"; map.put("order_name", order_name); } else { map.put("order_name", order_name); } map.put("order_type", order_type); WarnUnknownModule wModule = new WarnUnknownModule(); JSONObject j = wModule.queryWarnList(map, userId, curPage, pageSize, allList); this.appendObject("result", j); }