|
@@ -368,7 +368,7 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
//处理组织架构
|
|
|
if (!ObjectUtil.valueAllNull(entity.getOrganizationIds())){
|
|
|
String organizationId = JSON.toJSON(entity.getOrganizationIds()).toString();
|
|
|
- knowledge.setOrganizationId(organizationId);
|
|
|
+ entity.setOrganizationId(organizationId);
|
|
|
}
|
|
|
// 知识为待节点审核状态和待最终审核状态,修改失败;知识为最终审核通过,修改失败
|
|
|
if (knowledge.getApprovalStatus() == 3 || knowledge.getApprovalStatus() == 1) {
|
|
@@ -694,7 +694,14 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
if (CollectionUtils.isEmpty(organizationDto.getOrganizationId()) && !CollectionUtils.isEmpty(organizationDto.getGradeId()) &&
|
|
|
CollectionUtils.isEmpty(organizationDto.getGradeLevelId())) {
|
|
|
// 比较当前用户的职系是否符合条件
|
|
|
- if (organizationDto.getGradeId().contains(sequenceCode)) {
|
|
|
+ boolean flag = false;
|
|
|
+ for (String s : organizationDto.getGradeId()) {
|
|
|
+ if (s.contains(sequenceCode)) {
|
|
|
+ flag = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flag) {
|
|
|
// 符合条件,增加点击量
|
|
|
if (isView) {
|
|
|
addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
@@ -725,7 +732,14 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
// 如果职等为空,组织架构id,职系不为空
|
|
|
if (!CollectionUtils.isEmpty(organizationDto.getOrganizationId()) && !CollectionUtils.isEmpty(organizationDto.getGradeId()) &&
|
|
|
CollectionUtils.isEmpty(organizationDto.getGradeLevelId())) {
|
|
|
- if (flags.get() && organizationDto.getGradeId().contains(sequenceCode)) {
|
|
|
+ boolean flag = false;
|
|
|
+ for (String s : organizationDto.getGradeId()) {
|
|
|
+ if (s.contains(sequenceCode)) {
|
|
|
+ flag = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flags.get() && flag) {
|
|
|
// 符合条件,增加点击量
|
|
|
if (isView) {
|
|
|
addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
@@ -755,7 +769,14 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
// 如果组织架构id为空,职系,职等不为空
|
|
|
if (CollectionUtils.isEmpty(organizationDto.getOrganizationId()) && !CollectionUtils.isEmpty(organizationDto.getGradeId()) &&
|
|
|
!CollectionUtils.isEmpty(organizationDto.getGradeLevelId())) {
|
|
|
- if (organizationDto.getGradeId().contains(sequenceCode) && organizationDto.getGradeLevelId().contains(slyGrade)) {
|
|
|
+ boolean flag = false;
|
|
|
+ for (String s : organizationDto.getGradeId()) {
|
|
|
+ if (s.contains(sequenceCode)) {
|
|
|
+ flag = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flag && organizationDto.getGradeLevelId().contains(slyGrade)) {
|
|
|
// 符合条件,增加点击量
|
|
|
if (isView) {
|
|
|
addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|
|
@@ -770,7 +791,14 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
|
|
|
// 如果组织架构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)) {
|
|
|
+ boolean flag = false;
|
|
|
+ for (String s : organizationDto.getGradeId()) {
|
|
|
+ if (s.contains(sequenceCode)) {
|
|
|
+ flag = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flags.get() && flag && organizationDto.getGradeLevelId().contains(slyGrade)) {
|
|
|
// 符合条件,增加点击量
|
|
|
if (isView) {
|
|
|
addCountViews(osUserDto.getUserId(), knowledgeVo.getPkId());
|