Commit 7830f7ce authored by 韩桐桐's avatar 韩桐桐

BUGFIX

parent f98d59ac
package com.yeejoin.amos.patrol.dao.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import java.util.Date;
import java.util.List;
/**
......@@ -94,7 +91,7 @@ public class ESPlanTaskListDto {
private String omission;
@Field(type = FieldType.Object)
private List points;
private List<PlanTaskDetail> points;
}
......@@ -599,7 +599,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
*/
private void handleEsPlanTaskListPointsByIds(List<String> taskDetailIds, List<String> taskIds) {
taskIds.forEach(taskId -> esPlanTaskList.findById(taskId).ifPresent(esPlanTaskListDto -> {
List<PlanTaskDetail> points = (List<PlanTaskDetail>) esPlanTaskListDto.getPoints();
List<PlanTaskDetail> points = esPlanTaskListDto.getPoints();
List<PlanTaskDetail> filterPoints = points.stream().filter(point -> !taskDetailIds.contains(Objects.toString(point.getId()))).collect(Collectors.toList());
esPlanTaskList.deleteById(taskId);
if (!filterPoints.isEmpty()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment