|
|
|
@ -478,13 +478,17 @@ public class TaskServiceImpl implements TaskService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<Map<String, String>> whatDayHaveTask(){ |
|
|
|
|
public List<Map<String, String>> whatDayHaveTask(Long projectId){ |
|
|
|
|
LambdaQueryWrapperX<TaskDO> queryWrapperX = new LambdaQueryWrapperX<>(); |
|
|
|
|
queryWrapperX.ne(TaskDO::getDraft, true); |
|
|
|
|
queryWrapperX.ne(TaskDO::getPretendDelete, true); |
|
|
|
|
queryWrapperX.eqIfPresent(TaskDO::getProjectId, projectId); |
|
|
|
|
List<TaskDO> taskList = taskMapper.selectList(queryWrapperX); |
|
|
|
|
Map<Object, List<TaskDO>> dateMap = taskList.stream().collect(Collectors.groupingBy(item -> DateUtil.format(item.getPlanStartTime(), DatePattern.NORM_DATE_FORMAT))); |
|
|
|
|
List<Map<String, String>> list = new ArrayList<>(); |
|
|
|
|
if (ObjectUtil.isEmpty(taskList)){ |
|
|
|
|
return list; |
|
|
|
|
} |
|
|
|
|
Map<Object, List<TaskDO>> dateMap = taskList.stream().collect(Collectors.groupingBy(item -> DateUtil.format(item.getPlanStartTime(), DatePattern.NORM_DATE_FORMAT))); |
|
|
|
|
dateMap.entrySet().stream().forEach(item ->{ |
|
|
|
|
Map map = new HashMap<String,String>() ; |
|
|
|
|
map.put("date", item.getKey().toString()); |
|
|
|
|