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, "安全措施落实"); + } }