From 608dea1f05bb2e33df4df050380fa49602b6c3ff Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Sat, 17 Aug 2024 14:47:15 +0800
Subject: [PATCH] 图斑历史成果导出,媒体文件上传修改
---
src/main/java/com/dji/sample/patches/controller/PatchesController.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/dji/sample/patches/controller/PatchesController.java b/src/main/java/com/dji/sample/patches/controller/PatchesController.java
index 4f410ba..78b2265 100644
--- a/src/main/java/com/dji/sample/patches/controller/PatchesController.java
+++ b/src/main/java/com/dji/sample/patches/controller/PatchesController.java
@@ -74,6 +74,7 @@
@RequestParam(name = "dkmj", required = false) Double dkmj,
@RequestParam(name = "isPush",required = false) Integer isPush
) {
+ fileService.getNoaddFile();
//调用service分页查询
PatchesParam param = PatchesParam.builder()
.page(page)
@@ -177,7 +178,7 @@
// timerUtil.mytask5();
// timerUtil.mytask6();
// timerUtil.mytask7();
-
+ timerUtil.GtdbOperation();
} catch (Exception e) {
throw new RuntimeException("db存储发送出现异常" + e);
}
@@ -272,9 +273,10 @@
}
@GetMapping("/getExcel")
- public ResponseEntity<byte[]> exportExcel(@RequestParam String workspaceId) {
- List<LotInfo> lotInfos = getPatchesService.listLotinfo(workspaceId);
+ public ResponseEntity<byte[]> exportExcel(@RequestParam String ids) {
+// List<LotInfo> lotInfos = getPatchesService.listLotinfo(workspaceId);
try {
+ List<LotInfo> lotInfos = getPatchesService.getLotInfosByIDs(ids);
ByteArrayInputStream excelStream = ExcelUtil.exportLotInfoToExcel(lotInfos);
byte[] excelData = excelStream.readAllBytes();
excelStream.close();
@@ -287,7 +289,7 @@
return new ResponseEntity<>(excelData, headers, HttpStatus.OK);
} catch (IOException e) {
e.printStackTrace();
- return new ResponseEntity<>(("Failed to generate Excel file.").getBytes(), HttpStatus.INTERNAL_SERVER_ERROR);
+ return new ResponseEntity<>(("生成excel失败.").getBytes(), HttpStatus.INTERNAL_SERVER_ERROR);
}
}
}
--
Gitblit v1.9.3