Merge branch 'main' of http://carsafe.uicp.cn/toolchaintechnologycenter/spdm-backend
This commit is contained in:
@@ -71,8 +71,7 @@ import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.sdm.project.service.impl.NodeServiceImpl.getTagProperty;
|
||||
import static com.sdm.project.service.impl.NodeServiceImpl.setTagProperty;
|
||||
import static com.sdm.project.service.impl.NodeServiceImpl.*;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@@ -2596,7 +2595,8 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
||||
createDirReq.setDirName(dirName);
|
||||
createDirReq.setDirType(DirTypeEnum.PROJECT_NODE_DIR.getValue());
|
||||
TagReq tagReq = new TagReq();
|
||||
BeanUtils.copyProperties(taskNode,tagReq);
|
||||
// 将TaskNode的List<String> tag转换为TagReq的String tag
|
||||
copyTagListToString(taskNode, tagReq);
|
||||
if (NodeTypeEnum.TASK.getValue().equals(uuidOwnType)) {
|
||||
tagReq.setTaskId(uuid);
|
||||
}
|
||||
@@ -2606,6 +2606,22 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
||||
log.info("创建项目阶段时,调用创建文件夹的返回值为:{}", response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将TaskNode的List<String>类型tag复制到TagReq的String类型tag
|
||||
*/
|
||||
private void copyTagListToString(TaskNode source, TagReq target) {
|
||||
for (int i = 1; i <= 10; i++) {
|
||||
try {
|
||||
List<String> tagList = getTagListProperty(source, "tag" + i);
|
||||
if (tagList != null && !tagList.isEmpty()) {
|
||||
setTagProperty(target, "tag" + i, String.join(",", tagList));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 重命名文件夹
|
||||
public void renameDirNew(String uuid, String newDirName) {
|
||||
RenameDirReq req = new RenameDirReq();
|
||||
|
||||
Reference in New Issue
Block a user