fix[project]: 根据todoId去重,保留首次出现的待办
This commit is contained in:
@@ -2392,7 +2392,6 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
*/
|
||||
private List<LyricVTodoEmulationInfoDM> queryTodoListWithFixedTime(String startTime, String endTime) {
|
||||
// 查询原始待办数据
|
||||
// TODO 这里要确认是不是只拉取有限元仿真
|
||||
List<LyricVTodoEmulationInfoDM> todoInfoList = lyricVTodoInfoService.lambdaQuery()
|
||||
.eq(LyricVTodoEmulationInfoDM::getRelevanceTask, DemandTypeEnum.FINITE_ELEMENT_SIMULATION.getName())
|
||||
.ge(LyricVTodoEmulationInfoDM::getCreateTime, startTime)
|
||||
@@ -2403,13 +2402,14 @@ public class LyricInternalServiceImpl implements ILyricInternalService {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
// 过滤3D负责人为空的待办数据
|
||||
todoInfoList = todoInfoList.stream().filter(todo -> StringUtils.isNotBlank(todo.getThreeDimensionalPerformer()))
|
||||
.collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(todoInfoList)) {
|
||||
log.info("未查询到{}到{}的待同步的有效待办数据", startTime, endTime);
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 根据todoId去重,保留首次出现的待办
|
||||
todoInfoList = todoInfoList.stream()
|
||||
// 过滤掉todoId为null的数据
|
||||
.filter(dm -> dm.getTodoId() != null)
|
||||
.collect(Collectors.collectingAndThen(
|
||||
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(LyricVTodoEmulationInfoDM::getTodoId))),
|
||||
ArrayList::new
|
||||
));
|
||||
|
||||
List<LyricVTodoEmulationInfoDM> expTodoInfoList = todoInfoList.stream().filter(todoInfo -> DemandTypeEnum.FINITE_ELEMENT_SIMULATION.getName().equals(todoInfo.getRelevanceTask()))
|
||||
.toList();
|
||||
|
||||
@@ -3536,6 +3536,15 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
log.info("项目{}未查询到待办事项,无需同步", projectNum);
|
||||
return SdmResponse.success();
|
||||
}
|
||||
// 根据todoId去重,保留首次出现的待办
|
||||
todoInfoList = todoInfoList.stream()
|
||||
// 过滤掉todoId为null的数据
|
||||
.filter(dm -> dm.getTodoId() != null)
|
||||
.collect(Collectors.collectingAndThen(
|
||||
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(LyricVTodoEmulationInfoDM::getTodoId))),
|
||||
ArrayList::new
|
||||
));
|
||||
|
||||
log.info("项目{}查询到{}条待办事项", projectNum, todoInfoList.size());
|
||||
|
||||
// 3. 过滤已同步的待办
|
||||
|
||||
Reference in New Issue
Block a user