| | |
| | | @RequestParam(name = "dkmj", required = false) Double dkmj, |
| | | @RequestParam(name = "isPush",required = false) Integer isPush |
| | | ) { |
| | | fileService.getNoaddFile(); |
| | | //调用service分页查询 |
| | | PatchesParam param = PatchesParam.builder() |
| | | .page(page) |
| | |
| | | // timerUtil.mytask5(); |
| | | // timerUtil.mytask6(); |
| | | // timerUtil.mytask7(); |
| | | |
| | | timerUtil.GtdbOperation(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("db存储发送出现异常" + e); |
| | | } |
| | |
| | | } |
| | | |
| | | @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(); |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |