fix:查询有效报告模板

This commit is contained in:
2026-03-05 10:40:48 +08:00
parent 7da5b475f1
commit aa0e580a2b
5 changed files with 56 additions and 0 deletions

View File

@@ -8,6 +8,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
@Slf4j
@Component
@@ -46,4 +48,19 @@ public class SimulationReportFeignClientImpl implements ISimulationReportFeignCl
}
}
@Override
public SdmResponse<List<ReportTemplateResp>> queryValidReportTemplate() {
SdmResponse<List<ReportTemplateResp>> response;
try {
response = reportFeignClient.queryValidReportTemplate();
if (!response.isSuccess()) {
return SdmResponse.failed("查询有效报告模板失败");
}
return response;
} catch (Exception e) {
log.error("查询有效报告模板失败", e);
return SdmResponse.failed("查询有效报告模板失败");
}
}
}

View File

@@ -2,6 +2,7 @@ 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.FlowTemplateResp;
import com.sdm.common.entity.resp.capability.ReportTemplateResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@@ -9,6 +10,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = "capability",contextId = "reportTemplateFeignClient")
public interface ISimulationReportFeignClient {
@@ -19,4 +22,7 @@ public interface ISimulationReportFeignClient {
@GetMapping("/report/queryReportTemplateInfo")
SdmResponse<ReportTemplateResp> queryReportTemplateInfo(@RequestParam("uuid") String uuid);
@GetMapping("/report/queryValidReportTemplate")
SdmResponse<List<ReportTemplateResp>> queryValidReportTemplate();
}