From 0ed861468d4a41ed7899cfbcab9b8f184a2dbf84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=89=E7=82=AE?= <15856818120@163.com> Date: Thu, 10 Apr 2025 13:52:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=B7=A5=E5=85=B7=E7=B1=BB?= =?UTF-8?q?=EF=BC=8C=E4=BB=A5=E5=8F=8A=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SafetyMeasuresController.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/com/bonus/imgTool/imageUpload/controller/SafetyMeasuresController.java b/src/main/java/com/bonus/imgTool/imageUpload/controller/SafetyMeasuresController.java index 70a97ba..ea546cb 100644 --- a/src/main/java/com/bonus/imgTool/imageUpload/controller/SafetyMeasuresController.java +++ b/src/main/java/com/bonus/imgTool/imageUpload/controller/SafetyMeasuresController.java @@ -6,6 +6,7 @@ import com.bonus.imgTool.imageUpload.dto.SafetyMeasuresReqVo; import com.bonus.imgTool.imageUpload.dto.SafetyMeasuresVo; import com.bonus.imgTool.imageUpload.service.SafetyMeasuresService; import com.bonus.imgTool.system.vo.EncryptedReq; +import com.bonus.imgTool.utils.ExcelUtil; import com.bonus.imgTool.utils.ServerResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.PostMapping; @@ -13,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 安全措施落实 @@ -84,4 +87,19 @@ public class SafetyMeasuresController { public ServerResponse getSafetyMeasuresById(EncryptedReq data) { return safetyMeasuresService.getSafetyMeasuresById(data.getData()); } + + /** + * 安全措施落实导出 + * @param data + * @return + */ + @PostMapping(value = "/safetyMeasuresExport") + @DecryptAndVerify(decryptedClass = SafetyMeasuresReqVo.class) + @LogAnnotation(operModul = "安全措施落实-导出", operation = "查询照片", operDesc = "系统级事件",operType="导出") + public void safetyMeasuresExport(HttpServletResponse response, EncryptedReq data) { + + List safetyMeasuresList = (List) safetyMeasuresService.getSafetyMeasuresList(data.getData()).getData(); + ExcelUtil util = new ExcelUtil(SafetyMeasuresVo.class); + util.exportExcel(response, safetyMeasuresList, "安全措施落实"); + } }