feat:算例下编辑报告

This commit is contained in:
2026-01-13 17:33:29 +08:00
parent f9b2c327bb
commit b8e125f0b0
14 changed files with 660 additions and 16 deletions

View File

@@ -0,0 +1,18 @@
package com.sdm.common.entity.req.project;
import lombok.Data;
@Data
public class EditReportReq {
private String runId;
private String reportTemplate;
private String reportContent;
}

View File

@@ -0,0 +1,65 @@
package com.sdm.common.entity.resp.capability;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class ReportTemplateResp {
@Schema(description = "报告模版唯一ID")
private String uuid;
@Schema(description = "报告模版编码")
private String templateCode;
@Schema(description = "报告模版名称")
private String templateName;
@Schema(description = "报告模版版本")
private String templateVersion;
@Schema(description = "报告模版内容")
private String templateContent;
@Schema(description = "报告模板绑定文件ID")
private Long fileId;
@Schema(description = "报告模版状态 -1:草稿 0禁用 1启用")
private Integer templateStatus;
@Schema(description = "报告模版类型(分析方向)")
private String templateType;
@Schema(description = "报告模版审批状态 0未审批 1审批中 2审批通过 3审批未通过")
private Integer approveType;
@Schema(description = "报告模版评审流ID")
private String approveFlowId;
@Schema(description = "报告模版描述信息")
private String comment;
@Schema(description = "租户ID")
private Long tenantId;
@Schema(description = "更新时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
@Schema(description = "模版创建者ID")
private Long creator;
@Schema(description= "创建者名称,列表展示使用")
private String creatorName;
@Schema(description = "模版创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "模版更新人ID")
private Long updater;
}

View File

@@ -2,6 +2,7 @@ package com.sdm.common.feign.impl.capability;
import com.sdm.common.common.SdmResponse;
import com.sdm.common.entity.req.system.LaunchApproveReq;
import com.sdm.common.entity.resp.capability.ReportTemplateResp;
import com.sdm.common.feign.inter.capability.ISimulationReportFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -30,4 +31,19 @@ public class SimulationReportFeignClientImpl implements ISimulationReportFeignCl
}
}
@Override
public SdmResponse<ReportTemplateResp> queryReportTemplateInfo(String uuid) {
SdmResponse response;
try {
response = reportFeignClient.queryReportTemplateInfo(uuid);
if (!response.isSuccess()) {
return SdmResponse.failed("查询报告模板失败");
}
return response;
} catch (Exception e) {
log.error("查询报告模板失败", e);
return SdmResponse.failed("查询报告模板失败");
}
}
}

View File

@@ -2,9 +2,12 @@ package com.sdm.common.feign.inter.capability;
import com.sdm.common.common.SdmResponse;
import com.sdm.common.entity.req.system.LaunchApproveReq;
import com.sdm.common.entity.resp.capability.ReportTemplateResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = "capability",contextId = "reportTemplateFeignClient")
@@ -13,4 +16,7 @@ public interface ISimulationReportFeignClient {
@PostMapping("/report/approveHandleNotice")
SdmResponse receiveApproveNotice(@RequestBody LaunchApproveReq req);
@GetMapping("/report/queryReportTemplateInfo")
SdmResponse<ReportTemplateResp> queryReportTemplateInfo(@RequestParam("uuid") String uuid);
}