From 84ae19b4b2ab693fb4a3020c8d54f26f3910762b Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Fri, 16 Aug 2024 09:31:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=A1=8C=E5=BF=AB=E6=8A=A5=E6=A0=87?= =?UTF-8?q?=E6=B3=A8=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/controller/WordController.java | 20 +++++++++---------- .../com/zc/business/enums/UniversalEnum.java | 16 +++++++-------- .../business/DcTrafficIncidentsMapper.xml | 12 +++++------ 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/WordController.java b/zc-business/src/main/java/com/zc/business/controller/WordController.java index ee29ec1a..26dfc1cf 100644 --- a/zc-business/src/main/java/com/zc/business/controller/WordController.java +++ b/zc-business/src/main/java/com/zc/business/controller/WordController.java @@ -265,7 +265,7 @@ public class WordController { /** - * @Description 交通管制情况 + * @Description 当月交通管制情况 * * @author liuwenge * @date 2024/3/26 17:36 @@ -424,7 +424,7 @@ public class WordController { /** - * @Description 交通事故 + * @Description 当月交通事故 * * @author liuwenge * @date 2024/3/27 20:06 @@ -661,7 +661,7 @@ public class WordController { List> thisYearHZ = result.get("1"); List> lastYearHZ = result.get("3"); - PoiUtil.createHeading2(doc, "全路段实时车流量-济南方向"); + PoiUtil.createHeading2(doc, "当天全路段实时车流量-济南方向"); XWPFTable table = doc.createTable(15,3); //列宽自动分割 @@ -704,7 +704,7 @@ public class WordController { sheet.getRow(i+UniversalEnum.ONE.getNumber()).getCell(UniversalEnum.TWO.getNumber()).setCellValue(Long.parseLong(lastYearJN.get(i).get("totalFlow").toString())); } - PoiUtil.wordExportChar(chart, "全路段实时车流量-济南方向", singleBarSeriesNames,sheet ); + PoiUtil.wordExportChar(chart, "当天全路段实时车流量-济南方向", singleBarSeriesNames,sheet ); // 追加到同一个Word文档中 mergeChart(chart,doc); @@ -720,7 +720,7 @@ public class WordController { //换行 createLineBreak(doc); - PoiUtil.createHeading2(doc, "全路段实时车流量-菏泽方向"); + PoiUtil.createHeading2(doc, "当天全路段实时车流量-菏泽方向"); XWPFTable tableHZ = doc.createTable(15,3); //列宽自动分割 @@ -762,7 +762,7 @@ public class WordController { sheet.getRow(i+UniversalEnum.ONE.getNumber()).getCell(UniversalEnum.TWO.getNumber()).setCellValue(Long.parseLong(lastYearHZ.get(i).get("totalFlow").toString())); } - PoiUtil.wordExportChar(chart, "全路段实时车流量-菏泽方向", singleBarSeriesNames,sheet ); + PoiUtil.wordExportChar(chart, "当天全路段实时车流量-菏泽方向", singleBarSeriesNames,sheet ); // 追加到同一个Word文档中 mergeChart(chart,doc); @@ -815,7 +815,7 @@ public class WordController { lastYearJNData = lastYearJN.stream().collect(Collectors.groupingBy(item -> item.get("statisticalHour"))); } - PoiUtil.createHeading2(doc, "车流量时段分析-济南方向"); + PoiUtil.createHeading2(doc, "当天车流量时段分析-济南方向"); XWPFTable table = doc.createTable(25,3); //列宽自动分割 @@ -879,7 +879,7 @@ public class WordController { } } - PoiUtil.wordExportChar(chart, "车流量时段分析-济南方向", singleBarSeriesNames,sheet ); + PoiUtil.wordExportChar(chart, "当天车流量时段分析-济南方向", singleBarSeriesNames,sheet ); // 追加到同一个Word文档中 mergeChart(chart,doc); @@ -909,7 +909,7 @@ public class WordController { lastYearHZData = lastYearHZ.stream().collect(Collectors.groupingBy(item -> item.get("statisticalHour"))); } - PoiUtil.createHeading2(doc, "车流量时段分析-菏泽方向"); + PoiUtil.createHeading2(doc, "当天车流量时段分析-菏泽方向"); XWPFTable tableHZ = doc.createTable(25,3); //列宽自动分割 @@ -973,7 +973,7 @@ public class WordController { } } - PoiUtil.wordExportChar(chart, "车流量时段分析-菏泽方向", singleBarSeriesNames,sheet ); + PoiUtil.wordExportChar(chart, "当天车流量时段分析-菏泽方向", singleBarSeriesNames,sheet ); // 追加到同一个Word文档中 mergeChart(chart,doc); diff --git a/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java b/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java index a379baa0..0ae7cf56 100644 --- a/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java +++ b/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java @@ -119,7 +119,7 @@ public enum UniversalEnum { CONGESTION_CONDITION(0, "拥堵情况"), // 交通管制情况 - TRAFFIC_CONTROL_SITUATION(0, "交通管制情况"), + TRAFFIC_CONTROL_SITUATION(0, "当月交通管制情况"), // 封闭 CLOSE(0, "封闭"), @@ -134,7 +134,7 @@ public enum UniversalEnum { INTERVAL_RELEASE(0, "间隔放行"), // 交通事故 - TRAFFIC_ACCIDENT(0, "交通事故"), + TRAFFIC_ACCIDENT(0, "当月交通事故"), // 事故数量 NUMBER_OF_ACCIDENTS(0, "事故数量"), @@ -143,7 +143,7 @@ public enum UniversalEnum { QUANTITY(0, "数量"), // 出入口车流量 - TRAFFIC_FLOW_AT_ENTRANCES_AND_EXITS(0, "出入口车流量"), + TRAFFIC_FLOW_AT_ENTRANCES_AND_EXITS(0, "当天出入口车流量"), // 入口 ENTRANCE(0, "入口"), @@ -185,7 +185,7 @@ public enum UniversalEnum { CLOSED_CAUSE_STATISTICS(0, "封闭原因统计"), // 封闭数量统计 - CLOSED_QUANTITY_STATISTICS(0, "封闭数量统计"), + CLOSED_QUANTITY_STATISTICS(0, "当月封闭数量统计"), // 节假日 基础数据数据 HOLIDAY_BASIC_DATA_DATA(0, "节假日 基础数据数据"), @@ -194,7 +194,7 @@ public enum UniversalEnum { TIME(0, "时间"), // 事故类型统计 - ACCIDENT_TYPE_STATISTICS(0, "事故类型统计"), + ACCIDENT_TYPE_STATISTICS(0, "当月事故类型统计"), // 交管数据 TRAFFIC_CONTROL_DATA(0, "交管数据"), @@ -215,13 +215,13 @@ public enum UniversalEnum { ACCIDENT_TIME_STATISTICS(0, "事故时间统计"), // 拥堵地点 - CONGESTION_SITE(0, "拥堵地点"), + CONGESTION_SITE(0, "当月拥堵地点"), // 拥堵时长 - CONGESTION_DURATION(0, "拥堵时长"), + CONGESTION_DURATION(0, "当月拥堵时长"), // 拥堵长度 - CONGESTION_LENGTH(0, "拥堵长度"), + CONGESTION_LENGTH(0, "当月拥堵长度"), // 长清区 CHANG_QING_DISTRICT(0, "长清区"), diff --git a/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml b/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml index d289fa71..c68de440 100644 --- a/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml @@ -499,11 +499,11 @@ ) t1 LEFT JOIN (SELECT - hour(create_time) hours,count(*) num + hour(start_time) hours,count(*) num FROM dc_event - WHERE date_format(create_time, '%Y%m%d') = date_format(now(), '%Y%m%d') + WHERE date_format(start_time, '%Y%m') = date_format(now(), '%Y%m') and event_type = '3' and event_subclass = '3-2' - GROUP BY date_format(create_time, '%Y%m%d %H'), hours) t2 + GROUP BY hours) t2 ON t1.hours = t2.hours; @@ -554,11 +554,11 @@ ) t1 LEFT JOIN (SELECT - hour(create_time) hours,count(*) num + hour(start_time) hours,count(*) num FROM dc_event - WHERE date_format(create_time, '%Y%m%d') = date_format(now(), '%Y%m%d') + WHERE date_format(start_time, '%Y%m') = date_format(now(), '%Y%m') and event_type = '1' - GROUP BY date_format(create_time, '%Y%m%d %H'), hours) t2 + GROUP BY hours) t2 ON t1.hours = t2.hours;