|
@@ -275,7 +275,7 @@ public class WmDeptTaskTypeConfigServiceImpl extends ServiceImpl<WmDeptTaskTypeC
|
|
.eq(WmDeptTaskTypeConfig::getDeptId, ancestorDeptRelation.getAncestor()));
|
|
.eq(WmDeptTaskTypeConfig::getDeptId, ancestorDeptRelation.getAncestor()));
|
|
List<WmDeptTaskTypeConfigJsonDTO> ancestorConfigJsonDTOList = JSON.parseArray(ancestorDeptTaskTypeConfig.getTaskTypeJson(), WmDeptTaskTypeConfigJsonDTO.class);
|
|
List<WmDeptTaskTypeConfigJsonDTO> ancestorConfigJsonDTOList = JSON.parseArray(ancestorDeptTaskTypeConfig.getTaskTypeJson(), WmDeptTaskTypeConfigJsonDTO.class);
|
|
ancestorConfigTaskTypeIdList = ancestorConfigJsonDTOList.stream()
|
|
ancestorConfigTaskTypeIdList = ancestorConfigJsonDTOList.stream()
|
|
- .filter(configJsonDTO -> configJsonDTO.getQualifiedTask())
|
|
|
|
|
|
+ .filter(configJsonDTO -> configJsonDTO.getQualifiedTask() && configJsonDTO.getAssociateLower())
|
|
.map(WmDeptTaskTypeConfigJsonDTO::getTaskTypeName)
|
|
.map(WmDeptTaskTypeConfigJsonDTO::getTaskTypeName)
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
}
|
|
}
|
|
@@ -380,11 +380,12 @@ public class WmDeptTaskTypeConfigServiceImpl extends ServiceImpl<WmDeptTaskTypeC
|
|
// 转换为key value形式
|
|
// 转换为key value形式
|
|
if (StringUtils.isNotBlank(taskTypeName)) {
|
|
if (StringUtils.isNotBlank(taskTypeName)) {
|
|
filterAncestorConfigList = ancestorConfigJsonDTOList.stream()
|
|
filterAncestorConfigList = ancestorConfigJsonDTOList.stream()
|
|
- .filter(configJsonDTO -> configJsonDTO.getTaskTypeName().equals(taskTypeName) && configJsonDTO.getQualifiedTask())
|
|
|
|
|
|
+ .filter(configJsonDTO -> configJsonDTO.getTaskTypeName().equals(taskTypeName)
|
|
|
|
+ && configJsonDTO.getQualifiedTask() && configJsonDTO.getAssociateLower())
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
} else {
|
|
} else {
|
|
filterAncestorConfigList = ancestorConfigJsonDTOList.stream()
|
|
filterAncestorConfigList = ancestorConfigJsonDTOList.stream()
|
|
- .filter(configJsonDTO -> configJsonDTO.getQualifiedTask())
|
|
|
|
|
|
+ .filter(configJsonDTO -> configJsonDTO.getQualifiedTask() && configJsonDTO.getAssociateLower())
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -426,25 +427,23 @@ public class WmDeptTaskTypeConfigServiceImpl extends ServiceImpl<WmDeptTaskTypeC
|
|
// 关联了上级企业的包的任务 条件
|
|
// 关联了上级企业的包的任务 条件
|
|
if (CollectionUtil.isNotEmpty(finalFilterAncestorConfigList)) {
|
|
if (CollectionUtil.isNotEmpty(finalFilterAncestorConfigList)) {
|
|
for (WmDeptTaskTypeConfigJsonDTO configJsonDTO : finalFilterAncestorConfigList) {
|
|
for (WmDeptTaskTypeConfigJsonDTO configJsonDTO : finalFilterAncestorConfigList) {
|
|
- if (configJsonDTO.getAssociateLower()) {
|
|
|
|
- // 用户类型
|
|
|
|
- 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");
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- wrapper.or(wrapper2 -> wrapper2.ne("1", "1"));
|
|
|
|
- }
|
|
|
|
|
|
+ // 用户类型
|
|
|
|
+ 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");
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ wrapper.or(wrapper2 -> wrapper2.ne("1", "1"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|