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
46110d9e
Commit
46110d9e
authored
Feb 24, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点图优化代码
parent
e4520eab
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
21 deletions
+44
-21
EquipmentAlarmReportDay.java
...in/equipmanage/common/entity/EquipmentAlarmReportDay.java
+3
-0
EquipmentStateUtil.java
.../yeejoin/equipmanage/common/utils/EquipmentStateUtil.java
+2
-3
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+22
-4
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+16
-13
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentAlarmReportDay.java
View file @
46110d9e
...
@@ -83,4 +83,7 @@ public class EquipmentAlarmReportDay extends BaseEntity {
...
@@ -83,4 +83,7 @@ public class EquipmentAlarmReportDay extends BaseEntity {
@ApiModelProperty
(
value
=
"指标最新值"
)
@ApiModelProperty
(
value
=
"指标最新值"
)
private
String
value
;
private
String
value
;
@ApiModelProperty
(
value
=
"是否告警:0-否;1-是"
)
private
Integer
isAlarm
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/EquipmentStateUtil.java
View file @
46110d9e
...
@@ -268,9 +268,8 @@ public class EquipmentStateUtil {
...
@@ -268,9 +268,8 @@ public class EquipmentStateUtil {
public
static
String
judgeEquipState
(
EquipmentSpecificIndex
index
)
{
public
static
String
judgeEquipState
(
EquipmentSpecificIndex
index
)
{
if
(
TrueOrFalseEnum
.
real
.
value
.
toUpperCase
().
equals
(
String
.
valueOf
(
index
.
getValue
()).
toUpperCase
()))
{
if
(
TrueOrFalseEnum
.
real
.
value
.
toUpperCase
().
equals
(
String
.
valueOf
(
index
.
getValue
()).
toUpperCase
()))
{
return
StringUtils
.
isNotEmpty
(
index
.
getEmergencyLevelColor
())
?
index
.
getEmergencyLevelColor
()
:
"#49AA19"
;
return
index
.
getEmergencyLevelColor
();
}
else
{
return
"#49AA19"
;
}
}
return
""
;
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
46110d9e
...
@@ -542,7 +542,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -542,7 +542,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
SpeIndexVo
latestVo
=
statusList
.
get
(
0
);
SpeIndexVo
latestVo
=
statusList
.
get
(
0
);
BeanUtils
.
copyProperties
(
latestVo
,
spe
);
BeanUtils
.
copyProperties
(
latestVo
,
spe
);
spe
.
setName
(
"当前状态"
);
spe
.
setName
(
"当前状态"
);
spe
.
setValue
(
getStatus
(
statusList
));
Map
<
String
,
String
>
map
=
getStatus
(
statusList
);
spe
.
setValue
(
map
.
get
(
"runStatus"
));
spe
.
setColor
(
map
.
get
(
"color"
));
statusList
.
clear
();
statusList
.
clear
();
statusList
.
add
(
spe
);
statusList
.
add
(
spe
);
statusList
.
addAll
(
newList
);
statusList
.
addAll
(
newList
);
...
@@ -555,12 +557,28 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -555,12 +557,28 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
* @param statusList
* @param statusList
* @return
* @return
*/
*/
private
String
getStatus
(
List
<
SpeIndexVo
>
statusList
)
{
private
Map
<
String
,
String
>
getStatus
(
List
<
SpeIndexVo
>
statusList
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
SpeIndexVo
indexVo
=
statusList
.
get
(
0
);
SpeIndexVo
indexVo
=
statusList
.
get
(
0
);
int
i
=
0
;
for
(
SpeIndexVo
x
:
statusList
)
{
if
(
StringUtil
.
isNotEmpty
(
x
.
getIndexValue
()))
{
i
=
i
+
1
;
}
}
if
(
0
==
i
)
{
map
.
put
(
"runStatus"
,
"无"
);
map
.
put
(
"color"
,
""
);
return
map
;
}
if
(
StringUtil
.
isNotEmpty
(
indexVo
.
getIndexValue
())
&&
TrueOrFalseEnum
.
real
.
value
.
toUpperCase
().
equals
(
indexVo
.
getIndexValue
().
toUpperCase
()))
{
if
(
StringUtil
.
isNotEmpty
(
indexVo
.
getIndexValue
())
&&
TrueOrFalseEnum
.
real
.
value
.
toUpperCase
().
equals
(
indexVo
.
getIndexValue
().
toUpperCase
()))
{
return
indexVo
.
getIndexName
();
map
.
put
(
"runStatus"
,
indexVo
.
getIndexName
());
map
.
put
(
"color"
,
indexVo
.
getColor
());
return
map
;
}
}
return
"运行"
;
map
.
put
(
"runStatus"
,
"运行"
);
map
.
put
(
"color"
,
""
);
return
map
;
}
}
@Override
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
46110d9e
...
@@ -400,17 +400,19 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -400,17 +400,19 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
wrapper
.
eq
(
EquipmentAlarmReportDay:
:
getReportDate
,
sdf
.
format
(
x
.
getReportDate
())).
eq
(
EquipmentAlarmReportDay:
:
getIndexId
,
x
.
getIndexId
())
wrapper
.
eq
(
EquipmentAlarmReportDay:
:
getReportDate
,
sdf
.
format
(
x
.
getReportDate
())).
eq
(
EquipmentAlarmReportDay:
:
getIndexId
,
x
.
getIndexId
())
.
eq
(
EquipmentAlarmReportDay:
:
getEquipmentSpecificId
,
x
.
getEquipmentSpecificId
());
.
eq
(
EquipmentAlarmReportDay:
:
getEquipmentSpecificId
,
x
.
getEquipmentSpecificId
());
List
<
EquipmentAlarmReportDay
>
reportDayList
=
iEquipmentAlarmReportDayService
.
list
(
wrapper
);
List
<
EquipmentAlarmReportDay
>
reportDayList
=
iEquipmentAlarmReportDayService
.
list
(
wrapper
);
if
(
reportDayList
.
isEmpty
())
{
if
(
1
==
x
.
getIsAlarm
())
{
x
.
setReportDate
(
new
Date
());
if
(
reportDayList
.
isEmpty
())
{
x
.
setFrequency
(
1
);
x
.
setReportDate
(
new
Date
());
iEquipmentAlarmReportDayService
.
save
(
x
);
x
.
setFrequency
(
1
);
}
else
{
iEquipmentAlarmReportDayService
.
save
(
x
);
EquipmentAlarmReportDay
reportDay
=
reportDayList
.
get
(
0
);
}
else
{
reportDay
.
setLastReportDate
(
new
Date
());
EquipmentAlarmReportDay
reportDay
=
reportDayList
.
get
(
0
);
reportDay
.
setValue
(
x
.
getValue
());
reportDay
.
setLastReportDate
(
new
Date
());
reportDay
.
setFrequency
(
reportDay
.
getFrequency
()
+
1
);
reportDay
.
setValue
(
x
.
getValue
());
reportDay
.
setIndexTrueNum
(
reportDay
.
getIndexTrueNum
()
==
null
?
x
.
getIndexTrueNum
()
:
reportDay
.
getIndexTrueNum
()
+
x
.
getIndexTrueNum
());
reportDay
.
setFrequency
(
reportDay
.
getFrequency
()
+
1
);
iEquipmentAlarmReportDayService
.
updateById
(
reportDay
);
reportDay
.
setIndexTrueNum
(
reportDay
.
getIndexTrueNum
()
==
null
?
x
.
getIndexTrueNum
()
:
reportDay
.
getIndexTrueNum
()
+
x
.
getIndexTrueNum
());
iEquipmentAlarmReportDayService
.
updateById
(
reportDay
);
}
}
}
});
});
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQXXTJ
.
getTopic
(),
""
);
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQXXTJ
.
getTopic
(),
""
);
...
@@ -770,7 +772,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -770,7 +772,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if
(
TrueOrFalseEnum
.
real
.
value
.
toUpperCase
().
equals
(
index
.
getValue
().
toUpperCase
()))
{
if
(
TrueOrFalseEnum
.
real
.
value
.
toUpperCase
().
equals
(
index
.
getValue
().
toUpperCase
()))
{
topicObject
.
put
(
"color"
,
equipmentStateVo
.
getColor
());
topicObject
.
put
(
"color"
,
equipmentStateVo
.
getColor
());
}
else
{
}
else
{
topicObject
.
put
(
"color"
,
"
#49AA19
"
);
topicObject
.
put
(
"color"
,
""
);
}
}
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentStateVo
));
Map
<
String
,
Object
>
map
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentStateVo
));
map
.
put
(
canvasTopic
,
topicObject
);
map
.
put
(
canvasTopic
,
topicObject
);
...
@@ -889,6 +891,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -889,6 +891,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
equipmentAlarmReportDay
.
setIndexName
(
equipmentSpecificIndex
.
getEquipmentSpecificIndexName
());
equipmentAlarmReportDay
.
setIndexName
(
equipmentSpecificIndex
.
getEquipmentSpecificIndexName
());
equipmentAlarmReportDay
.
setIndexType
(
equipmentSpecificIndex
.
getNameKey
());
equipmentAlarmReportDay
.
setIndexType
(
equipmentSpecificIndex
.
getNameKey
());
equipmentAlarmReportDay
.
setValue
(
equipmentSpecificIndex
.
getValue
());
equipmentAlarmReportDay
.
setValue
(
equipmentSpecificIndex
.
getValue
());
equipmentAlarmReportDay
.
setIsAlarm
(
equipmentSpecificIndex
.
getIsAlarm
());
return
equipmentAlarmReportDay
;
return
equipmentAlarmReportDay
;
}
}
...
@@ -1230,7 +1233,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -1230,7 +1233,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
/**
/**
* 发送数据至换流站
* 发送数据至换流站
* @param
equipmentSpecificIndex
* @param
*/
*/
private
void
sendEquipSpecIndexToAutosysTopic
(
EquipmentSpecificIndex
equipmentSpeIndex
){
private
void
sendEquipSpecIndexToAutosysTopic
(
EquipmentSpecificIndex
equipmentSpeIndex
){
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
46110d9e
...
@@ -325,7 +325,7 @@
...
@@ -325,7 +325,7 @@
wl_signal_classify sc
wl_signal_classify sc
WHERE
WHERE
es.realtime_iot_index_id = ei.id
es.realtime_iot_index_id = ei.id
AND upper(
sc.type_code) = ei.type_code
AND upper(
ei.type_code) = upper(sc.type_code)
AND find_in_set(
AND find_in_set(
es.id,
es.id,
(
(
...
...
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