1、数据查询二次查询 bugfix
This commit is contained in:
@@ -2,7 +2,9 @@ package com.sdm.project.model.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.sdm.common.entity.pojo.BaseEntity;
|
||||
import com.sdm.common.entity.req.data.TagReq;
|
||||
import com.sdm.project.model.entity.SimulationPerformanceExtra;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -114,4 +116,10 @@ public class PerformanceNodePo extends NodeAllBase {
|
||||
|
||||
private String searchType = "performance";
|
||||
|
||||
/**
|
||||
* 标签请求参数 设置tag1-tag10 ,taskId, runId记录文件所属节点信息
|
||||
*/
|
||||
@Schema(description = "标签请求参数")
|
||||
private TagReq tagReq;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.sdm.project.model.po;
|
||||
|
||||
import com.sdm.common.entity.pojo.BaseEntity;
|
||||
import com.sdm.common.entity.req.data.TagReq;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -83,4 +85,10 @@ public class TaskRunPo extends BaseEntity {
|
||||
private String pMembers;
|
||||
|
||||
private String searchType = "run";
|
||||
|
||||
/**
|
||||
* 标签请求参数 设置tag1-tag10 ,taskId, runId记录文件所属节点信息
|
||||
*/
|
||||
@Schema(description = "标签请求参数")
|
||||
private TagReq tagReq;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,13 @@ package com.sdm.project.model.vo;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.sdm.common.entity.pojo.BaseEntity;
|
||||
import com.sdm.common.entity.req.data.TagReq;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Data
|
||||
public class SpdmAnalysisTaskVo extends BaseEntity {
|
||||
@@ -71,6 +76,12 @@ public class SpdmAnalysisTaskVo extends BaseEntity {
|
||||
@JsonProperty("pMembers")
|
||||
private String pMembers;
|
||||
|
||||
/**
|
||||
* 仿真负责人id
|
||||
*/
|
||||
@JsonProperty("pMemberIdList")
|
||||
private List<Long> pMemberIdList = new ArrayList<>();
|
||||
|
||||
private String tag1;
|
||||
private String tag2;
|
||||
private String tag3;
|
||||
@@ -84,6 +95,10 @@ public class SpdmAnalysisTaskVo extends BaseEntity {
|
||||
|
||||
private String searchType = "task";
|
||||
|
||||
|
||||
/**
|
||||
* 标签请求参数 设置tag1-tag10 ,taskId, runId记录文件所属节点信息
|
||||
*/
|
||||
@Schema(description = "标签请求参数")
|
||||
private TagReq tagReq;
|
||||
|
||||
}
|
||||
|
||||
@@ -1833,6 +1833,8 @@ public class TaskServiceImpl implements ITaskService {
|
||||
continue;
|
||||
}
|
||||
performanceNodePo.setRunName(simulationRun.getRunName());
|
||||
TagReq tagReq = req.getTagReq();
|
||||
performanceNodePo.setTagReq(tagReq);
|
||||
}
|
||||
jsonObject.put("data", performanceList);
|
||||
return SdmResponse.success(jsonObject);
|
||||
@@ -1959,18 +1961,6 @@ public class TaskServiceImpl implements ITaskService {
|
||||
return SdmResponse.success(jsonObject);
|
||||
}
|
||||
|
||||
// 根据仿真负责人过滤
|
||||
Long pMembers = req.getPMembers();
|
||||
if (ObjectUtils.isNotEmpty(pMembers)) {
|
||||
allTaskVoList = allTaskVoList.stream().filter(task -> pMembers.equals(task.getCreator())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
if (CollectionUtils.isEmpty(allTaskVoList)) {
|
||||
log.info("数据分析中未查询到任务信息");
|
||||
jsonObject.put("data", new ArrayList<>());
|
||||
return SdmResponse.success(jsonObject);
|
||||
}
|
||||
|
||||
jsonObject.put("total", allTaskVoList.size());
|
||||
taskVoList = allTaskVoList.stream().skip((long) (req.getCurrent() - 1) * req.getSize()).limit(req.getSize()).toList();
|
||||
if (CollectionUtils.isEmpty(taskVoList)) {
|
||||
@@ -2067,15 +2057,24 @@ public class TaskServiceImpl implements ITaskService {
|
||||
eachTaskNodeMemberPoList = memberMap.get(task.getUuid());
|
||||
if (CollectionUtils.isNotEmpty(eachTaskNodeMemberPoList) && MapUtils.isNotEmpty(cidUserMap)) {
|
||||
List<String> nickNameList = new ArrayList<>();
|
||||
List<Long> idList = new ArrayList<>();
|
||||
for (TaskNodeMemberPo taskNodeMemberPo : eachTaskNodeMemberPoList) {
|
||||
String nickName = cidUserMap.get(taskNodeMemberPo.getUserId());
|
||||
if (StringUtils.isBlank(nickName)) {
|
||||
continue;
|
||||
}
|
||||
nickNameList.add(nickName);
|
||||
idList.add(taskNodeMemberPo.getUserId());
|
||||
}
|
||||
task.setPMembers(String.join(",", nickNameList));
|
||||
task.setPMemberIdList(idList);
|
||||
}
|
||||
task.setTagReq(tagReq);
|
||||
}
|
||||
// 根据仿真负责人过滤
|
||||
Long pMembers = req.getPMembers();
|
||||
if (ObjectUtils.isNotEmpty(pMembers)) {
|
||||
allTaskVoList = allTaskVoList.stream().filter(task -> task.getPMemberIdList().contains(pMembers)).collect(Collectors.toList());
|
||||
}
|
||||
jsonObject.put("currentPage", req.getCurrent());
|
||||
jsonObject.put("pageSize", req.getSize());
|
||||
@@ -2346,6 +2345,8 @@ public class TaskServiceImpl implements ITaskService {
|
||||
if (CollectionUtils.isEmpty(nickNameList)) continue;
|
||||
taskRunPo.setPMembers(cidUserResp.getData().stream().map(CIDUserResp::getNickname).collect(Collectors.joining(",")));
|
||||
}
|
||||
TagReq tagReq = req.getTagReq();
|
||||
taskRunPo.setTagReq(tagReq);
|
||||
}
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
|
||||
Reference in New Issue
Block a user