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
e6030b42
Commit
e6030b42
authored
Feb 17, 2023
by
高建强
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6_temp' into develop_dl_plan6_temp
parents
a3ac8c1d
cc16fffc
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
69 additions
and
16 deletions
+69
-16
DayHourEnum.java
...ava/com/yeejoin/equipmanage/common/enums/DayHourEnum.java
+31
-0
TopicEnum.java
.../java/com/yeejoin/equipmanage/common/enums/TopicEnum.java
+2
-1
BigScreenController.java
...m/yeejoin/equipmanage/controller/BigScreenController.java
+2
-2
ConfigureController.java
...m/yeejoin/equipmanage/controller/ConfigureController.java
+4
-4
IotFeign.java
...src/main/java/com/yeejoin/equipmanage/fegin/IotFeign.java
+0
-3
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+2
-2
EquipmentSpecificAlarmServiceImpl.java
...anage/service/impl/EquipmentSpecificAlarmServiceImpl.java
+20
-4
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+8
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/DayHourEnum.java
0 → 100644
View file @
e6030b42
package
com
.
yeejoin
.
equipmanage
.
common
.
enums
;
/**
* 一天内不同时段个数
*/
public
enum
DayHourEnum
{
hour
(
"小时"
,
24
),
hafHour
(
"半小时个数"
,
48
),
twoHour
(
"两小时个数"
,
12
),
fourHour
(
"四小时个数"
,
6
);
private
String
name
;
private
int
number
;
DayHourEnum
(
String
name
,
int
number
){
this
.
name
=
name
;
this
.
number
=
number
;
}
public
String
getName
()
{
return
name
;
}
public
int
getNumber
()
{
return
number
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/TopicEnum.java
View file @
e6030b42
...
...
@@ -20,7 +20,8 @@ public enum TopicEnum {
CARZXDT
(
"carIndexInsertOrUpdate"
,
"最新动态-告警日志列表"
),
EQXXTJ
(
"fasReportInsertOrUpdate"
,
"设备信号消息统计列表"
),
ALARM_LOG_INSERT
(
"alarm/log/insert"
,
"告警日志插入"
),
IOT_SYSTEM__AlARM
(
"iot-system-alarm"
,
"确警消息"
);
IOT_SYSTEM__AlARM
(
"iot-system-alarm"
,
"确警消息"
),
SHBZYCXH
(
"fasNormalIndexInsertOrUpdate"
,
"四横八纵遥测信号"
);
private
String
topic
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BigScreenController.java
View file @
e6030b42
...
...
@@ -114,8 +114,8 @@ public class BigScreenController extends AbstractBaseController {
ResponseModel
entity1
=
null
;
ResponseModel
entity2
=
null
;
try
{
entity1
=
iotFeign
.
selectListNew
(
getAppKey
(),
getProduct
(),
getToken
(),
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"true"
,
pressurePumpStart
);
entity2
=
iotFeign
.
selectListNew
(
getAppKey
(),
getProduct
(),
getToken
(),
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"false"
,
pressurePumpStart
);
entity1
=
iotFeign
.
selectListNew
(
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"true"
,
pressurePumpStart
);
entity2
=
iotFeign
.
selectListNew
(
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"false"
,
pressurePumpStart
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/ConfigureController.java
View file @
e6030b42
...
...
@@ -332,8 +332,8 @@ public class ConfigureController extends AbstractBaseController {
ResponseModel
entity1
=
null
;
ResponseModel
entity2
=
null
;
try
{
entity1
=
iotFeign
.
selectListNew
(
getAppKey
(),
getProduct
(),
getToken
(),
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"true"
,
pressurePumpStart
);
entity2
=
iotFeign
.
selectListNew
(
getAppKey
(),
getProduct
(),
getToken
(),
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"false"
,
pressurePumpStart
);
entity1
=
iotFeign
.
selectListNew
(
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"true"
,
pressurePumpStart
);
entity2
=
iotFeign
.
selectListNew
(
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"false"
,
pressurePumpStart
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -393,8 +393,8 @@ public class ConfigureController extends AbstractBaseController {
ResponseModel
entity1
=
null
;
ResponseModel
entity2
=
null
;
try
{
entity1
=
iotFeign
.
selectListNew
(
getAppKey
(),
getProduct
(),
getToken
(),
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"true"
,
pressurePumpStart
);
entity2
=
iotFeign
.
selectListNew
(
getAppKey
(),
getProduct
(),
getToken
(),
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"false"
,
pressurePumpStart
);
entity1
=
iotFeign
.
selectListNew
(
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"true"
,
pressurePumpStart
);
entity2
=
iotFeign
.
selectListNew
(
prefix
,
suffix
,
startDateStr
,
nowStrLong
,
"false"
,
pressurePumpStart
);
}
catch
(
Exception
e
)
{
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 @
e6030b42
...
...
@@ -64,9 +64,6 @@ public interface IotFeign {
@RequestMapping
(
value
=
"v1/livedata/common/list"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
ResponseModel
selectListNew
(
@RequestHeader
(
"appKey"
)
String
appKey
,
@RequestHeader
(
"product"
)
String
product
,
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"measurement"
)
String
measurement
,
@RequestParam
(
required
=
false
,
value
=
"deviceName"
)
String
deviceName
,
@RequestParam
(
value
=
"timeStart"
)
String
beginDate
,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
e6030b42
...
...
@@ -286,7 +286,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
prefix
=
iotCode
.
toString
().
substring
(
0
,
8
);
suffix
=
iotCode
.
toString
().
substring
(
8
);
try
{
ResponseModel
responseModel
=
iotFeign
.
selectListNew
(
appKey
,
product
,
token
,
prefix
,
suffix
,
startTime
,
endTime
,
null
,
pressurePumpStart
);
ResponseModel
responseModel
=
iotFeign
.
selectListNew
(
prefix
,
suffix
,
startTime
,
endTime
,
null
,
pressurePumpStart
);
if
(
200
==
responseModel
.
getStatus
())
{
String
json
=
JSON
.
toJSONString
(
responseModel
.
getResult
());
List
<
Map
<
String
,
String
>>
dataList
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json
);
...
...
@@ -451,7 +451,7 @@ public class EmergencyServiceImpl implements IEmergencyService {
durationTime
=
intervalTime2
;
intervalTime1
=
falseDataList
.
get
(
0
).
get
(
"createdTime"
);
String
stop5BeforeTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
dateAddMinutes
(
DateUtils
.
convertStrToDate
(
intervalTime1
,
"yyyy-MM-dd HH:mm:ss"
),
-
5
),
"yyyy-MM-dd HH:mm:ss"
);
ResponseModel
pipeResponseModel
=
iotFeign
.
selectListNew
(
appKey
,
product
,
token
,
prefix
,
null
,
stop5BeforeTime
,
intervalTime2
,
null
,
"FHS_PipePressureDetector_PipePressure"
);
ResponseModel
pipeResponseModel
=
iotFeign
.
selectListNew
(
prefix
,
null
,
stop5BeforeTime
,
intervalTime2
,
null
,
"FHS_PipePressureDetector_PipePressure"
);
if
(
200
==
pipeResponseModel
.
getStatus
())
{
String
pipeJson
=
JSON
.
toJSONString
(
pipeResponseModel
.
getResult
());
List
<
Map
<
String
,
String
>>
pipeDataList
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
pipeJson
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmServiceImpl.java
View file @
e6030b42
...
...
@@ -35,6 +35,7 @@ import org.springframework.data.domain.PageImpl;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -788,8 +789,18 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
if
(
equipmentSpecificMapper
.
getEquipmentSpecificIotCodeWYB
().
get
(
0
)
!=
null
)
{
vo
=
equipmentSpecificMapper
.
getEquipmentSpecificIotCodeWYB
().
get
(
0
);
}
int
startNum
=
Integer
.
parseInt
(
stringObjectMap
.
get
(
"startNum"
).
toString
());
ResponseModel
start
=
iotFeign
.
selectListNew
(
remoteSecurityService
.
getServerToken
().
getAppKey
(),
remoteSecurityService
.
getServerToken
().
getProduct
(),
remoteSecurityService
.
getServerToken
().
getToke
(),
vo
.
getIotCode
().
substring
(
0
,
8
),
null
,
startTime
,
endTime
,
"true"
,
pressurePumpStart
);
// 启停总数
int
allNum
=
0
;
// 启动次数
int
startNum
=
0
;
ResponseModel
all
=
iotFeign
.
selectListNew
(
vo
.
getIotCode
().
substring
(
0
,
8
),
null
,
startTime
,
endTime
,
null
,
pressurePumpStart
);
if
(
200
==
all
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
all
.
getResult
()))
{
String
json1
=
JSON
.
toJSONString
(
all
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
allNum
=
listObject1
.
size
();
}
ResponseModel
start
=
iotFeign
.
selectListNew
(
vo
.
getIotCode
().
substring
(
0
,
8
),
null
,
startTime
,
endTime
,
"true"
,
pressurePumpStart
);
if
(
200
==
start
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
start
.
getResult
()))
{
String
json1
=
JSON
.
toJSONString
(
start
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
...
...
@@ -797,7 +808,6 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
}
Map
<
String
,
Object
>
retMap
=
new
HashMap
<>();
int
allNum
=
Integer
.
parseInt
(
stringObjectMap
.
get
(
"allNum"
).
toString
());
// 计算平均每小时打压频率
try
{
...
...
@@ -808,7 +818,13 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
int
twoHour
=
DateUtils
.
dateBetweenNew2
(
DateUtils
.
dateParse
(
startTime
,
null
),
DateUtils
.
dateParse
(
endTime
,
null
));
int
fourHour
=
DateUtils
.
dateBetweenNew3
(
DateUtils
.
dateParse
(
startTime
,
null
),
DateUtils
.
dateParse
(
endTime
,
null
));
// 开始时间与结束时间为同一天时 给默认值
if
(
hour
==
0
){
hour
=
DayHourEnum
.
hour
.
getNumber
();
hafHour
=
DayHourEnum
.
hafHour
.
getNumber
();
twoHour
=
DayHourEnum
.
twoHour
.
getNumber
();
fourHour
=
DayHourEnum
.
fourHour
.
getNumber
();
}
if
(
allNum
/
hour
>
15
)
{
retMap
.
put
(
"status"
,
"异常"
);
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
e6030b42
...
...
@@ -498,6 +498,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
// 直流中心消息推送刷新
publishDataToDCCenterPage
(
equipmentSpecificIndexList
);
// 四横八纵遥测信号信息列表刷新
publishNormalIndexValueToPage
(
equipmentSpecificIndexList
);
if
(
"zd"
.
equals
(
system
)){
System
.
out
.
println
(
"站端系统----------------"
);
...
...
@@ -1370,6 +1373,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
log
.
info
(
String
.
format
(
"直流中心指标消息发送:%s"
,
JSON
.
toJSONString
(
equipmentSpecificIndexList
)));
}
public
void
publishNormalIndexValueToPage
(
List
<
EquipmentSpecificIndex
>
equipmentSpecificIndexList
)
{
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
SHBZYCXH
.
getTopic
(),
JSON
.
toJSONString
(
equipmentSpecificIndexList
));
log
.
info
(
String
.
format
(
"四横八纵遥测指标消息发送:%s"
,
JSON
.
toJSONString
(
equipmentSpecificIndexList
)));
}
/**
* 更新数据报表表
*
...
...
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