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
c8841c9d
Commit
c8841c9d
authored
Apr 27, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加大厅与窗口关联
parent
d359400b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
base-manager/src/main/java/com/mortals/xhx/module/window/model/vo/WindowBusinessVo.java
.../mortals/xhx/module/window/model/vo/WindowBusinessVo.java
+10
-0
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowBusinessServiceImpl.java
...module/window/service/impl/WindowBusinessServiceImpl.java
+13
-3
No files found.
base-manager/src/main/java/com/mortals/xhx/module/window/model/vo/WindowBusinessVo.java
View file @
c8841c9d
...
...
@@ -28,4 +28,14 @@ public class WindowBusinessVo extends BaseEntityLong {
/** 窗口id列表 */
private
List
<
Long
>
windowIdList
;
/**
* 大厅ID
*/
private
Long
hallId
;
/**
* 大厅名称
*/
private
String
hallName
;
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowBusinessServiceImpl.java
View file @
c8841c9d
...
...
@@ -14,8 +14,8 @@ import com.mortals.xhx.module.business.model.BusinessQuery;
import
com.mortals.xhx.module.site.model.SiteBusinessEntity
;
import
com.mortals.xhx.module.site.model.SiteBusinessQuery
;
import
com.mortals.xhx.module.site.model.SiteEntity
;
import
com.mortals.xhx.module.window.model.
WindowEntity
;
import
com.mortals.xhx.module.window.
model.WindowQuery
;
import
com.mortals.xhx.module.window.model.
*
;
import
com.mortals.xhx.module.window.
service.WindowHallService
;
import
com.mortals.xhx.module.window.service.WindowService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.checkerframework.checker.units.qual.A
;
...
...
@@ -24,11 +24,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.xhx.module.window.dao.WindowBusinessDao
;
import
com.mortals.xhx.module.window.model.WindowBusinessEntity
;
import
com.mortals.xhx.module.window.service.WindowBusinessService
;
import
org.springframework.util.ObjectUtils
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
static
com
.
mortals
.
framework
.
util
.
HttpUtil
.
HEADER_CONTENT_TYPE
;
...
...
@@ -46,15 +46,25 @@ import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_PHP_HTTP_URL;
public
class
WindowBusinessServiceImpl
extends
AbstractCRUDServiceImpl
<
WindowBusinessDao
,
WindowBusinessEntity
,
Long
>
implements
WindowBusinessService
{
@Autowired
private
WindowService
windowService
;
@Autowired
private
WindowHallService
windowHallService
;
@Override
protected
void
findAfter
(
WindowBusinessEntity
entity
,
PageInfo
pageInfo
,
Context
context
,
List
<
WindowBusinessEntity
>
list
)
throws
AppException
{
Map
<
Long
,
WindowEntity
>
collect
=
windowService
.
findToMap
(
new
WindowQuery
(),
context
);
Map
<
Long
,
WindowHallEntity
>
windowHallEntityMap
=
windowHallService
.
find
(
new
WindowHallQuery
(),
context
).
parallelStream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getWindowId
(),
Function
.
identity
()));
Iterator
iterator
=
list
.
iterator
();
while
(
iterator
.
hasNext
())
{
WindowBusinessEntity
item
=
(
WindowBusinessEntity
)
iterator
.
next
();
if
(!
ObjectUtils
.
isEmpty
(
item
.
getWindowId
())
&&
!
ObjectUtils
.
isEmpty
(
collect
.
get
(
item
.
getWindowId
())))
{
item
.
setFromnum
(
collect
.
get
(
item
.
getWindowId
()).
getFromnum
());
WindowHallEntity
windowHallEntity
=
windowHallEntityMap
.
get
(
item
.
getWindowId
());
item
.
setHallId
(
windowHallEntity
.
getHallId
()
==
null
?
null
:
windowHallEntity
.
getWindowId
());
item
.
setHallName
(
windowHallEntity
.
getHallName
()
==
null
?
""
:
windowHallEntity
.
getHallName
());
}
else
{
iterator
.
remove
();
}
...
...
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