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
a3ac8c1d
Commit
a3ac8c1d
authored
Feb 16, 2023
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:稳压泵指标统计基础方法新增
parent
1a6a52de
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
314 additions
and
6 deletions
+314
-6
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+128
-0
PressurePumpAnalysisEnum.java
...in/equipmanage/common/enums/PressurePumpAnalysisEnum.java
+51
-0
PressurePumpRelateEnum.java
...join/equipmanage/common/enums/PressurePumpRelateEnum.java
+40
-0
IPressurePumpService.java
...com/yeejoin/equipmanage/service/IPressurePumpService.java
+37
-1
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+52
-3
PressurePumpServiceImpl.java
...oin/equipmanage/service/impl/PressurePumpServiceImpl.java
+0
-0
application-dev.properties
...ystem-equip/src/main/resources/application-dev.properties
+2
-0
nameKeyInfo.json
...oot-system-equip/src/main/resources/json/nameKeyInfo.json
+4
-2
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
a3ac8c1d
...
@@ -5,7 +5,10 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -5,7 +5,10 @@ import org.apache.commons.lang3.StringUtils;
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.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -23,6 +26,7 @@ public class DateUtils {
...
@@ -23,6 +26,7 @@ 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_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月"
;
...
@@ -96,6 +100,18 @@ public class DateUtils {
...
@@ -96,6 +100,18 @@ 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
...
@@ -883,4 +899,116 @@ public class DateUtils {
...
@@ -883,4 +899,116 @@ public class DateUtils {
Date
end
=
calendar
.
getTime
();
Date
end
=
calendar
.
getTime
();
return
end
;
return
end
;
}
}
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
();
}
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/PressurePumpAnalysisEnum.java
0 → 100644
View file @
a3ac8c1d
package
com
.
yeejoin
.
equipmanage
.
common
.
enums
;
/**
* @Description: 稳压泵分析枚举
* @Author: GaoJianqiang
* @Date: 2023/2/16 10:20
*/
public
enum
PressurePumpAnalysisEnum
{
PRESSURE_PUMP_FAULT
(
"1"
,
"1"
,
"稳压泵是否故障"
,
"无"
,
""
),
PRESSURE_PUMP_INTERVAL
(
"2"
,
"2"
,
"最近一次启停间隔"
,
"无"
,
"分钟"
),
PRESSURE_PUMP_DURATION
(
"3"
,
"3"
,
"最近一次启动时长"
,
"无"
,
"分钟"
),
PRESSURE_PUMP_HALF
(
"4"
,
"4"
,
"半小时启动"
,
"无"
,
"次"
),
PRESSURE_PUMP_TWO
(
"5"
,
"5"
,
"2小时启动"
,
"无"
,
"次"
),
PRESSURE_PUMP_PIPE
(
"6"
,
"6"
,
"管网压力"
,
"无"
,
""
);
private
final
String
key
;
private
final
String
code
;
private
final
String
name
;
private
final
Object
value
;
private
final
String
unit
;
PressurePumpAnalysisEnum
(
String
key
,
String
code
,
String
name
,
Object
value
,
String
unit
)
{
this
.
key
=
key
;
this
.
code
=
code
;
this
.
name
=
name
;
this
.
value
=
value
;
this
.
unit
=
unit
;
}
public
String
getKey
()
{
return
key
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
public
Object
getValue
()
{
return
value
;
}
public
String
getUnit
()
{
return
unit
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/PressurePumpRelateEnum.java
0 → 100644
View file @
a3ac8c1d
package
com
.
yeejoin
.
equipmanage
.
common
.
enums
;
/**
* @Description: 稳压泵相关枚举
* @Author: GaoJianqiang
* @Date: 2023/2/16 15:20
*/
public
enum
PressurePumpRelateEnum
{
FAULT
(
"有"
,
"有故障"
),
NOT_FAULT
(
"无"
,
"无故障"
),
PRESSURE_PUMP
(
"PressurePump"
,
"稳压泵标识"
),
ONE_HOUR_MINUTE
(
"60"
,
"60分钟"
),
IOT_INDEX_VALUE_TRUE
(
"true"
,
"物联指标值:true"
),
IOT_INDEX_VALUE_FALSE
(
"false"
,
"物联指标值:false"
),
HALF_HOUR
(
"0.5"
,
"半小时"
),
TWO_HOUR
(
"2.0"
,
"2小时"
),
PIPE_PRESSURE_DIFF
(
"0.5"
,
"管网压力差判定标准,> 0.05Mpa 异常, <= 0.05 正常"
),
PRESSURE_PUMP_START_BEFORE_MINUTE
(
"-5"
,
"稳压泵启泵前分钟数"
),
PIPE_PRESSURE_NORMAL_STATUS
(
"正常"
,
"稳压泵管网压力正常状态"
),
PIPE_PRESSURE_ABNORMAL_STATUS
(
"异常"
,
"稳压泵管网压力异常状态"
),
UN_CLEAN_TIME
(
"false"
,
"未消除"
);
private
final
String
value
;
private
final
String
desc
;
PressurePumpRelateEnum
(
String
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
String
getValue
()
{
return
value
;
}
public
String
getDesc
()
{
return
desc
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IPressurePumpService.java
View file @
a3ac8c1d
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service;
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service;
import
com.yeejoin.equipmanage.common.vo.IotDataVO
;
import
com.yeejoin.equipmanage.common.vo.IotDataVO
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -30,5 +31,40 @@ public interface IPressurePumpService {
...
@@ -30,5 +31,40 @@ public interface IPressurePumpService {
* 获取指标配置JSON信息集合
* 获取指标配置JSON信息集合
* @return
* @return
*/
*/
List
<
Map
>
getNameKeyInfoList
();
List
<
Map
>
getNameKeyInfoList
(
String
code
);
/**
* 获取所有稳压泵最近一次启停间隔,min
* @return
*/
long
getAllPressurePumpStartStopInterval
(
List
<
IotDataVO
>
redisDataList
,
String
nowStrLong
,
String
bizOrgCode
);
/**
* 获取稳压泵一定时间内启动频率或次数
*
* @param hour
* @param dateNow
* @return
*/
int
getAllPressurePumpStartFrequency
(
double
hour
,
Date
dateNow
);
/**
* 获取稳压泵最近一次启停时长,min
* @param redisDataList
* @param nowStrLong
* @param bizOrgCode
* @return
*/
long
getAllPressurePumpStartStopDuration
(
List
<
IotDataVO
>
redisDataList
,
String
nowStrLong
,
String
bizOrgCode
);
/**
* 获取稳压泵指定启泵前 minutes 分钟,管网压力差绝对值
*
* @param redisDataList
* @param redisDataPipeList
* @param nowStrLong
* @param minutes
* @return
*/
double
getAllPressurePumpPipePressureDiff
(
List
<
IotDataVO
>
redisDataList
,
List
<
IotDataVO
>
redisDataPipeList
,
String
nowStrLong
,
String
minutes
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
a3ac8c1d
...
@@ -5,14 +5,18 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -5,14 +5,18 @@ import com.alibaba.fastjson.JSONArray;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog
;
import
com.yeejoin.equipmanage.common.enums.IndexStatusEnum
;
import
com.yeejoin.equipmanage.common.enums.IndexStatusEnum
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.enums.PressurePumpAnalysisEnum
;
import
com.yeejoin.equipmanage.common.enums.PressurePumpRelateEnum
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.utils.UnitTransformUtil
;
import
com.yeejoin.equipmanage.common.utils.UnitTransformUtil
;
import
com.yeejoin.equipmanage.common.vo.IotDataVO
;
import
com.yeejoin.equipmanage.fegin.IotFeign
;
import
com.yeejoin.equipmanage.fegin.IotFeign
;
import
com.yeejoin.equipmanage.mapper.EmergencyMapper
;
import
com.yeejoin.equipmanage.mapper.EmergencyMapper
;
import
com.yeejoin.equipmanage.service.IEmergencyService
;
import
com.yeejoin.equipmanage.service.IEmergencyService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmLogService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmLogService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IPressurePumpService
;
import
org.apache.commons.compress.utils.Lists
;
import
org.apache.commons.compress.utils.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -46,9 +50,15 @@ public class EmergencyServiceImpl implements IEmergencyService {
...
@@ -46,9 +50,15 @@ public class EmergencyServiceImpl implements IEmergencyService {
@Autowired
@Autowired
private
IotFeign
iotFeign
;
private
IotFeign
iotFeign
;
@Autowired
private
IPressurePumpService
pressurePumpService
;
@Value
(
"${equipment.pressurepump.start}"
)
@Value
(
"${equipment.pressurepump.start}"
)
private
String
pressurePumpStart
;
private
String
pressurePumpStart
;
@Value
(
"${equipment.pressurepump.pipepressure}"
)
private
String
pressurePumpPipePressure
;
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getSystemState
(
String
bizOrgCode
)
{
public
List
<
Map
<
String
,
Object
>>
getSystemState
(
String
bizOrgCode
)
{
List
<
Map
<
String
,
Object
>>
list
=
emergencyMapper
.
getSystemState
(
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
list
=
emergencyMapper
.
getSystemState
(
bizOrgCode
);
...
@@ -217,6 +227,45 @@ public class EmergencyServiceImpl implements IEmergencyService {
...
@@ -217,6 +227,45 @@ public class EmergencyServiceImpl implements IEmergencyService {
return
emergencyMapper
.
getStockEquipStatistics
();
return
emergencyMapper
.
getStockEquipStatistics
();
}
}
// @Override
public
List
<
Map
<
String
,
Object
>>
getPressurePumpDiagnosticAnalysis1
(
String
equipmentCode
,
String
nameKeys
,
String
fieldKey
,
String
bizOrgCode
,
String
appKey
,
String
product
,
String
token
)
{
PressurePumpAnalysisEnum
[]
values
=
PressurePumpAnalysisEnum
.
values
();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
PressurePumpAnalysisEnum
value
:
values
)
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"key"
,
value
.
getKey
());
map
.
put
(
"code"
,
value
.
getCode
());
map
.
put
(
"name"
,
value
.
getName
());
map
.
put
(
"value"
,
value
.
getValue
());
map
.
put
(
"unit"
,
value
.
getUnit
());
list
.
add
(
map
);
}
// 获取redis稳压泵缓存数据,默认JSON配置最近4小时
List
<
IotDataVO
>
redisDataList
=
pressurePumpService
.
getDataToRedis
(
pressurePumpStart
);
List
<
IotDataVO
>
redisDataPipeList
=
pressurePumpService
.
getDataToRedis
(
pressurePumpPipePressure
);
String
nowStrLong
=
DateUtils
.
getDateNowString
();
Date
dateNow
=
DateUtils
.
getDateNow
();
// 1. 判断稳压泵整体是否故障
List
<
EquipmentSpecificAlarmLog
>
alarmLogList
=
equipmentSpecificAlarmLogService
.
getAlarmLogInfoList
(
equipmentCode
,
nameKeys
,
PressurePumpRelateEnum
.
IOT_INDEX_VALUE_TRUE
.
getValue
(),
PressurePumpRelateEnum
.
UN_CLEAN_TIME
.
getValue
(),
bizOrgCode
);
list
.
get
(
0
).
put
(
"value"
,
CollectionUtils
.
isEmpty
(
alarmLogList
)
?
PressurePumpRelateEnum
.
NOT_FAULT
.
getValue
()
:
PressurePumpRelateEnum
.
FAULT
.
getValue
());
// 2. 最近一次启停间隔
long
interval
=
pressurePumpService
.
getAllPressurePumpStartStopInterval
(
redisDataList
,
nowStrLong
,
bizOrgCode
);
list
.
get
(
1
).
put
(
"value"
,
interval
);
// 3. 最近一次启动时长s
long
duration
=
pressurePumpService
.
getAllPressurePumpStartStopDuration
(
redisDataList
,
nowStrLong
,
bizOrgCode
);
list
.
get
(
1
).
put
(
"value"
,
duration
);
// 4. 半小时启动
int
halfFrequency
=
pressurePumpService
.
getAllPressurePumpStartFrequency
(
Double
.
parseDouble
(
PressurePumpRelateEnum
.
HALF_HOUR
.
getValue
()),
dateNow
);
list
.
get
(
3
).
put
(
"value"
,
interval
);
// 5. 2小时启动
int
twoFrequency
=
pressurePumpService
.
getAllPressurePumpStartFrequency
(
Double
.
parseDouble
(
PressurePumpRelateEnum
.
TWO_HOUR
.
getValue
()),
dateNow
);
list
.
get
(
4
).
put
(
"value"
,
interval
);
// 6. 管网压力状态
double
pressureDiff
=
pressurePumpService
.
getAllPressurePumpPipePressureDiff
(
redisDataList
,
redisDataPipeList
,
nowStrLong
,
PressurePumpRelateEnum
.
PRESSURE_PUMP_START_BEFORE_MINUTE
.
getValue
());
list
.
get
(
5
).
put
(
"value"
,
pressureDiff
>
Double
.
parseDouble
(
PressurePumpRelateEnum
.
PIPE_PRESSURE_DIFF
.
getValue
())
?
PressurePumpRelateEnum
.
PIPE_PRESSURE_ABNORMAL_STATUS
.
getValue
()
:
PressurePumpRelateEnum
.
PIPE_PRESSURE_NORMAL_STATUS
.
getValue
());
return
list
;
}
@Override
@Override
public
Map
<
String
,
Object
>
getPressurePumpStatusChart
(
String
equipmentCode
,
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
appKey
,
String
product
,
String
token
)
{
public
Map
<
String
,
Object
>
getPressurePumpStatusChart
(
String
equipmentCode
,
String
startTime
,
String
endTime
,
String
bizOrgCode
,
String
appKey
,
String
product
,
String
token
)
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
...
@@ -337,7 +386,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
...
@@ -337,7 +386,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
durationlMap
.
put
(
"unit"
,
"分钟"
);
durationlMap
.
put
(
"unit"
,
"分钟"
);
// 4. 半小时启动
// 4. 半小时启动
// 5. 2小时启动
// 5. 2小时启动
String
nowStrLong
=
DateUtils
.
get
NowStrLo
ng
();
String
nowStrLong
=
DateUtils
.
get
DateNowStri
ng
();
Date
halfHour
=
DateUtils
.
dateAddMinutes
(
null
,
-
30
);
Date
halfHour
=
DateUtils
.
dateAddMinutes
(
null
,
-
30
);
Date
twoHour
=
DateUtils
.
dateAddHours
(
null
,
-
2
);
Date
twoHour
=
DateUtils
.
dateAddHours
(
null
,
-
2
);
String
half
=
DateUtils
.
convertDateToString
(
halfHour
,
DateUtils
.
DATE_TIME_PATTERN
);
String
half
=
DateUtils
.
convertDateToString
(
halfHour
,
DateUtils
.
DATE_TIME_PATTERN
);
...
@@ -462,7 +511,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
...
@@ -462,7 +511,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
public
double
getPressurePumpIntervalTime
(
String
prefix
,
String
appKey
,
String
product
,
String
token
)
{
public
double
getPressurePumpIntervalTime
(
String
prefix
,
String
appKey
,
String
product
,
String
token
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
ResponseModel
intervalResponseModel
=
iotFeign
.
topSingleField
(
appKey
,
product
,
token
,
"100"
,
prefix
,
null
,
null
,
pressurePumpStart
);
ResponseModel
intervalResponseModel
=
iotFeign
.
topSingleField
(
appKey
,
product
,
token
,
"100"
,
prefix
,
null
,
null
,
pressurePumpStart
);
String
nowStrLong
=
DateUtils
.
get
NowStrLo
ng
();
String
nowStrLong
=
DateUtils
.
get
DateNowStri
ng
();
String
intervalTime1
=
nowStrLong
;
String
intervalTime1
=
nowStrLong
;
String
intervalTime2
=
nowStrLong
;
String
intervalTime2
=
nowStrLong
;
if
(
200
==
intervalResponseModel
.
getStatus
())
{
if
(
200
==
intervalResponseModel
.
getStatus
())
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/PressurePumpServiceImpl.java
View file @
a3ac8c1d
This diff is collapsed.
Click to expand it.
amos-boot-system-equip/src/main/resources/application-dev.properties
View file @
a3ac8c1d
...
@@ -116,6 +116,8 @@ equipment.scrap.cron=0 0 9 * * ?
...
@@ -116,6 +116,8 @@ equipment.scrap.cron=0 0 9 * * ?
# 稳压泵启动信号
# 稳压泵启动信号
equipment.pressurepump.start
=
FHS_PressurePump_Start
equipment.pressurepump.start
=
FHS_PressurePump_Start
# 稳压泵管网压力信号
equipment.pressurepump.pipepressure
=
FHS_PipePressureDetector_PipePressure
# 站端标识
# 站端标识
...
...
amos-boot-system-equip/src/main/resources/json/nameKeyInfo.json
View file @
a3ac8c1d
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
{
{
"name"
:
"稳压泵"
,
"name"
:
"稳压泵"
,
"code"
:
"PressurePump"
,
"code"
:
"PressurePump"
,
"nameKey"
:
"FHS_PressurePump_Start"
,
"nameKey"
:
"FHS_PressurePump_Start,FHS_PipePressureDetector_PipePressure"
,
"expire"
:
14400
"expire"
:
14400
,
"equipmentCode"
:
"92010800KAL44"
}
}
]
]
\ 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