From e98c8f2f2ad18d1dfbca09c7449cbf9ffadaca8f Mon Sep 17 00:00:00 2001 From: dongxiaoyan Date: Wed, 27 Feb 2019 17:43:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=B5=81=E9=87=8F=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1app=E8=B6=8B=E5=8A=BF=E4=B8=ADapp=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E7=AC=A6=E5=8F=B7=E8=B7=9F=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E6=A0=87=E7=AD=BE=E5=86=99=E6=B3=95=E7=9A=84=E5=86=B2?= =?UTF-8?q?=E7=AA=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TrafficStatisticsInfoController.java | 16 +++++++++++++++- .../views/dashboard/trafficAppTrendList.jsp | 15 ++++++++------- .../views/dashboard/trafficAppTypeList.jsp | 6 +++--- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java index 4c4ce263a..34e0fd049 100644 --- a/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java +++ b/src/main/java/com/nis/web/controller/dashboard/TrafficStatisticsInfoController.java @@ -464,7 +464,7 @@ public class TrafficStatisticsInfoController extends BaseController { * App趋势界面 独立IP访问数量趋势图 */ @RequestMapping(value="appTrendList") - public String appTrendList(Model model,String beginDate,String endDate,String appName,Integer appType,Integer entranceId){ + public String appTrendList(Model model,String beginDate,String endDate,Integer appType,Integer entranceId){ if(StringUtil.isBlank(beginDate)||StringUtil.isBlank(endDate)){ Calendar cal = Calendar. getInstance (); cal.setTime(new Date()); @@ -472,6 +472,20 @@ public class TrafficStatisticsInfoController extends BaseController { cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 2); beginDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime()); } + //标签集合 + List codeList = CodeDicUtils.getCodeList("appCode"); + //将数字替换为标签文字 + String appName=""; + if(appType!=null){ + Double value1 = Double.valueOf(appType); + for (CodeResult code : codeList) { + Double value2 = Double.valueOf(code.getCode().trim()); + if(value1.equals(value2)){ + appName= code.getItem().trim(); + break; + } + } + } model.addAttribute("appName", appName); model.addAttribute("appType", appType); model.addAttribute("entranceId", entranceId); diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficAppTrendList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficAppTrendList.jsp index e2fd71793..c8502308e 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/trafficAppTrendList.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/trafficAppTrendList.jsp @@ -235,6 +235,7 @@