src/main/java/com/example/jz/controller/CauseController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/example/jz/controller/ReportController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/example/jz/service/impl/ReportServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/example/jz/controller/CauseController.java
@@ -49,7 +49,7 @@ } @ApiOperation(httpMethod = "POST", value = "添加案件") @ApiOperation(httpMethod = "POST", value = "案件台-案件录入-添加案件") @PostMapping("/addCause") @ApiResponse(message = "执行成功", code = 200) public R addCause(@RequestBody CauseDto causeDto) { @@ -57,7 +57,7 @@ return R.ok(); } @ApiOperation(httpMethod = "PUT", value = "修改案件") @ApiOperation(httpMethod = "PUT", value = "案件台-案件录入-修改案件") @PutMapping("/updateCause") @ApiResponse(message = "执行成功", code = 200) public R updateCause(@RequestBody CauseDto causeDto, Integer id) { @@ -65,35 +65,35 @@ } @ApiOperation(httpMethod = "GET", value = "案件录入列表") @ApiOperation(httpMethod = "GET", value = "案件台-案件录入-案件录入列表") @GetMapping("/getCauseList") @ApiResponse(message = "执行成功", code = 200) public R getCauseList(String cause, Integer status, Integer size, Integer current) { return R.ok(causeService.getCauserListByCondition(cause, status, size, current)); } @ApiOperation(httpMethod = "GET", value = "负责人查询") @ApiOperation(httpMethod = "GET", value = "案件台-案件录入-负责人查询") @GetMapping("/getManagerList") @ApiResponse(message = "执行成功", code = 200) public R getManagerList() { return R.ok(causeService.getManagerList()); } @ApiOperation(httpMethod = "GET", value = "获取报案人员") @ApiOperation(httpMethod = "GET", value = "案件台-案件录入-获取案件报案人员") @GetMapping("/getReporterList") @ApiResponse(message = "执行成功", code = 200) public R getReporterList(Integer causeId) { return R.ok(causeService.getReporterList(causeId)); } @ApiOperation(httpMethod = "GET", value = "获取案件群公告") @ApiOperation(httpMethod = "GET", value = "案件台-案件录入-获取案件群公告") @GetMapping("/getGroupAnnouncement") @ApiResponse(message = "执行成功", code = 200) public R getGroupAnnouncement(Integer groupId) { return R.ok(causeService.getGroupAnnouncement(groupId)); } @ApiOperation(httpMethod = "DELETE", value = "案件删除") @ApiOperation(httpMethod = "DELETE", value = "案件台-案件录入-案件删除") @DeleteMapping("/deleteCause") @ApiResponse(message = "执行成功", code = 200) public R deleteCause(@RequestParam(value = "id") Integer id) { @@ -101,7 +101,7 @@ return R.ok(); } @ApiOperation(httpMethod = "POST", value = "案件导入") @ApiOperation(httpMethod = "POST", value = "案件台-案件录入-案件导入") @PostMapping("/upload") @ApiResponse(message = "执行成功", code = 200) @SneakyThrows src/main/java/com/example/jz/controller/ReportController.java
@@ -86,7 +86,7 @@ return R.ok(reportService.audit(report)); } @ApiOperation(httpMethod = "PUT", value = "报案人编辑") @ApiOperation(httpMethod = "PUT", value = "案件台-报案人员-编辑") @PutMapping("/updateReport") @ApiResponse(message = "执行成功", code = 200) public R updateReport(@RequestBody Report report) { @@ -94,7 +94,7 @@ return R.ok(); } @ApiOperation(httpMethod = "DELETE", value = "报案人人员退群") @ApiOperation(httpMethod = "DELETE", value = "案件台-报案人员-退群") @DeleteMapping("/leaveGroup") @ApiResponse(message = "执行成功", code = 200) public R leaveGroup(@RequestParam(value = "id") Integer id, @RequestParam(value = "groupId") Integer groupId) { @@ -102,7 +102,7 @@ return R.ok(); } @ApiOperation(httpMethod = "DELETE", value = "删除报案人") @ApiOperation(httpMethod = "DELETE", value = "案件台-报案人员-删除") @DeleteMapping("/deleteReporter") @ApiResponse(message = "执行成功", code = 200) public R deleteReporter(@RequestParam(value = "id") Integer id) { @@ -110,7 +110,7 @@ return R.ok(); } @ApiOperation(httpMethod = "POST", value = "导出材料") @ApiOperation(httpMethod = "POST", value = "案件台-报案人员-报案材料导出") @PostMapping("/exportReporter") @ApiResponse(message = "执行成功", code = 200) public void exportReport(@RequestParam(value = "id") Integer id, HttpServletResponse response) { src/main/java/com/example/jz/service/impl/ReportServiceImpl.java
@@ -113,17 +113,29 @@ ArrayList<ImageData> imageDataList = new ArrayList<>(); if (StringUtils.isNotBlank(a.getReportMaterials())) { String[] urls = a.getReportMaterials().split(","); for (int i = 0; i < urls.length; i++) { if (urls.length==1){ int width=600; try { ImageData imageData = new ImageData(); imageData.setImage(IoUtils.toByteArray(new URL(minIOService.getPreviewFileUrl(urls[i])).openConnection().getInputStream())); imageData.setLeft(width/ urls.length*i); imageData.setRight(width-width/ urls.length*(i+1)); imageData.setImage(IoUtils.toByteArray(new URL(minIOService.getPreviewFileUrl(urls[0])).openConnection().getInputStream())); imageData.setRight(width/2); imageDataList.add(imageData); } catch (Exception e) { throw new RuntimeException(e); } }else { for (int i = 0; i < urls.length; i++) { int width = 600; try { ImageData imageData = new ImageData(); imageData.setImage(IoUtils.toByteArray(new URL(minIOService.getPreviewFileUrl(urls[i])).openConnection().getInputStream())); imageData.setLeft(width / urls.length * i); imageData.setRight(width - width / urls.length * (i + 1)); imageDataList.add(imageData); } catch (Exception e) { throw new RuntimeException(e); } } } } objectWriteCellData.setImageDataList(imageDataList);