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
cdedb328
Commit
cdedb328
authored
Jan 11, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加宜宾环境
parent
e5cb274d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
base-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
...mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
+16
-10
base-manager/src/test/java/com/mortals/httpclient/dept/DeptController.http
...test/java/com/mortals/httpclient/dept/DeptController.http
+1
-1
No files found.
base-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
View file @
cdedb328
...
...
@@ -33,10 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -135,20 +132,29 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
public
Rest
<
List
<
BusinessEntity
>>
getBusinessByDept
(
DeptQuery
deptQuery
,
Context
context
)
{
//查询部门窗口
List
<
WindowEntity
>
windowEntities
=
windowService
.
find
(
new
WindowQuery
().
deptId
(
deptQuery
.
getId
()));
//查询窗口业务
WindowBusinessQuery
windowBusinessQuery
=
new
WindowBusinessQuery
();
windowBusinessQuery
.
setWindowIdList
(
windowEntities
.
stream
().
map
(
WindowEntity:
:
getId
).
collect
(
Collectors
.
toList
()));
List
<
Long
>
windowList
=
windowEntities
.
stream
().
map
(
WindowEntity:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
windowList
)){
return
Rest
.
ok
(
"窗口查询结果为空"
,
Collections
.
EMPTY_LIST
);
}
windowBusinessQuery
.
setWindowIdList
(
windowList
);
List
<
WindowBusinessEntity
>
windowBusinessEntities
=
windowBusinessService
.
find
(
windowBusinessQuery
);
SiteBusinessQuery
siteBusinessQuery
=
new
SiteBusinessQuery
();
siteBusinessQuery
.
setBusinessIdList
(
windowBusinessEntities
.
stream
().
map
(
WindowBusinessEntity:
:
getSiteBusinessId
).
collect
(
Collectors
.
toList
()));
List
<
Long
>
siteBusinessList
=
windowBusinessEntities
.
stream
().
map
(
WindowBusinessEntity:
:
getSiteBusinessId
).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
siteBusinessList
)){
return
Rest
.
ok
(
"站点业务查询结果为空"
,
Collections
.
EMPTY_LIST
);
}
siteBusinessQuery
.
setBusinessIdList
(
siteBusinessList
);
List
<
SiteBusinessEntity
>
siteBusinessEntities
=
siteBusinessService
.
find
(
siteBusinessQuery
);
BusinessQuery
businessQuery
=
new
BusinessQuery
();
businessQuery
.
setIdList
(
siteBusinessEntities
.
stream
().
map
(
SiteBusinessEntity:
:
getBusinessId
).
collect
(
Collectors
.
toList
()));
List
<
Long
>
businessList
=
siteBusinessEntities
.
stream
().
map
(
SiteBusinessEntity:
:
getBusinessId
).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
businessList
)){
return
Rest
.
ok
(
"业务查询结果为空"
,
Collections
.
EMPTY_LIST
);
}
businessQuery
.
setIdList
(
businessList
);
List
<
BusinessEntity
>
businessEntities
=
businessService
.
find
(
businessQuery
);
return
Rest
.
ok
(
businessEntities
);
}
...
...
base-manager/src/test/java/com/mortals/httpclient/dept/DeptController.http
View file @
cdedb328
...
...
@@ -45,7 +45,7 @@ POST {{baseUrl}}/dept/getBusinessByDept
Content-Type: application/json
{
"id":
1
"id":
36
}
###部门查看
...
...
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