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 = "报告下载(reportType: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 = "报告批量上传")