Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
b1c6884e
Commit
b1c6884e
authored
Oct 23, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.对于主变高压侧、主变低压侧增加排序操作。
2.社会贡献汉字进行常量抽取。
parent
ba8d57bf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
50 deletions
+42
-50
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+7
-0
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+4
-4
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+27
-42
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+4
-4
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/constants/CommonConstans.java
View file @
b1c6884e
...
...
@@ -158,4 +158,11 @@ public class CommonConstans {
put
(
"前万线"
,
Arrays
.
asList
(
"313光差保护_总正向有功电度"
,
"313光差保护_总反向有功电度"
,
"313光差保护_总感性无功电度"
,
"313光差保护_总容性无功电度"
));
}
};
public
static
final
String
XIAZAO_ZHUBIANGAOYACE
=
"1主变高压侧"
;
public
static
final
String
XIAZAO_ZHUBIANDIYACE
=
"1主变低压侧"
;
public
static
final
String
ER_YANG_HUA_TAN_JIANPAILIANG
=
"二氧化碳减排量(t)"
;
public
static
final
String
BIAO_ZHUN_MEI_JIANPAILIANG
=
"节约标准煤(t)"
;
public
static
final
String
TAN_FEN_CHEN_ZHUBIANDIYACE
=
"碳粉尘减排量(t)"
;
public
static
final
String
ER_YANG_HUA_LIU_ZHUBIANDIYACE
=
"二氧化硫减排量(t)"
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
b1c6884e
...
...
@@ -364,16 +364,16 @@ public class CommonServiceImpl {
二氧化硫减排量(t)=发电量(万kW·h)*1.51
氮氧化物减排量(t)=发电量(万kW·h)*1.69
*/
co2
.
setUnit
(
"二氧化碳减排量(t)"
);
co2
.
setUnit
(
CommonConstans
.
ER_YANG_HUA_TAN_JIANPAILIANG
);
co2
.
setTitle
(
String
.
format
(
"%.2f"
,
totalSocialContribution
*
CommonConstans
.
carbonDioxide
));
socialContributionDtoList
.
add
(
co2
);
coal
.
setUnit
(
"节约标准煤(t)"
);
coal
.
setUnit
(
CommonConstans
.
BIAO_ZHUN_MEI_JIANPAILIANG
);
coal
.
setTitle
(
String
.
format
(
"%.2f"
,
(
totalSocialContribution
*
CommonConstans
.
standardCoal
)));
socialContributionDtoList
.
add
(
coal
);
toner
.
setUnit
(
"碳粉尘减排量(t)"
);
toner
.
setUnit
(
CommonConstans
.
TAN_FEN_CHEN_ZHUBIANDIYACE
);
toner
.
setTitle
(
String
.
format
(
"%.2f"
,
(
totalSocialContribution
*
CommonConstans
.
toner
)));
socialContributionDtoList
.
add
(
toner
);
so2
.
setUnit
(
"二氧化硫减排量(t)"
);
so2
.
setUnit
(
CommonConstans
.
ER_YANG_HUA_LIU_ZHUBIANDIYACE
);
so2
.
setTitle
(
String
.
format
(
"%.2f"
,
(
totalSocialContribution
*
CommonConstans
.
sulfurDioxide
)));
socialContributionDtoList
.
add
(
so2
);
socialContributionDtoPage
.
setRecords
(
socialContributionDtoList
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
b1c6884e
...
...
@@ -26,6 +26,7 @@ import java.util.stream.Collectors;
import
javax.annotation.PostConstruct
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
...
...
@@ -102,6 +103,8 @@ import lombok.extern.slf4j.Slf4j;
public
class
MonitorFanIndicatorImpl
implements
IMonitorFanIndicator
{
private
final
static
List
<
String
>
fanStatesList
=
Arrays
.
asList
(
"报警状态"
,
"停机状态"
,
"故障状态"
,
"待机状态"
,
"维护状态"
,
"正常发电状态"
);
@Autowired
private
static
Map
<
String
,
EquipmentSpecificIndex
>
map
;
@Autowired
SystemEnumMapper
systemEnumMapper
;
@Autowired
SwitchPictureMapper
switchPictureMapper
;
...
...
@@ -142,20 +145,14 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
private
String
fanStatusImagePathPrefix
;
@Value
(
"classpath:/json/topic.json"
)
private
Resource
topic
;
@Value
(
"classpath:/json/fanlocation.json"
)
private
Resource
fanlocation
;
@Autowired
private
IndicatorDataMapper
indicatorDataMapper
;
private
List
<
Map
>
list
;
@Autowired
private
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
@Autowired
private
static
Map
<
String
,
EquipmentSpecificIndex
>
map
;
@Override
public
ResultsData
getNationWideInfo
(
int
current
,
int
size
,
String
gateway
,
String
equipmentNumber
)
{
String
table
=
gateway
;
...
...
@@ -266,9 +263,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
});
}
result
.
stream
().
forEach
(
e
->
{
if
(
powerOther
.
contains
(
e
.
getEquipmentIndexName
())||
e
.
getEquipmentIndexName
().
equals
(
"日发电量"
))
{
if
(
powerOther
.
contains
(
e
.
getEquipmentIndexName
())
||
e
.
getEquipmentIndexName
().
equals
(
"日发电量"
))
{
e
.
setValue
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
e
.
getValueF
()));
}
else
{
}
else
{
e
.
setValue
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
e
.
getValueF
()));
}
...
...
@@ -341,8 +338,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
List
<
ESEquipmentsDTO
>
getFanStatusList
(
String
stationId
)
{
StationBasic
stationBasic
=
getOneByStationNumber
(
stationId
);
if
(
stationBasic
.
getStationName
().
contains
(
"GFDZ"
))
{
if
(
stationBasic
.
getStationName
().
contains
(
"GFDZ"
))
{
return
new
ArrayList
<
ESEquipmentsDTO
>();
}
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
...
...
@@ -393,48 +389,33 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Double
fdjSpeed
=
Double
.
valueOf
(
objMap
.
get
(
"发电机转速"
));
Date
fdjTime
=
timeMap
.
get
(
"发电机转速"
);
Long
min
=
null
;
if
(
fdjTime
!=
null
)
{
if
(
fdjTime
!=
null
)
{
long
start
=
fdjTime
.
getTime
();
//获取当前时间毫秒值
long
current
=
System
.
currentTimeMillis
();
min
=
(
current
-
start
)
/
1000
/
60
;
min
=
(
current
-
start
)
/
1000
/
60
;
}
//正常运行
//1.发电状态=true(遥信)
//2.风机状态=8(遥测)
//3.有功功率>0(遥测)
//4.实时故障:枚举值匹配不上,以及匹配为备留信号的为正常运行
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
elecStatus
)&&
"8.0"
.
equals
(
fanStatus
)&&
power
>
0
&&!
isWarn
)
{
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
elecStatus
)
&&
"8.0"
.
equals
(
fanStatus
)
&&
power
>
0
&&
!
isWarn
)
{
equipMap
.
put
(
entry
.
getKey
(),
"正常运行"
);
}
else
if
(
"11.0"
.
equals
(
fanStatus
))
{
}
else
if
(
"11.0"
.
equals
(
fanStatus
))
{
equipMap
.
put
(
entry
.
getKey
(),
"限功率"
);
}
else
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
warnStatus
))
{
}
else
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
warnStatus
))
{
equipMap
.
put
(
entry
.
getKey
(),
"报警运行"
);
}
else
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
standbyStatus
)&&
"3.0"
.
equals
(
fanStatus
))
{
}
else
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
standbyStatus
)
&&
"3.0"
.
equals
(
fanStatus
))
{
equipMap
.
put
(
entry
.
getKey
(),
"待机状态"
);
}
else
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
stopStatus
)&&
"1.0"
.
equals
(
fanStatus
))
{
}
else
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
stopStatus
)
&&
"1.0"
.
equals
(
fanStatus
))
{
equipMap
.
put
(
entry
.
getKey
(),
"停机状态"
);
}
else
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
stopStatus
)&&
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
faultStatus
))
{
}
else
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
stopStatus
)
&&
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
faultStatus
))
{
equipMap
.
put
(
entry
.
getKey
(),
"故障状态"
);
}
else
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
mainStatus
)&&
"2.0"
.
equals
(
fanStatus
))
{
}
else
if
(
Boolean
.
TRUE
.
toString
().
equalsIgnoreCase
(
mainStatus
)
&&
"2.0"
.
equals
(
fanStatus
))
{
equipMap
.
put
(
entry
.
getKey
(),
"维护状态"
);
}
else
if
(
fdjSpeed
>
0
&&
min
!=
null
&&
min
>=
10
)
{
}
else
if
(
fdjSpeed
>
0
&&
min
!=
null
&&
min
>=
10
)
{
equipMap
.
put
(
entry
.
getKey
(),
"通讯中断"
);
}
}
...
...
@@ -452,7 +433,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
List
<
ESEquipmentsDTO
>
resultList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
equipNumList
))
{
equipNumList
.
forEach
(
item
->
{
String
status
=
equipMap
.
get
(
item
.
getEquipmentNumber
());
String
status
=
equipMap
.
get
(
item
.
getEquipmentNumber
());
item
.
setAddress
(
status
);
ESEquipmentsDTO
esEquipmentsDTO
=
new
ESEquipmentsDTO
();
BeanUtil
.
copyProperties
(
item
,
esEquipmentsDTO
);
...
...
@@ -485,8 +466,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
String
valueEnum
=
equipmentSpecificIndex
.
getValueEnum
();
JSONArray
arr
=
JSONObject
.
parseArray
(
valueEnum
);
if
(
arr
==
null
)
{
if
(
arr
==
null
)
{
continue
;
}
for
(
Object
o
:
arr
)
{
...
...
@@ -606,7 +586,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentNumberKeyword
,
Arrays
.
asList
(
equipNum
));
List
<
ESEquipments
>
equipNumList
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
if
(
ObjectUtils
.
isEmpty
(
frontModule
))
{
if
(
ObjectUtils
.
isEmpty
(
frontModule
))
{
equipNumList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
}
if
(
CollectionUtils
.
isNotEmpty
(
equipNumList
)
&&
!
ObjectUtils
.
isEmpty
(
equipNumList
.
get
(
0
).
getValueF
()))
{
...
...
@@ -1381,13 +1361,17 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
// queryCodtion.put(CommonConstans.QueryStringSystemTypeKeyword, Arrays.asList("模拟量"));
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
map
.
get
(
"boosterName"
));
likeMap
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
"模拟量"
);
if
(
"1主变高压侧"
.
equals
(
map
.
get
(
"boosterName"
))
||
"1主变低压侧"
.
equals
(
map
.
get
(
"boosterName"
)))
{
if
(
CommonConstans
.
XIAZAO_ZHUBIANGAOYACE
.
equals
(
map
.
get
(
"boosterName"
))
||
CommonConstans
.
XIAZAO_ZHUBIANDIYACE
.
equals
(
map
.
get
(
"boosterName"
)))
{
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"压侧"
);
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtions
(
queryCodtion
,
null
,
ESEquipments
.
class
,
likeMap
);
Integer
traceIdCount
=
listData
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
()).
size
();
if
(
traceIdCount
>
0
)
{
listData
=
listData
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
());
}
// 主变高压侧
Map
<
String
,
String
>
zbGYC
=
listData
.
stream
().
filter
(
t
->
t
.
getFrontModule
().
contains
(
"1主变高压侧"
)).
collect
(
Collectors
.
toMap
(
ESEquipments:
:
getDisplayName
,
ESEquipments:
:
getValue
));
Map
<
String
,
String
>
zbGYC
=
listData
.
stream
().
filter
(
t
->
t
.
getFrontModule
().
contains
(
CommonConstans
.
XIAZAO_ZHUBIANGAOYACE
)).
collect
(
Collectors
.
toMap
(
ESEquipments:
:
getDisplayName
,
ESEquipments:
:
getValue
));
List
<
Map
<
String
,
String
>>
zbList
=
new
ArrayList
<>();
listData
.
stream
().
filter
(
t
->
t
.
getFrontModule
().
contains
(
"1主变低压侧"
)).
forEach
(
item
->
{
listData
.
stream
().
filter
(
t
->
t
.
getFrontModule
().
contains
(
CommonConstans
.
XIAZAO_ZHUBIANDIYACE
)).
forEach
(
item
->
{
HashMap
<
String
,
String
>
zbMap
=
new
HashMap
<>();
zbMap
.
put
(
"traceId"
,
item
.
getTraceId
());
zbMap
.
put
(
"title"
,
item
.
getDisplayName
());
...
...
@@ -1395,6 +1379,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
zbMap
.
put
(
"grade2"
,
keepTwoDecimalPlaces
(
zbGYC
.
getOrDefault
(
item
.
getDisplayName
(),
"0.0"
)));
zbList
.
add
(
zbMap
);
});
zbList
.
sort
(
Comparator
.
comparingInt
(
o
->
Integer
.
parseInt
(
o
.
get
(
"traceId"
).
toString
())));
IPage
<
Map
<
String
,
String
>>
zbResult
=
new
Page
<>();
zbResult
.
setRecords
(
zbList
);
zbResult
.
setCurrent
(
1
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceImpl.java
View file @
b1c6884e
...
...
@@ -1052,19 +1052,19 @@ public class MonitoringServiceImpl {
Double
totalAnnual
=
(
powerOfAnnualFD
+
powerOfAnnualGF
);
HashMap
<
String
,
String
>
stringHashMap13
=
new
HashMap
<>();
stringHashMap13
.
put
(
"title1"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
totalAnnual
*
CommonConstans
.
carbonDioxide
)));
stringHashMap13
.
put
(
"title2"
,
"二氧化碳减排量(t)"
);
stringHashMap13
.
put
(
"title2"
,
CommonConstans
.
ER_YANG_HUA_TAN_JIANPAILIANG
);
list3
.
add
(
stringHashMap13
);
HashMap
<
String
,
String
>
stringHashMap14
=
new
HashMap
<>();
stringHashMap14
.
put
(
"title1"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
totalAnnual
*
CommonConstans
.
standardCoal
)));
stringHashMap14
.
put
(
"title2"
,
"节约标准煤(t)"
);
stringHashMap14
.
put
(
"title2"
,
CommonConstans
.
BIAO_ZHUN_MEI_JIANPAILIANG
);
list3
.
add
(
stringHashMap14
);
HashMap
<
String
,
String
>
stringHashMap15
=
new
HashMap
<>();
stringHashMap15
.
put
(
"title1"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
totalAnnual
*
CommonConstans
.
toner
)));
stringHashMap15
.
put
(
"title2"
,
"碳粉尘减排量(t)"
);
stringHashMap15
.
put
(
"title2"
,
CommonConstans
.
TAN_FEN_CHEN_ZHUBIANDIYACE
);
list3
.
add
(
stringHashMap15
);
HashMap
<
String
,
String
>
stringHashMap16
=
new
HashMap
<>();
stringHashMap16
.
put
(
"title1"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
totalAnnual
*
CommonConstans
.
sulfurDioxide
)));
stringHashMap16
.
put
(
"title2"
,
"二氧化硫减排量(t)"
);
stringHashMap16
.
put
(
"title2"
,
CommonConstans
.
ER_YANG_HUA_LIU_ZHUBIANDIYACE
);
list3
.
add
(
stringHashMap16
);
page3
.
setRecords
(
list3
);
try
{
...
...
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