Compare commits
2 Commits
9068e081a2
...
7e29acfce6
| Author | SHA1 | Date | |
|---|---|---|---|
| 7e29acfce6 | |||
| 5bc397bc0e |
@@ -30,10 +30,7 @@ import com.sdm.common.feign.impl.system.SysDeptFeignClientImpl;
|
||||
import com.sdm.common.feign.impl.system.SysUserFeignClientImpl;
|
||||
import com.sdm.common.log.CoreLogger;
|
||||
import com.sdm.common.service.UserNameCacheService;
|
||||
import com.sdm.common.utils.FilesUtil;
|
||||
import com.sdm.common.utils.MdcUtil;
|
||||
import com.sdm.common.utils.PageUtils;
|
||||
import com.sdm.common.utils.RandomUtil;
|
||||
import com.sdm.common.utils.*;
|
||||
import com.sdm.outbridge.entity.*;
|
||||
import com.sdm.outbridge.mode.GetProcessDataReq;
|
||||
import com.sdm.outbridge.mode.HkUploadFileReq;
|
||||
@@ -657,6 +654,7 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
log.error("待办的创建时间为空,待办id为:{}", todo.getTodoId());
|
||||
}
|
||||
req.setCreateTime(createTime.replace("T", " "));
|
||||
req.setUpdateTime(DateUtils.getCurrentDateTime());
|
||||
req.setDemandSource(SYNC_PROJECT_SOURCE);
|
||||
// if (isConvertibleToInt(todo.getIntroduceBy())) {
|
||||
// req.setCreator(Long.valueOf(todo.getIntroduceBy()));
|
||||
@@ -3123,6 +3121,8 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
spdmProjectNodeEditReq.setPid("");
|
||||
spdmProjectNodeEditReq.setCreateTime(curDateStr);
|
||||
spdmProjectNodeEditReq.setCreator(jobNumber);
|
||||
spdmProjectNodeEditReq.setUpdateTime(DateUtils.getCurrentDateTime());
|
||||
spdmProjectNodeEditReq.setUpdater(jobNumber);
|
||||
spdmProjectNodeEditReq.setTenantId(tenantId);
|
||||
spdmProjectNodeEditReq.setProjectSource(SYNC_PROJECT_SOURCE);
|
||||
spdmProjectNodeEditReq.setProjectId(Math.toIntExact(lyricVProjectToDM.getId()));
|
||||
|
||||
@@ -47,10 +47,7 @@ import com.sdm.project.bo.ExportOperate;
|
||||
import com.sdm.project.common.MemberTypeEnum;
|
||||
import com.sdm.project.common.TaskExeStatusEnum;
|
||||
import com.sdm.project.common.TaskQryTypeEnum;
|
||||
import com.sdm.project.dao.SimulationDemandMapper;
|
||||
import com.sdm.project.dao.SimulationNodeMapper;
|
||||
import com.sdm.project.dao.SimulationProjectMapper;
|
||||
import com.sdm.project.dao.SimulationTaskMapper;
|
||||
import com.sdm.project.dao.*;
|
||||
import com.sdm.project.model.bo.*;
|
||||
import com.sdm.project.model.entity.*;
|
||||
import com.sdm.project.model.po.PerformanceNodePo;
|
||||
@@ -2009,6 +2006,7 @@ public class TaskServiceImpl implements ITaskService {
|
||||
|
||||
@Override
|
||||
public SdmResponse analysisPerformanceList(SpdmAnalysisPerformanceListReq req) {
|
||||
Long tenantId = ThreadLocalContext.getTenantId();
|
||||
SpdmAnalysisTaskListReq taskReq = new SpdmAnalysisTaskListReq();
|
||||
BeanUtils.copyProperties(req, taskReq);
|
||||
taskReq.setCurrent(1);
|
||||
@@ -2023,6 +2021,11 @@ public class TaskServiceImpl implements ITaskService {
|
||||
if (performanceTagReq != null) {
|
||||
performanceTagReq.setTaskId(req.getTaskNodeId());
|
||||
}
|
||||
TagReq tagReq = req.getTagReq();
|
||||
String runName = "";
|
||||
if (tagReq != null && StringUtils.isNotBlank(tagReq.getRunName())) {
|
||||
runName = tagReq.getRunName();
|
||||
}
|
||||
SdmResponse response = analysisTaskList(taskReq);
|
||||
if (ObjectUtils.isEmpty(response)) {
|
||||
log.info("指标查询中,未查询到任务1");
|
||||
@@ -2055,6 +2058,19 @@ public class TaskServiceImpl implements ITaskService {
|
||||
log.info("指标查询中,未查询到指标3");
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
}
|
||||
}else if (StringUtils.isNotBlank(runName)) {
|
||||
List<SimulationRun> runList = simulationRunService.lambdaQuery().like(SimulationRun::getRunName, runName).eq(SimulationRun::getTenantId, tenantId)
|
||||
.list();
|
||||
if (CollectionUtils.isEmpty(runList)) {
|
||||
log.info("runList is empty");
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
}
|
||||
List<String> runIdList = runList.stream().map(SimulationRun::getUuid).toList();
|
||||
performanceNodePoList = performanceNodePoList.stream().filter(performanceNodePo -> runIdList.contains(performanceNodePo.getRunId())).toList();
|
||||
if (CollectionUtils.isEmpty(performanceNodePoList)) {
|
||||
log.info("指标查询中,未查询到指标3");
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
}
|
||||
} else {
|
||||
// 不传runId 为导出任务下的指标 筛除掉算例下的指标
|
||||
if (req.getIsExportFlag()) {
|
||||
@@ -2181,10 +2197,10 @@ public class TaskServiceImpl implements ITaskService {
|
||||
continue;
|
||||
}
|
||||
performanceNodePo.setRunName(simulationRun.getRunName());
|
||||
TagReq tagReq = performanceNodePo.getTagReq();
|
||||
if (tagReq != null) {
|
||||
tagReq.setRunId(simulationRun.getUuid());
|
||||
tagReq.setRunName(simulationRun.getRunName());
|
||||
TagReq returnTagReq = performanceNodePo.getTagReq();
|
||||
if (returnTagReq != null) {
|
||||
returnTagReq.setRunId(simulationRun.getUuid());
|
||||
returnTagReq.setRunName(simulationRun.getRunName());
|
||||
}
|
||||
}
|
||||
jsonObject.put("data", performanceList);
|
||||
@@ -2261,6 +2277,10 @@ public class TaskServiceImpl implements ITaskService {
|
||||
req.setToDoMarkerList(Arrays.stream(req.getToDoMarker().split(",")).toList());
|
||||
}
|
||||
|
||||
// 20260416 数据查询中的任务、算例名称需要支持模糊搜索
|
||||
String taskName = tagReq.getTaskName();
|
||||
req.setTaskName(taskName);
|
||||
|
||||
|
||||
String taskNodeId = tagReq.getTaskId();
|
||||
List<SpdmAnalysisTaskVo> taskVoList;
|
||||
@@ -2649,6 +2669,10 @@ public class TaskServiceImpl implements ITaskService {
|
||||
log.info("指标查询中,未查询到任务2");
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
}
|
||||
TagReq tagReq = req.getTagReq();
|
||||
if (tagReq != null && StringUtils.isNotBlank(tagReq.getRunName())) {
|
||||
req.setRunName(tagReq.getRunName());
|
||||
}
|
||||
List<String> taskIdList = taskVoList.stream().map(SpdmAnalysisTaskVo::getUuid).toList();
|
||||
List<TaskRunPo> runPoList = projectMapper.queryRunListByNodeIdList(taskIdList, req);
|
||||
if (CollectionUtils.isEmpty(runPoList)) {
|
||||
@@ -2660,7 +2684,6 @@ public class TaskServiceImpl implements ITaskService {
|
||||
List<TaskRunPo> filterRunList = new ArrayList<>();
|
||||
|
||||
// 根据runId过滤
|
||||
TagReq tagReq = req.getTagReq();
|
||||
if (tagReq != null && StringUtils.isNotBlank(tagReq.getRunId())) {
|
||||
runPoList = runPoList.stream().filter(run -> tagReq.getRunId().equals(run.getUuid())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@@ -690,8 +690,8 @@
|
||||
and STR_TO_DATE(createTime,'%Y-%m-%d %H:%i:%s') <= #{req.endTime}
|
||||
]]>
|
||||
</if>
|
||||
<if test="req.name != null and req.name != ''">
|
||||
<bind name="searchKey1" value="'%' + req.name + '%'"/>
|
||||
<if test="req.runName != null and req.runName != ''">
|
||||
<bind name="searchKey1" value="'%' + req.runName + '%'"/>
|
||||
and runName like #{searchKey1}
|
||||
</if>
|
||||
<if test="req.type != null and req.type != ''">
|
||||
|
||||
Reference in New Issue
Block a user