Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
civil
civil-bigdata
Commits
9463765f
Commit
9463765f
authored
Jun 26, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增社会组织和儿童福利院的统计
parent
39ec5c7f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
51 deletions
+33
-51
portal-server/src/main/java/com/zq/portal/task/HyTask.java
+0
-45
portal-server/src/main/java/com/zq/portal/task/StatsTimingTask.java
+33
-6
No files found.
portal-server/src/main/java/com/zq/portal/task/HyTask.java
deleted
100644 → 0
View file @
39ec5c7f
package
com
.
zq
.
portal
.
task
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.zq.common.entity.SystemArea
;
import
com.zq.portal.dao.AreaDao
;
import
com.zq.portal.service.HyStatsService
;
import
com.zq.portal.vo.StatsReqVo
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.List
;
@Component
@RequiredArgsConstructor
public
class
HyTask
{
private
final
HyStatsService
hyStatsService
;
private
final
AreaDao
areaDao
;
/**
* 每天凌晨统计数据
*/
@Scheduled
(
cron
=
"0 0 0 * * ?"
)
@Scheduled
(
cron
=
"0 */30 * * * ?"
)
public
void
sync
()
{
System
.
out
.
println
(
"婚姻基本数统计 触发时间 :"
+
new
Date
());
hyStatsService
.
getFivesYearMarriageLine
(
StatsReqVo
.
builder
().
areaCode
(
"450000000000"
).
build
());
hyStatsService
.
getMarriageStats
(
StatsReqVo
.
builder
().
areaCode
(
"450000000000"
).
build
());
hyStatsService
.
getAreaUnderMarriageStatsList
(
StatsReqVo
.
builder
().
areaCode
(
"450000000000"
).
build
());
List
<
SystemArea
>
systemAreaList
=
areaDao
.
selectList
(
Wrappers
.
lambdaQuery
(
SystemArea
.
builder
().
parentId
(
"450000000000"
).
build
()));
for
(
SystemArea
systemArea
:
systemAreaList
)
{
// 市
hyStatsService
.
getAreaUnderMarriageStatsList
(
StatsReqVo
.
builder
().
areaCode
(
systemArea
.
getCode
()).
build
());
List
<
SystemArea
>
systemAreas
=
areaDao
.
selectList
(
Wrappers
.
lambdaQuery
(
SystemArea
.
builder
().
parentId
(
systemArea
.
getCode
()).
build
()));
for
(
SystemArea
area
:
systemAreas
)
{
// 区
hyStatsService
.
getAreaUnderMarriageStatsList
(
StatsReqVo
.
builder
().
areaCode
(
area
.
getCode
()).
build
());
}
}
}
}
portal-server/src/main/java/com/zq/portal/task/StatsTimingTask.java
View file @
9463765f
package
com
.
zq
.
portal
.
task
;
package
com
.
zq
.
portal
.
task
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.zq.common.entity.SystemArea
;
import
com.zq.portal.dao.AreaDao
;
import
com.zq.portal.service.HyStatsService
;
import
com.zq.portal.service.PeopleService
;
import
com.zq.portal.service.PeopleService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.zq.portal.vo.StatsReqVo
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@RequiredArgsConstructor
@Component
@Component
public
class
StatsTimingTask
{
public
class
StatsTimingTask
{
private
final
PeopleService
peopleService
;
private
final
PeopleService
peopleService
;
private
final
HyStatsService
hyStatsService
;
private
final
AreaDao
areaDao
;
@Autowired
public
StatsTimingTask
(
PeopleService
peopleService
)
{
this
.
peopleService
=
peopleService
;
}
@Scheduled
(
cron
=
"0 */30 * * * ?"
)
@Scheduled
(
cron
=
"0 */30 * * * ?"
)
public
void
cacheAreaData
()
{
public
void
cacheAreaData
()
{
...
@@ -28,4 +32,27 @@ public class StatsTimingTask {
...
@@ -28,4 +32,27 @@ public class StatsTimingTask {
peopleService
.
getCJYLCount
();
peopleService
.
getCJYLCount
();
}
}
/**
* 每天凌晨统计数据
*/
@Scheduled
(
cron
=
"0 0 0 * * ?"
)
@Scheduled
(
cron
=
"0 */30 * * * ?"
)
public
void
sync
()
{
System
.
out
.
println
(
"婚姻基本数统计 触发时间 :"
+
new
Date
());
hyStatsService
.
getFivesYearMarriageLine
(
StatsReqVo
.
builder
().
areaCode
(
"450000000000"
).
build
());
hyStatsService
.
getMarriageStats
(
StatsReqVo
.
builder
().
areaCode
(
"450000000000"
).
build
());
hyStatsService
.
getAreaUnderMarriageStatsList
(
StatsReqVo
.
builder
().
areaCode
(
"450000000000"
).
build
());
List
<
SystemArea
>
systemAreaList
=
areaDao
.
selectList
(
Wrappers
.
lambdaQuery
(
SystemArea
.
builder
().
parentId
(
"450000000000"
).
build
()));
for
(
SystemArea
systemArea
:
systemAreaList
)
{
// 市
hyStatsService
.
getAreaUnderMarriageStatsList
(
StatsReqVo
.
builder
().
areaCode
(
systemArea
.
getCode
()).
build
());
List
<
SystemArea
>
systemAreas
=
areaDao
.
selectList
(
Wrappers
.
lambdaQuery
(
SystemArea
.
builder
().
parentId
(
systemArea
.
getCode
()).
build
()));
for
(
SystemArea
area
:
systemAreas
)
{
// 区
hyStatsService
.
getAreaUnderMarriageStatsList
(
StatsReqVo
.
builder
().
areaCode
(
area
.
getCode
()).
build
());
}
}
}
}
}
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