|
|
@ -1,23 +1,40 @@ |
|
|
|
package cn.iocoder.yudao.module.farm.service.task; |
|
|
|
package cn.iocoder.yudao.module.farm.service.task; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
|
|
|
|
import cn.hutool.core.text.StrBuilder; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.project.dto.ProjectListDTO; |
|
|
|
import cn.iocoder.yudao.framework.common.page.PageUtil; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.task.dto.TaskMsgDTO; |
|
|
|
import cn.iocoder.yudao.framework.common.page.PageVO; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.resource.dto.ResourceDTO; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.resource.dto.ResourceMsgDTO; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.task.dto.*; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.area.AreaDO; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.area.AreaDO; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.crop.CropDO; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.project.ProjectDO; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.resource.ResourceDO; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.resourceType.ResourceTypeDO; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.taskCate.TaskCateDO; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.taskCate.TaskCateDO; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.area.AreaMapper; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.area.AreaMapper; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.crop.CropMapper; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.project.ProjectMapper; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.resource.ResourceMapper; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.resourceType.ResourceTypeMapper; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.taskCate.TaskCateMapper; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.taskCate.TaskCateMapper; |
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.CpUser.CpUserDO; |
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.CpUser.CpUserDO; |
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.system.dal.mysql.CpUser.CpUserMapper; |
|
|
|
import cn.iocoder.yudao.module.system.dal.mysql.CpUser.CpUserMapper; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.system.service.CpUser.CpUserService; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
|
|
|
import com.zsw.base.R; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.task.vo.*; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.task.vo.*; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.task.TaskDO; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.task.TaskDO; |
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult; |
|
|
@ -45,6 +62,17 @@ public class TaskServiceImpl implements TaskService { |
|
|
|
private AreaMapper areaMapper; |
|
|
|
private AreaMapper areaMapper; |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private TaskCateMapper taskCateMapper; |
|
|
|
private TaskCateMapper taskCateMapper; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private CpUserService cpUserService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private ProjectMapper projectMapper; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private CropMapper cropMapper; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private ResourceTypeMapper resourceTypeMapper; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private ResourceMapper resourceMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Long createTask(TaskCreateReqVO createReqVO) { |
|
|
|
public Long createTask(TaskCreateReqVO createReqVO) { |
|
|
@ -93,6 +121,33 @@ public class TaskServiceImpl implements TaskService { |
|
|
|
return taskMapper.selectPage(pageReqVO); |
|
|
|
return taskMapper.selectPage(pageReqVO); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
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()); |
|
|
|
|
|
|
|
list.add(newDTO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
PageResult<TaskAssemblyDTO> page = new PageResult<>(); |
|
|
|
|
|
|
|
page.setList(list); |
|
|
|
|
|
|
|
page.setTotal(taskPage.getTotal()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return page; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public PageResult<TaskDO> getTaskSearchPage(TaskPageSearchReqVO pageVO){ |
|
|
|
public PageResult<TaskDO> getTaskSearchPage(TaskPageSearchReqVO pageVO){ |
|
|
|
pageVO.setPageNo(pageVO.getPageNo() - 1); |
|
|
|
pageVO.setPageNo(pageVO.getPageNo() - 1); |
|
|
@ -191,4 +246,189 @@ public class TaskServiceImpl implements TaskService { |
|
|
|
return taskMsgList; |
|
|
|
return taskMsgList; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public R<TaskDetailDTO> appGetTask(Long id){ |
|
|
|
|
|
|
|
TaskDO taskDO = taskMapper.selectById(id); |
|
|
|
|
|
|
|
TaskDetailDTO taskMsg = new TaskDetailDTO(); |
|
|
|
|
|
|
|
BeanUtil.copyProperties(taskDO, taskMsg); |
|
|
|
|
|
|
|
List<Long> userIdList = taskDO.getExecutorPerson().toJavaList(Long.class); |
|
|
|
|
|
|
|
List<CpUserDO> userList = cpUserMapper.selectList(Wrappers.<CpUserDO>lambdaQuery().in(CpUserDO::getId, userIdList)); |
|
|
|
|
|
|
|
//负责人
|
|
|
|
|
|
|
|
taskMsg.setApiMainPerson(cpUserService.getById(String.valueOf(taskMsg.getMainPerson()))); |
|
|
|
|
|
|
|
//执行人
|
|
|
|
|
|
|
|
taskMsg.setApiExecutor(userList); |
|
|
|
|
|
|
|
return R.success(taskMsg); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public R<PageVO<TaskDetailDTO>> apiGetTaskPage(TaskPageDTO pageDTO){ |
|
|
|
|
|
|
|
PageUtil.startPage(pageDTO); |
|
|
|
|
|
|
|
LambdaQueryWrapperX<TaskDO> lambdaQueryWrapperX = new LambdaQueryWrapperX<>(); |
|
|
|
|
|
|
|
List<TaskDO> taskDOList = taskMapper.selectList(lambdaQueryWrapperX); |
|
|
|
|
|
|
|
List<TaskDetailDTO> taskList = BeanUtil.copyToList(taskDOList, TaskDetailDTO.class); |
|
|
|
|
|
|
|
PageVO<TaskDetailDTO> pageVO = PageUtil.convertPageInfo(taskList); |
|
|
|
|
|
|
|
return R.success(pageVO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 任务里面信息预查询(查出所有需要的) |
|
|
|
|
|
|
|
**/ |
|
|
|
|
|
|
|
public TaskPreAssemblyDTO taskPreAssemble(List<TaskDO> taskDOList){ |
|
|
|
|
|
|
|
//项目名
|
|
|
|
|
|
|
|
List<Long> projectIdList = taskDOList.stream().map(TaskDO::getProjectId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<ProjectDO> projectDOList = projectMapper.selectList(new LambdaQueryWrapperX<ProjectDO>().inIfPresent(ProjectDO::getId, projectIdList)); |
|
|
|
|
|
|
|
//区域
|
|
|
|
|
|
|
|
List<Long> areaIdList = new ArrayList<>(); |
|
|
|
|
|
|
|
//执行人
|
|
|
|
|
|
|
|
List<Long> executorIdList = new ArrayList<>(); |
|
|
|
|
|
|
|
//资源 要处理的数据
|
|
|
|
|
|
|
|
Map<Long,List<ResourceDTO>> resourceMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (TaskDO taskDO : taskDOList) { |
|
|
|
|
|
|
|
for (Object area : taskDO.getAreas()) { |
|
|
|
|
|
|
|
areaIdList.addAll(JSONArray.parseArray(area.toString(), Long.class)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
executorIdList.addAll(taskDO.getExecutorPerson().toJavaList(Long.class)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resourceMap.put(taskDO.getId(), taskDO.getResources().toJavaList(ResourceDTO.class)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<AreaDO> areaDOList = areaMapper.selectList(new LambdaQueryWrapperX<AreaDO>().inIfPresent(AreaDO::getId, areaIdList)); |
|
|
|
|
|
|
|
List<CpUserDO> executorList = cpUserMapper.selectList(new LambdaQueryWrapperX<CpUserDO>().inIfPresent(CpUserDO::getId, executorIdList)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//负责人
|
|
|
|
|
|
|
|
List<Long> mainPersonIdList = taskDOList.stream().map(TaskDO::getMainPerson).collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<CpUserDO> mainPersonList = cpUserMapper.selectList(new LambdaQueryWrapperX<CpUserDO>().inIfPresent(CpUserDO::getId, mainPersonIdList)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//作物名
|
|
|
|
|
|
|
|
List<Long> cropIdList = taskDOList.stream().map(TaskDO::getCropId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<CropDO> cropDOList = cropMapper.selectList(new LambdaQueryWrapperX<CropDO>().inIfPresent(CropDO::getId, cropIdList)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//任务名
|
|
|
|
|
|
|
|
List<Long> taskCateIdList = taskDOList.stream().map(TaskDO::getTaskCateId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<TaskCateDO> taskCateDOList = taskCateMapper.selectList(new LambdaQueryWrapperX<TaskCateDO>().inIfPresent(TaskCateDO::getId, taskCateIdList)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//任务内容
|
|
|
|
|
|
|
|
List<Long> taskCateNameIdList = taskDOList.stream().map(TaskDO::getTaskCateName).collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<TaskCateDO> taskMsgList = taskCateMapper.selectList(new LambdaQueryWrapperX<TaskCateDO>().inIfPresent(TaskCateDO::getId, taskCateNameIdList)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//资源 处理下
|
|
|
|
|
|
|
|
List<ResourceDTO> resourceAssemble = new ArrayList<>(); |
|
|
|
|
|
|
|
for (List<ResourceDTO> dto : resourceMap.values()){ |
|
|
|
|
|
|
|
resourceAssemble.addAll(dto); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<Long> resourceTypeIdList = new ArrayList<>(); |
|
|
|
|
|
|
|
List<Long> resourceIdList = new ArrayList<>(); |
|
|
|
|
|
|
|
for (ResourceDTO resourceDTO : resourceAssemble) { |
|
|
|
|
|
|
|
resourceTypeIdList.add(resourceDTO.getResourceId().get(0)); |
|
|
|
|
|
|
|
resourceIdList.add(resourceDTO.getResourceId().get(1)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<ResourceTypeDO> resourceTypeList = resourceTypeMapper.selectList(new LambdaQueryWrapperX<ResourceTypeDO>().inIfPresent(ResourceTypeDO::getId, resourceTypeIdList)); |
|
|
|
|
|
|
|
List<ResourceDO> resourceList = resourceMapper.selectList(new LambdaQueryWrapperX<ResourceDO>().inIfPresent(ResourceDO::getId, resourceIdList)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<Long, List<ResourceMsgDTO>> taskResouceMap = new HashMap<>(); |
|
|
|
|
|
|
|
for (Long taskId : resourceMap.keySet()){ |
|
|
|
|
|
|
|
List<ResourceMsgDTO> dtoList= new ArrayList<>(); |
|
|
|
|
|
|
|
List<ResourceDTO> innerList = resourceMap.get(taskId); |
|
|
|
|
|
|
|
innerList.forEach(inner ->{ |
|
|
|
|
|
|
|
ResourceMsgDTO msg = new ResourceMsgDTO(); |
|
|
|
|
|
|
|
msg.setNum(inner.getNum()); |
|
|
|
|
|
|
|
resourceTypeList.forEach(type ->{ |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(inner) && inner.getResourceId().get(0).equals(type.getId())){ |
|
|
|
|
|
|
|
msg.setResourceType(type.getName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
resourceList.forEach(res ->{ |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(inner) && inner.getResourceId().get(1).equals(res.getId())){ |
|
|
|
|
|
|
|
msg.setResourceName(res.getName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
dtoList.add(msg); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
taskResouceMap.put(taskId, dtoList); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return TaskPreAssemblyDTO.builder() |
|
|
|
|
|
|
|
.projectDOList(projectDOList) |
|
|
|
|
|
|
|
.areaDOList(areaDOList) |
|
|
|
|
|
|
|
.executorList(executorList) |
|
|
|
|
|
|
|
.mainPersonList(mainPersonList) |
|
|
|
|
|
|
|
.cropDOList(cropDOList) |
|
|
|
|
|
|
|
.taskCateDOList(taskCateDOList) |
|
|
|
|
|
|
|
.taskMsgList(taskMsgList) |
|
|
|
|
|
|
|
.taskResouceMap(taskResouceMap) |
|
|
|
|
|
|
|
.build(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 任务所需信息组装 |
|
|
|
|
|
|
|
* @param taskDOList 任务列表 |
|
|
|
|
|
|
|
**/ |
|
|
|
|
|
|
|
public Map<Long, TaskAssemblyDTO> taskAssemble(List<TaskDO> taskDOList){ |
|
|
|
|
|
|
|
TaskPreAssemblyDTO preAssemblyDTO = this.taskPreAssemble(taskDOList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<Long, TaskAssemblyDTO> map = new HashMap<>(); |
|
|
|
|
|
|
|
for (TaskDO taskDO : taskDOList) { |
|
|
|
|
|
|
|
TaskAssemblyDTO dto = new TaskAssemblyDTO(); |
|
|
|
|
|
|
|
//项目名
|
|
|
|
|
|
|
|
preAssemblyDTO.getProjectDOList().stream().filter(project -> project.getId().equals(taskDO.getProjectId())).findFirst() |
|
|
|
|
|
|
|
.ifPresent(item ->{ |
|
|
|
|
|
|
|
dto.setProjectName(item.getName()); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
//负责人名
|
|
|
|
|
|
|
|
preAssemblyDTO.getMainPersonList().stream().filter(mainPerson -> mainPerson.getId().equals(taskDO.getMainPerson())).findFirst() |
|
|
|
|
|
|
|
.ifPresent(item ->{ |
|
|
|
|
|
|
|
dto.setMainPersonName(item.getName()); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
//作物名
|
|
|
|
|
|
|
|
preAssemblyDTO.getCropDOList().stream().filter(crop -> crop.getId().equals(taskDO.getCropId())).findFirst() |
|
|
|
|
|
|
|
.ifPresent(item ->{ |
|
|
|
|
|
|
|
dto.setCropName(item.getName()); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
//任务类型名
|
|
|
|
|
|
|
|
preAssemblyDTO.getTaskCateDOList().stream().filter(taskCate -> taskCate.getId().equals(taskDO.getTaskCateId())).findFirst() |
|
|
|
|
|
|
|
.ifPresent(item ->{ |
|
|
|
|
|
|
|
dto.setTaskName(item.getName()); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
//任务内容
|
|
|
|
|
|
|
|
preAssemblyDTO.getTaskMsgList().stream().filter(taskMsg -> taskMsg.getId().equals(taskDO.getTaskCateName())).findFirst() |
|
|
|
|
|
|
|
.ifPresent(item ->{ |
|
|
|
|
|
|
|
dto.setTaskMsg(item.getName()); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
//执行人名
|
|
|
|
|
|
|
|
List<String> executorNameList = new ArrayList<>(); |
|
|
|
|
|
|
|
preAssemblyDTO.getExecutorList().forEach(executor ->{ |
|
|
|
|
|
|
|
taskDO.getExecutorPerson().toJavaList(Long.class).forEach(item ->{ |
|
|
|
|
|
|
|
if (executor.getId().equals(item)){ |
|
|
|
|
|
|
|
executorNameList.add( executor.getName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
dto.setExecutorNameList(executorNameList); |
|
|
|
|
|
|
|
//区域名
|
|
|
|
|
|
|
|
List<String> areaNameList = new ArrayList<>(); |
|
|
|
|
|
|
|
for (Object obj : taskDO.getAreas()) { |
|
|
|
|
|
|
|
List<Long> areaList = JSONArray.parseArray(obj.toString(), Long.class); |
|
|
|
|
|
|
|
StrBuilder areaName = new StrBuilder(); |
|
|
|
|
|
|
|
areaList.forEach( one ->{ |
|
|
|
|
|
|
|
preAssemblyDTO.getAreaDOList().stream().filter(item -> item.getId().equals(one)).findFirst() |
|
|
|
|
|
|
|
.ifPresent(sonArea ->{ |
|
|
|
|
|
|
|
areaName.append(sonArea.getName()); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
areaNameList.add(areaName.toString()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
dto.setAreaNameList(areaNameList); |
|
|
|
|
|
|
|
//资源
|
|
|
|
|
|
|
|
if (preAssemblyDTO.getTaskResouceMap().containsKey(taskDO.getId())){ |
|
|
|
|
|
|
|
List<ResourceMsgDTO> resList = preAssemblyDTO.getTaskResouceMap().get(taskDO.getId()); |
|
|
|
|
|
|
|
dto.setTaskResourceList(resList); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
map.put(taskDO.getId(), dto); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return map; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|