From 88641a3762cecd0fe4aec1442975038c2a5ba80e Mon Sep 17 00:00:00 2001 From: fangjiakai <450850793@qq.com> Date: Fri, 6 Feb 2026 13:58:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(accident):=20=E6=B7=BB=E5=8A=A0=E5=A1=AB?= =?UTF-8?q?=E6=8A=A5=E4=BA=BA=E5=AD=97=E6=AE=B5=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 AccidentExportCO 和 EventExportCO 中添加填报人字段 - 调整 Excel 导出列索引顺序,报出日期移至第 17 列 - 为填报人字段添加 ExcelProperty 注解支持导出 - 更新 AccidentRepositoryImpl 中的分页查询逻辑 - 移除 AccidentController 中的多余空行以优化代码格式 --- .../java/com/zcloud/accident/web/AccidentController.java | 2 +- .../zcloud/accident/dto/clientobject/AccidentExportCO.java | 7 ++++++- .../zcloud/accident/dto/clientobject/EventExportCO.java | 7 ++++++- .../repository/impl/AccidentRepositoryImpl.java | 2 ++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/web-adapter/src/main/java/com/zcloud/accident/web/AccidentController.java b/web-adapter/src/main/java/com/zcloud/accident/web/AccidentController.java index 407a01e..f925486 100644 --- a/web-adapter/src/main/java/com/zcloud/accident/web/AccidentController.java +++ b/web-adapter/src/main/java/com/zcloud/accident/web/AccidentController.java @@ -7,6 +7,7 @@ import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.Response; import com.alibaba.cola.dto.SingleResponse; import com.jjb.saas.framework.auth.utils.AuthContext; +import com.jjb.saas.framework.event.producer.RemoteEventPublisher; import com.zcloud.accident.api.AccidentServiceI; import com.zcloud.accident.command.convertor.AccidentExportConvertor; import com.zcloud.accident.command.convertor.EventExportConvertor; @@ -46,7 +47,6 @@ public class AccidentController { private final AccidentServiceI accidentService; private final AccidentExportConvertor accidentExportConvertor; private final EventExportConvertor eventExportConvertor; - @ApiOperation("新增") @PostMapping("/save") public SingleResponse add(@Validated @RequestBody AccidentAddCmd cmd) { diff --git a/web-client/src/main/java/com/zcloud/accident/dto/clientobject/AccidentExportCO.java b/web-client/src/main/java/com/zcloud/accident/dto/clientobject/AccidentExportCO.java index ab0a8c2..c6c5ab0 100644 --- a/web-client/src/main/java/com/zcloud/accident/dto/clientobject/AccidentExportCO.java +++ b/web-client/src/main/java/com/zcloud/accident/dto/clientobject/AccidentExportCO.java @@ -97,8 +97,13 @@ public class AccidentExportCO { @ColumnWidth(20) private String measures; + @ApiModelProperty(value = "填报人") + @ExcelProperty(value = "填报人", index = 16) + @ColumnWidth(20) + private String reportUser; + @ApiModelProperty(value = "报出日期") - @ExcelProperty(value = "报出日期", index = 16) + @ExcelProperty(value = "报出日期", index = 17) @ColumnWidth(20) @DateTimeFormat("yyyy-MM-dd HH:mm:ss") private LocalDateTime reportDate; diff --git a/web-client/src/main/java/com/zcloud/accident/dto/clientobject/EventExportCO.java b/web-client/src/main/java/com/zcloud/accident/dto/clientobject/EventExportCO.java index 0468895..860c46c 100644 --- a/web-client/src/main/java/com/zcloud/accident/dto/clientobject/EventExportCO.java +++ b/web-client/src/main/java/com/zcloud/accident/dto/clientobject/EventExportCO.java @@ -98,8 +98,13 @@ public class EventExportCO { @ColumnWidth(20) private String measures; + @ApiModelProperty(value = "填报人") + @ExcelProperty(value = "填报人", index = 16) + @ColumnWidth(20) + private String reportUser; + @ApiModelProperty(value = "报出日期") - @ExcelProperty(value = "报出日期", index = 16) + @ExcelProperty(value = "报出日期", index = 17) @ColumnWidth(20) @DateTimeFormat("yyyy-MM-dd HH:mm:ss") private LocalDateTime reportDate; diff --git a/web-infrastructure/src/main/java/com/zcloud/accident/persistence/repository/impl/AccidentRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/accident/persistence/repository/impl/AccidentRepositoryImpl.java index 2826dd7..e60cea5 100644 --- a/web-infrastructure/src/main/java/com/zcloud/accident/persistence/repository/impl/AccidentRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/accident/persistence/repository/impl/AccidentRepositoryImpl.java @@ -36,10 +36,12 @@ public class AccidentRepositoryImpl extends BaseRepositoryImpl iPage = new Query().getPage(params); + IPage result = accidentMapper.listPage(iPage, params,menuPerms); return PageHelper.pageToResponse(result, result.getRecords()); } + @Override public List listAll(Map params, String menuPerms) { return accidentMapper.list(params, menuPerms);