fix:仿真策划打tag
This commit is contained in:
@@ -71,8 +71,7 @@ import java.util.*;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.sdm.project.service.impl.NodeServiceImpl.getTagProperty;
|
import static com.sdm.project.service.impl.NodeServiceImpl.*;
|
||||||
import static com.sdm.project.service.impl.NodeServiceImpl.setTagProperty;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@@ -2596,7 +2595,8 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
|||||||
createDirReq.setDirName(dirName);
|
createDirReq.setDirName(dirName);
|
||||||
createDirReq.setDirType(DirTypeEnum.PROJECT_NODE_DIR.getValue());
|
createDirReq.setDirType(DirTypeEnum.PROJECT_NODE_DIR.getValue());
|
||||||
TagReq tagReq = new TagReq();
|
TagReq tagReq = new TagReq();
|
||||||
BeanUtils.copyProperties(taskNode,tagReq);
|
// 将TaskNode的List<String> tag转换为TagReq的String tag
|
||||||
|
copyTagListToString(taskNode, tagReq);
|
||||||
if (NodeTypeEnum.TASK.getValue().equals(uuidOwnType)) {
|
if (NodeTypeEnum.TASK.getValue().equals(uuidOwnType)) {
|
||||||
tagReq.setTaskId(uuid);
|
tagReq.setTaskId(uuid);
|
||||||
}
|
}
|
||||||
@@ -2606,6 +2606,22 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
|
|||||||
log.info("创建项目阶段时,调用创建文件夹的返回值为:{}", response);
|
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) {
|
public void renameDirNew(String uuid, String newDirName) {
|
||||||
RenameDirReq req = new RenameDirReq();
|
RenameDirReq req = new RenameDirReq();
|
||||||
|
|||||||
Reference in New Issue
Block a user