Merge remote-tracking branch 'origin/main'

This commit is contained in:
2025-12-09 17:22:50 +08:00
22 changed files with 351 additions and 25 deletions

View File

@@ -6,6 +6,7 @@ package com.sdm.common.entity.enums;
public enum MessageTemplateEnum {
TASK_ISSUE("任务通知", "收到一条下发的新任务:%s请前去[任务管理-我执行的]进行处理"),
DATA_ALERT("数据通知", "您的数据存储空间已达阈值,可前往[系统管理-数据存储-存储设置]查看"),
HPC_START("作业通知", "作业已发起"),
HPC_END("作业通知", "作业已结束")
;

View File

@@ -0,0 +1,65 @@
package com.sdm.common.entity.resp.task;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class PerformanceResp {
private Integer id;
private String uuid;
private String nodeId;
private String taskId;
@ApiModelProperty(value = "算列runId")
private String runId;
private String performanceName;
private String nodeName;
private String englishName;
private String nodeCode;
private String poolName;
private String performanceType;
private String unit;
private String targetValue;
private String lowValue;
private String highValue;
private String method;
@ApiModelProperty(value = "指标完成情况 未完成 不合格 风险可控 未分析 合格")
private String completeStatus;
@ApiModelProperty(value = "计算及结果值")
private String resultValue;
private String description;
private String taskName;
private String standard;
private String tenantId;
private LocalDateTime createTime;
private Long creator;
private Integer pid;
}

View File

@@ -27,4 +27,16 @@ public class SimulationRunFeignClientImpl implements ISimulationRunFeignClient {
}
return response;
}
@Override
public SdmResponse<List<Long>> getSimulationKeyResultFileIds(String runId) {
SdmResponse response;
try {
response = simulationRunFeignClient.getSimulationKeyResultFileIds(runId);
} catch (Exception e) {
log.error("查询算例关键结果文件失败", e);
return SdmResponse.failed("查询算例关键结果文件失败");
}
return response;
}
}

View File

@@ -0,0 +1,33 @@
package com.sdm.common.feign.impl.task;
import com.sdm.common.common.SdmResponse;
import com.sdm.common.entity.resp.task.PerformanceResp;
import com.sdm.common.feign.inter.task.ISimuluationPerformanceFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
@Slf4j
@Component
public class SimuluationPerformanceFeignClientImpl implements ISimuluationPerformanceFeignClient {
@Autowired
private ISimuluationPerformanceFeignClient simuluationPerformanceFeignClient;
@Override
public SdmResponse<List<PerformanceResp>> getRunPerformance(String runId) {
SdmResponse response;
try {
response = simuluationPerformanceFeignClient.getRunPerformance(runId);
if (!response.isSuccess()) {
return SdmResponse.failed("查询算例指标失败");
}
return response;
} catch (Exception e) {
log.error("查询算例指标异常", e);
return SdmResponse.failed("查询算例指标异常");
}
}
}

View File

@@ -3,8 +3,12 @@ package com.sdm.common.feign.inter.project;
import com.sdm.common.common.SdmResponse;
import com.sdm.common.entity.req.system.LaunchApproveReq;
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;
import java.util.List;
@FeignClient(name = "project",contextId = "runFeignClient")
@@ -13,4 +17,7 @@ public interface ISimulationRunFeignClient {
@PostMapping("/run/deliverableApproveCallback")
SdmResponse deliverableApproveCallback(@RequestBody LaunchApproveReq req);
@GetMapping(value = "/run/getSimulationKeyResultFileIds")
SdmResponse<List<Long>> getSimulationKeyResultFileIds(@RequestParam String runId);
}

View File

@@ -0,0 +1,18 @@
package com.sdm.common.feign.inter.task;
import com.sdm.common.common.SdmResponse;
import com.sdm.common.entity.resp.task.PerformanceResp;
import jakarta.validation.constraints.NotNull;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = "task",contextId = "taskPerformanceClient")
public interface ISimuluationPerformanceFeignClient {
@GetMapping("/taskPerformance/getRunPerformance")
SdmResponse<List<PerformanceResp>> getRunPerformance(@NotNull @RequestParam String runId);
}

View File

@@ -6,7 +6,9 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = "task")
import java.util.List;
@FeignClient(name = "task",contextId = "taskPoolClient")
public interface ISimuluationTaskPoolFeignClient {
@PostMapping("/taskpool/approveHandleNotice")