|
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.redxun.common.base.db.BaseDao;
|
|
|
import com.redxun.common.base.db.BaseService;
|
|
|
import com.redxun.common.base.db.PageHelper;
|
|
@@ -25,24 +24,22 @@ import com.redxun.knowledge.common.MessageService;
|
|
|
import com.redxun.knowledge.common.UserService;
|
|
|
import com.redxun.knowledge.entity.dao.*;
|
|
|
import com.redxun.knowledge.entity.dto.KnowledgeDto;
|
|
|
+import com.redxun.knowledge.entity.dto.OrganizationDto;
|
|
|
import com.redxun.knowledge.entity.vo.*;
|
|
|
import com.redxun.knowledge.map.entity.dao.MapContent;
|
|
|
import com.redxun.knowledge.map.mapper.MapContentMapper;
|
|
|
import com.redxun.knowledge.mapper.*;
|
|
|
-import com.redxun.knowledge.utils.DeduplicationUtil;
|
|
|
import com.redxun.knowledge.utils.PageListUtils;
|
|
|
import com.redxun.search.service.SearchService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
-import com.mysql.cj.jdbc.Clob;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import javax.sql.rowset.serial.SerialClob;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -149,8 +146,10 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
knowledge.setCreateTime(new Date());
|
|
|
knowledge.setUpdateBy(users.getUserId());
|
|
|
knowledge.setUpdateTime(new Date());
|
|
|
- knowledge.setOrganizationId(knowledgeDto.getOrganizationId());
|
|
|
-
|
|
|
+ if (!Objects.isNull(knowledgeDto.getOrganizationIds())){
|
|
|
+ String organizationId = JSON.toJSON(knowledgeDto.getOrganizationIds()).toString();
|
|
|
+ knowledge.setOrganizationId(organizationId);
|
|
|
+ }
|
|
|
JPaasUser user = userService.queryUser(userService.queryLoginUser());
|
|
|
if (user != null) {
|
|
|
knowledge.setAuthor(user.getFullName());
|
|
@@ -228,7 +227,11 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
knowledgeVo.setApprovalStatus(knowledge.getApprovalStatus());
|
|
|
knowledgeVo.setCreateBy(knowledge.getCreateBy());
|
|
|
knowledgeVo.setViews(knowledge.getViews());
|
|
|
- knowledgeVo.setOrganizationId(knowledge.getOrganizationId());
|
|
|
+ //组织架构解析后返回
|
|
|
+ if (!StringUtils.isEmpty(knowledge.getOrganizationId())){
|
|
|
+ OrganizationDto organizationDto = JSON.parseObject(knowledge.getOrganizationId(), OrganizationDto.class);
|
|
|
+ knowledgeVo.setOrganizationIds(organizationDto);
|
|
|
+ }
|
|
|
if (!StringUtils.isEmpty(knowledge.getCategoryId())){
|
|
|
knowledgeVo.setKnowledgeCategoryAdminVo(knowledgeCategoryService.findAllParentByCategoryId(knowledge.getCategoryId()));
|
|
|
}
|
|
@@ -278,153 +281,9 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
}
|
|
|
}
|
|
|
knowledgeVo.setApprovals(approvals);
|
|
|
- if (flag != null && flag == 1 && knowledgeVo.getApprovalStatus() == 5 && knowledge.getCreateBy().equals(userService.queryLoginUser())) {
|
|
|
- // 解析组织架构/职系/职等数据
|
|
|
- Map<String, Object> organizationIdMap = new HashMap<>();
|
|
|
- if (StringUtils.isNotEmpty(knowledge.getOrganizationId())) {
|
|
|
- List<Map> mapList = JSON.parseArray(knowledge.getOrganizationId(), Map.class);
|
|
|
- for (int i = 0; i < mapList.size(); i++) {
|
|
|
- Map maps = mapList.get(i);
|
|
|
- maps.forEach((k, v) -> organizationIdMap.put((String) k, v));
|
|
|
- }
|
|
|
- }
|
|
|
- // 获取当前登录人的组织架构/职系/职等数据
|
|
|
- OsUserDto osUserDto = userService.queryOsUserDto(userService.queryLoginUser());
|
|
|
- String sequenceCode = osUserDto.getSequenceCode();
|
|
|
- String slyGrade = osUserDto.getSlyGrade();
|
|
|
- List<String> deptAuthority = knowledgeApproveMapper.deptAuthority(userService.queryLoginUser());
|
|
|
- boolean flags = false;
|
|
|
- if (StringUtils.isNotEmpty((String) organizationIdMap.get("organizationId"))) {
|
|
|
- for (int i = 0; i < deptAuthority.size(); i++) {
|
|
|
- if (deptAuthority.get(i).contains((String) organizationIdMap.get("organizationId"))) {
|
|
|
- flags = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // 如果知识最终审核通过,判断组织架构/职系/职等是否符合(前台判断)
|
|
|
- if (knowledge.getOrganizationId() == null) {
|
|
|
- addCountViews(osUserDto.getUserId(), pkId);
|
|
|
- knowledgeVo.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 如果职系,职等,组织架构id全部为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- knowledgeVo.setIsOrganizationId(0);
|
|
|
- addCountViews(osUserDto.getUserId(), pkId);
|
|
|
- return knowledgeVo;
|
|
|
- }
|
|
|
- // 如果职系,职等为空,组织架构id不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 比较当前用户的组织架构是否符合条件
|
|
|
- if (flags) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- knowledgeVo.setIsOrganizationId(0);
|
|
|
- addCountViews(osUserDto.getUserId(), pkId);
|
|
|
- return knowledgeVo;
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- knowledgeVo.setIsOrganizationId(1);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职等为空,职系不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 比较当前用户的职系是否符合条件
|
|
|
- if (sequenceCode.equals(organizationIdMap.get("gradeId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- knowledgeVo.setIsOrganizationId(0);
|
|
|
- addCountViews(osUserDto.getUserId(), pkId);
|
|
|
- return knowledgeVo;
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- knowledgeVo.setIsOrganizationId(1);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职系为空,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- // 比较当前用户的职系是否符合条件
|
|
|
- if (slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- knowledgeVo.setIsOrganizationId(0);
|
|
|
- addCountViews(osUserDto.getUserId(), pkId);
|
|
|
- return knowledgeVo;
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- knowledgeVo.setIsOrganizationId(1);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果职等为空,组织架构id,职系不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- if (flags && sequenceCode.equals(organizationIdMap.get("gradeId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- knowledgeVo.setIsOrganizationId(0);
|
|
|
- addCountViews(osUserDto.getUserId(), pkId);
|
|
|
- return knowledgeVo;
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- knowledgeVo.setIsOrganizationId(1);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果职系为空,组织架构id,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (flags && slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- knowledgeVo.setIsOrganizationId(0);
|
|
|
- addCountViews(osUserDto.getUserId(), pkId);
|
|
|
- return knowledgeVo;
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- knowledgeVo.setIsOrganizationId(1);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id为空,职系,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (sequenceCode.equals(organizationIdMap.get("gradeId")) && slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- knowledgeVo.setIsOrganizationId(0);
|
|
|
- addCountViews(osUserDto.getUserId(), pkId);
|
|
|
- return knowledgeVo;
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- knowledgeVo.setIsOrganizationId(1);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职系,职等都不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (flags &&
|
|
|
- sequenceCode.equals(organizationIdMap.get("gradeId")) &&
|
|
|
- slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- knowledgeVo.setIsOrganizationId(0);
|
|
|
- // 符合条件,增加点击量
|
|
|
- addCountViews(osUserDto.getUserId(), pkId);
|
|
|
- return knowledgeVo;
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- knowledgeVo.setIsOrganizationId(1);
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //权限处理(组织架构)(详情需要增加点击量)
|
|
|
+ if (flag != null && flag == 1 && knowledgeVo.getApprovalStatus() == 5 && !knowledge.getCreateBy().equals(userService.queryLoginUser())) {
|
|
|
+ knowledgeVo = parseOrganization(knowledge.getOrganizationId(), true, knowledgeVo);
|
|
|
}
|
|
|
return knowledgeVo;
|
|
|
}
|
|
@@ -448,131 +307,14 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
Map<String, Object> map = userService.querySexAndPhoto(e.getCreateBy());
|
|
|
e.setParams(map);
|
|
|
|
|
|
- // 解析组织架构/职系/职等数据
|
|
|
+ // 权限处理(组织架构)(列表不需要增加点击量)
|
|
|
if (e.getApprovalStatus() == 5) {
|
|
|
- Map<String, Object> organizationIdMap = new HashMap<>();
|
|
|
- if (StringUtils.isNotEmpty(e.getOrganizationId())) {
|
|
|
- List<Map> mapList = JSON.parseArray(e.getOrganizationId(), Map.class);
|
|
|
- for (int i = 0; i < mapList.size(); i++) {
|
|
|
- Map maps = mapList.get(i);
|
|
|
- maps.forEach((k, v) -> organizationIdMap.put((String) k, v));
|
|
|
- }
|
|
|
- }
|
|
|
- // 获取当前登录人的组织架构/职系/职等数据
|
|
|
- OsUserDto osUserDto = userService.queryOsUserDto(userService.queryLoginUser());
|
|
|
- String sequenceCode = osUserDto.getSequenceCode();
|
|
|
- String slyGrade = osUserDto.getSlyGrade();
|
|
|
- List<String> deptAuthority = knowledgeApproveMapper.deptAuthority(userService.queryLoginUser());
|
|
|
- boolean flags = false;
|
|
|
- if (StringUtils.isNotEmpty((String) organizationIdMap.get("organizationId"))) {
|
|
|
- for (int i = 0; i < deptAuthority.size(); i++) {
|
|
|
- if (deptAuthority.get(i).contains((String) organizationIdMap.get("organizationId"))) {
|
|
|
- flags = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // 如果知识最终审核通过,判断组织架构/职系/职等是否符合(前台判断)
|
|
|
- if (e.getOrganizationId() == null) {
|
|
|
- e.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 如果职系,职等,组织架构id全部为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- e.setIsOrganizationId(0);
|
|
|
- }
|
|
|
- // 如果职系,职等为空,组织架构id不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 比较当前用户的组织架构是否符合条件
|
|
|
- if (flags) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- e.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- e.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职等为空,职系不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 比较当前用户的职系是否符合条件
|
|
|
- if (sequenceCode.equals(organizationIdMap.get("gradeId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- e.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- e.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职系为空,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- // 比较当前用户的职系是否符合条件
|
|
|
- if (slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- e.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- e.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果职等为空,组织架构id,职系不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- if (flags && sequenceCode.equals(organizationIdMap.get("gradeId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- e.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- e.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果职系为空,组织架构id,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (flags && slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- e.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- e.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id为空,职系,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (sequenceCode.equals(organizationIdMap.get("gradeId")) && slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- e.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- e.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职系,职等都不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (flags &&
|
|
|
- sequenceCode.equals(organizationIdMap.get("gradeId")) &&
|
|
|
- slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- e.setIsOrganizationId(0);
|
|
|
- // 符合条件,增加点击量
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- e.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ e = parseOrganization(e.getOrganizationId(), false, e);
|
|
|
+ }
|
|
|
+ //登陆人是作者,有权限
|
|
|
+ if (e.getCreateBy().equals(userService.queryLoginUser())){
|
|
|
+ e.setIsOrganizationId(0);
|
|
|
}
|
|
|
-
|
|
|
});
|
|
|
return page;
|
|
|
}
|
|
@@ -619,6 +361,11 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
throw new RuntimeException("输入的分类不存在,请重新输入");
|
|
|
}
|
|
|
Knowledge knowledge = this.get(entity.getPkId());
|
|
|
+ //处理组织架构
|
|
|
+ if (!Objects.isNull(entity.getOrganizationIds())){
|
|
|
+ String organizationId = JSON.toJSON(entity.getOrganizationIds()).toString();
|
|
|
+ knowledge.setOrganizationId(organizationId);
|
|
|
+ }
|
|
|
// 知识为待节点审核状态和待最终审核状态,修改失败;知识为最终审核通过,修改失败
|
|
|
if (knowledge.getApprovalStatus() == 3 || knowledge.getApprovalStatus() == 1) {
|
|
|
return -1;
|
|
@@ -666,7 +413,7 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
}
|
|
|
}
|
|
|
// 组织架构/职系/职等信息
|
|
|
- if (StringUtils.isEmpty(entity.getOrganizationId())){
|
|
|
+ if (Objects.isNull(entity.getOrganizationIds())){
|
|
|
entity.setOrganizationId("");
|
|
|
}
|
|
|
return this.getRepository().updateById(entity);
|
|
@@ -729,8 +476,10 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ String[] split = e.getApproverId().split(",");
|
|
|
+ List<String> approverIdList = Arrays.asList(split);
|
|
|
// 如果有权限
|
|
|
- if (e.getApproverId().equals(userNo) || flag) {
|
|
|
+ if (approverIdList.contains(userNo) || flag) {
|
|
|
resultList.add(e);
|
|
|
}
|
|
|
});
|
|
@@ -745,281 +494,39 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
* @return
|
|
|
*/
|
|
|
public IPage getAllKnowledgeByCategoryId(QueryFilter filter) {
|
|
|
+ IPage page = new Page();
|
|
|
Map<String, Object> params = PageHelper.constructParams(filter);
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
// 工作成果下的知识
|
|
|
String keyword = (String) filter.getParams().get("keyword");
|
|
|
if (keyword.equals("working")) {
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
map.put("categoryId", "40");
|
|
|
filter.setParams(map);
|
|
|
- IPage page = knowledgeMapper.getAllKnowledgeByCategoryId(filter.getPage(), filter.getParams(), params);
|
|
|
+ page = knowledgeMapper.getAllKnowledgeByCategoryId(filter.getPage(), filter.getParams(), params);
|
|
|
List<KnowledgeVo> collect = page.getRecords();
|
|
|
collect.forEach(g -> {
|
|
|
KnowledgeCategoryAdminVo knowledgeCategoryAdminVos = knowledgeCategoryService.findAllParentByCategoryId(g.getCategoryId());
|
|
|
g.setKnowledgeCategoryAdminVo(knowledgeCategoryAdminVos);
|
|
|
Map<String, Object> maps = userService.querySexAndPhoto(g.getCreateBy());
|
|
|
g.setParams(maps);
|
|
|
- // 解析组织架构/职系/职等数据
|
|
|
- Map<String, Object> organizationIdMap = new HashMap<>();
|
|
|
- if (StringUtils.isNotEmpty(g.getOrganizationId())) {
|
|
|
- List<Map> mapList = JSON.parseArray(g.getOrganizationId(), Map.class);
|
|
|
- for (int i = 0; i < mapList.size(); i++) {
|
|
|
- Map mapLists = mapList.get(i);
|
|
|
- mapLists.forEach((k, v) -> organizationIdMap.put((String) k, v));
|
|
|
- }
|
|
|
- }
|
|
|
- // 获取当前登录人的组织架构/职系/职等数据
|
|
|
- OsUserDto osUserDto = userService.queryOsUserDto(userService.queryLoginUser());
|
|
|
- String sequenceCode = osUserDto.getSequenceCode();
|
|
|
- String slyGrade = osUserDto.getSlyGrade();
|
|
|
- List<String> deptAuthority = knowledgeApproveMapper.deptAuthority(userService.queryLoginUser());
|
|
|
- boolean flags = false;
|
|
|
- if (StringUtils.isNotEmpty((String) organizationIdMap.get("organizationId"))) {
|
|
|
- for (int i = 0; i < deptAuthority.size(); i++) {
|
|
|
- if (deptAuthority.get(i).contains((String) organizationIdMap.get("organizationId"))) {
|
|
|
- flags = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // 如果知识最终审核通过,判断组织架构/职系/职等是否符合(前台判断)
|
|
|
- if (g.getOrganizationId() == null) {
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 如果职系,职等,组织架构id全部为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- }
|
|
|
- // 如果职系,职等为空,组织架构id不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 比较当前用户的组织架构是否符合条件
|
|
|
- if (flags) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职等为空,职系不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 比较当前用户的职系是否符合条件
|
|
|
- if (sequenceCode.equals(organizationIdMap.get("gradeId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职系为空,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- // 比较当前用户的职系是否符合条件
|
|
|
- if (slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果职等为空,组织架构id,职系不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- if (flags && sequenceCode.equals(organizationIdMap.get("gradeId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果职系为空,组织架构id,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (flags && slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id为空,职系,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (sequenceCode.equals(organizationIdMap.get("gradeId")) && slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职系,职等都不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (flags &&
|
|
|
- sequenceCode.equals(organizationIdMap.get("gradeId")) &&
|
|
|
- slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- // 符合条件,增加点击量
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ //权限处理(组织架构)(工作成功列表不需要增加点击量)
|
|
|
+ g = parseOrganization(g.getOrganizationId(),false,g);
|
|
|
});
|
|
|
- return page;
|
|
|
} else {
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
map.put("categoryId", "50");
|
|
|
filter.setParams(map);
|
|
|
- IPage page = knowledgeMapper.getAllKnowledgeByCategoryId(filter.getPage(), filter.getParams(), params);
|
|
|
+ page = knowledgeMapper.getAllKnowledgeByCategoryId(filter.getPage(), filter.getParams(), params);
|
|
|
List<KnowledgeVo> collect = page.getRecords();
|
|
|
collect.forEach(g -> {
|
|
|
KnowledgeCategoryAdminVo knowledgeCategoryAdminVos = knowledgeCategoryService.findAllParentByCategoryId(g.getCategoryId());
|
|
|
g.setKnowledgeCategoryAdminVo(knowledgeCategoryAdminVos);
|
|
|
Map<String, Object> maps = userService.querySexAndPhoto(g.getCreateBy());
|
|
|
g.setParams(maps);
|
|
|
- // 解析组织架构/职系/职等数据
|
|
|
- Map<String, Object> organizationIdMap = new HashMap<>();
|
|
|
- if (StringUtils.isNotEmpty(g.getOrganizationId())) {
|
|
|
- List<Map> mapList = JSON.parseArray(g.getOrganizationId(), Map.class);
|
|
|
- for (int i = 0; i < mapList.size(); i++) {
|
|
|
- Map mapLists = mapList.get(i);
|
|
|
- mapLists.forEach((k, v) -> organizationIdMap.put((String) k, v));
|
|
|
- }
|
|
|
- }
|
|
|
- // 获取当前登录人的组织架构/职系/职等数据
|
|
|
- OsUserDto osUserDto = userService.queryOsUserDto(userService.queryLoginUser());
|
|
|
- String sequenceCode = osUserDto.getSequenceCode();
|
|
|
- String slyGrade = osUserDto.getSlyGrade();
|
|
|
- List<String> deptAuthority = knowledgeApproveMapper.deptAuthority(userService.queryLoginUser());
|
|
|
- boolean flags = false;
|
|
|
- if (StringUtils.isNotEmpty((String) organizationIdMap.get("organizationId"))) {
|
|
|
- for (int i = 0; i < deptAuthority.size(); i++) {
|
|
|
- if (deptAuthority.get(i).contains((String) organizationIdMap.get("organizationId"))) {
|
|
|
- flags = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // 如果知识最终审核通过,判断组织架构/职系/职等是否符合(前台判断)
|
|
|
- if (g.getOrganizationId() == null) {
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 如果职系,职等,组织架构id全部为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- }
|
|
|
- // 如果职系,职等为空,组织架构id不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 比较当前用户的组织架构是否符合条件
|
|
|
- if (flags) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职等为空,职系不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- // 比较当前用户的职系是否符合条件
|
|
|
- if (sequenceCode.equals(organizationIdMap.get("gradeId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职系为空,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- // 比较当前用户的职系是否符合条件
|
|
|
- if (slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果职等为空,组织架构id,职系不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") == null) {
|
|
|
- if (flags && sequenceCode.equals(organizationIdMap.get("gradeId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果职系为空,组织架构id,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") == null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (flags && slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id为空,职系,职等不为空
|
|
|
- if (organizationIdMap.get("organizationId") == null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (sequenceCode.equals(organizationIdMap.get("gradeId")) && slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- // 符合条件,增加点击量
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 如果组织架构id,职系,职等都不为空
|
|
|
- if (organizationIdMap.get("organizationId") != null && organizationIdMap.get("gradeId") != null &&
|
|
|
- organizationIdMap.get("gradeLevelId") != null) {
|
|
|
- if (flags &&
|
|
|
- sequenceCode.equals(organizationIdMap.get("gradeId")) &&
|
|
|
- slyGrade.equals(organizationIdMap.get("gradeLevelId"))) {
|
|
|
- g.setIsOrganizationId(0);
|
|
|
- // 符合条件,增加点击量
|
|
|
- } else {
|
|
|
- // 没有权限(不增加点击量)
|
|
|
- g.setIsOrganizationId(1);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //权限处理(组织架构)(工作成功列表不需要增加点击量)
|
|
|
+ g = parseOrganization(g.getOrganizationId(),false,g);
|
|
|
});
|
|
|
- return page;
|
|
|
}
|
|
|
+ return page;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1119,4 +626,169 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
actionLogMapper.insert(actionLog);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 组织架构解析
|
|
|
+ * @param organizationId 组织架构信息
|
|
|
+ * @param isView 是否需要增加点击量(true 是 false 否)
|
|
|
+ * @param KnowledgeVo 知识信息
|
|
|
+ */
|
|
|
+ private KnowledgeVo parseOrganization(String organizationId, Boolean isView, KnowledgeVo knowledgeVo) {
|
|
|
+ OsUserDto osUserDto = userService.queryOsUserDto(userService.queryLoginUser());
|
|
|
+
|
|
|
+ //没有组织架构信息
|
|
|
+ if (StringUtils.isEmpty(organizationId)) {
|
|
|
+ if (isView) {
|
|
|
+ addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
|
+ }
|
|
|
+ knowledgeVo.setIsOrganizationId(0);
|
|
|
+ return knowledgeVo;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 解析组织架构/职系/职等数据
|
|
|
+ OrganizationDto organizationDto = JSON.parseObject(organizationId, OrganizationDto.class);
|
|
|
+ knowledgeVo.setOrganizationIds(organizationDto);
|
|
|
+ // 获取当前登录人的组织架构/职系/职等数据
|
|
|
+ String sequenceCode = osUserDto.getSequenceCode();
|
|
|
+ String slyGrade = osUserDto.getSlyGrade();
|
|
|
+ List<String> deptAuthority = knowledgeApproveMapper.deptAuthority(userService.queryLoginUser());
|
|
|
+ AtomicBoolean flags = new AtomicBoolean(false);
|
|
|
+ if (!CollectionUtils.isEmpty(organizationDto.getOrganizationId())) {
|
|
|
+ organizationDto.getOrganizationId().forEach(e -> {
|
|
|
+ for (int i = 0; i < deptAuthority.size(); i++) {
|
|
|
+ if (deptAuthority.get(i).contains(e)) {
|
|
|
+ flags.set(true);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 如果知识最终审核通过,判断组织架构/职系/职等是否符合(前台判断)
|
|
|
+
|
|
|
+ // 如果职系,职等为空,组织架构id不为空
|
|
|
+ if (!CollectionUtils.isEmpty(organizationDto.getOrganizationId()) && CollectionUtils.isEmpty(organizationDto.getGradeId()) &&
|
|
|
+ CollectionUtils.isEmpty(organizationDto.getGradeLevelId())) {
|
|
|
+ // 比较当前用户的组织架构是否符合条件
|
|
|
+ if (flags.get()) {
|
|
|
+ // 符合条件,增加点击量
|
|
|
+ if (isView) {
|
|
|
+ addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
|
+ }
|
|
|
+ knowledgeVo.setIsOrganizationId(0);
|
|
|
+ return knowledgeVo;
|
|
|
+ } else {
|
|
|
+ // 没有权限(不增加点击量)
|
|
|
+ knowledgeVo.setIsOrganizationId(1);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 如果组织架构id,职等为空,职系不为空
|
|
|
+ if (CollectionUtils.isEmpty(organizationDto.getOrganizationId()) && !CollectionUtils.isEmpty(organizationDto.getGradeId()) &&
|
|
|
+ CollectionUtils.isEmpty(organizationDto.getGradeLevelId())) {
|
|
|
+ // 比较当前用户的职系是否符合条件
|
|
|
+ if (organizationDto.getGradeId().contains(sequenceCode)) {
|
|
|
+ // 符合条件,增加点击量
|
|
|
+ if (isView) {
|
|
|
+ addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
|
+ }
|
|
|
+ knowledgeVo.setIsOrganizationId(0);
|
|
|
+ return knowledgeVo;
|
|
|
+ } else {
|
|
|
+ // 没有权限(不增加点击量)
|
|
|
+ knowledgeVo.setIsOrganizationId(1);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 如果组织架构id,职系为空,职等不为空
|
|
|
+ if (CollectionUtils.isEmpty(organizationDto.getOrganizationId()) && CollectionUtils.isEmpty(organizationDto.getGradeId()) &&
|
|
|
+ !CollectionUtils.isEmpty(organizationDto.getGradeLevelId())) {
|
|
|
+ // 比较当前用户的职等是否符合条件
|
|
|
+ if (organizationDto.getGradeLevelId().contains(slyGrade)) {
|
|
|
+ // 符合条件,增加点击量
|
|
|
+ if (isView) {
|
|
|
+ addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
|
+ }
|
|
|
+ knowledgeVo.setIsOrganizationId(0);
|
|
|
+ return knowledgeVo;
|
|
|
+ } else {
|
|
|
+ // 没有权限(不增加点击量)
|
|
|
+ knowledgeVo.setIsOrganizationId(1);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 如果职等为空,组织架构id,职系不为空
|
|
|
+ if (!CollectionUtils.isEmpty(organizationDto.getOrganizationId()) && !CollectionUtils.isEmpty(organizationDto.getGradeId()) &&
|
|
|
+ CollectionUtils.isEmpty(organizationDto.getGradeLevelId())) {
|
|
|
+ if (flags.get() && organizationDto.getGradeId().contains(sequenceCode)) {
|
|
|
+ // 符合条件,增加点击量
|
|
|
+ if (isView) {
|
|
|
+ addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
|
+ }
|
|
|
+ knowledgeVo.setIsOrganizationId(0);
|
|
|
+ return knowledgeVo;
|
|
|
+ } else {
|
|
|
+ // 没有权限(不增加点击量)
|
|
|
+ knowledgeVo.setIsOrganizationId(1);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 如果职系为空,组织架构id,职等不为空
|
|
|
+ if (!CollectionUtils.isEmpty(organizationDto.getOrganizationId()) && CollectionUtils.isEmpty(organizationDto.getGradeId()) &&
|
|
|
+ !CollectionUtils.isEmpty(organizationDto.getGradeLevelId())) {
|
|
|
+ if (flags.get() && organizationDto.getGradeLevelId().contains(slyGrade)) {
|
|
|
+ // 符合条件,增加点击量
|
|
|
+ if (isView) {
|
|
|
+ addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
|
+ }
|
|
|
+ knowledgeVo.setIsOrganizationId(0);
|
|
|
+ return knowledgeVo;
|
|
|
+ } else {
|
|
|
+ // 没有权限(不增加点击量)
|
|
|
+ knowledgeVo.setIsOrganizationId(1);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 如果组织架构id为空,职系,职等不为空
|
|
|
+ if (CollectionUtils.isEmpty(organizationDto.getOrganizationId()) && !CollectionUtils.isEmpty(organizationDto.getGradeId()) &&
|
|
|
+ !CollectionUtils.isEmpty(organizationDto.getGradeLevelId())) {
|
|
|
+ if (organizationDto.getGradeId().contains(sequenceCode) && organizationDto.getGradeLevelId().contains(slyGrade)) {
|
|
|
+ // 符合条件,增加点击量
|
|
|
+ if (isView) {
|
|
|
+ addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
|
+ }
|
|
|
+ knowledgeVo.setIsOrganizationId(0);
|
|
|
+ return knowledgeVo;
|
|
|
+ } else {
|
|
|
+ // 没有权限(不增加点击量)
|
|
|
+ knowledgeVo.setIsOrganizationId(1);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 如果组织架构id,职系,职等都不为空
|
|
|
+ if (!CollectionUtils.isEmpty(organizationDto.getOrganizationId()) && !CollectionUtils.isEmpty(organizationDto.getGradeId()) &&
|
|
|
+ !CollectionUtils.isEmpty(organizationDto.getGradeLevelId())) {
|
|
|
+ if (flags.get() && organizationDto.getGradeId().contains(sequenceCode) && organizationDto.getGradeLevelId().contains(slyGrade)) {
|
|
|
+ // 符合条件,增加点击量
|
|
|
+ if (isView) {
|
|
|
+ addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
|
+ }
|
|
|
+ knowledgeVo.setIsOrganizationId(0);
|
|
|
+ return knowledgeVo;
|
|
|
+ } else {
|
|
|
+ // 没有权限(不增加点击量)
|
|
|
+ knowledgeVo.setIsOrganizationId(1);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|