Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chuanshan_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
廖旭伟
chuanshan_gov_platform
Commits
a4b3f411
Commit
a4b3f411
authored
Aug 30, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
事项同步bug修改
parent
10ad8ee3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
single-matter/src/main/java/com/mortals/xhx/common/utils/SyncGovMatterDetailThread.java
...m/mortals/xhx/common/utils/SyncGovMatterDetailThread.java
+14
-3
single-matter/src/main/java/com/mortals/xhx/module/matter/model/MatterEntity.java
...ava/com/mortals/xhx/module/matter/model/MatterEntity.java
+2
-4
No files found.
single-matter/src/main/java/com/mortals/xhx/common/utils/SyncGovMatterDetailThread.java
View file @
a4b3f411
...
...
@@ -17,6 +17,7 @@ import com.mortals.xhx.module.matter.model.MatterQuery;
import
com.mortals.xhx.module.matter.service.MatterService
;
import
com.mortals.xhx.module.site.model.SiteEntity
;
import
com.mortals.xhx.module.site.model.SiteMatterEntity
;
import
com.mortals.xhx.module.site.model.SiteMatterQuery
;
import
com.mortals.xhx.module.site.model.SiteQuery
;
import
com.mortals.xhx.module.site.service.SiteMatterService
;
import
com.mortals.xhx.module.site.service.SiteService
;
...
...
@@ -69,13 +70,18 @@ public class SyncGovMatterDetailThread implements Runnable {
@Override
public
void
run
()
{
log
.
info
(
"同步站点事项开始....."
);
//
Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity, context);
//
log.info("同步站点部门:" + JSON.toJSONString(deptRest));
Rest
<
String
>
deptRest
=
deptService
.
syncDeptBySiteId
(
siteEntity
,
context
);
//
log.info("同步站点部门:" + JSON.toJSONString(deptRest));
Rest
<
String
>
rest
=
siteService
.
syncMatterBySiteId
(
siteEntity
,
context
);
//Rest<String> rest = Rest.ok();
AreaEntity
areaEntity
=
areaService
.
getCache
(
siteEntity
.
getAreaCode
());
log
.
info
(
"同步事项列表:"
+
JSON
.
toJSONString
(
rest
));
if
(
rest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
log
.
info
(
"查询事项列表开始"
);
List
<
MatterEntity
>
matterEntityList
=
matterService
.
find
(
new
MatterQuery
().
areaCode
(
siteEntity
.
getAreaCode
()).
source
(
SourceEnum
.
政务网
.
getValue
()));
log
.
info
(
"查询事项列表结束"
);
List
<
MatterEntity
>
unSyncDetailMatterList
=
matterEntityList
.
stream
()
.
filter
(
f
->
f
.
getHaveGetMatterInfo
().
equalsIgnoreCase
(
"false"
))
.
collect
(
Collectors
.
toList
());
...
...
@@ -88,9 +94,14 @@ public class SyncGovMatterDetailThread implements Runnable {
}*/
//重新添加
if
(
ObjectUtils
.
isEmpty
(
siteEntities
))
{
if
(
!
ObjectUtils
.
isEmpty
(
siteEntities
))
{
log
.
info
(
"同步站点事项到站点....."
);
for
(
SiteEntity
site
:
siteEntities
)
{
//判断是否已经有站点事项,如果有则不添加
int
count
=
siteMatterService
.
count
(
new
SiteMatterQuery
().
siteId
(
site
.
getId
()),
null
);
if
(
count
>
0
)
{
continue
;
}
List
<
SiteMatterEntity
>
siteMatterList
=
matterEntityList
.
stream
().
map
(
item
->
{
return
matterService
.
switchMatterToSiteMatter
(
item
,
site
,
context
).
getData
();
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
...
...
single-matter/src/main/java/com/mortals/xhx/module/matter/model/MatterEntity.java
View file @
a4b3f411
package
com.mortals.xhx.module.matter.model
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.ArrayList
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mortals.framework.annotation.Excel
;
...
...
@@ -1694,7 +1692,7 @@ public class MatterEntity extends MatterVo {
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
(
);
return
Objects
.
hash
(
this
.
areaCode
,
this
.
matterNo
);
}
@Override
...
...
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