Эх сурвалжийг харах

fix: 批量任务审核-修改若干问题

lixuesong 3 жил өмнө
parent
commit
f69f7bebe0

+ 4 - 59
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/WmTaskTypeController.java

@@ -17,17 +17,13 @@
 
 package com.qunzhixinxi.hnqz.admin.controller;
 
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.map.MapUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.qunzhixinxi.hnqz.admin.api.entity.SysDeptRelation;
 import com.qunzhixinxi.hnqz.admin.entity.WmDaAgent;
 import com.qunzhixinxi.hnqz.admin.entity.WmDaDrugEnt;
 import com.qunzhixinxi.hnqz.admin.entity.WmTaskTypeEntRef;
 import com.qunzhixinxi.hnqz.admin.entity.output.WmTaskTypeDeptOutput;
-import com.qunzhixinxi.hnqz.admin.enums.EnableEnum;
 import com.qunzhixinxi.hnqz.admin.service.*;
 import com.qunzhixinxi.hnqz.common.core.util.R;
 import com.qunzhixinxi.hnqz.common.log.annotation.SysLog;
@@ -43,7 +39,6 @@ import org.springframework.web.bind.annotation.*;
 
 import java.time.LocalDateTime;
 import java.util.*;
-import java.util.stream.Collectors;
 
 
 /**
@@ -59,11 +54,10 @@ import java.util.stream.Collectors;
 public class WmTaskTypeController {
 
 	private final WmTaskTypeService wmTaskTypeService;
-	private final SysDeptService sysDeptService;
 	private final WmDaDrugEntService wmDaDrugEntService;
 	private final WmDaAgentService wmDaAgentService;
 	private final WmTaskTypeEntRefService wmTaskTypeEntRefService;
-	private final SysDeptRelationService sysDeptRelationService;
+	private final WmDeptTaskTypeConfigService wmDeptTaskTypeConfigService;
 
 	/**
 	 * 分页查询
@@ -316,57 +310,8 @@ public class WmTaskTypeController {
 	 * @return
 	 */
 	@GetMapping("/list-task-type-tree")
-	public R<?> listTaskTypeTree(String taskTypeName) {
-		// 查询出当前dept对应的任务类型(药企或药企给CSO的任务类型)
-		Integer deptId = SecurityUtils.getUser().getDeptId();
-		List<SysDeptRelation> relationList = sysDeptRelationService.list(Wrappers.<SysDeptRelation>lambdaQuery()
-				.eq(SysDeptRelation::getDescendant, deptId));
-		SysDeptRelation deptRelation = relationList.stream()
-				.filter(sysDeptRelation -> !sysDeptRelation.getAncestor().equals(1))
-				.findFirst()
-				.get();
-		WmDaDrugEnt wmDaDrugEnt = wmDaDrugEntService.getOne(Wrappers.<WmDaDrugEnt>lambdaQuery()
-				.eq(WmDaDrugEnt::getDeptId, deptRelation.getAncestor())
-				.eq(WmDaDrugEnt::getEnableFlag, EnableEnum.ENABLE.val()));
-		// 查询企业对应的任务类型
-		LambdaQueryWrapper<WmTaskType> taskTypeWrapper = Wrappers.lambdaQuery();
-		taskTypeWrapper.eq(WmTaskType::getDeptId, deptId);
-		taskTypeWrapper.eq(WmTaskType::getDurgentId, wmDaDrugEnt.getId());
-		if (StringUtils.isNotBlank(taskTypeName)) {
-			taskTypeWrapper.like(WmTaskType::getTaskTypeName, taskTypeName);
-		}
-		List<WmTaskType> taskTypeList = wmTaskTypeService.list(taskTypeWrapper);
-
-		List<Map<String, Object>> resultList = new ArrayList<>();
-		if (CollectionUtil.isNotEmpty(taskTypeList)) {
-			// 查询基础任务类型,用于匹配任务类型大类
-			List<WmTaskType> baseTaskTypeList = wmTaskTypeService.list(Wrappers.<WmTaskType>lambdaQuery()
-					.eq(WmTaskType::getEnableFlag, EnableEnum.ENABLE.val())
-					.eq(WmTaskType::getTaskTypeLevel, "1"));
-			// 根据parentId去重
-			List<WmTaskType> baseTaskTypeFilterList = baseTaskTypeList
-					.stream()
-					.collect(
-							Collectors.collectingAndThen(
-									Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(WmTaskType::getParentId))), ArrayList::new
-							)
-					);
-			// 转换为key是baseId,value是taskTypelist的列表map
-			Map<String, List<WmTaskType>> tempTaskTypeMap = taskTypeList.stream()
-					.filter(wmTaskType -> wmTaskType.getParentId() != null)
-					.collect(Collectors.groupingBy(WmTaskType::getParentId));
-			// 转换为list<map>
-			baseTaskTypeFilterList.forEach(taskType -> {
-				Map<String, Object> taskTypeMap = MapUtil.newHashMap(2);
-				List<WmTaskType> wmTaskTypes = tempTaskTypeMap.get(taskType.getParentId());
-				if (CollectionUtil.isNotEmpty(wmTaskTypes)) {
-					taskTypeMap.put("label", taskType.getTaskTypeName());
-					taskTypeMap.put("children", tempTaskTypeMap.get(taskType.getParentId()));
-					resultList.add(taskTypeMap);
-				}
-			});
-		}
-
-		return R.ok(resultList);
+	public R<?> listConfigedTaskTypeTree(String taskTypeName) {
+		List<Map<String, Object>> list = wmDeptTaskTypeConfigService.listConfigedTaskTypeTree(taskTypeName);
+		return R.ok(list);
 	}
 }

