diff --git a/zc-business/pom.xml b/zc-business/pom.xml
index c0017e0b..6b870a73 100644
--- a/zc-business/pom.xml
+++ b/zc-business/pom.xml
@@ -47,6 +47,31 @@
com.ruoyi
ruoyi-system
+
+
+ org.apache.poi
+ poi-ooxml
+ 4.1.2
+
+
+ org.apache.poi
+ poi-ooxml-schemas
+ 4.1.2
+
+
+ org.apache.poi
+ poi
+ 4.1.2
+
+
+
+
+ com.deepoove
+ poi-tl
+ 1.9.1
+
+
com.zc
1.0.0
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
new file mode 100644
index 00000000..b2879914
--- /dev/null
+++ b/zc-business/src/main/java/com/zc/business/controller/WordController.java
@@ -0,0 +1,1050 @@
+package com.zc.business.controller;
+
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.zc.business.mapper.DcTrafficIncidentsMapper;
+import com.zc.business.utils.PoiUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.apache.poi.xwpf.usermodel.*;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.text.SimpleDateFormat;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+
+import static com.zc.business.utils.PoiUtil.*;
+
+/**
+ * @Description 通行情况快报
+ *
+ * @author liuwenge
+ * @date 2024/3/26 11:13
+ */
+@Api(tags = "通行情况快报")
+@RestController
+@RequestMapping("/business/word")
+public class WordController {
+
+ @Autowired
+ private WeatherForecastController weatherForecastController;
+ @Autowired
+ private DcTrafficIncidentsMapper dcTrafficIncidentsMapper;
+
+
+ @PostMapping("/trafficSituationReport")
+ @ApiOperation("导出通行情况快报")
+ public void trafficSituationReport(HttpServletResponse response){
+ try {
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+ String date = df.format(new Date());
+ String outputPath = RuoYiConfig.getDownloadPath() +"/济菏高速公路通行情况快报" + date + ".docx";
+ // 读取Word模板
+ InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("wordTemplate/wordTemplate.docx");
+ XWPFDocument newDoc = new XWPFDocument(inputStream);
+
+ // 创建并插入带超链接的目录
+ insertTOC(newDoc);
+
+
+ //换页
+ XWPFParagraph breakPara = newDoc.createParagraph();
+ breakPara.setAlignment(ParagraphAlignment.CENTER);
+ CTP ctP = breakPara.getCTP();
+ CTR ctr = ctP.addNewR();
+ CTBr ctBr = ctr.addNewBr();
+ ctBr.setType(STBrType.PAGE);
+
+
+
+ PoiUtil.createHeading1(newDoc,"总体情况");
+ /** 天气情况统计 */
+ weather(newDoc);
+ /** 交通管制情况 */
+ trafficControl(newDoc);
+ /** 交通事故 */
+ trafficAccident(newDoc);
+ /** 出入口车流量 */
+ trafficFlow(newDoc);
+
+
+
+ PoiUtil.createHeading1(newDoc,"收费站运行情况");
+ /** 封闭原因统计 */
+ trafficControlReasons(newDoc);
+ /** 封闭数量统计 */
+ closedQuantity(newDoc);
+ PoiUtil.createHeading1(newDoc,"交通事故情况");
+ /** 交通事故统计 */
+ accidentType(newDoc);
+
+
+ PoiUtil.createHeading1(newDoc,"拥堵情况");
+ /** 拥堵地点 */
+ congestionLocation(newDoc);
+ /** 拥堵时长 */
+ congestionDuration(newDoc);
+ /** 拥堵长度 */
+ congestionMileage(newDoc);
+
+
+
+ // 保存新生成的Word文件
+// FileOutputStream out = new FileOutputStream(outputPath);
+// out.close();
+
+ // 不保存直接返回文件流
+ newDoc.write(response.getOutputStream());
+
+
+ // 关闭文档
+ newDoc.close();
+ System.out.println("生成通行情况快报成功!");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @Description 天气情况统计
+ *
+ * @author liuwenge
+ * @date 2024/3/26 15:39
+ * @param
+ * @return void
+ */
+
+ public void weather(XWPFDocument doc) {
+
+ PoiUtil.createHeading2(doc,"天气情况统计");
+
+ XWPFTable table = doc.createTable(9, 25);
+ //列宽自动分割
+ CTTblWidth infoTableWidth = table.getCTTbl().addNewTblPr().addNewTblW();
+ infoTableWidth.setType(STTblWidth.DXA);
+ infoTableWidth.setW(BigInteger.valueOf(9072));
+
+ AjaxResult ajaxResult = weatherForecastController.hourlyWeather();
+ if (ajaxResult.get("code").equals(200)) {
+ Map>> data = (Map>>) ajaxResult.get("data");
+ data.keySet().forEach(key ->{
+ if ("hourlyWeather1".equals(key)){
+ setTableFonts(table.getRow(1).getCell(0), "长清区");
+ List