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
9afd82cd
Commit
9afd82cd
authored
Nov 09, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化窗口业务查询
parent
bf446a65
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
13 deletions
+20
-13
base-manager/src/main/java/com/mortals/xhx/module/window/service/WindowHallService.java
.../mortals/xhx/module/window/service/WindowHallService.java
+2
-1
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowBusinessServiceImpl.java
...module/window/service/impl/WindowBusinessServiceImpl.java
+6
-3
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowHallServiceImpl.java
...xhx/module/window/service/impl/WindowHallServiceImpl.java
+11
-4
base-manager/src/test/java/com/mortals/httpclient/window/WindowBusinessController.http
...m/mortals/httpclient/window/WindowBusinessController.http
+1
-5
No files found.
base-manager/src/main/java/com/mortals/xhx/module/window/service/WindowHallService.java
View file @
9afd82cd
...
...
@@ -3,6 +3,7 @@ import com.mortals.framework.exception.AppException;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.ICRUDCacheService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.matter.model.MatterEntity
;
import
com.mortals.xhx.module.window.model.WindowHallEntity
;
...
...
@@ -15,7 +16,7 @@ import com.mortals.xhx.module.window.dao.WindowHallDao;
* @author zxfei
* @date 2023-04-25
*/
public
interface
WindowHallService
extends
ICRUD
Service
<
WindowHallEntity
,
Long
>
{
public
interface
WindowHallService
extends
ICRUD
CacheService
<
WindowHallEntity
,
Long
>
{
WindowHallDao
getDao
();
...
...
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowBusinessServiceImpl.java
View file @
9afd82cd
...
...
@@ -52,9 +52,12 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
@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
()));
Map
<
Long
,
WindowEntity
>
collect
=
windowService
.
getCacheList
().
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
(),
y
->
y
,
(
o
,
n
)
->
n
));
//Map<Long, WindowEntity> collect = windowService.findToMap(new WindowQuery(), context);
Map
<
Long
,
WindowHallEntity
>
windowHallEntityMap
=
windowHallService
.
getCacheList
().
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
(),
y
->
y
,
(
o
,
n
)
->
n
));
//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
();
...
...
@@ -67,7 +70,7 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
if
(!
ObjectUtils
.
isEmpty
(
windowHallEntity
))
{
item
.
setHallId
(
windowHallEntity
.
getHallId
());
item
.
setHallName
(
windowHallEntity
.
getHallName
());
}
else
{
}
else
{
//log.info("windowhallEntity is null windowId:{}",item.getWindowId());
}
}
else
{
...
...
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowHallServiceImpl.java
View file @
9afd82cd
...
...
@@ -2,6 +2,7 @@ package com.mortals.xhx.module.window.service.impl;
import
cn.hutool.core.util.ObjectUtil
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.xhx.module.window.model.WindowEntity
;
import
com.mortals.xhx.module.window.model.WindowQuery
;
import
com.mortals.xhx.module.window.service.WindowService
;
...
...
@@ -27,7 +28,7 @@ import java.util.stream.Collectors;
* @date 2023-04-25
*/
@Service
(
"windowHallService"
)
public
class
WindowHallServiceImpl
extends
AbstractCRUDServiceImpl
<
WindowHallDao
,
WindowHallEntity
,
Long
>
implements
WindowHallService
{
public
class
WindowHallServiceImpl
extends
AbstractCRUD
Cache
ServiceImpl
<
WindowHallDao
,
WindowHallEntity
,
Long
>
implements
WindowHallService
{
@Autowired
private
WindowService
windowService
;
...
...
@@ -41,8 +42,14 @@ public class WindowHallServiceImpl extends AbstractCRUDServiceImpl<WindowHallDao
*/
@Override
protected
void
findAfter
(
WindowHallEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
WindowHallEntity
>
list
)
throws
AppException
{
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
List
<
Long
>
collect
=
list
.
stream
().
map
(
i
->
i
.
getWindowId
()).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
Long
,
WindowEntity
>
collectWin
=
windowService
.
getCacheList
().
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
(),
y
->
y
,
(
o
,
n
)
->
n
));
list
.
forEach
(
item
->
{
WindowEntity
windowEntity
=
collectWin
.
get
(
item
.
getWindowId
());
item
.
setFromnum
(
windowEntity
==
null
?
""
:
windowEntity
.
getFromnum
());
});
/* List<Long> collect = list.stream().map(i -> i.getWindowId()).distinct().collect(Collectors.toList());
if (!ObjectUtils.isEmpty(collect)) {
WindowQuery windowQuery = new WindowQuery();
windowQuery.setIdList(collect);
...
...
@@ -51,6 +58,6 @@ public class WindowHallServiceImpl extends AbstractCRUDServiceImpl<WindowHallDao
WindowEntity windowEntity = collectWin.get(item.getWindowId());
item.setFromnum(windowEntity == null ? "" : windowEntity.getFromnum());
});
}
}
*/
}
}
\ No newline at end of file
base-manager/src/test/java/com/mortals/httpclient/window/WindowBusinessController.http
View file @
9afd82cd
...
...
@@ -3,11 +3,7 @@
POST {{baseUrl}}/window/business/list
Content-Type: application/json
{
"page":1,
"size":10
}
{"windowIdList":["77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99"],"size":-1}
###窗口业务更新与保存
POST {{baseUrl}}/window/business/save
...
...
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