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
010be5cf
Commit
010be5cf
authored
Jan 14, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改站点名称同步修改窗口站点
parent
c6b8b131
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
8 deletions
+53
-8
base-manager/src/main/java/com/mortals/xhx/module/app/web/AppController.java
...in/java/com/mortals/xhx/module/app/web/AppController.java
+0
-2
base-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
...mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
+18
-0
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteServiceImpl.java
...mortals/xhx/module/site/service/impl/SiteServiceImpl.java
+35
-6
No files found.
base-manager/src/main/java/com/mortals/xhx/module/app/web/AppController.java
View file @
010be5cf
...
@@ -79,8 +79,6 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
...
@@ -79,8 +79,6 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
}
else
{
}
else
{
entity
.
setCustUrl
(
""
);
entity
.
setCustUrl
(
""
);
}
}
return
super
.
infoAfter
(
id
,
model
,
entity
,
context
);
return
super
.
infoAfter
(
id
,
model
,
entity
,
context
);
}
}
...
...
base-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
View file @
010be5cf
...
@@ -2,6 +2,7 @@ package com.mortals.xhx.module.dept.service.impl;
...
@@ -2,6 +2,7 @@ package com.mortals.xhx.module.dept.service.impl;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.xhx.common.code.SourceEnum
;
import
com.mortals.xhx.common.code.SourceEnum
;
...
@@ -62,6 +63,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
...
@@ -62,6 +63,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
private
WindowBusinessService
windowBusinessService
;
private
WindowBusinessService
windowBusinessService
;
@Override
@Override
protected
String
getExtKey
(
DeptEntity
data
)
{
protected
String
getExtKey
(
DeptEntity
data
)
{
return
data
.
getDeptNumber
();
return
data
.
getDeptNumber
();
...
@@ -165,4 +167,20 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
...
@@ -165,4 +167,20 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
condition
.
put
(
"source"
,
SourceEnum
.
政务网
.
getValue
());
condition
.
put
(
"source"
,
SourceEnum
.
政务网
.
getValue
());
this
.
dao
.
delete
(
condition
);
this
.
dao
.
delete
(
condition
);
}
}
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected
void
updateAfter
(
DeptEntity
entity
,
Context
context
)
throws
AppException
{
List
<
WindowEntity
>
windowEntityList
=
windowService
.
find
(
new
WindowQuery
().
deptId
(
entity
.
getId
()));
windowEntityList
.
forEach
(
item
->{
item
.
setDeptName
(
entity
.
getName
());
});
windowService
.
update
(
windowEntityList
,
context
);
super
.
updateAfter
(
entity
,
context
);
}
}
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteServiceImpl.java
View file @
010be5cf
...
@@ -32,11 +32,13 @@ import com.mortals.xhx.module.model.model.ModelEntity;
...
@@ -32,11 +32,13 @@ import com.mortals.xhx.module.model.model.ModelEntity;
import
com.mortals.xhx.module.model.model.ModelQuery
;
import
com.mortals.xhx.module.model.model.ModelQuery
;
import
com.mortals.xhx.module.model.service.ModelService
;
import
com.mortals.xhx.module.model.service.ModelService
;
import
com.mortals.xhx.module.site.dao.SiteDao
;
import
com.mortals.xhx.module.site.dao.SiteDao
;
import
com.mortals.xhx.module.site.model.SiteEntity
;
import
com.mortals.xhx.module.site.model.*
;
import
com.mortals.xhx.module.site.model.SiteQuery
;
import
com.mortals.xhx.module.site.model.SiteTreeSelect
;
import
com.mortals.xhx.module.site.model.vo.SiteAreaVo
;
import
com.mortals.xhx.module.site.model.vo.SiteAreaVo
;
import
com.mortals.xhx.module.site.service.SiteBusinessService
;
import
com.mortals.xhx.module.site.service.SiteService
;
import
com.mortals.xhx.module.site.service.SiteService
;
import
com.mortals.xhx.module.window.model.WindowEntity
;
import
com.mortals.xhx.module.window.model.WindowQuery
;
import
com.mortals.xhx.module.window.service.WindowService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.Log
;
...
@@ -77,12 +79,36 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
...
@@ -77,12 +79,36 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
private
UserService
userService
;
private
UserService
userService
;
@Autowired
@Autowired
private
DeptService
deptService
;
private
DeptService
deptService
;
@Autowired
private
MattersService
mattersService
;
@Autowired
@Autowired
private
MatterService
matterService
;
private
MatterService
matterService
;
@Autowired
private
WindowService
windowService
;
@Autowired
private
SiteBusinessService
siteBusinessService
;
@Override
protected
void
updateBefore
(
SiteEntity
entity
,
Context
context
)
throws
AppException
{
//校验下前后名称是否一直 如果不一致 同步修改所以关联
SiteEntity
siteEntity
=
this
.
get
(
entity
.
getId
(),
context
);
if
(!
siteEntity
.
getSiteName
().
equals
(
entity
.
getSiteName
())){
//todo
}
//更新窗口名称
List
<
WindowEntity
>
windowEntityList
=
windowService
.
find
(
new
WindowQuery
().
siteId
(
entity
.
getId
()));
windowEntityList
.
forEach
(
item
->
item
.
setSiteName
(
entity
.
getSiteName
()));
windowService
.
update
(
windowEntityList
,
context
);
//更新站点业务名称
List
<
SiteBusinessEntity
>
siteBusinessEntities
=
siteBusinessService
.
find
(
new
SiteBusinessQuery
().
siteId
(
entity
.
getId
()));
siteBusinessEntities
.
forEach
(
item
->
item
.
setSiteName
(
entity
.
getSiteName
()));
siteBusinessService
.
update
(
siteBusinessEntities
,
context
);
super
.
updateBefore
(
entity
,
context
);
}
@Override
@Override
protected
void
validData
(
SiteEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
validData
(
SiteEntity
entity
,
Context
context
)
throws
AppException
{
if
(
ObjectUtils
.
isEmpty
(
entity
.
getAreaCode
()))
{
if
(
ObjectUtils
.
isEmpty
(
entity
.
getAreaCode
()))
{
...
@@ -242,9 +268,10 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
...
@@ -242,9 +268,10 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
userPdu
.
setPage
(
1
);
userPdu
.
setPage
(
1
);
userPdu
.
setSize
(-
1
);
userPdu
.
setSize
(-
1
);
Rest
<
RespData
<
List
<
UserPdu
>>>
list
=
userFeign
.
list
(
userPdu
);
Rest
<
RespData
<
List
<
UserPdu
>>>
list
=
userFeign
.
list
(
userPdu
);
userService
.
updateUserList
(
list
.
getData
().
getData
());
userService
.
updateUserList
(
list
.
getData
().
getData
());
}
}
super
.
updateAfter
(
entity
,
context
);
super
.
updateAfter
(
entity
,
context
);
}
}
...
@@ -506,4 +533,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
...
@@ -506,4 +533,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
Set
<
String
>
secondSet
=
secondList
.
parallelStream
().
map
(
e
->
e
.
getMatterNo
()).
collect
(
Collectors
.
toSet
());
Set
<
String
>
secondSet
=
secondList
.
parallelStream
().
map
(
e
->
e
.
getMatterNo
()).
collect
(
Collectors
.
toSet
());
return
firstList
.
parallelStream
().
filter
(
item
->
!
secondSet
.
contains
(
item
.
getMatterNo
())).
collect
(
Collectors
.
toList
());
return
firstList
.
parallelStream
().
filter
(
item
->
!
secondSet
.
contains
(
item
.
getMatterNo
())).
collect
(
Collectors
.
toList
());
}
}
}
}
\ No newline at end of file
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