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
6ca0cbe2
Commit
6ca0cbe2
authored
Apr 24, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计部门入驻事项
parent
101e84ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
19 deletions
+32
-19
base-manager/src/main/java/com/mortals/xhx/module/site/web/SiteMatterController.java
...com/mortals/xhx/module/site/web/SiteMatterController.java
+32
-19
No files found.
base-manager/src/main/java/com/mortals/xhx/module/site/web/SiteMatterController.java
View file @
6ca0cbe2
...
...
@@ -5,6 +5,7 @@ import com.mortals.framework.common.Rest;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.util.ThreadPool
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BasePhpCRUDJsonMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
...
...
@@ -76,27 +77,39 @@ public class SiteMatterController extends BaseCRUDJsonBodyMappingController<Site
@Override
protected
int
batchSaveAfter
(
List
<
SiteMatterEntity
>
list
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
//统计部门入驻数量
List
<
SiteEntity
>
siteEntities
=
siteService
.
find
(
new
SiteQuery
());
for
(
SiteEntity
siteEntity
:
siteEntities
)
{
DeptQuery
query
=
new
DeptQuery
();
query
.
setSiteId
(
siteEntity
.
getId
());
List
<
DeptEntity
>
deptEntities
=
deptService
.
find
(
query
);
for
(
DeptEntity
deptEntity
:
deptEntities
)
{
DeptEntity
deptQuery
=
new
DeptEntity
();
deptQuery
.
setUpdateTime
(
new
Date
());
Runnable
runnable
=
new
Runnable
()
{
/**
*
*/
@Override
public
void
run
()
{
//统计入驻事项
SiteMatterQuery
siteMatterQuery
=
new
SiteMatterQuery
();
siteMatterQuery
.
setDeptCode
(
deptEntity
.
getDeptNumber
());
siteMatterQuery
.
setSource
(
SourceEnum
.
政务网
.
getValue
());
siteMatterQuery
.
setHallCheckIn
(
YesNoEnum
.
YES
.
getValue
());
int
incount
=
siteMatterService
.
count
(
siteMatterQuery
,
null
);
deptQuery
.
setInNum
(
incount
);
DeptEntity
condition
=
new
DeptEntity
();
condition
.
setId
(
deptEntity
.
getId
());
deptService
.
getDao
().
update
(
deptQuery
,
condition
);
List
<
SiteEntity
>
siteEntities
=
siteService
.
find
(
new
SiteQuery
());
for
(
SiteEntity
siteEntity
:
siteEntities
)
{
DeptQuery
query
=
new
DeptQuery
();
query
.
setSiteId
(
siteEntity
.
getId
());
List
<
DeptEntity
>
deptEntities
=
deptService
.
find
(
query
);
for
(
DeptEntity
deptEntity
:
deptEntities
)
{
DeptEntity
deptQuery
=
new
DeptEntity
();
deptQuery
.
setUpdateTime
(
new
Date
());
//统计入驻事项
SiteMatterQuery
siteMatterQuery
=
new
SiteMatterQuery
();
siteMatterQuery
.
setDeptCode
(
deptEntity
.
getDeptNumber
());
siteMatterQuery
.
setSource
(
SourceEnum
.
政务网
.
getValue
());
siteMatterQuery
.
setHallCheckIn
(
YesNoEnum
.
YES
.
getValue
());
int
incount
=
siteMatterService
.
count
(
siteMatterQuery
,
null
);
deptQuery
.
setInNum
(
incount
);
DeptEntity
condition
=
new
DeptEntity
();
condition
.
setId
(
deptEntity
.
getId
());
deptService
.
getDao
().
update
(
deptQuery
,
condition
);
}
}
}
}
};
ThreadPool
.
getInstance
().
execute
(
runnable
);
return
super
.
batchSaveAfter
(
list
,
model
,
context
);
}
}
\ 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