提交 45ef74a4 authored 作者: zhoushaopan's avatar zhoushaopan

修改了只显示一个任务

上级 61c69b8f
...@@ -22,6 +22,7 @@ import com.tykj.dev.device.user.read.subject.bto.MessageBto; ...@@ -22,6 +22,7 @@ import com.tykj.dev.device.user.read.subject.bto.MessageBto;
import com.tykj.dev.device.user.subject.entity.User; import com.tykj.dev.device.user.subject.entity.User;
import com.tykj.dev.device.user.subject.service.UserPublicService; import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.device.user.util.UserUtils; import com.tykj.dev.device.user.util.UserUtils;
import com.tykj.dev.misc.base.BusinessEnum;
import com.tykj.dev.misc.base.CustomOrder; import com.tykj.dev.misc.base.CustomOrder;
import com.tykj.dev.misc.base.StatusEnum; import com.tykj.dev.misc.base.StatusEnum;
import com.tykj.dev.misc.exception.ApiException; import com.tykj.dev.misc.exception.ApiException;
...@@ -484,6 +485,11 @@ public class TaskServiceImpl implements TaskService { ...@@ -484,6 +485,11 @@ public class TaskServiceImpl implements TaskService {
public List<TaskUserVo> getManageList(TaskSelectVo taskSelectVo) { public List<TaskUserVo> getManageList(TaskSelectVo taskSelectVo) {
Integer num = taskSelectVo.getSelectNum(); Integer num = taskSelectVo.getSelectNum();
Integer userId = userUtils.getCurrentUserId(); Integer userId = userUtils.getCurrentUserId();
List<Integer> businesses = new ArrayList<>();
businesses.add(BusinessEnum.ALLOT.id);
businesses.add(BusinessEnum.REPAIR_BACK.id);
businesses.add(BusinessEnum.REPAIR.id);
businesses.add(BusinessEnum.ALLOT_BACK.id);
//业务管理中的待办和跟踪 //业务管理中的待办和跟踪
if (num == 2 || num == 3) { if (num == 2 || num == 3) {
//查询出符合筛选条件的所有task //查询出符合筛选条件的所有task
...@@ -564,7 +570,8 @@ public class TaskServiceImpl implements TaskService { ...@@ -564,7 +570,8 @@ public class TaskServiceImpl implements TaskService {
//省能看到所有业务 //省能看到所有业务
if (level == 1) { if (level == 1) {
taskUserVos = taskDao.findAll(getSelectSpecification(taskSelectVo)).stream() taskUserVos = taskDao.findAll(getSelectSpecification(taskSelectVo)).stream()
.filter(taskBto -> taskSelectVo.getType() == null || taskSelectVo.getType()==1?(taskBto.getCustomInfo()==null|| !"country".equals(taskBto.getCustomInfo())):(taskBto.getCustomInfo()!=null&& "country".equals(taskBto.getCustomInfo()))) .filter(taskBto -> taskSelectVo.getType() == null
|| taskSelectVo.getType()==1?(taskBto.getCustomInfo()==null || !"country".equals(taskBto.getCustomInfo())):(taskBto.getCustomInfo()!=null&& "country".equals(taskBto.getCustomInfo())))
.map(Task::parse2Bto) .map(Task::parse2Bto)
.map(TaskBto::toVo) .map(TaskBto::toVo)
.collect(Collectors.toList()); .collect(Collectors.toList());
...@@ -577,6 +584,20 @@ public class TaskServiceImpl implements TaskService { ...@@ -577,6 +584,20 @@ public class TaskServiceImpl implements TaskService {
.filter(taskUserVo -> !Collections.disjoint(idLists, taskUserVo.getInvolveUserIdList())||(taskUserVo.getCreateUserId()!=null&&idLists.contains(taskUserVo.getCreateUserId()))) .filter(taskUserVo -> !Collections.disjoint(idLists, taskUserVo.getInvolveUserIdList())||(taskUserVo.getCreateUserId()!=null&&idLists.contains(taskUserVo.getCreateUserId())))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
taskUserVos = taskUserVos.stream()
.filter(taskUserVo -> businesses.contains(taskUserVo.getBusinessType()))
.filter(taskUserVo -> taskUserVo.getParentTaskId() == null || taskUserVo.getParentTaskId() == 0).collect(Collectors.toList());
//如果存在集合中
// if (businesses.contains(taskUserVo.getBusinessType())){
// if (taskUserVo.getParentTaskId() != null && taskUserVo.getParentTaskId() !=0 ){
// return false;
// }else {
// return true;
// }
// }else {
// return true;
// }
//set经办人,置顶以及阅读情况 //set经办人,置顶以及阅读情况
for (TaskUserVo taskUserVo : taskUserVos) { for (TaskUserVo taskUserVo : taskUserVos) {
List<Integer> idList = taskUserVo.getUserReadDetailList(); List<Integer> idList = taskUserVo.getUserReadDetailList();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论