Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
69f008f1
Commit
69f008f1
authored
May 13, 2025
by
李松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应急大屏法律法规卡片添加orgCode过滤
parent
cb7d17c8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
12 deletions
+29
-12
DocCategoryResource.java
...in/amos/knowledgebase/controller/DocCategoryResource.java
+3
-2
DocContentResource.java
...oin/amos/knowledgebase/controller/DocContentResource.java
+4
-3
DocLibraryResource.java
...oin/amos/knowledgebase/controller/DocLibraryResource.java
+3
-2
DocCategoryMapper.java
...in/amos/knowledgebase/face/orm/dao/DocCategoryMapper.java
+2
-1
DocCategoryService.java
...n/amos/knowledgebase/face/service/DocCategoryService.java
+2
-2
DocLibraryService.java
...in/amos/knowledgebase/face/service/DocLibraryService.java
+5
-1
DocCategoryMapper.xml
...ledgebase/src/main/resources/mapper/DocCategoryMapper.xml
+4
-1
KnowledgeDocContentMapper.xml
...e/src/main/resources/mapper/KnowledgeDocContentMapper.xml
+6
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/controller/DocCategoryResource.java
View file @
69f008f1
...
...
@@ -104,10 +104,11 @@ public class DocCategoryResource {
@ApiOperation
(
value
=
"文档分类树查询-携带文档基本信息(包含根节点信息)"
)
@RequestMapping
(
value
=
"/tree-extra"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
Collection
>
docCategoryTreeExtra
(
@RequestParam
(
value
=
"root"
,
required
=
false
)
Long
root
,
@RequestParam
(
value
=
"onlyPublish"
,
defaultValue
=
"true"
,
required
=
false
)
Boolean
onlyPublish
)
{
@RequestParam
(
value
=
"onlyPublish"
,
defaultValue
=
"true"
,
required
=
false
)
Boolean
onlyPublish
,
@RequestParam
(
value
=
"orgCode"
,
required
=
false
)
String
orgCode
)
{
if
(
ValidationUtil
.
isEmpty
(
root
))
{
root
=
DocCategoryService
.
ROOT
;
}
return
ResponseHelper
.
buildResponse
(
docCategoryService
.
queryDocCategoryTreeExtra
(
RequestContext
.
getAgencyCode
(),
root
,
onlyPublish
));
return
ResponseHelper
.
buildResponse
(
docCategoryService
.
queryDocCategoryTreeExtra
(
RequestContext
.
getAgencyCode
(),
root
,
onlyPublish
,
orgCode
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/controller/DocContentResource.java
View file @
69f008f1
...
...
@@ -190,10 +190,11 @@ public class DocContentResource {
@RequestParam
(
value
=
"auditStatus"
,
required
=
false
)
String
[]
auditStatus
,
@RequestParam
(
value
=
"docStatus"
,
required
=
false
)
String
docStatus
,
@RequestParam
(
value
=
"createTimeLeft"
,
required
=
false
)
String
createTimeLeft
,
@RequestParam
(
value
=
"createTimeRight"
,
required
=
false
)
String
createTimeRight
)
{
@RequestParam
(
value
=
"createTimeRight"
,
required
=
false
)
String
createTimeRight
,
@RequestParam
(
value
=
"orgCode"
,
required
=
false
)
String
orgCode
)
{
Map
requestMap
=
request
.
getParameterMap
();
Page
page
=
docLibraryService
.
queryDocList
(
offset
,
end
,
directoryId
,
docTitle
,
auditStatus
,
docStatus
,
requestMap
,
createTimeLeft
,
createTimeRight
,
false
,
true
);
requestMap
,
createTimeLeft
,
createTimeRight
,
false
,
true
,
orgCode
);
return
ResponseHelper
.
buildResponse
(
page
);
}
...
...
@@ -219,7 +220,7 @@ public class DocContentResource {
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
docContentService
.
queryLikeOrDis
(
sequenceNbr
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取简单的预案信息"
)
@RequestMapping
(
value
=
"/getSimpleDetail/{sequenceNbr}"
,
method
=
RequestMethod
.
GET
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/controller/DocLibraryResource.java
View file @
69f008f1
...
...
@@ -63,10 +63,11 @@ public class DocLibraryResource {
@RequestParam
(
value
=
"directoryId"
,
required
=
false
)
Long
directoryId
,
@RequestParam
(
value
=
"docTitle"
,
required
=
false
)
String
docTitle
,
@RequestParam
(
value
=
"createTimeLeft"
,
required
=
false
)
String
createTimeLeft
,
@RequestParam
(
value
=
"createTimeRight"
,
required
=
false
)
String
createTimeRight
)
{
@RequestParam
(
value
=
"createTimeRight"
,
required
=
false
)
String
createTimeRight
,
@RequestParam
(
value
=
"orgCode"
,
required
=
false
)
String
orgCode
)
{
Map
requestMap
=
request
.
getParameterMap
();
Page
page
=
docLibraryService
.
queryDocList
(
offset
,
end
,
directoryId
,
docTitle
,
null
,
Constants
.
DOC_STATUS_PUBLISHED
,
requestMap
,
createTimeLeft
,
createTimeRight
,
Boolean
.
parseBoolean
(
filterByCollection
),
false
);
requestMap
,
createTimeLeft
,
createTimeRight
,
Boolean
.
parseBoolean
(
filterByCollection
),
false
,
orgCode
);
return
ResponseHelper
.
buildResponse
(
page
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/orm/dao/DocCategoryMapper.java
View file @
69f008f1
...
...
@@ -17,5 +17,5 @@ import java.util.List;
*/
public
interface
DocCategoryMapper
extends
BaseMapper
<
KnowledgeDocCategory
>
{
List
<
MultipleNodeModel
>
queryDocAndCategoryTree
(
@Param
(
"categoryIds"
)
List
<
Long
>
categoryIds
,
@Param
(
"docStatus"
)
String
docStatus
);
List
<
MultipleNodeModel
>
queryDocAndCategoryTree
(
@Param
(
"categoryIds"
)
List
<
Long
>
categoryIds
,
@Param
(
"docStatus"
)
String
docStatus
,
@Param
(
"orgCode"
)
String
orgCode
);
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/DocCategoryService.java
View file @
69f008f1
...
...
@@ -190,7 +190,7 @@ public class DocCategoryService extends BaseService<KnowledgeDocCategoryModel, K
return
this
.
queryForList
(
""
,
false
,
parentId
);
}
public
Collection
queryDocCategoryTreeExtra
(
String
agencyCode
,
Long
root
,
Boolean
onlyPublish
)
{
public
Collection
queryDocCategoryTreeExtra
(
String
agencyCode
,
Long
root
,
Boolean
onlyPublish
,
String
orgCode
)
{
KnowledgeDocCategoryModel
rootCategory
=
null
;
if
(
root
!=
null
&&
!
ROOT
.
equals
(
root
))
{
rootCategory
=
this
.
queryBySeq
(
root
);
...
...
@@ -204,7 +204,7 @@ public class DocCategoryService extends BaseService<KnowledgeDocCategoryModel, K
List
<
KnowledgeDocCategoryModel
>
allChildren
=
TreeUtil
.
getAllChildren
(
categoryTree
);
if
(!
allChildren
.
isEmpty
())
{
List
<
Long
>
directoryIds
=
BaseUtil
.
getModelIds
(
allChildren
);
List
<
MultipleNodeModel
>
multipleNodeModels
=
this
.
baseMapper
.
queryDocAndCategoryTree
(
directoryIds
,
onlyPublish
?
Constants
.
DOC_STATUS_PUBLISHED
:
null
);
List
<
MultipleNodeModel
>
multipleNodeModels
=
this
.
baseMapper
.
queryDocAndCategoryTree
(
directoryIds
,
onlyPublish
?
Constants
.
DOC_STATUS_PUBLISHED
:
null
,
orgCode
);
return
TreeBuilder
.
buildByRecursive
(
multipleNodeModels
,
null
==
rootCategory
?
root
:
rootCategory
.
getParentId
());
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/DocLibraryService.java
View file @
69f008f1
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.knowledgebase.face.service;
import
com.alibaba.fastjson.JSON
;
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.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
...
...
@@ -134,11 +135,14 @@ public class DocLibraryService {
}
public
Page
queryDocList
(
int
offset
,
int
end
,
Long
directoryId
,
String
docTitle
,
String
[]
auditStatus
,
String
docStatus
,
Map
<
String
,
String
[]>
requestMap
,
String
createTimeLeft
,
String
createTimeRight
,
boolean
favor
,
boolean
permission
)
{
Map
<
String
,
String
[]>
requestMap
,
String
createTimeLeft
,
String
createTimeRight
,
boolean
favor
,
boolean
permission
,
String
orgCode
)
{
Map
<
String
,
Object
>
paramsMap
=
new
HashMap
<>();
paramsMap
.
put
(
"userId"
,
RequestContext
.
getExeUserId
());
paramsMap
.
put
(
"start"
,
offset
);
paramsMap
.
put
(
"limit"
,
end
>
offset
?
end
-
offset
+
1
:
50
);
if
(!
ObjectUtils
.
isEmpty
(
orgCode
))
{
paramsMap
.
put
(
"orgCode"
,
orgCode
);
}
// 封装权限过滤条件
if
(
permission
)
{
addPermissionFilters
(
paramsMap
);
...
...
amos-boot-system-knowledgebase/src/main/resources/mapper/DocCategoryMapper.xml
View file @
69f008f1
...
...
@@ -10,6 +10,9 @@
FROM
knowledge_doc_content kdc
<where>
<if
test=
"orgCode != null and orgCode != ''"
>
kdc.ORG_CODE like concat(#{orgCode}, '%')
</if>
<if
test=
"docStatus != null and docStatus.length > 0"
>
AND DOC_STATUS = #{docStatus}
</if>
...
...
@@ -37,5 +40,5 @@
</if>
</where>
</select>
</mapper>
amos-boot-system-knowledgebase/src/main/resources/mapper/KnowledgeDocContentMapper.xml
View file @
69f008f1
...
...
@@ -139,6 +139,9 @@
<if
test=
"commonFilters.createTimeRight != null"
>
AND CREATE_TIME
<![CDATA[<=]]>
#{commonFilters.createTimeRight}
</if>
<if
test=
"orgCode != null and orgCode != ''"
>
AND doct.ORG_CODE like concat(#{orgCode}, '%')
</if>
</if>
<if
test=
"collect != null"
>
AND collect = #{collect}
...
...
@@ -228,6 +231,9 @@
<if
test=
"commonFilters.createTimeRight != null"
>
AND CREATE_TIME
<![CDATA[<=]]>
#{commonFilters.createTimeRight}
</if>
<if
test=
"orgCode != null and orgCode != ''"
>
AND doct.ORG_CODE like concat(#{orgCode}, '%')
</if>
</if>
<if
test=
"collect != null"
>
AND collect = #{collect}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment