From b0dd7ca693fcd13e539316cfc8c63150182a0315 Mon Sep 17 00:00:00 2001
From: aix <vip_xiaobin810@163.com>
Date: Tue, 20 Aug 2024 15:18:12 +0800
Subject: [PATCH] 红外设置
---
src/main/java/com/dji/sample/patches/controller/PatchesController.java | 7 ++++---
1 files changed, 4 insertions(+), 3 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 2bee9dc..78b2265 100644
--- a/src/main/java/com/dji/sample/patches/controller/PatchesController.java
+++ b/src/main/java/com/dji/sample/patches/controller/PatchesController.java
@@ -273,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();
@@ -288,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