Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
c234a2dc
Commit
c234a2dc
authored
Feb 15, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改根据业务查询部门逻辑
parent
9317ae8b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
14 deletions
+37
-14
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteBusinessServiceImpl.java
...xhx/module/site/service/impl/SiteBusinessServiceImpl.java
+35
-12
base-manager/src/test/java/com/mortals/httpclient/site/SiteBusinessController.http
...a/com/mortals/httpclient/site/SiteBusinessController.http
+2
-2
No files found.
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteBusinessServiceImpl.java
View file @
c234a2dc
...
@@ -45,14 +45,38 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
...
@@ -45,14 +45,38 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
@Override
@Override
protected
void
findAfter
(
SiteBusinessEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
SiteBusinessEntity
>
list
)
throws
AppException
{
protected
void
findAfter
(
SiteBusinessEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
SiteBusinessEntity
>
list
)
throws
AppException
{
SiteBusinessQuery
siteBusinessQuery
=
new
SiteBusinessQuery
();
if
(!
ObjectUtils
.
isEmpty
(
params
.
getIdNotList
()))
{
//排除掉已经存在的ids
list
=
list
.
stream
().
map
(
item
->
{
siteBusinessQuery
.
siteId
(
item
.
getSiteId
());
siteBusinessQuery
.
setParentId
(
item
.
getBusinessId
());
siteBusinessQuery
.
setIdNotList
(
params
.
getIdNotList
());
List
<
SiteBusinessEntity
>
childs
=
this
.
find
(
siteBusinessQuery
.
siteId
(
item
.
getSiteId
()).
parentId
(
item
.
getBusinessId
()));
if
(
ObjectUtils
.
isEmpty
(
childs
))
{
//子节点已经全部选中,删除父节点
return
null
;
}
else
{
childs
.
stream
().
forEach
(
item1
->
{
buildChildBusiness
(
item1
);
});
item
.
setChildren
(
childs
);
buildChildBusiness
(
item
);
return
item
;
}
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
}
else
{
list
.
stream
().
peek
(
item
->
{
list
.
stream
().
peek
(
item
->
{
List
<
SiteBusinessEntity
>
childs
=
this
.
find
(
new
SiteBusinessQuery
()
.
siteId
(
item
.
getSiteId
()).
parentId
(
item
.
getBusinessId
()));
List
<
SiteBusinessEntity
>
childs
=
this
.
find
(
siteBusinessQuery
.
siteId
(
item
.
getSiteId
()).
parentId
(
item
.
getBusinessId
()));
childs
.
stream
().
forEach
(
item1
->
{
childs
.
stream
().
forEach
(
item1
->
{
buildChildBusiness
(
item1
);
buildChildBusiness
(
item1
);
});
});
item
.
setChildren
(
childs
);
item
.
setChildren
(
childs
);
buildChildBusiness
(
item
);
buildChildBusiness
(
item
);
}).
count
();
}).
count
();
}
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
}
}
...
@@ -71,7 +95,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
...
@@ -71,7 +95,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
if
(
businessEntity
.
getIsBusiness
()
==
IsBusinessEnum
.
一级业务
.
getValue
())
{
if
(
businessEntity
.
getIsBusiness
()
==
IsBusinessEnum
.
一级业务
.
getValue
())
{
//添加二级业务列表
//添加二级业务列表
List
<
BusinessEntity
>
businessEntities
=
businessService
.
find
(
new
BusinessQuery
().
parentId
(
businessEntity
.
getId
()));
List
<
BusinessEntity
>
businessEntities
=
businessService
.
find
(
new
BusinessQuery
().
parentId
(
businessEntity
.
getId
()));
if
(!
ObjectUtils
.
isEmpty
(
businessEntities
))
{
if
(!
ObjectUtils
.
isEmpty
(
businessEntities
))
{
item
.
setBusinessChildren
(
businessEntities
);
item
.
setBusinessChildren
(
businessEntities
);
}
}
}
}
...
@@ -98,12 +122,11 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
...
@@ -98,12 +122,11 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
.
filter
(
item
->
!
item
.
getSiteBusinessName
().
equals
(
entity
.
getBusinessName
()))
.
filter
(
item
->
!
item
.
getSiteBusinessName
().
equals
(
entity
.
getBusinessName
()))
.
peek
(
item
->
item
.
setSiteBusinessName
(
entity
.
getBusinessName
()))
.
peek
(
item
->
item
.
setSiteBusinessName
(
entity
.
getBusinessName
()))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
businessMatterEntities
))
{
if
(!
ObjectUtils
.
isEmpty
(
businessMatterEntities
))
{
businessMatterService
.
update
(
businessMatterEntities
,
context
);
businessMatterService
.
update
(
businessMatterEntities
,
context
);
}
}
super
.
updateAfter
(
entity
,
context
);
super
.
updateAfter
(
entity
,
context
);
}
}
...
...
base-manager/src/test/java/com/mortals/httpclient/site/SiteBusinessController.http
View file @
c234a2dc
...
@@ -7,7 +7,7 @@ Content-Type: application/json
...
@@ -7,7 +7,7 @@ Content-Type: application/json
"idNotList": [11,12],
"idNotList": [11,12],
"siteId": 1,
"siteId": 1,
"page":1,
"page":1,
"size":
10
"size":
-1
}
}
###站点业务列表
###站点业务列表
...
...
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