|
|
|
@ -178,16 +178,7 @@ public class TaskServiceImpl implements TaskService {
|
|
|
|
|
PageResult<TaskDO> pageResult = taskMapper.selectPage(pageReqVO, queryWrapperX); |
|
|
|
|
|
|
|
|
|
Map<Long, TaskAssemblyDTO> map = this.taskAssemble(pageResult.getList()); |
|
|
|
|
List<TaskAssemblyDTO> list = new ArrayList<>(); |
|
|
|
|
pageResult.getList().forEach(item ->{ |
|
|
|
|
if (map.containsKey(item.getId())){ |
|
|
|
|
TaskAssemblyDTO taskAssemblyDTO = map.get(item.getId()); |
|
|
|
|
TaskAssemblyDTO dto = BeanUtil.copyProperties(item, TaskAssemblyDTO.class); |
|
|
|
|
dto.setProjectName(taskAssemblyDTO.getProjectName()); |
|
|
|
|
dto.setTaskMsg(taskAssemblyDTO.getTaskMsg()); |
|
|
|
|
list.add(dto); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
List<TaskAssemblyDTO> list = new ArrayList<>(map.values()); |
|
|
|
|
|
|
|
|
|
PageResult<TaskAssemblyDTO> assemble = new PageResult<>(); |
|
|
|
|
assemble.setTotal(pageResult.getTotal()); |
|
|
|
@ -199,23 +190,7 @@ public class TaskServiceImpl implements TaskService {
|
|
|
|
|
public PageResult<TaskAssemblyDTO> getAdminTaskPage(TaskPageReqVO pageReqVO){ |
|
|
|
|
PageResult<TaskDO> taskPage = taskMapper.selectPage(pageReqVO); |
|
|
|
|
Map<Long, TaskAssemblyDTO> map = this.taskAssemble(taskPage.getList()); |
|
|
|
|
List<TaskAssemblyDTO> list = new ArrayList<>(); |
|
|
|
|
taskPage.getList().forEach(item ->{ |
|
|
|
|
if (map.containsKey(item.getId())){ |
|
|
|
|
TaskAssemblyDTO dto = map.get(item.getId()); |
|
|
|
|
TaskAssemblyDTO newDTO = BeanUtil.copyProperties(item, TaskAssemblyDTO.class); |
|
|
|
|
newDTO.setProjectName(dto.getProjectName()); |
|
|
|
|
newDTO.setTaskName(dto.getTaskName()); |
|
|
|
|
newDTO.setTaskResourceList(dto.getTaskResourceList()); |
|
|
|
|
newDTO.setAreaNameList(dto.getAreaNameList()); |
|
|
|
|
newDTO.setExecutorNameList(dto.getExecutorNameList()); |
|
|
|
|
newDTO.setTaskMsg(dto.getTaskMsg()); |
|
|
|
|
newDTO.setMainPersonName(dto.getMainPersonName()); |
|
|
|
|
newDTO.setCropName(dto.getCropName()); |
|
|
|
|
newDTO.setCreateTime(dto.getCreateTime()); |
|
|
|
|
list.add(newDTO); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
List<TaskAssemblyDTO> list = new ArrayList<>(map.values()); |
|
|
|
|
PageResult<TaskAssemblyDTO> page = new PageResult<>(); |
|
|
|
|
page.setList(list); |
|
|
|
|
page.setTotal(taskPage.getTotal()); |
|
|
|
@ -388,7 +363,7 @@ public class TaskServiceImpl implements TaskService {
|
|
|
|
|
|
|
|
|
|
Map<Long, TaskAssemblyDTO> map = new HashMap<>(); |
|
|
|
|
for (TaskDO taskDO : taskDOList) { |
|
|
|
|
TaskAssemblyDTO dto = new TaskAssemblyDTO(); |
|
|
|
|
TaskAssemblyDTO dto = BeanUtil.copyProperties(taskDO, TaskAssemblyDTO.class); |
|
|
|
|
//项目名
|
|
|
|
|
preAssemblyDTO.getProjectDOList().stream().filter(project -> project.getId().equals(taskDO.getProjectId())).findFirst() |
|
|
|
|
.ifPresent(item ->{ |
|
|
|
|