启动脚本+数据总览

This commit is contained in:
2025-11-12 11:01:10 +08:00
parent ebf4e9a6b2
commit e0f9af2d9e
42 changed files with 204 additions and 199 deletions

View File

@@ -1,43 +0,0 @@
package com.sdm.common.entity.enums;
import com.sdm.common.entity.data.IData;
public enum NodeType {
PHASE( "阶段", 1, IData.DATA_TYPE.PHASE),
DISCIPLINE("学科", 2, IData.DATA_TYPE.DISCIPLINE),
SYSTEM("系统", 3, IData.DATA_TYPE.SYSTEM),
TASK_GROUP("任务组", 4, IData.DATA_TYPE.TASK_GROUP);
private final String name;
private final int code;
private final IData.DATA_TYPE dataType;
private NodeType(String name, int code, IData.DATA_TYPE dataType) {
this.dataType = dataType;
this.name = name;
this.code = code;
}
public String getName() {
return name;
}
public int getCode() {
return code;
}
public IData.DATA_TYPE getDataType() {
return dataType;
}
public static IData.DATA_TYPE getDataTypeByCode(int code) {
IData.DATA_TYPE dataType = null;
switch (code) {
case 1 -> dataType = IData.DATA_TYPE.PHASE;
case 2 -> dataType = IData.DATA_TYPE.DISCIPLINE;
case 3 -> dataType = IData.DATA_TYPE.SYSTEM;
case 4 -> dataType = IData.DATA_TYPE.TASK_GROUP;
default -> dataType = IData.DATA_TYPE.INHERIT_TYPE;
}
return dataType;
}
}

View File

@@ -3,6 +3,11 @@ package com.sdm.common.entity.enums;
public enum NodeTypeEnum {
NODE("node"),
PROJECT("project"),
PHASE("phase"),
DISCIPLINE("discipline"),
MACHINE("machine"),
WORKSPACE("workspace"),
TASK("task"),
RUN("run"),
PERFORMANCE("performance");

View File

@@ -9,8 +9,7 @@ import lombok.Data;
@Data
public class UserListReq extends BaseReq {
@Schema(description = "租户ID")
@NotNull(message = "租户ID不能为空")
private Long tenantId = 1979091834410176514L;
private Long tenantId;
@Schema(description = "用户ID")
private Long userId;

View File

@@ -26,5 +26,5 @@ public class UserQueryReq {
@Schema(description = "用户IDS")
private List<Long> userIds;
private Long tenantId = 1979091834410176514L;
private Long tenantId;
}

View File

@@ -23,9 +23,7 @@ public class DataClientFeignClientImpl implements IDataFeignClient {
SdmResponse<List<FileMetadataInfoResp> > response;
try {
response = dataClient.listDir(dirType,parentDirId);
if (!response.isSuccess()) {
return SdmResponse.failed("创建文件夹失败");
}
log.info("查询文件夹列表响应:"+ response);
return response;
} catch (Exception e) {
log.error("创建文件夹失败", e);
@@ -37,9 +35,7 @@ public class DataClientFeignClientImpl implements IDataFeignClient {
SdmResponse response;
try {
response = dataClient.createDir(req);
if (!response.isSuccess()) {
return SdmResponse.failed("创建文件夹失败");
}
log.info("创建文响应件夹:"+ response);
return response;
} catch (Exception e) {
log.error("创建文件夹失败", e);
@@ -52,9 +48,7 @@ public class DataClientFeignClientImpl implements IDataFeignClient {
SdmResponse response;
try {
response = dataClient.renameDirNew(req);
if (!response.isSuccess()) {
return SdmResponse.failed("重命名文件夹失败");
}
log.info("重命名文件夹响应:"+ response);
return response;
} catch (Exception e) {
log.error("重命名文件夹失败", e);
@@ -67,9 +61,7 @@ public class DataClientFeignClientImpl implements IDataFeignClient {
SdmResponse response;
try {
response = dataClient.delDir(req);
if (!response.isSuccess()) {
return SdmResponse.failed("删除文件夹失败");
}
log.info("删除文件夹响应:"+ response);
return response;
} catch (Exception e) {
log.error("删除文件夹失败", e);

View File

@@ -36,7 +36,7 @@ public interface ISimulationNodeFeignClient {
SdmResponse delteNode(@RequestBody DelNodeReq req);
// 项目列表
@GetMapping("/list")
@GetMapping("/node/list")
SdmResponse list(@RequestBody SpdmNodeListReq req);