+ 11 - 0
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/WmDeptTaskTypeConfigService.java

@@ -7,6 +7,9 @@ import com.qunzhixinxi.hnqz.admin.entity.WmDeptTaskTypeConfig;
 import com.qunzhixinxi.hnqz.admin.entity.WmTask;
 import com.qunzhixinxi.hnqz.admin.entity.dto.WmDeptTaskTypeConfigDTO;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 部门任务类型配置服务
  *
@@ -30,6 +33,14 @@ public interface WmDeptTaskTypeConfigService extends IService<WmDeptTaskTypeConf
 	 */
 	WmDeptTaskTypeConfigDTO getDeptTaskTypeConfig(Integer deptId);
 
+	/**
+	 * 查询任务类型树
+	 *
+	 * @param taskTypeName
+	 * @return
+	 */
+	List<Map<String, Object>> listConfigedTaskTypeTree(String taskTypeName);
+
 	/**
 	 * 根据企业的任务类型配置查询任务列表
 	 *

+ 2 - 3
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/SysDeptServiceImpl.java

@@ -489,12 +489,11 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
 		// CSO
 		LambdaQueryWrapper<SysDept> csoWrapper = Wrappers.lambdaQuery();
 		csoWrapper.eq(SysDept::getDelFlag, DelEnum.NOT_DEL.val());
-		csoWrapper.eq(SysDept::getLevel, DeptLevelEnum.CSO_L1.getVal());
+		csoWrapper.in(SysDept::getLevel, DeptLevelEnum.CSO_L1.getVal(), DeptLevelEnum.CSO_L2.getVal());
 		if (StringUtils.isNotBlank(deptName)) {
 			csoWrapper.like(SysDept::getName, deptName);
 		}
-		Page<SysDept> csoPage = this.page(page, csoWrapper);
-		List<Map<String, Object>> csoMapList = csoPage.getRecords().stream().map(sysDept -> {
+		Page<SysDept> csoPage = this.page(page, csoWrapper);List<Map<String, Object>> csoMapList = csoPage.getRecords().stream().map(sysDept -> {
 			Map<String, Object> deptMap = MapUtil.newHashMap(2);
 			deptMap.put("deptId", sysDept.getDeptId());
 			deptMap.put("name", sysDept.getName());

+ 177 - 33
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/WmDeptTaskTypeConfigServiceImpl.java

@@ -2,6 +2,7 @@ package com.qunzhixinxi.hnqz.admin.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.map.MapUtil;
 import cn.hutool.core.util.ArrayUtil;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -37,9 +38,11 @@ import org.springframework.stereotype.Service;
 
 import java.time.LocalDateTime;
 import java.util.ArrayList;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeSet;
 import java.util.stream.Collectors;
 
 /**
@@ -141,6 +144,7 @@ public class WmDeptTaskTypeConfigServiceImpl extends ServiceImpl<WmDeptTaskTypeC
 			deptTaskTypeConfigDTO.setId(deptTaskTypeConfig.getId());
 			List<WmDeptTaskTypeConfigJsonDTO> configJsonDTOList = JSON.parseArray(deptTaskTypeConfig.getTaskTypeJson(), WmDeptTaskTypeConfigJsonDTO.class);
 			configMap = configJsonDTOList.stream()
+					.distinct()
 					.collect(Collectors.toMap(WmDeptTaskTypeConfigJsonDTO::getTaskTypeName, wmDeptTaskTypeConfigJsonDTO -> wmDeptTaskTypeConfigJsonDTO));
 		}
 		// 以企业的任务类型数据为基础,进行任务类型配置数据的拼接
@@ -171,6 +175,104 @@ public class WmDeptTaskTypeConfigServiceImpl extends ServiceImpl<WmDeptTaskTypeC
 		return deptTaskTypeConfigDTO;
 	}
 
+	/**
+	 * 查询任务类型树
+	 *
+	 * @param taskTypeName
+	 * @return
+	 */
+	@Override
+	public List<Map<String, Object>> listConfigedTaskTypeTree(String taskTypeName) {
+		Integer deptId = SecurityUtils.getUser().getDeptId();
+		// 查询已配置的任务类型
+		// 当前企业配置
+		WmDeptTaskTypeConfig deptTaskTypeConfig = this.getOne(Wrappers.<WmDeptTaskTypeConfig>lambdaQuery()
+				.eq(WmDeptTaskTypeConfig::getDeptId, deptId));
+		List<String> configTaskTypeIdList = null;
+		if (deptTaskTypeConfig != null) {
+			List<WmDeptTaskTypeConfigJsonDTO> configJsonDTOList = JSON.parseArray(deptTaskTypeConfig.getTaskTypeJson(), WmDeptTaskTypeConfigJsonDTO.class);
+			configTaskTypeIdList = configJsonDTOList.stream()
+					.filter(configJsonDTO -> configJsonDTO.getQualifiedTask())
+					.map(WmDeptTaskTypeConfigJsonDTO::getTaskTypeName)
+					.collect(Collectors.toList());
+		}
+		// 查询上级
+		SysDeptRelation ancestorDeptRelation = sysDeptRelationMapper.selectOne(Wrappers.<SysDeptRelation>lambdaQuery()
+				.eq(SysDeptRelation::getDescendant, deptId)
+				.ne(SysDeptRelation::getAncestor, deptId)
+				.ne(SysDeptRelation::getAncestor, 1));
+		List<String> ancestorConfigTaskTypeIdList = null;
+		if (ancestorDeptRelation != null) {
+			// 上级企业配置
+			WmDeptTaskTypeConfig ancestorDeptTaskTypeConfig = this.getOne(Wrappers.<WmDeptTaskTypeConfig>lambdaQuery()
+					.eq(WmDeptTaskTypeConfig::getDeptId, ancestorDeptRelation.getAncestor()));
+			List<WmDeptTaskTypeConfigJsonDTO> ancestorConfigJsonDTOList = JSON.parseArray(ancestorDeptTaskTypeConfig.getTaskTypeJson(), WmDeptTaskTypeConfigJsonDTO.class);
+			ancestorConfigTaskTypeIdList = ancestorConfigJsonDTOList.stream()
+					.filter(configJsonDTO -> configJsonDTO.getQualifiedTask())
+					.map(WmDeptTaskTypeConfigJsonDTO::getTaskTypeName)
+					.collect(Collectors.toList());
+		}
+		if (CollectionUtil.isEmpty(configTaskTypeIdList) && CollectionUtil.isEmpty(ancestorConfigTaskTypeIdList)) {
+			return new ArrayList<>();
+		}
+
+		// 查询出当前dept对应的任务类型(药企或药企给CSO的任务类型)
+		List<SysDeptRelation> relationList = sysDeptRelationMapper.selectList(Wrappers.<SysDeptRelation>lambdaQuery()
+				.eq(SysDeptRelation::getDescendant, deptId));
+		SysDeptRelation deptRelation = relationList.stream()
+				.filter(sysDeptRelation -> !sysDeptRelation.getAncestor().equals(1))
+				.findFirst()
+				.get();
+		WmDaDrugEnt wmDaDrugEnt = wmDaDrugEntMapper.selectOne(Wrappers.<WmDaDrugEnt>lambdaQuery()
+				.eq(WmDaDrugEnt::getDeptId, deptRelation.getAncestor())
+				.eq(WmDaDrugEnt::getEnableFlag, EnableEnum.ENABLE.val()));
+		// 查询企业对应的任务类型
+		LambdaQueryWrapper<WmTaskType> taskTypeWrapper = Wrappers.lambdaQuery();
+		taskTypeWrapper.eq(WmTaskType::getDeptId, deptId);
+		taskTypeWrapper.eq(WmTaskType::getDurgentId, wmDaDrugEnt.getId());
+		if (org.apache.commons.lang.StringUtils.isNotBlank(taskTypeName)) {
+			taskTypeWrapper.like(WmTaskType::getTaskTypeName, taskTypeName);
+		}
+		List<WmTaskType> taskTypeList = wmTaskTypeService.list(taskTypeWrapper);
+
+		List<Map<String, Object>> resultList = new ArrayList<>();
+		if (CollectionUtil.isNotEmpty(taskTypeList)) {
+			// 查询基础任务类型,用于匹配任务类型大类
+			List<WmTaskType> baseTaskTypeList = wmTaskTypeService.list(Wrappers.<WmTaskType>lambdaQuery()
+					.eq(WmTaskType::getEnableFlag, EnableEnum.ENABLE.val())
+					.eq(WmTaskType::getTaskTypeLevel, "1"));
+			// 根据parentId去重
+			List<WmTaskType> baseTaskTypeFilterList = baseTaskTypeList
+					.stream()
+					.collect(
+							Collectors.collectingAndThen(
+									Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(WmTaskType::getParentId))), ArrayList::new
+							)
+					);
+			// 转换为key是baseId,value是taskTypelist的列表map
+			List<String> finalConfigTaskTypeIdList = configTaskTypeIdList;
+			List<String> finalAncestorConfigTaskTypeIdList = ancestorConfigTaskTypeIdList;
+			Map<String, List<WmTaskType>> tempTaskTypeMap = taskTypeList.stream()
+					.filter(wmTaskType -> wmTaskType.getParentId() != null
+							&& (
+							(finalConfigTaskTypeIdList != null && finalConfigTaskTypeIdList.contains(wmTaskType.getTaskTypeName()))
+									|| (finalAncestorConfigTaskTypeIdList != null && finalAncestorConfigTaskTypeIdList.contains(wmTaskType.getTaskTypeName()))
+					))
+					.collect(Collectors.groupingBy(WmTaskType::getParentId));
+			// 转换为list<map>
+			baseTaskTypeFilterList.forEach(taskType -> {
+				Map<String, Object> taskTypeMap = MapUtil.newHashMap(2);
+				List<WmTaskType> wmTaskTypes = tempTaskTypeMap.get(taskType.getParentId());
+				if (CollectionUtil.isNotEmpty(wmTaskTypes)) {
+					taskTypeMap.put("label", taskType.getTaskTypeName());
+					taskTypeMap.put("children", tempTaskTypeMap.get(taskType.getParentId()));
+					resultList.add(taskTypeMap);
+				}
+			});
+		}
+		return resultList;
+	}
+
 	/**
 	 * 根据企业的任务类型配置查询任务列表
 	 *
@@ -181,13 +283,14 @@ public class WmDeptTaskTypeConfigServiceImpl extends ServiceImpl<WmDeptTaskTypeC
 	@Override
 	public IPage<WmTask> listTaskByConfig(Page<WmTask> page, String taskTypeName, String[] taskStatus) {
 		Integer deptId = SecurityUtils.getUser().getDeptId();
+		// 本级dept对应任务类型配置
 		WmDeptTaskTypeConfig deptTaskTypeConfig = this.getOne(Wrappers.<WmDeptTaskTypeConfig>lambdaQuery()
 				.eq(WmDeptTaskTypeConfig::getDeptId, deptId));
+		List<WmDeptTaskTypeConfigJsonDTO> filterConfigJsonDTOList = null;
 		if (deptTaskTypeConfig != null) {
 			// 查询该企业当前任务类型下 的任务类型配置数据
 			List<WmDeptTaskTypeConfigJsonDTO> configJsonDTOList =
 					JSON.parseArray(deptTaskTypeConfig.getTaskTypeJson(), WmDeptTaskTypeConfigJsonDTO.class);
-			List<WmDeptTaskTypeConfigJsonDTO> filterConfigJsonDTOList = null;
 			if (StringUtils.isNotBlank(taskTypeName)) {
 				filterConfigJsonDTOList = configJsonDTOList.stream()
 						.filter(configJsonDTO -> configJsonDTO.getTaskTypeName().equals(taskTypeName) && configJsonDTO.getQualifiedTask())
@@ -197,50 +300,91 @@ public class WmDeptTaskTypeConfigServiceImpl extends ServiceImpl<WmDeptTaskTypeC
 						.filter(configJsonDTO -> configJsonDTO.getQualifiedTask())
 						.collect(Collectors.toList());
 			}
-			if (CollectionUtil.isEmpty(filterConfigJsonDTOList)) {
-				// 任务配置为空,则直接返回空page
-				return page;
+		}
+
+		// 查询上级的deptId
+		SysDeptRelation ancestorDeptRelation = sysDeptRelationMapper.selectOne(Wrappers.<SysDeptRelation>lambdaQuery()
+				.eq(SysDeptRelation::getDescendant, deptId)
+				.ne(SysDeptRelation::getAncestor, deptId)
+				.ne(SysDeptRelation::getAncestor, 1));
+		// 上级dept对应任务类型配置
+		List<WmDeptTaskTypeConfigJsonDTO> filterAncestorConfigList = null;
+		if (ancestorDeptRelation != null) {
+			WmDeptTaskTypeConfig ancestorDeptTaskTypeConfig = this.getOne(Wrappers.<WmDeptTaskTypeConfig>lambdaQuery()
+					.eq(WmDeptTaskTypeConfig::getDeptId, ancestorDeptRelation.getAncestor()));
+			if (ancestorDeptTaskTypeConfig != null) {
+				List<WmDeptTaskTypeConfigJsonDTO> ancestorConfigJsonDTOList =
+						JSON.parseArray(ancestorDeptTaskTypeConfig.getTaskTypeJson(), WmDeptTaskTypeConfigJsonDTO.class);
+				// 转换为key value形式
+				if (StringUtils.isNotBlank(taskTypeName)) {
+					filterAncestorConfigList = ancestorConfigJsonDTOList.stream()
+							.filter(configJsonDTO -> configJsonDTO.getTaskTypeName().equals(taskTypeName) && configJsonDTO.getQualifiedTask())
+							.collect(Collectors.toList());
+				} else {
+					filterAncestorConfigList = ancestorConfigJsonDTOList.stream()
+							.filter(configJsonDTO -> configJsonDTO.getQualifiedTask())
+							.collect(Collectors.toList());
+				}
 			}
-			// 查询本地和下级的deptId
-			List<SysDeptRelation> relationList = sysDeptRelationMapper.selectList(Wrappers.<SysDeptRelation>lambdaQuery()
-					.eq(SysDeptRelation::getAncestor, deptId));
-			List<String> associateDeptIdList = relationList.stream()
-					.map(deptRelation -> String.valueOf(deptRelation.getDescendant()))
-					.collect(Collectors.toList());
-			// 根据不同任务类型的不同条件 拼接sql
-			QueryWrapper<WmTask> taskWrapper = Wrappers.query();
-			taskWrapper.eq("t.del_flag", DelEnum.NOT_DEL.val());
-			taskWrapper.eq("t.real_flag", "0");
-			taskWrapper.in("t.task_status", taskStatus);
-			List<WmDeptTaskTypeConfigJsonDTO> finalFilterConfigJsonDTOList = filterConfigJsonDTOList;
-			taskWrapper.and(wrapper -> {
+		}
+		// 任务配置为空,则直接返回空page
+		if (CollectionUtil.isEmpty(filterConfigJsonDTOList) && CollectionUtil.isEmpty(filterAncestorConfigList)) {
+			return page;
+		}
+
+		// 根据不同任务类型的不同条件 拼接sql
+		QueryWrapper<WmTask> taskWrapper = Wrappers.query();
+		taskWrapper.eq("t.del_flag", DelEnum.NOT_DEL.val());
+		taskWrapper.eq("t.real_flag", "0");
+		taskWrapper.in("t.task_status", taskStatus);
+		List<WmDeptTaskTypeConfigJsonDTO> finalFilterConfigJsonDTOList = filterConfigJsonDTOList;
+		List<WmDeptTaskTypeConfigJsonDTO> finalFilterAncestorConfigList = filterAncestorConfigList;
+		taskWrapper.and(wrapper -> {
+			// 当前企业直接发包的任务 条件
+			if (finalFilterConfigJsonDTOList != null) {
 				for (WmDeptTaskTypeConfigJsonDTO configJsonDTO : finalFilterConfigJsonDTOList) {
 					// 用户类型
-					List<String> taskUserTypeList = new ArrayList<>();
+					List<String> typeIdList = new ArrayList<>();
 					if (configJsonDTO.getZbdbStatusEnable() && configJsonDTO.getZbdbStatusSelect()) {
-						taskUserTypeList.add("5");
+						typeIdList.add("4");
 					}
 					if (configJsonDTO.getYydbStatusEnable() && configJsonDTO.getYydbStatusSelect()) {
-						taskUserTypeList.add("6");
+						typeIdList.add("3");
 					}
-					if (CollectionUtil.isNotEmpty(taskUserTypeList)) {
+					if (CollectionUtil.isNotEmpty(typeIdList)) {
 						wrapper.or(wrapper2 -> {
 							wrapper2.eq("t.task_type_id", configJsonDTO.getTaskTypeId());
-							wrapper2.in("t.task_user_type", taskUserTypeList);
-							if (configJsonDTO.getAssociateLower()) {
-								// 关联了下级
-								wrapper2.in("t.dept_id", associateDeptIdList);
-							} else {
-								// 没有关联下级
-								wrapper2.eq("t.dept_id", deptId);
-							}
+							wrapper2.eq("t.dept_id", deptId);
+							wrapper2.in("p.typeid", typeIdList);
+							wrapper2.isNull("p.relation_score_id");
 						});
 					}
 				}
-			});
-			return wmTaskMapper.listWmTaskByWrapper(page, taskWrapper);
-		}
-		return page;
+			}
+			// 关联了上级企业的包的任务 条件
+			if (finalFilterAncestorConfigList != null) {
+				for (WmDeptTaskTypeConfigJsonDTO configJsonDTO : finalFilterAncestorConfigList) {
+					// 用户类型
+					List<String> typeIdList = new ArrayList<>();
+					if (configJsonDTO.getZbdbStatusEnable() && configJsonDTO.getZbdbStatusSelect()) {
+						typeIdList.add("4");
+					}
+					if (configJsonDTO.getYydbStatusEnable() && configJsonDTO.getYydbStatusSelect()) {
+						typeIdList.add("3");
+					}
+					if (CollectionUtil.isNotEmpty(typeIdList)) {
+						wrapper.or(wrapper2 -> {
+							wrapper2.eq("t.task_type_id", configJsonDTO.getTaskTypeId());
+							wrapper2.eq("t.dept_id", deptId);
+							wrapper2.in("p.typeid", typeIdList);
+							wrapper2.isNotNull("p.relation_score_id");
+						});
+					}
+				}
+			}
+		});
+		taskWrapper.orderByDesc("t.lookinto_date");
+		return wmTaskMapper.listWmTaskByWrapper(page, taskWrapper);
 	}
 
 	/**