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
3bed505b
Commit
3bed505b
authored
Aug 04, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
集电线路图 光伏逆变器接口
parent
630cafa4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
102 additions
and
0 deletions
+102
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+18
-0
SjglZsjZsbtzMapper.java
...mos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
+1
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+65
-0
SjglZsjZsbtzMapper.xml
.../src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
+18
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
3bed505b
...
@@ -765,5 +765,23 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -765,5 +765,23 @@ public class MonitorFanIdxController extends BaseController {
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"集电线路图右侧 光伏列表"
)
@GetMapping
(
"/gfList"
)
@Scheduled
(
cron
=
"0/10 * * * * ? "
)
public
ResponseModel
getListByNbq
()
{
LambdaQueryWrapper
<
StationBasic
>
wrapper
=
new
LambdaQueryWrapper
<>();
List
<
StationBasic
>
stationBasics
=
stationBasicMapper
.
selectList
(
wrapper
);
for
(
StationBasic
stationBasic
:
stationBasics
)
{
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
String
werks
=
stationBasic
.
getStationNumber
();
monitorFanIndicator
.
getListByNbq
(
gatewayId
,
werks
,
stationBasic
.
getSequenceNbr
().
toString
());
}
return
CommonResponseUtil
.
success
();
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
View file @
3bed505b
...
@@ -24,5 +24,6 @@ public interface SjglZsjZsbtzMapper extends BaseMapper<SjglZsjZsbtz> {
...
@@ -24,5 +24,6 @@ public interface SjglZsjZsbtzMapper extends BaseMapper<SjglZsjZsbtz> {
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationWerks
(
String
WERKS
,
String
DATAID
);
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationWerks
(
String
WERKS
,
String
DATAID
);
List
<
Map
<
String
,
Object
>>
getStationInfoMapByStationGFWerks
(
String
WERKS
,
String
DATAID
);
}
}
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 @
3bed505b
...
@@ -1649,5 +1649,70 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1649,5 +1649,70 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
map
.
put
(
"axisData"
,
timeMap
.
keySet
());
map
.
put
(
"axisData"
,
timeMap
.
keySet
());
return
map
;
return
map
;
}
}
public
void
getListByNbq
(
String
gatewayId
,
String
werks
,
String
stationId
){
String
sql
=
" SELECT * FROM indicators_"
+
gatewayId
+
" WHERE equipmentIndexName ='总直流功率' and frontModule = '逆变器'"
;
String
sql1
=
" SELECT * FROM indicators_"
+
gatewayId
+
" WHERE equipmentIndexName ='有功功率' and frontModule = '逆变器'"
;
List
<
IndicatorsDto
>
listData
=
influxDButils
.
getListData
(
sql
,
IndicatorsDto
.
class
);
List
<
IndicatorsDto
>
listData1
=
influxDButils
.
getListData
(
sql1
,
IndicatorsDto
.
class
);
// 将两组数据合并成一个集合中 将总直流功率数据 放入 另一个集合的valueLable中
for
(
IndicatorsDto
listDatum
:
listData
)
{
for
(
IndicatorsDto
indicatorsDto
:
listData1
)
{
if
(
indicatorsDto
.
getEquipmentNumber
().
equals
(
listDatum
.
getEquipmentNumber
())){
indicatorsDto
.
setValueLabel
(
listDatum
.
getValue
());
}
}
}
List
<
Map
<
String
,
String
>>
maps
=
new
ArrayList
<>();
Set
<
String
>
nums
=
new
HashSet
<>();
//此处组装数据 每一个Map代表一个逆变器
for
(
IndicatorsDto
indicatorsDto
:
listData1
)
{
int
num
=
Integer
.
parseInt
(
indicatorsDto
.
getEquipmentNumber
().
substring
(
0
,
2
));
nums
.
add
(
String
.
valueOf
(
num
));
Map
<
String
,
String
>
map
=
new
HashMap
<>();
String
equipNum
=
indicatorsDto
.
getEquipmentNumber
();
String
number
=
equipNum
.
substring
(
equipNum
.
length
()
-
1
);
map
.
put
(
"titie"
,
String
.
valueOf
(
num
));
map
.
put
(
"titie"
+
number
,
equipNum
);
map
.
put
(
"value"
+
number
,
indicatorsDto
.
getValue
());
map
.
put
(
"valueLabel"
+
number
,
indicatorsDto
.
getValueLabel
());
maps
.
add
(
map
);
}
TpriDmpDatabook
tpriDmpDatabook
=
tpriDmpDatabookServiceImpl
.
getTpriDmpDatabookByDataName
(
"集电线"
);
List
<
Map
<
String
,
Object
>>
dataMaps
=
sjglZsjZsbtzServiceImpl
.
sjglZsjZsbtzMapper
.
getStationInfoMapByStationGFWerks
(
werks
,
tpriDmpDatabook
.
getDataid
().
toString
());
int
i
=
0
;
//逆变器需要根据所属集电线分类组装 下面循环是将同一子阵下的不同逆变器组装为消息数据
for
(
Map
<
String
,
Object
>
dataMap
:
dataMaps
)
{
List
<
Map
<
String
,
String
>>
statusMaps
=
new
ArrayList
<>();
String
equipNum
=
dataMap
.
get
(
"equipNum"
).
toString
();
for
(
String
num
:
nums
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"titie"
,
"#"
+
num
);
for
(
Map
<
String
,
String
>
stringMap
:
maps
)
{
if
(
stringMap
.
get
(
"titie"
).
equals
(
num
)){
map
.
putAll
(
stringMap
);
}
}
if
(
equipNum
.
contains
(
num
)){
statusMaps
.
add
(
map
);
}
}
IPage
<
Map
<
String
,
String
>>
result
=
new
Page
<>();
result
.
setRecords
(
statusMaps
);
result
.
setCurrent
(
1
);
result
.
setTotal
(
statusMaps
.
size
());
i
+=
1
;
try
{
emqKeeper
.
getMqttClient
().
publish
(
stationId
+
"/fj/group"
+
i
,
JSON
.
toJSONString
(
result
).
getBytes
(),
0
,
false
);
}
catch
(
MqttException
e
)
{
log
.
info
(
"消息发送失败"
);
e
.
printStackTrace
();
}
}
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
View file @
3bed505b
...
@@ -19,4 +19,22 @@
...
@@ -19,4 +19,22 @@
</select>
</select>
<select
id=
"getStationInfoMapByStationGFWerks"
resultType=
"map"
>
SELECT LEFT
( b.SBMC, 4 ) AS NAME,
GROUP_CONCAT( REPLACE ( SUBSTRING_INDEX( b.SBMC, "#",- 1 ), '光伏阵区系统', '' ) ) AS equipNum
FROM
(
SELECT
*
FROM
sjgl_zsj_zsbtz
WHERE
FSB IN ( SELECT DBID FROM `sjgl_zsj_zsbtz` WHERE MACHGENRE = ( SELECT DATAID FROM `tpri_dmp_databook` WHERE DATANAME = #{DATAID} ) AND WERKS = #{WERKS} )
) B
GROUP BY
B.FSB
</select>
</mapper>
</mapper>
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