From fbd4ecb70baf2e671876ca809a81f6e6fe7342ee Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期日, 20 九月 2026 19:52:50 +0800
Subject: [PATCH] feat(inspect): 新增检测标准方法报告文本功能并优化报告生成 - 委托编号生成逻辑调整为下单时生成并校验唯一性,避免审核时重复 - 新增标准模板价格字段及对应的数据模型和数据库映射 - 订单费用详情查询逻辑重构为基于模板价格计算方式 - 新增标准模板与设备绑定关系的数据结构和管理功能 - 委托编号唯一性校验逻辑增强
---
inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java b/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java
index 1fef16d..06a045e 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java
@@ -10,6 +10,7 @@
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.framework.exception.ErrorException;
import com.ruoyi.inspect.dto.ReportPageDto;
+import com.ruoyi.inspect.service.InsOrderPlanService;
import com.ruoyi.inspect.service.InsReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -37,6 +38,9 @@
@Resource
private InsReportService insReportService;
+
+ @Resource
+ private InsOrderPlanService insOrderPlanService;
@Value("${wordUrl}")
private String wordUrl;
@@ -150,12 +154,21 @@
return Result.success(insReportService.downAll(ids));
}
- @ApiOperation(value = "鎶ュ憡涓嬭浇")
+ @ApiOperation(value = "鎶ュ憡涓嬭浇锛坮eportType锛�0妫�娴嬫姤鍛婏紝1妫�楠屾姤鍛婏級")
@GetMapping("/download")
@PreAuthorize("@ss.hasPermi('business:reportPreparation')")
@PersonalScope(permsName = "business:reportPreparation", objectName = ReportPageDto.class, paramName = "createOrderUser")
- public void download(Integer id, ReportPageDto reportPageDto, HttpServletResponse response) {
- insReportService.download(id, reportPageDto.getCreateOrderUser(), response);
+ public void download(Integer id, Integer reportType, ReportPageDto reportPageDto, HttpServletResponse response) {
+ insReportService.download(id, reportType, reportPageDto.getCreateOrderUser(), response);
+ }
+
+ @ApiOperation(value = "閲嶆柊鐢熸垚鎶ュ憡")
+ @PostMapping("/regenerate")
+// @PreAuthorize("@ss.hasPermi('business:reportPreparation')")
+ @PersonalScope(permsName = "business:reportPreparation", objectName = ReportPageDto.class, paramName = "createOrderUser")
+ public Result regenerate(@RequestBody ReportPageDto reportPageDto) {
+ insOrderPlanService.regenerateReport(reportPageDto.getId(), reportPageDto.getCreateOrderUser());
+ return Result.success();
}
@ApiOperation(value = "鎶ュ憡鎵归噺涓婁紶")
--
Gitblit v1.9.3