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
d35053f5
Commit
d35053f5
authored
Jul 04, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改窗口导入后redis信息id未更新
parent
6e669953
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowServiceImpl.java
...als/xhx/module/window/service/impl/WindowServiceImpl.java
+7
-7
base-manager/src/main/java/com/mortals/xhx/module/window/web/WindowController.java
...a/com/mortals/xhx/module/window/web/WindowController.java
+0
-2
No files found.
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowServiceImpl.java
View file @
d35053f5
...
@@ -69,13 +69,9 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
...
@@ -69,13 +69,9 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
Map
<
Long
,
List
<
WorkmanEntity
>>
workmanCollect
=
workmanService
.
find
(
new
WorkmanQuery
()).
stream
().
filter
(
f
->
f
.
getWindowId
()
!=
null
).
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getWindowId
()));
Map
<
Long
,
List
<
WorkmanEntity
>>
workmanCollect
=
workmanService
.
find
(
new
WorkmanQuery
()).
stream
().
filter
(
f
->
f
.
getWindowId
()
!=
null
).
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getWindowId
()));
Map
<
Long
,
List
<
WindowBusinessEntity
>>
windowBusinessCollect
=
windowBusinessService
.
find
(
new
WindowBusinessQuery
())
Map
<
Long
,
List
<
WindowBusinessEntity
>>
windowBusinessCollect
=
windowBusinessService
.
find
(
new
WindowBusinessQuery
())
.
stream
().
filter
(
f
->
f
.
getWindowId
()
!=
null
).
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getWindowId
()));
.
stream
().
filter
(
f
->
f
.
getWindowId
()
!=
null
).
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getWindowId
()));
Map
<
Long
,
List
<
WindowMatterEntity
>>
windowMatterCollect
=
windowMatterService
.
find
(
new
WindowMatterQuery
())
Map
<
Long
,
List
<
WindowMatterEntity
>>
windowMatterCollect
=
windowMatterService
.
find
(
new
WindowMatterQuery
())
.
stream
().
filter
(
f
->
f
.
getWindowId
()
!=
null
).
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getWindowId
()));
.
stream
().
filter
(
f
->
f
.
getWindowId
()
!=
null
).
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getWindowId
()));
Map
<
Long
,
WindowHallEntity
>
windowHallMap
=
windowHallService
.
find
(
new
WindowHallQuery
()).
parallelStream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getWindowId
(),
y
->
y
,
(
o
,
n
)
->
n
));
Map
<
Long
,
WindowHallEntity
>
windowHallMap
=
windowHallService
.
find
(
new
WindowHallQuery
()).
parallelStream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getWindowId
(),
y
->
y
,
(
o
,
n
)
->
n
));
list
.
stream
().
peek
(
item
->
{
list
.
stream
().
peek
(
item
->
{
if
(!
ObjectUtils
.
isEmpty
(
workmanCollect
.
get
(
item
.
getId
())))
{
if
(!
ObjectUtils
.
isEmpty
(
workmanCollect
.
get
(
item
.
getId
())))
{
item
.
setWorkmanList
(
workmanCollect
.
get
(
item
.
getId
()));
item
.
setWorkmanList
(
workmanCollect
.
get
(
item
.
getId
()));
...
@@ -83,7 +79,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
...
@@ -83,7 +79,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
if
(!
ObjectUtils
.
isEmpty
(
windowBusinessCollect
.
get
(
item
.
getId
())))
{
if
(!
ObjectUtils
.
isEmpty
(
windowBusinessCollect
.
get
(
item
.
getId
())))
{
item
.
setWindowBusinessList
(
windowBusinessCollect
.
get
(
item
.
getId
()));
item
.
setWindowBusinessList
(
windowBusinessCollect
.
get
(
item
.
getId
()));
}
}
if
(!
ObjectUtils
.
isEmpty
(
windowMatterCollect
.
get
(
item
.
getId
())))
{
if
(!
ObjectUtils
.
isEmpty
(
windowMatterCollect
.
get
(
item
.
getId
())))
{
item
.
setWindowMatterList
(
windowMatterCollect
.
get
(
item
.
getId
()));
item
.
setWindowMatterList
(
windowMatterCollect
.
get
(
item
.
getId
()));
}
}
...
@@ -92,7 +87,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
...
@@ -92,7 +87,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
item
.
setHallId
(
windowHallEntity
.
getHallId
());
item
.
setHallId
(
windowHallEntity
.
getHallId
());
item
.
setHallName
(
windowHallEntity
.
getHallName
());
item
.
setHallName
(
windowHallEntity
.
getHallName
());
}
}
}).
count
();
}).
count
();
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
}
}
...
@@ -109,7 +103,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
...
@@ -109,7 +103,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
}
}
WindowBusinessQuery
windowBusinessQuery
=
new
WindowBusinessQuery
();
WindowBusinessQuery
windowBusinessQuery
=
new
WindowBusinessQuery
();
//windowBusinessQuery.setSiteBusinessIdList(businessIdList);
//windowBusinessQuery.setSiteBusinessIdList(businessIdList);
//先删除后再新增
//先删除后再新增
windowBusinessQuery
.
setWindowId
(
windowId
);
windowBusinessQuery
.
setWindowId
(
windowId
);
Long
[]
ids
=
windowBusinessService
.
find
(
windowBusinessQuery
).
stream
()
Long
[]
ids
=
windowBusinessService
.
find
(
windowBusinessQuery
).
stream
()
...
@@ -215,6 +208,13 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
...
@@ -215,6 +208,13 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
@Override
@Override
protected
void
saveAfter
(
WindowEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
WindowEntity
entity
,
Context
context
)
throws
AppException
{
super
.
saveAfter
(
entity
,
context
);
super
.
saveAfter
(
entity
,
context
);
//判断是否存在id,如果不存在 查询后获取
if
(
entity
.
newEntity
()){
WindowEntity
windowEntity
=
this
.
selectOne
(
new
WindowQuery
().
siteId
(
entity
.
getSiteId
()).
fromnum
(
entity
.
getFromnum
()));
if
(!
ObjectUtils
.
isEmpty
(
windowEntity
)){
entity
.
setId
(
windowEntity
.
getId
());
}
}
pushChangeMsg
(
entity
.
getId
());
pushChangeMsg
(
entity
.
getId
());
}
}
...
...
base-manager/src/main/java/com/mortals/xhx/module/window/web/WindowController.java
View file @
d35053f5
...
@@ -167,10 +167,8 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
...
@@ -167,10 +167,8 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
*/
*/
@Override
@Override
public
void
doImportDataBefore
(
List
<
WindowEntity
>
list
,
boolean
updateSupport
,
Context
context
)
throws
AppException
{
public
void
doImportDataBefore
(
List
<
WindowEntity
>
list
,
boolean
updateSupport
,
Context
context
)
throws
AppException
{
String
siteId
=
request
.
getParameter
(
"siteId"
);
String
siteId
=
request
.
getParameter
(
"siteId"
);
String
deptId
=
request
.
getParameter
(
"deptId"
);
String
deptId
=
request
.
getParameter
(
"deptId"
);
log
.
info
(
"siteId:{}"
,
siteId
);
SiteEntity
siteEntity
=
null
;
SiteEntity
siteEntity
=
null
;
DeptEntity
deptEntity
=
null
;
DeptEntity
deptEntity
=
null
;
if
(!
ObjectUtils
.
isEmpty
(
siteId
))
{
if
(!
ObjectUtils
.
isEmpty
(
siteId
))
{
...
...
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