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
b0928098
Commit
b0928098
authored
Feb 17, 2023
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:稳压泵指标统计细化重构提交
parent
ebe0d4ea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
68 additions
and
151 deletions
+68
-151
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+3
-2
PressurePumpAnalysisEnum.java
...in/equipmanage/common/enums/PressurePumpAnalysisEnum.java
+5
-5
PressurePumpRelateEnum.java
...join/equipmanage/common/enums/PressurePumpRelateEnum.java
+2
-0
DateUtils.java
.../java/com/yeejoin/equipmanage/common/utils/DateUtils.java
+0
-128
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+2
-2
IotFeign.java
...src/main/java/com/yeejoin/equipmanage/fegin/IotFeign.java
+0
-3
IPressurePumpService.java
...com/yeejoin/equipmanage/service/IPressurePumpService.java
+50
-8
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+0
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+1
-1
PressurePumpServiceImpl.java
...oin/equipmanage/service/impl/PressurePumpServiceImpl.java
+0
-0
nameKeyInfo.json
...oot-system-equip/src/main/resources/json/nameKeyInfo.json
+3
-1
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+2
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
b0928098
...
@@ -27,6 +27,7 @@ public class DateUtils {
...
@@ -27,6 +27,7 @@ public class DateUtils {
public
static
final
String
MINUTE_ONLY_PATTERN
=
"mm"
;
public
static
final
String
MINUTE_ONLY_PATTERN
=
"mm"
;
public
static
final
String
HOUR_ONLY_PATTERN
=
"HH"
;
public
static
final
String
HOUR_ONLY_PATTERN
=
"HH"
;
public
static
final
String
MONTH_DAY_HOUR_PATTERN
=
"MM-dd HH"
;
public
static
final
String
MONTH_DAY_HOUR_PATTERN
=
"MM-dd HH"
;
public
static
final
String
MONTH_DAY_HOUR_MINUTE_PATTERN
=
"MM-dd HH:mm"
;
public
static
final
String
DATE_PATTERN_NUM
=
"yyyyMMdd"
;
public
static
final
String
DATE_PATTERN_NUM
=
"yyyyMMdd"
;
public
static
final
String
CHN_DATE_PATTERN_YEAR
=
"yyyy年"
;
public
static
final
String
CHN_DATE_PATTERN_YEAR
=
"yyyy年"
;
public
static
final
String
CHN_DATE_PATTERN_MONTH
=
"MM月"
;
public
static
final
String
CHN_DATE_PATTERN_MONTH
=
"MM月"
;
...
@@ -933,7 +934,7 @@ public class DateUtils {
...
@@ -933,7 +934,7 @@ public class DateUtils {
* @param pattern 时间格式
* @param pattern 时间格式
* @return 秒数
* @return 秒数
*/
*/
public
static
Long
getDurationSec
c
onds
(
String
startTime
,
String
endTime
,
String
pattern
)
{
public
static
Long
getDurationSeconds
(
String
startTime
,
String
endTime
,
String
pattern
)
{
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
startTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
startTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
endTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
endTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
getSeconds
();
return
Duration
.
between
(
start
,
end
).
getSeconds
();
...
@@ -947,7 +948,7 @@ public class DateUtils {
...
@@ -947,7 +948,7 @@ public class DateUtils {
* @param pattern 时间格式
* @param pattern 时间格式
* @return 秒数
* @return 秒数
*/
*/
public
static
Long
getDurationSec
c
onds
(
Date
startTime
,
Date
endTime
,
String
pattern
)
{
public
static
Long
getDurationSeconds
(
Date
startTime
,
Date
endTime
,
String
pattern
)
{
final
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
);
final
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
);
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
sdf
.
format
(
startTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
sdf
.
format
(
startTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/PressurePumpAnalysisEnum.java
View file @
b0928098
...
@@ -8,11 +8,11 @@ package com.yeejoin.equipmanage.common.enums;
...
@@ -8,11 +8,11 @@ package com.yeejoin.equipmanage.common.enums;
public
enum
PressurePumpAnalysisEnum
{
public
enum
PressurePumpAnalysisEnum
{
PRESSURE_PUMP_FAULT
(
"1"
,
"1"
,
"稳压泵是否故障"
,
"无"
,
""
),
PRESSURE_PUMP_FAULT
(
"1"
,
"1"
,
"稳压泵是否故障"
,
"无"
,
""
),
PRESSURE_PUMP_INTERVAL
(
"2"
,
"2"
,
"最近一次启停间隔"
,
"
无
"
,
"分钟"
),
PRESSURE_PUMP_INTERVAL
(
"2"
,
"2"
,
"最近一次启停间隔"
,
"
0
"
,
"分钟"
),
PRESSURE_PUMP_DURATION
(
"3"
,
"3"
,
"最近一次启动时长"
,
"
无
"
,
"分钟"
),
PRESSURE_PUMP_DURATION
(
"3"
,
"3"
,
"最近一次启动时长"
,
"
0
"
,
"分钟"
),
PRESSURE_PUMP_HALF
(
"4"
,
"4"
,
"半小时启动"
,
"
无
"
,
"次"
),
PRESSURE_PUMP_HALF
(
"4"
,
"4"
,
"半小时启动"
,
"
0
"
,
"次"
),
PRESSURE_PUMP_TWO
(
"5"
,
"5"
,
"2小时启动"
,
"
无
"
,
"次"
),
PRESSURE_PUMP_TWO
(
"5"
,
"5"
,
"2小时启动"
,
"
0
"
,
"次"
),
PRESSURE_PUMP_PIPE
(
"6"
,
"6"
,
"管网压力"
,
"
无
"
,
""
);
PRESSURE_PUMP_PIPE
(
"6"
,
"6"
,
"管网压力"
,
"
正常
"
,
""
);
private
final
String
key
;
private
final
String
key
;
private
final
String
code
;
private
final
String
code
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/PressurePumpRelateEnum.java
View file @
b0928098
...
@@ -19,6 +19,8 @@ public enum PressurePumpRelateEnum {
...
@@ -19,6 +19,8 @@ public enum PressurePumpRelateEnum {
PRESSURE_PUMP_START_BEFORE_MINUTE
(
"-5"
,
"稳压泵启泵前分钟数"
),
PRESSURE_PUMP_START_BEFORE_MINUTE
(
"-5"
,
"稳压泵启泵前分钟数"
),
PIPE_PRESSURE_NORMAL_STATUS
(
"正常"
,
"稳压泵管网压力正常状态"
),
PIPE_PRESSURE_NORMAL_STATUS
(
"正常"
,
"稳压泵管网压力正常状态"
),
PIPE_PRESSURE_ABNORMAL_STATUS
(
"异常"
,
"稳压泵管网压力异常状态"
),
PIPE_PRESSURE_ABNORMAL_STATUS
(
"异常"
,
"稳压泵管网压力异常状态"
),
START
(
"1"
,
"稳压泵启动"
),
STOP
(
"0"
,
"稳压泵停止"
),
UN_CLEAN_TIME
(
"false"
,
"未消除"
);
UN_CLEAN_TIME
(
"false"
,
"未消除"
);
private
final
String
value
;
private
final
String
value
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/DateUtils.java
View file @
b0928098
...
@@ -7,9 +7,6 @@ import java.text.DateFormat;
...
@@ -7,9 +7,6 @@ import java.text.DateFormat;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.ParsePosition
;
import
java.text.ParsePosition
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.Duration
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -27,7 +24,6 @@ public class DateUtils {
...
@@ -27,7 +24,6 @@ public class DateUtils {
public
static
final
String
YEAR_PATTERN
=
"yyyy"
;
public
static
final
String
YEAR_PATTERN
=
"yyyy"
;
public
static
final
String
MINUTE_ONLY_PATTERN
=
"mm"
;
public
static
final
String
MINUTE_ONLY_PATTERN
=
"mm"
;
public
static
final
String
HOUR_ONLY_PATTERN
=
"HH"
;
public
static
final
String
HOUR_ONLY_PATTERN
=
"HH"
;
public
static
final
String
MONTH_DAY_HOUR_PATTERN
=
"MM-dd HH"
;
public
static
final
String
DATE_TIME_T_PATTERN
=
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
;
public
static
final
String
DATE_TIME_T_PATTERN
=
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
;
public
static
final
String
[]
TWENTY_FOUR
=
new
String
[]{
" 00:00:00"
,
" 01:00:00"
,
" 02:00:00"
,
public
static
final
String
[]
TWENTY_FOUR
=
new
String
[]{
" 00:00:00"
,
" 01:00:00"
,
" 02:00:00"
,
" 03:00:00"
,
" 04:00:00"
,
" 05:00:00"
,
" 06:00:00"
,
" 07:00:00"
,
" 08:00:00"
,
" 09:00:00"
,
" 10:00:00"
,
" 11:00:00"
,
" 12:00:00"
,
" 13:00:00"
,
" 03:00:00"
,
" 04:00:00"
,
" 05:00:00"
,
" 06:00:00"
,
" 07:00:00"
,
" 08:00:00"
,
" 09:00:00"
,
" 10:00:00"
,
" 11:00:00"
,
" 12:00:00"
,
" 13:00:00"
,
...
@@ -92,18 +88,6 @@ public class DateUtils {
...
@@ -92,18 +88,6 @@ public class DateUtils {
}
}
/**
/**
* 将字符换转换为日期
* @param date
* @param pattern
* @return
* @throws ParseException
*/
public
static
Date
convertStrToDate
(
String
date
,
String
pattern
)
throws
ParseException
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
pattern
);
return
formatter
.
parse
(
date
);
}
/**
* 获取当前时间任意
* 获取当前时间任意
* @return
* @return
*/
*/
...
@@ -1031,118 +1015,6 @@ public class DateUtils {
...
@@ -1031,118 +1015,6 @@ public class DateUtils {
return
now
;
return
now
;
}
}
public
static
List
<
String
>
getTimeStrListByStartAndEnd
(
String
startTime
,
String
endTime
,
String
pattern
)
{
try
{
List
<
String
>
list
=
new
ArrayList
<>();
Date
startDate
=
convertStrToDate
(
startTime
,
DATE_TIME_PATTERN
);
Date
endDate
=
convertStrToDate
(
endTime
,
DATE_TIME_PATTERN
);
list
.
add
(
convertDateToString
(
startDate
,
pattern
));
Date
date
=
startDate
;
while
(
true
)
{
if
(
MONTH_DAY_HOUR_PATTERN
.
equals
(
pattern
))
{
date
=
dateAddMinutes
(
date
,
60
);
}
else
{
date
=
dateAddMinutes
(
date
,
1
);
}
if
(
dateCompare
(
endDate
,
date
)
==
1
)
{
list
.
add
(
convertDateToString
(
date
,
pattern
));
}
else
{
break
;
}
}
return
list
;
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
/**
* 获取两个时间段之间的秒数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 秒数
*/
public
static
Long
getDurationSecconds
(
String
startTime
,
String
endTime
,
String
pattern
)
{
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
startTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
endTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
getSeconds
();
}
/**
* 获取两个时间段之间的秒数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 秒数
*/
public
static
Long
getDurationSecconds
(
Date
startTime
,
Date
endTime
,
String
pattern
)
{
final
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
);
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
sdf
.
format
(
startTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
getSeconds
();
}
/**
* 获取两个时间段之间的分钟数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 分钟数
*/
public
static
Long
getDurationMinutes
(
String
startTime
,
String
endTime
,
String
pattern
)
{
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
startTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
endTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
toMinutes
();
}
/**
* 获取两个时间段之间的分钟数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 分钟数
*/
public
static
Long
getDurationMinutes
(
Date
startTime
,
Date
endTime
,
String
pattern
)
{
final
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
);
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
sdf
.
format
(
startTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
toMinutes
();
}
/**
* 获取两个时间段之间的小时数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 小时
*/
public
static
Long
getDurationHours
(
String
startTime
,
String
endTime
,
String
pattern
)
{
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
startTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
endTime
,
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
toHours
();
}
/**
* 获取两个时间段之间的小时数
*
* @param startTime 开始时间
* @param endTime 结束时间
* @param pattern 时间格式
* @return 小时
*/
public
static
Long
getDurationHours
(
Date
startTime
,
Date
endTime
,
String
pattern
)
{
final
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
);
final
LocalDateTime
start
=
LocalDateTime
.
parse
(
sdf
.
format
(
startTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
final
LocalDateTime
end
=
LocalDateTime
.
parse
(
sdf
.
format
(
endTime
),
DateTimeFormatter
.
ofPattern
(
pattern
));
return
Duration
.
between
(
start
,
end
).
toHours
();
}
public
static
Date
getBeginDayOfWeek
()
{
public
static
Date
getBeginDayOfWeek
()
{
Date
date
=
new
Date
();
Date
date
=
new
Date
();
if
(
date
==
null
)
{
if
(
date
==
null
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
b0928098
...
@@ -325,8 +325,8 @@ public class SupervisionConfigureController extends AbstractBaseController {
...
@@ -325,8 +325,8 @@ public class SupervisionConfigureController extends AbstractBaseController {
twoHourEntity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
two
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
twoHourEntity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
two
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
fourHourEntity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
four
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
fourHourEntity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
four
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
oneHourEntity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
one
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
oneHourEntity
=
iotFeign
.
selectList
(
getAppKey
(),
getProduct
(),
getToken
(),
one
,
nowStrLong
,
prefix
,
suffix
,
pressurePumpStart
);
start
=
iotFeign
.
topSingleField
(
getAppKey
(),
getProduct
(),
getToken
(),
"1"
,
prefix
,
suffix
,
"true"
,
pressurePumpStart
);
start
=
iotFeign
.
topSingleField
(
"1"
,
prefix
,
suffix
,
"true"
,
pressurePumpStart
);
stop
=
iotFeign
.
topSingleField
(
getAppKey
(),
getProduct
(),
getToken
(),
"1"
,
prefix
,
suffix
,
"false"
,
pressurePumpStart
);
stop
=
iotFeign
.
topSingleField
(
"1"
,
prefix
,
suffix
,
"false"
,
pressurePumpStart
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/fegin/IotFeign.java
View file @
b0928098
...
@@ -53,9 +53,6 @@ public interface IotFeign {
...
@@ -53,9 +53,6 @@ public interface IotFeign {
@RequestMapping
(
value
=
"v1/livedata/common/top/single-field"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
@RequestMapping
(
value
=
"v1/livedata/common/top/single-field"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
ResponseModel
topSingleField
(
ResponseModel
topSingleField
(
@RequestHeader
(
"appKey"
)
String
appKey
,
@RequestHeader
(
"product"
)
String
product
,
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"top"
)
String
top
,
@RequestParam
(
value
=
"top"
)
String
top
,
@RequestParam
(
value
=
"productKey"
)
String
productKey
,
@RequestParam
(
value
=
"productKey"
)
String
productKey
,
@RequestParam
(
required
=
false
,
value
=
"deviceName"
)
String
deviceName
,
@RequestParam
(
required
=
false
,
value
=
"deviceName"
)
String
deviceName
,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IPressurePumpService.java
View file @
b0928098
...
@@ -15,17 +15,20 @@ public interface IPressurePumpService {
...
@@ -15,17 +15,20 @@ public interface IPressurePumpService {
/**
/**
* redis缓存物联采集数据,内部读取JSON配置指定有效期
* redis缓存物联采集数据,内部读取JSON配置指定有效期
*
@param message
*
* @param iotDatalist
* @param iotDatalist
* @param topic
*/
*/
void
saveDataToRedis
(
List
<
IotDataVO
>
iotDatalist
);
void
saveDataToRedis
(
List
<
IotDataVO
>
iotDatalist
,
String
topic
);
/**
/**
* 根据key,模糊查询所有的redis缓存数据
* 根据nameKey,模糊查询所有的redis缓存数据
* @param key
* @param infoCode
* @param nameKey
* @param iotCode
* @return
* @return
*/
*/
List
<
IotDataVO
>
getDataToRedis
(
String
key
);
List
<
IotDataVO
>
getDataToRedis
(
String
infoCode
,
String
nameKey
,
String
iotCode
);
/**
/**
* 获取指标配置JSON信息集合
* 获取指标配置JSON信息集合
...
@@ -37,7 +40,7 @@ public interface IPressurePumpService {
...
@@ -37,7 +40,7 @@ public interface IPressurePumpService {
* 获取所有稳压泵最近一次启停间隔,min
* 获取所有稳压泵最近一次启停间隔,min
* @return
* @return
*/
*/
long
getAllPressurePumpStartStopInterval
(
List
<
IotDataVO
>
redisDataList
,
String
nowStrLong
,
String
bizOrgCode
);
long
getAllPressurePumpStartStopInterval
(
List
<
IotDataVO
>
redisDataList
,
List
<
Map
<
String
,
String
>>
iotDataList
,
String
nowStrLong
,
String
bizOrgCode
);
/**
/**
* 获取稳压泵一定时间内启动频率或次数
* 获取稳压泵一定时间内启动频率或次数
...
@@ -50,21 +53,60 @@ public interface IPressurePumpService {
...
@@ -50,21 +53,60 @@ public interface IPressurePumpService {
/**
/**
* 获取稳压泵最近一次启停时长,min
* 获取稳压泵最近一次启停时长,min
*
* @param redisDataList
* @param redisDataList
* @param iotDataList
* @param nowStrLong
* @param nowStrLong
* @param bizOrgCode
* @param bizOrgCode
* @return
* @return
*/
*/
long
getAllPressurePumpStartStopDuration
(
List
<
IotDataVO
>
redisDataList
,
String
nowStrLong
,
String
bizOrgCode
);
long
getAllPressurePumpStartStopDuration
(
List
<
IotDataVO
>
redisDataList
,
List
<
Map
<
String
,
String
>>
iotDataList
,
String
nowStrLong
,
String
bizOrgCode
);
/**
/**
* 获取稳压泵指定启泵前 minutes 分钟,管网压力差绝对值
* 获取稳压泵指定启泵前 minutes 分钟,管网压力差绝对值
*
*
* @param redisDataList
* @param redisDataList
* @param redisDataPipeList
* @param redisDataPipeList
* @param iotDataList
* @param iotDataPipeList
* @param nowStrLong
* @param nowStrLong
* @param minutes
* @param minutes
* @return
* @return
*/
*/
double
getAllPressurePumpPipePressureDiff
(
List
<
IotDataVO
>
redisDataList
,
List
<
IotDataVO
>
redisDataPipeList
,
String
nowStrLong
,
String
minutes
);
double
getAllPressurePumpPipePressureDiff
(
List
<
IotDataVO
>
redisDataList
,
List
<
IotDataVO
>
redisDataPipeList
,
List
<
Map
<
String
,
String
>>
iotDataList
,
List
<
Map
<
String
,
String
>>
iotDataPipeList
,
String
nowStrLong
,
String
minutes
);
/**
* 根据指标,获取物联top数据,influxdb
* @param top
* @param productKey
* @param deviceName
* @param key
* @param fieldKey
* @return
*/
List
<
Map
<
String
,
String
>>
getIotTopSingleField
(
String
top
,
String
productKey
,
String
deviceName
,
String
key
,
String
fieldKey
);
/**
* 根据时间范围,获取redis指定指标或指定指标设备的缓存数据
* @param infoCode
* @param nameKey
* @param iotCode
* @param startDate
* @param endDate
* @return
*/
List
<
IotDataVO
>
getDataToRedisByDateBetween
(
String
infoCode
,
String
nameKey
,
String
iotCode
,
Date
startDate
,
Date
endDate
);
/**
* 根据时间范围获取iot物联数据集合
* @param startTime
* @param endTime
* @param prefix
* @param suffix
* @param o
* @param pressurePumpStart
* @return
*/
List
<
Map
<
String
,
String
>>
getIotCommonListData
(
String
startTime
,
String
endTime
,
String
prefix
,
String
suffix
,
String
key
,
String
fieldKey
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
b0928098
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
b0928098
...
@@ -317,7 +317,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -317,7 +317,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
}
// redis缓存指定指标、指定时长物联数据
// redis缓存指定指标、指定时长物联数据
pressurePumpService
.
saveDataToRedis
(
iotDatalist
);
pressurePumpService
.
saveDataToRedis
(
iotDatalist
,
topic
);
if
(!
StringUtils
.
isEmpty
(
traceId
))
{
if
(!
StringUtils
.
isEmpty
(
traceId
))
{
String
finalTraceId
=
traceId
;
String
finalTraceId
=
traceId
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/PressurePumpServiceImpl.java
View file @
b0928098
This diff is collapsed.
Click to expand it.
amos-boot-system-equip/src/main/resources/json/nameKeyInfo.json
View file @
b0928098
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
"code"
:
"PressurePump"
,
"code"
:
"PressurePump"
,
"nameKey"
:
"FHS_PressurePump_Start,FHS_PipePressureDetector_PipePressure"
,
"nameKey"
:
"FHS_PressurePump_Start,FHS_PipePressureDetector_PipePressure"
,
"expire"
:
14400
,
"expire"
:
14400
,
"equipmentCode"
:
"92010800KAL44"
"equipmentCode"
:
"92010800KAL44"
,
"top"
:
"100"
}
}
]
]
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
b0928098
...
@@ -1728,7 +1728,8 @@
...
@@ -1728,7 +1728,8 @@
wes.value_label valueLabel,
wes.value_label valueLabel,
wes.realtime_iot_es_index_id realtimeIotSpecificIndexId,
wes.realtime_iot_es_index_id realtimeIotSpecificIndexId,
wes.realtime_iot_index_update_date realtiemIotIndexUpdateDate,
wes.realtime_iot_index_update_date realtiemIotIndexUpdateDate,
wes.realtime_iot_index_id realtimeIotIndexId
wes.realtime_iot_index_id realtimeIotIndexId,
wes.iot_code iotCode
FROM
FROM
wl_equipment_specific wes
wl_equipment_specific wes
<where>
<where>
...
...
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