Merge branch 'main' of http://192.168.65.198:3000/toolchaintechnologycenter/spdm-backend
# Conflicts: # common/src/main/java/com/sdm/common/entity/enums/FilePermissionEnum.java # project/src/main/java/com/sdm/project/service/impl/ProjectServiceImpl.java # project/src/main/java/com/sdm/project/service/impl/TaskServiceImpl.java
This commit is contained in:
@@ -8,6 +8,7 @@ public class DataDictionary extends BaseBean {
|
||||
{
|
||||
init();
|
||||
}
|
||||
public int id;
|
||||
public String uuid;
|
||||
public String dictName;
|
||||
public String dictValue;
|
||||
|
||||
@@ -14,4 +14,13 @@ public class CommonConstants {
|
||||
|
||||
public static final String GENERAL_N = "N";
|
||||
|
||||
/**
|
||||
* 交付物文件夹名
|
||||
*/
|
||||
public static final String DELIVERABLE_DIR_NAME = "交付物文件";
|
||||
/**
|
||||
* 试验结果文件夹名
|
||||
*/
|
||||
public static final String EXPERIMENT_DIR_NAME = "试验结果";
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,26 @@ public enum FileBizTypeEnum {
|
||||
* 需求附件
|
||||
*/
|
||||
@Schema(description = "需求附件", example = "7")
|
||||
DEMAND_FILE(7),
|
||||
PROJECT_DEMAND_FILE(7),
|
||||
|
||||
/**
|
||||
* 会议纪要-项目
|
||||
*/
|
||||
@Schema(description = "会议纪要-项目", example = "8")
|
||||
PROJECT_MEETING_FILE(8),
|
||||
|
||||
/**
|
||||
* 知识文件-项目
|
||||
*/
|
||||
@Schema(description = "知识文件-项目", example = "9")
|
||||
PROJECT_KNOWLEDGE_FILE(9),
|
||||
|
||||
/**
|
||||
* 附件-项目
|
||||
*/
|
||||
@Schema(description = "附件-项目", example = "10")
|
||||
PROJECT_ATTACHMENT_FILE(10),
|
||||
|
||||
|
||||
/**
|
||||
* 交付物文件
|
||||
@@ -57,6 +76,24 @@ public enum FileBizTypeEnum {
|
||||
@Schema(description = "试验结果文件", example = "12")
|
||||
EXPERIMENT_FILE(12),
|
||||
|
||||
/**
|
||||
* 3D模型
|
||||
*/
|
||||
@Schema(description = "3D模型", example = "13")
|
||||
MODEL_3D_FILE(13),
|
||||
|
||||
/**
|
||||
* 试验数据闭环报告
|
||||
*/
|
||||
@Schema(description = "试验数据闭环报告", example = "14")
|
||||
EXPERIMENT_CLOSING_REPORT_FILE(14),
|
||||
|
||||
/**
|
||||
* 复盘报告
|
||||
*/
|
||||
@Schema(description = "复盘报告", example = "15")
|
||||
REVIEW_REPORT_FILE(15),
|
||||
|
||||
/**
|
||||
* 项目文件
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,8 @@ public enum FilePermissionEnum {
|
||||
ZERO((byte) 0),
|
||||
ALL((byte) (READ.value | WRITE.value | DELETE.value | DOWNLOAD.value | UPLOAD.value)),
|
||||
BASE((byte) (READ.value | DOWNLOAD.value)),
|
||||
ALL_EXCLUDE_DELETE((byte) (READ.value | WRITE.value | DOWNLOAD.value | UPLOAD.value));
|
||||
BASE((byte) (READ.value | DOWNLOAD.value)),
|
||||
BASE_PRO((byte) (READ.value | DOWNLOAD.value | UPLOAD.value));
|
||||
byte value;
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@ public class BatchCreateNormalDirReq {
|
||||
@Schema(description = "父节点对应的文件夹ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "是否跳过权限校验,默认为false", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
private Boolean skipPermissionCheck = false;
|
||||
|
||||
@NotEmpty(message = "文件夹项列表不能为空")
|
||||
@Schema(description = "待创建的文件夹项列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<FolderItemReq> folderItems;
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.sdm.common.entity.req.data;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.sdm.common.entity.enums.FileBizTypeEnum;
|
||||
import com.sdm.common.entity.req.system.DictTagReq;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -67,9 +68,13 @@ public class UploadFilesReq {
|
||||
@Schema(description = "文件名")
|
||||
private String fileName;
|
||||
|
||||
@Schema(description = "文件类型 1:模型文件 2:仿真报告 3:计算文件 4:曲线文件 5:云图文件",implementation = FileBizTypeEnum.class)
|
||||
@Schema(description = "文件类型 1:模型文件 2:仿真报告 3:计算文件 4:曲线文件 5:云图文件", implementation = FileBizTypeEnum.class)
|
||||
private Integer fileType;
|
||||
|
||||
@Schema(description = "字典标签列表")
|
||||
private List<DictTagReq> tags;
|
||||
|
||||
|
||||
/**
|
||||
* 关联项目id
|
||||
*/
|
||||
@@ -127,7 +132,7 @@ public class UploadFilesReq {
|
||||
*/
|
||||
@Schema(description = "扩展字段值")
|
||||
private String extensionValue;
|
||||
|
||||
|
||||
/**
|
||||
* 值的数据类型(string, number, boolean, json等)
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.sdm.common.entity.req.system;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Schema(description = "字典标签查询请求")
|
||||
public class DictTagReq {
|
||||
@Schema(description = "字典名称", example = "file_type")
|
||||
private String dictName;
|
||||
|
||||
@Schema(description = "字典值", example = "document")
|
||||
private String dictValue;
|
||||
|
||||
@Data
|
||||
@Schema(description = "批量查询字典ID请求")
|
||||
public static class BatchDictIdQueryReq {
|
||||
@Schema(description = "字典标签查询项列表")
|
||||
private List<DictTagReq> items;
|
||||
}
|
||||
}
|
||||
@@ -219,4 +219,9 @@ public class SpdmTaskVo extends BaseEntity {
|
||||
@JsonProperty(value = "payAttentionMemberList")
|
||||
private List<CIDUserResp> payAttentionMemberList;
|
||||
|
||||
/**
|
||||
* 仿真执行人userId
|
||||
*/
|
||||
private String eUserId;
|
||||
|
||||
}
|
||||
|
||||
@@ -64,11 +64,11 @@ public class DataClientFeignClientImpl implements IDataFeignClient {
|
||||
SdmResponse<PageDataResp<List<FileMetadataInfoResp>>> response;
|
||||
try {
|
||||
response = dataClient.queryDir(req);
|
||||
log.info("创建文响应件夹:"+ response);
|
||||
log.info("查询文件夹响应:"+ response);
|
||||
return response;
|
||||
} catch (Exception e) {
|
||||
log.error("创建文件夹失败", e);
|
||||
return SdmResponse.failed("创建文件夹失败");
|
||||
log.error("查询文件夹失败", e);
|
||||
return SdmResponse.failed("查询文件夹失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.sdm.common.feign.impl.system;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.sdm.common.common.SdmResponse;
|
||||
import com.sdm.common.entity.bo.DataDictionary;
|
||||
import com.sdm.common.entity.req.system.DictTagReq;
|
||||
import com.sdm.common.entity.resp.PageDataResp;
|
||||
import com.sdm.common.entity.resp.system.CIDUserResp;
|
||||
import com.sdm.common.feign.inter.system.ISysConfigFeignClient;
|
||||
@@ -11,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@@ -32,4 +34,20 @@ public class SysConfigFeignClientImpl implements ISysConfigFeignClient {
|
||||
return SdmResponse.failed("字典信息未查询");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse<Map<String, Map<String, Integer>>> batchQueryDictionaryIds(DictTagReq.BatchDictIdQueryReq req) {
|
||||
SdmResponse<Map<String, Map<String, Integer>>> sdmResponse;
|
||||
try {
|
||||
sdmResponse = sysConfigFeignClient.batchQueryDictionaryIds(req);
|
||||
if(!sdmResponse.isSuccess() ||ObjectUtils.isEmpty(sdmResponse.getData())){
|
||||
return SdmResponse.failed("字典信息未查询");
|
||||
}
|
||||
return sdmResponse;
|
||||
} catch (Exception e) {
|
||||
log.error("字典信息失败", e);
|
||||
return SdmResponse.failed("字典信息未查询");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,15 @@ package com.sdm.common.feign.inter.system;
|
||||
|
||||
import com.sdm.common.common.SdmResponse;
|
||||
import com.sdm.common.entity.bo.DataDictionary;
|
||||
import com.sdm.common.entity.req.system.DictTagReq;
|
||||
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;
|
||||
import java.util.Map;
|
||||
|
||||
@FeignClient(name = "system",contextId = "sysConfigFeignClient")
|
||||
public interface ISysConfigFeignClient {
|
||||
@@ -14,4 +18,7 @@ public interface ISysConfigFeignClient {
|
||||
@GetMapping(value = "/systemData/getDictionaryData")
|
||||
SdmResponse<List<DataDictionary>> getDictionaryData(@RequestParam("dictClass")String dictClass);
|
||||
|
||||
@PostMapping(value = "/systemData/batchDictionaryIds")
|
||||
SdmResponse<Map<String, Map<String, Integer>>> batchQueryDictionaryIds(@RequestBody DictTagReq.BatchDictIdQueryReq req);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user