From 82ce59218139d9fefeae7b9e5fbc88b499ff023f Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 08 十月 2026 13:35:06 +0800
Subject: [PATCH] feat(inspect): 新增新聚检验订单编辑功能并优化报告生成流程 - 新增 updateNewJuInsOrder 接口支持新聚检验订单修改 - 增加文件上传大小限制至200MB,请求大小限制至400MB - 在设备信息中新增出厂编号字段显示 - 优化温湿度处理逻辑,报告中仅显示温度信息 - 新增印章管理功能,支持MA标志章、报告章和骑缝章配置 - 完善检验报告生成流程,增加多种报告类型常量定义 - 优化附件上传功能,增加空值检查和返回值处理 - 调整委托编号生成逻辑,完善新聚订单可编辑性判断 - 更新CNAS流程中报告编号使用正式报告编号替代委托编号
---
inspect-server/src/main/java/com/ruoyi/inspect/controller/InsReportController.java | 34 ++++++++++++++++++++++++++++++----
1 files changed, 30 insertions(+), 4 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..41cdfad 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;
@@ -111,7 +115,20 @@
Integer id = (Integer) param.get("id");
Integer isRatify = (Integer) param.get("isRatify");
String ratifyTell = (String) param.get("ratifyTell");
- return Result.success(insReportService.ratifyReport(id, isRatify, ratifyTell));
+ Object sealIdsObj = param.get("sealIds");
+ String sealIds = sealIdsObj == null ? null : String.valueOf(sealIdsObj);
+ Integer maSealId = toInteger(param.get("maSealId"));
+ Integer reportSealId = toInteger(param.get("reportSealId"));
+ Integer seamSealId = toInteger(param.get("seamSealId"));
+ return Result.success(insReportService.ratifyReport(
+ id, isRatify, ratifyTell, sealIds, maSealId, reportSealId, seamSealId));
+ }
+
+ private Integer toInteger(Object value) {
+ if (value == null || String.valueOf(value).trim().isEmpty()) {
+ return null;
+ }
+ return value instanceof Number ? ((Number) value).intValue() : Integer.valueOf(String.valueOf(value));
}
@Anonymous
@@ -150,12 +167,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