Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
wangsixiang 3 months ago
parent
commit
53c3f11b83
  1. 20
      zc-business/src/main/java/com/zc/business/controller/WordController.java
  2. 16
      zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java
  3. 12
      zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

20
zc-business/src/main/java/com/zc/business/controller/WordController.java

@ -265,7 +265,7 @@ public class WordController {
/** /**
* @Description 交通管制情况 * @Description 当月交通管制情况
* *
* @author liuwenge * @author liuwenge
* @date 2024/3/26 17:36 * @date 2024/3/26 17:36
@ -424,7 +424,7 @@ public class WordController {
/** /**
* @Description 交通事故 * @Description 当月交通事故
* *
* @author liuwenge * @author liuwenge
* @date 2024/3/27 20:06 * @date 2024/3/27 20:06
@ -661,7 +661,7 @@ public class WordController {
List<Map<String, Object>> thisYearHZ = result.get("1"); List<Map<String, Object>> thisYearHZ = result.get("1");
List<Map<String, Object>> lastYearHZ = result.get("3"); List<Map<String, Object>> lastYearHZ = result.get("3");
PoiUtil.createHeading2(doc, "全路段实时车流量-济南方向"); PoiUtil.createHeading2(doc, "当天全路段实时车流量-济南方向");
XWPFTable table = doc.createTable(15,3); 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())); 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文档中 // 追加到同一个Word文档中
mergeChart(chart,doc); mergeChart(chart,doc);
@ -720,7 +720,7 @@ public class WordController {
//换行 //换行
createLineBreak(doc); createLineBreak(doc);
PoiUtil.createHeading2(doc, "全路段实时车流量-菏泽方向"); PoiUtil.createHeading2(doc, "当天全路段实时车流量-菏泽方向");
XWPFTable tableHZ = doc.createTable(15,3); 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())); 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文档中 // 追加到同一个Word文档中
mergeChart(chart,doc); mergeChart(chart,doc);
@ -815,7 +815,7 @@ public class WordController {
lastYearJNData = lastYearJN.stream().collect(Collectors.groupingBy(item -> item.get("statisticalHour"))); lastYearJNData = lastYearJN.stream().collect(Collectors.groupingBy(item -> item.get("statisticalHour")));
} }
PoiUtil.createHeading2(doc, "车流量时段分析-济南方向"); PoiUtil.createHeading2(doc, "当天车流量时段分析-济南方向");
XWPFTable table = doc.createTable(25,3); XWPFTable table = doc.createTable(25,3);
//列宽自动分割 //列宽自动分割
@ -879,7 +879,7 @@ public class WordController {
} }
} }
PoiUtil.wordExportChar(chart, "车流量时段分析-济南方向", singleBarSeriesNames,sheet ); PoiUtil.wordExportChar(chart, "当天车流量时段分析-济南方向", singleBarSeriesNames,sheet );
// 追加到同一个Word文档中 // 追加到同一个Word文档中
mergeChart(chart,doc); mergeChart(chart,doc);
@ -909,7 +909,7 @@ public class WordController {
lastYearHZData = lastYearHZ.stream().collect(Collectors.groupingBy(item -> item.get("statisticalHour"))); lastYearHZData = lastYearHZ.stream().collect(Collectors.groupingBy(item -> item.get("statisticalHour")));
} }
PoiUtil.createHeading2(doc, "车流量时段分析-菏泽方向"); PoiUtil.createHeading2(doc, "当天车流量时段分析-菏泽方向");
XWPFTable tableHZ = doc.createTable(25,3); XWPFTable tableHZ = doc.createTable(25,3);
//列宽自动分割 //列宽自动分割
@ -973,7 +973,7 @@ public class WordController {
} }
} }
PoiUtil.wordExportChar(chart, "车流量时段分析-菏泽方向", singleBarSeriesNames,sheet ); PoiUtil.wordExportChar(chart, "当天车流量时段分析-菏泽方向", singleBarSeriesNames,sheet );
// 追加到同一个Word文档中 // 追加到同一个Word文档中
mergeChart(chart,doc); mergeChart(chart,doc);

16
zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java

@ -119,7 +119,7 @@ public enum UniversalEnum {
CONGESTION_CONDITION(0, "拥堵情况"), CONGESTION_CONDITION(0, "拥堵情况"),
// 交通管制情况 // 交通管制情况
TRAFFIC_CONTROL_SITUATION(0, "交通管制情况"), TRAFFIC_CONTROL_SITUATION(0, "当月交通管制情况"),
// 封闭 // 封闭
CLOSE(0, "封闭"), CLOSE(0, "封闭"),
@ -134,7 +134,7 @@ public enum UniversalEnum {
INTERVAL_RELEASE(0, "间隔放行"), INTERVAL_RELEASE(0, "间隔放行"),
// 交通事故 // 交通事故
TRAFFIC_ACCIDENT(0, "交通事故"), TRAFFIC_ACCIDENT(0, "当月交通事故"),
// 事故数量 // 事故数量
NUMBER_OF_ACCIDENTS(0, "事故数量"), NUMBER_OF_ACCIDENTS(0, "事故数量"),
@ -143,7 +143,7 @@ public enum UniversalEnum {
QUANTITY(0, "数量"), QUANTITY(0, "数量"),
// 出入口车流量 // 出入口车流量
TRAFFIC_FLOW_AT_ENTRANCES_AND_EXITS(0, "出入口车流量"), TRAFFIC_FLOW_AT_ENTRANCES_AND_EXITS(0, "当天出入口车流量"),
// 入口 // 入口
ENTRANCE(0, "入口"), ENTRANCE(0, "入口"),
@ -185,7 +185,7 @@ public enum UniversalEnum {
CLOSED_CAUSE_STATISTICS(0, "封闭原因统计"), CLOSED_CAUSE_STATISTICS(0, "封闭原因统计"),
// 封闭数量统计 // 封闭数量统计
CLOSED_QUANTITY_STATISTICS(0, "封闭数量统计"), CLOSED_QUANTITY_STATISTICS(0, "当月封闭数量统计"),
// 节假日 基础数据数据 // 节假日 基础数据数据
HOLIDAY_BASIC_DATA_DATA(0, "节假日 基础数据数据"), HOLIDAY_BASIC_DATA_DATA(0, "节假日 基础数据数据"),
@ -194,7 +194,7 @@ public enum UniversalEnum {
TIME(0, "时间"), TIME(0, "时间"),
// 事故类型统计 // 事故类型统计
ACCIDENT_TYPE_STATISTICS(0, "事故类型统计"), ACCIDENT_TYPE_STATISTICS(0, "当月事故类型统计"),
// 交管数据 // 交管数据
TRAFFIC_CONTROL_DATA(0, "交管数据"), TRAFFIC_CONTROL_DATA(0, "交管数据"),
@ -215,13 +215,13 @@ public enum UniversalEnum {
ACCIDENT_TIME_STATISTICS(0, "事故时间统计"), 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, "长清区"), CHANG_QING_DISTRICT(0, "长清区"),

12
zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

@ -499,11 +499,11 @@
) t1 ) t1
LEFT JOIN LEFT JOIN
(SELECT (SELECT
hour(create_time) hours,count(*) num hour(start_time) hours,count(*) num
FROM dc_event 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' 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; ON t1.hours = t2.hours;
</select> </select>
@ -554,11 +554,11 @@
) t1 ) t1
LEFT JOIN LEFT JOIN
(SELECT (SELECT
hour(create_time) hours,count(*) num hour(start_time) hours,count(*) num
FROM dc_event 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' 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; ON t1.hours = t2.hours;
</select> </select>

Loading…
Cancel
Save