From 9f19d3a24f8474bf6f9eb9401888c44b34b381e6 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期四, 21 十一月 2024 14:29:50 +0800 Subject: [PATCH] 第一次改动(检验任务与样品关联,附件与样品关联,报告与样品关联) --- inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java | 40 +++++++++++++++++++++++++++++++++++----- 1 files changed, 35 insertions(+), 5 deletions(-) diff --git a/inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java b/inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java index 8e450da..5ea7804 100644 --- a/inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java +++ b/inspect-server/src/main/java/com/yuanchu/mom/controller/InsReportController.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.yuanchu.mom.annotation.ValueAuth; import com.yuanchu.mom.annotation.ValueClassify; +import com.yuanchu.mom.dto.InsReportDto; import com.yuanchu.mom.dto.ReportPageDto; import com.yuanchu.mom.exception.ErrorException; import com.yuanchu.mom.service.InsReportService; @@ -21,6 +22,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.File; +import java.io.IOException; import java.io.PrintWriter; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -63,7 +65,7 @@ pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + file.getOriginalFilename(); urlString = realpath + "/" + pathName; file.transferTo(new File(urlString)); - return Result.success(insReportService.inReport("/word/"+pathName, id)); + return Result.success(insReportService.inReport("/word/" + pathName, id)); } catch (Exception e) { throw new ErrorException("鏂囦欢涓婁紶澶辫触"); } @@ -76,12 +78,12 @@ return Result.success(insReportService.upReportUrl(id)); } - @ValueClassify("鎶ュ憡缂栧埗") + /*@ValueClassify("鎶ュ憡缂栧埗") @ApiOperation(value = "鎶ュ憡鍦ㄧ嚎缂栧埗") @GetMapping("/upReportFile") public Result upReportFile() { return Result.success(); - } + }*/ @ValueClassify("鎶ュ憡缂栧埗") @ApiOperation(value = "鎻愪氦") @@ -100,8 +102,8 @@ @ValueClassify("鎶ュ憡缂栧埗") @ApiOperation(value = "鎵瑰噯") @PostMapping("/ratifyReport") - public Result ratifyReport(Integer id, Integer isRatify, String ratifyTell) { - return Result.success(insReportService.ratifyReport(id, isRatify, ratifyTell)); + public Result ratifyReport(Integer id, Integer isRatify, String ratifyTell,String sealUrl) { + return Result.success(insReportService.ratifyReport(id, isRatify, ratifyTell,sealUrl)); } @RequestMapping("/onlyOffice/save") @@ -133,4 +135,32 @@ writer.write("{\"error\":0}"); } } + + @ValueAuth + @ApiOperation(value = "鎶ュ憡鎵归噺涓嬭浇") + @GetMapping("/downAll") + public Result downAll(String ids) { + return Result.success(insReportService.downAll(ids)); + } + + @ValueAuth + @ApiOperation(value = "鎶ュ憡鎵归噺涓婁紶") + @PostMapping("/upAll") + public Result upAll(MultipartFile file) throws IOException { + return Result.success(insReportService.upAll(file)); + } + + @ValueAuth + @ApiOperation(value = "鏌ュ嚭璇ヨ鍗曚笅姣忎釜鏍峰搧涓嬫瘡涓珯鐐圭殑妫�楠屾鏁�") + @GetMapping("/getInsOrderStateCount") + public Result getInsOrderStateCount(Integer id){ + return Result.success(insReportService.getInsOrderStateCount(id)); + } + + @ValueClassify("鎶ュ憡缂栧埗") + @ApiOperation(value = "鍒ゆ柇鏄惁鐢熸垚鎬绘姤鍛�") + @PostMapping("/isReport") + public Result isReport(@RequestBody InsReportDto insReportDto) { + return Result.success(insReportService.isReport(insReportDto)); + } } -- Gitblit v1.9.3