Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
940986df
Commit
940986df
authored
Aug 21, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
稳压泵统计改为近三天
parent
8593722a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
PressurePumpServiceImpl.java
...oin/equipmanage/service/impl/PressurePumpServiceImpl.java
+5
-2
SupervisionVideoServiceImpl.java
...equipmanage/service/impl/SupervisionVideoServiceImpl.java
+1
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/PressurePumpServiceImpl.java
View file @
940986df
...
...
@@ -2,6 +2,9 @@ package com.yeejoin.equipmanage.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.equipmanage.common.dto.OrgUsrDto
;
...
...
@@ -136,8 +139,8 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
String
time
=
split
.
length
>
0
?
(
split
[
split
.
length
-
1
])
:
""
;
try
{
Date
date
=
DateUtils
.
convertStrToDate
(
time
,
DateUtils
.
DATE_PATTERN
);
// 结束日期不包含今天,获取3天前数据
if
(
DateUtils
.
dateCompare
(
date
,
startDate
)
>=
0
&&
DateUtils
.
dateCompare
(
endDate
,
date
)
>
0
)
{
// 结束日期不包含今天,获取3天前数据
改为统计近三天 包含当天
if
(
DateUtils
.
dateCompare
(
date
,
startDate
)
>=
0
&&
DateUtils
.
dateCompare
(
endDate
,
date
)
>
=
0
)
{
list
.
add
(
JSON
.
parseObject
(
redisUtils
.
get
(
x
).
toString
(),
PressurePumpCountVo
.
class
));
}
}
catch
(
ParseException
e
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SupervisionVideoServiceImpl.java
View file @
940986df
...
...
@@ -129,7 +129,7 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
// 近3天启动平均值,四合五入
AtomicInteger
dayAvgFrequency
=
new
AtomicInteger
();
try
{
Date
startDate
=
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
.
DateUtils
.
dateAddDays
(
dateNow
,
Integer
.
parseInt
(
PressurePumpRelateEnum
.
DAY_AVG
.
getValue
()));
Date
startDate
=
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
.
DateUtils
.
dateAddDays
(
dateNow
,
Integer
.
parseInt
(
PressurePumpRelateEnum
.
DAY_AVG
.
getValue
())
+
1
);
String
startTime
=
String
.
join
(
" "
,
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
.
DateUtils
.
dateFormat
(
startDate
,
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
.
DateUtils
.
DATE_PATTERN
),
"00:00:00"
);
String
endTime
=
String
.
join
(
" "
,
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
.
DateUtils
.
dateFormat
(
dateNow
,
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
.
DateUtils
.
DATE_PATTERN
),
"23:59:59"
);
Map
<
String
,
List
<
PressurePumpCountVo
>>
dayAvgDataMap
=
pressurePumpService
.
getDateRangeCountList
(
pumpInfoList
,
startTime
,
endTime
,
PressurePumpRelateEnum
.
PRESSURE_PUMP
.
getValue
(),
countRedisKey
,
equipmentCode
,
pressurePumpStart
,
countExpire
,
bizOrgCode
);
...
...
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