Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bill-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
赵啸非
bill-platform
Commits
1f98f457
Commit
1f98f457
authored
Aug 02, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重新调整统计线程实现
parent
cc86484b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
14 deletions
+18
-14
bill-manager/src/main/java/com/mortals/xhx/daemon/task/SiteStatTaskImpl.java
...in/java/com/mortals/xhx/daemon/task/SiteStatTaskImpl.java
+6
-11
bill-manager/src/test/java/com/mortals/httpclient/system.http
...-manager/src/test/java/com/mortals/httpclient/system.http
+12
-3
No files found.
bill-manager/src/main/java/com/mortals/xhx/daemon/task/SiteStatTaskImpl.java
View file @
1f98f457
...
...
@@ -8,6 +8,7 @@ import com.mortals.framework.exception.AppException;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.ITask
;
import
com.mortals.framework.service.ITaskExcuteService
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.ThreadPool
;
import
com.mortals.xhx.common.code.AccessTypeEnum
;
import
com.mortals.xhx.common.code.StatTypeEnum
;
...
...
@@ -54,37 +55,31 @@ import static java.util.stream.Collectors.toCollection;
@Service
(
"SiteStatTask"
)
public
class
SiteStatTaskImpl
implements
ITaskExcuteService
{
@Autowired
private
ISiteFeign
siteFeign
;
@Autowired
private
PjEvaluateStatService
pjEvaluateStatService
;
@Autowired
private
PhQueueStatService
phQueueStatService
;
@Autowired
private
StatService
statService
;
@Autowired
private
ICacheService
cacheService
;
@Autowired
private
AccessService
accessService
;
@Autowired
private
AccessStatLogService
accessStatLogService
;
@Override
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
log
.
info
(
"站点评价统计任务"
);
//统计最近一周
statByDate
();
//统计最近4天
Long
compare
=
DataUtil
.
converStr2Long
(
task
.
getExcuteParam
(),
4L
);
statByDate
(
compare
);
log
.
info
(
"站点统计缓存任务"
);
//统计排号与评价 部门,等字典顺序记录次数
updateSiteCache
();
}
private
void
statByDate
()
{
private
void
statByDate
(
Long
compare
)
{
List
<
SitePdu
>
sitePduList
=
accessService
.
getStatSiteList
();
Long
compare
=
4L
;
DateTime
attendStart
=
DateUtil
.
offsetDay
(
new
Date
(),
-
compare
.
intValue
());
for
(
SitePdu
site
:
sitePduList
)
{
if
(
ObjectUtils
.
isEmpty
(
site
.
getId
()))
continue
;
...
...
bill-manager/src/test/java/com/mortals/httpclient/system.http
View file @
1f98f457
...
...
@@ -47,7 +47,7 @@ POST {{baseUrl}}/pj/evaluate/stat/stat
Content-Type: application/json
{
"pjTimeStart": "202
3-01
-01",
"pjTimeStart": "202
4-07
-01",
"pjTimeEnd": "2024-07-29"
}
...
...
@@ -56,7 +56,7 @@ POST {{baseUrl}}/ph/queue/stat/stat
Content-Type: application/json
{
"taketimeStart": "202
3-01
-01",
"taketimeStart": "202
4-07
-01",
"taketimeEnd": "2024-07-29"
}
...
...
@@ -66,10 +66,19 @@ POST {{baseUrl}}/stat/stat
Content-Type: application/json
{
"createTimeStart": "202
3-01
-01",
"createTimeStart": "202
4-07
-01",
"createTimeEnd": "2024-07-29"
}
###所有
POST {{baseUrl}}/access/stat
Content-Type: application/json
{
"accessTimeStart": "2024-07-01",
"accessTimeEnd": "2024-07-29"
}
...
...
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