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
46b39d15
Commit
46b39d15
authored
Aug 15, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏升压站数据
parent
b77e7fbd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
20 deletions
+28
-20
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+23
-15
FanWaringRecordMapper.java
...oot/module/jxiop/biz/tdMapper2/FanWaringRecordMapper.java
+2
-2
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+1
-1
FanWarningRecord.xml
.../src/main/resources/mapper/tdengine2/FanWarningRecord.xml
+2
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TDBigScreenAnalyseController.java
View file @
46b39d15
...
@@ -145,8 +145,8 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
...
@@ -145,8 +145,8 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
stationCode
=
stationBasic
.
getFanGatewayId
();
stationCode
=
stationBasic
.
getFanGatewayId
();
if
(
"FDZ"
.
equals
(
stationBasic
.
getStationType
()))
{
if
(
"FDZ"
.
equals
(
stationBasic
.
getStationType
()))
{
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"场站"
)
;
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"场站"
)
.
and
(
wrapper
.
eq
(
FanHealthIndex:
:
getGatewayId
,
stationCode
);
qw
->
qw
.
eq
(
FanHealthIndex:
:
getGatewayId
,
stationBasic
.
getFanGatewayId
()).
or
().
eq
(
FanHealthIndex:
:
getGatewayId
,
stationBasic
.
getBoosterGatewayId
())
);
FanHealthIndex
fanHealthIndex
=
fanHealthIndexMapper
.
selectOne
(
wrapper
);
FanHealthIndex
fanHealthIndex
=
fanHealthIndexMapper
.
selectOne
(
wrapper
);
// 预防空指针
// 预防空指针
if
(
Objects
.
isNull
(
fanHealthIndex
))
{
if
(
Objects
.
isNull
(
fanHealthIndex
))
{
...
@@ -157,8 +157,8 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
...
@@ -157,8 +157,8 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
}
}
}
else
{
}
else
{
LambdaQueryWrapper
<
PvHealthIndex
>
pvwrapper
=
new
LambdaQueryWrapper
<
PvHealthIndex
>();
LambdaQueryWrapper
<
PvHealthIndex
>
pvwrapper
=
new
LambdaQueryWrapper
<
PvHealthIndex
>();
pvwrapper
.
eq
(
PvHealthIndex:
:
getAnalysisObjType
,
"场站"
)
;
pvwrapper
.
eq
(
PvHealthIndex:
:
getAnalysisObjType
,
"场站"
)
.
and
(
pvwrapper
.
eq
(
PvHealthIndex:
:
getGatewayId
,
stationCode
);
qw
->
qw
.
eq
(
PvHealthIndex:
:
getGatewayId
,
stationBasic
.
getFanGatewayId
()).
or
().
eq
(
PvHealthIndex:
:
getGatewayId
,
stationBasic
.
getBoosterGatewayId
())
);
pvwrapper
.
orderByDesc
(
PvHealthIndex:
:
getTs
);
pvwrapper
.
orderByDesc
(
PvHealthIndex:
:
getTs
);
pvwrapper
.
last
(
"limit 1"
);
pvwrapper
.
last
(
"limit 1"
);
PvHealthIndex
pvHealthIndex
=
pvHealthIndexMapper
.
selectOne
(
pvwrapper
);
PvHealthIndex
pvHealthIndex
=
pvHealthIndexMapper
.
selectOne
(
pvwrapper
);
...
@@ -283,11 +283,13 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
...
@@ -283,11 +283,13 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
@RequestParam
(
required
=
false
)
Date
startTime
,
@RequestParam
(
required
=
false
)
Date
endTime
)
{
@RequestParam
(
required
=
false
)
Date
startTime
,
@RequestParam
(
required
=
false
)
Date
endTime
)
{
String
finalStationCode
=
null
;
String
finalStationCode
=
null
;
String
zyzfinalStationCode
=
null
;
String
finalAreaCode
=
null
;
String
finalAreaCode
=
null
;
String
stationType
=
null
;
String
stationType
=
null
;
if
(
StrUtil
.
isNotEmpty
(
stationCode
))
{
if
(
StrUtil
.
isNotEmpty
(
stationCode
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
finalStationCode
=
stationBasic
.
getFanGatewayId
();
finalStationCode
=
stationBasic
.
getFanGatewayId
();
zyzfinalStationCode
=
stationBasic
.
getBoosterGatewayId
();
stationType
=
stationBasic
.
getStationType
();
stationType
=
stationBasic
.
getStationType
();
}
else
if
(
StrUtil
.
isNotEmpty
(
station
))
{
}
else
if
(
StrUtil
.
isNotEmpty
(
station
))
{
// 由于命名不统一
// 由于命名不统一
...
@@ -296,6 +298,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
...
@@ -296,6 +298,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
.
eq
(
StationBasic:
:
getStationName
,
station
.
substring
(
0
,
station
.
length
()
-
1
)
+
'站'
));
.
eq
(
StationBasic:
:
getStationName
,
station
.
substring
(
0
,
station
.
length
()
-
1
)
+
'站'
));
finalStationCode
=
stationBasic
.
getFanGatewayId
();
finalStationCode
=
stationBasic
.
getFanGatewayId
();
stationType
=
stationBasic
.
getStationType
();
stationType
=
stationBasic
.
getStationType
();
zyzfinalStationCode
=
stationBasic
.
getBoosterGatewayId
();
}
}
if
(
StrUtil
.
isNotEmpty
(
areaCode
))
{
if
(
StrUtil
.
isNotEmpty
(
areaCode
))
{
finalAreaCode
=
"%"
+
areaCode
+
"%"
;
finalAreaCode
=
"%"
+
areaCode
+
"%"
;
...
@@ -316,8 +319,10 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
...
@@ -316,8 +319,10 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
if
(
CharSequenceUtil
.
isNotEmpty
(
finalStationCode
))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
finalStationCode
))
{
if
(
"FDZ"
.
equals
(
stationType
))
{
if
(
"FDZ"
.
equals
(
stationType
))
{
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"场站"
);
final
String
fanGatewayId
=
finalStationCode
;
wrapper
.
eq
(
FanHealthIndex:
:
getGatewayId
,
finalStationCode
);
final
String
syzGatewayId
=
zyzfinalStationCode
;
wrapper
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"场站"
).
and
(
qw
->
qw
.
eq
(
FanHealthIndex:
:
getGatewayId
,
fanGatewayId
).
or
().
eq
(
FanHealthIndex:
:
getGatewayId
,
syzGatewayId
));
List
<
FanHealthIndex
>
fanHealthIndexList
=
fanHealthIndexMapper
.
selectList
(
wrapper
);
List
<
FanHealthIndex
>
fanHealthIndexList
=
fanHealthIndexMapper
.
selectList
(
wrapper
);
valueList
=
fanHealthIndexList
.
stream
()
valueList
=
fanHealthIndexList
.
stream
()
.
map
(
t
->
String
.
map
(
t
->
String
...
@@ -326,9 +331,11 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
...
@@ -326,9 +331,11 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
dateList
=
fanHealthIndexList
.
stream
().
map
(
t
->
t
.
getRecDate
()).
collect
(
Collectors
.
toList
());
dateList
=
fanHealthIndexList
.
stream
().
map
(
t
->
t
.
getRecDate
()).
collect
(
Collectors
.
toList
());
}
else
{
}
else
{
final
String
fanGatewayId
=
finalStationCode
;
final
String
syzGatewayId
=
zyzfinalStationCode
;
LambdaQueryWrapper
<
PvHealthIndex
>
pvwrapper
=
new
LambdaQueryWrapper
<
PvHealthIndex
>();
LambdaQueryWrapper
<
PvHealthIndex
>
pvwrapper
=
new
LambdaQueryWrapper
<
PvHealthIndex
>();
pvwrapper
.
eq
(
PvHealthIndex:
:
getAnalysisObjType
,
"场站"
)
;
pvwrapper
.
eq
(
PvHealthIndex:
:
getAnalysisObjType
,
"场站"
)
.
and
(
pvwrapper
.
eq
(
PvHealthIndex:
:
getGatewayId
,
finalStationCode
);
qw
->
qw
.
eq
(
PvHealthIndex:
:
getGatewayId
,
fanGatewayId
).
or
().
eq
(
PvHealthIndex:
:
getGatewayId
,
syzGatewayId
)
);
pvwrapper
.
orderByDesc
(
PvHealthIndex:
:
getTs
);
pvwrapper
.
orderByDesc
(
PvHealthIndex:
:
getTs
);
pvwrapper
.
last
(
"limit 15"
);
pvwrapper
.
last
(
"limit 15"
);
List
<
PvHealthIndex
>
pvHealthIndexList
=
pvHealthIndexMapper
.
selectList
(
pvwrapper
);
List
<
PvHealthIndex
>
pvHealthIndexList
=
pvHealthIndexMapper
.
selectList
(
pvwrapper
);
...
@@ -584,16 +591,17 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
...
@@ -584,16 +591,17 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
,
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
)
{
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endDate
)
{
String
syzGatewayId
=
""
;
if
(
StrUtil
.
isNotEmpty
(
stationId
))
{
if
(
StrUtil
.
isNotEmpty
(
stationId
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
stationId
=
stationBasic
.
getFanGatewayId
();
stationId
=
stationBasic
.
getFanGatewayId
();
syzGatewayId
=
stationBasic
.
getBoosterGatewayId
();
}
}
if
(
arae
!=
null
)
{
if
(
arae
!=
null
)
{
arae
=
"%"
+
arae
+
"%"
;
arae
=
"%"
+
arae
+
"%"
;
}
}
Integer
count
=
fanWaringRecordMapper
.
getEquipWarningInfoByPageCount
(
arae
,
station
,
stationType
,
warningName
,
Integer
count
=
fanWaringRecordMapper
.
getEquipWarningInfoByPageCount
(
arae
,
station
,
stationType
,
warningName
,
stationId
,
startDate
,
endDate
);
stationId
,
startDate
,
endDate
,
syzGatewayId
);
// 前端存在分页bug 此处限制分页后筛选导致页面超出问题
// 前端存在分页bug 此处限制分页后筛选导致页面超出问题
if
(
count
>
0
&&
current
>
(
count
/
10
+
1
))
{
if
(
count
>
0
&&
current
>
(
count
/
10
+
1
))
{
current
=
1
;
current
=
1
;
...
@@ -603,7 +611,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
...
@@ -603,7 +611,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
// stationType, (current - 1) * size, size, warningName, stationId, startDate,
// stationType, (current - 1) * size, size, warningName, stationId, startDate,
// endDate);
// endDate);
List
<
FanWarningRecord
>
idxBizFanWarningRecordIPage
=
fanWaringRecordMapper
.
getEquipWarningInfoByPage
(
arae
,
List
<
FanWarningRecord
>
idxBizFanWarningRecordIPage
=
fanWaringRecordMapper
.
getEquipWarningInfoByPage
(
arae
,
station
,
stationType
,
(
current
-
1
)
*
size
,
size
,
warningName
,
stationId
,
startDate
,
endDate
);
station
,
stationType
,
(
current
-
1
)
*
size
,
size
,
warningName
,
stationId
,
startDate
,
endDate
,
syzGatewayId
);
Page
<
FanWarningRecord
>
idxBizFanWarningRecordPage
=
new
Page
<>(
current
,
size
);
Page
<
FanWarningRecord
>
idxBizFanWarningRecordPage
=
new
Page
<>(
current
,
size
);
idxBizFanWarningRecordPage
.
setRecords
(
idxBizFanWarningRecordIPage
);
idxBizFanWarningRecordPage
.
setRecords
(
idxBizFanWarningRecordIPage
);
...
@@ -1639,8 +1647,8 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
...
@@ -1639,8 +1647,8 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
LambdaQueryWrapper
<
FanHealthIndex
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FanHealthIndex
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
FanHealthIndex:
:
getIndexAddress
,
indexAddress
)
;
lambdaQueryWrapper
.
eq
(
FanHealthIndex:
:
getIndexAddress
,
indexAddress
)
.
and
(
lambdaQueryWrapper
.
eq
(
FanHealthIndex:
:
getGatewayId
,
stationBasic
.
getFanGatewayId
(
));
qw
->
qw
.
eq
(
FanHealthIndex:
:
getGatewayId
,
stationBasic
.
getFanGatewayId
()).
or
().
eq
(
FanHealthIndex:
:
getGatewayId
,
stationBasic
.
getBoosterGatewayId
()
));
lambdaQueryWrapper
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"测点"
);
lambdaQueryWrapper
.
eq
(
FanHealthIndex:
:
getAnalysisObjType
,
"测点"
);
lambdaQueryWrapper
.
orderByDesc
(
FanHealthIndex:
:
getTs
);
lambdaQueryWrapper
.
orderByDesc
(
FanHealthIndex:
:
getTs
);
...
@@ -1677,8 +1685,8 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
...
@@ -1677,8 +1685,8 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
LambdaQueryWrapper
<
PvHealthIndex
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
PvHealthIndex
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
PvHealthIndex:
:
getIndexAddress
,
indexAddress
)
;
lambdaQueryWrapper
.
eq
(
PvHealthIndex:
:
getIndexAddress
,
indexAddress
)
.
and
(
lambdaQueryWrapper
.
eq
(
PvHealthIndex:
:
getGatewayId
,
stationBasic
.
getFanGatewayId
(
));
qw
->
qw
.
eq
(
PvHealthIndex:
:
getGatewayId
,
stationBasic
.
getFanGatewayId
()).
or
().
eq
(
PvHealthIndex:
:
getGatewayId
,
stationBasic
.
getBoosterGatewayId
()
));
lambdaQueryWrapper
.
eq
(
PvHealthIndex:
:
getAnalysisObjType
,
"测点"
);
lambdaQueryWrapper
.
eq
(
PvHealthIndex:
:
getAnalysisObjType
,
"测点"
);
lambdaQueryWrapper
.
orderByDesc
(
PvHealthIndex:
:
getTs
);
lambdaQueryWrapper
.
orderByDesc
(
PvHealthIndex:
:
getTs
);
lambdaQueryWrapper
.
eq
(
PvHealthIndex:
:
getAnalysisType
,
"按10分钟"
);
lambdaQueryWrapper
.
eq
(
PvHealthIndex:
:
getAnalysisType
,
"按10分钟"
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanWaringRecordMapper.java
View file @
46b39d15
...
@@ -41,9 +41,9 @@ public interface FanWaringRecordMapper extends BaseMapper<FanWarningRecord> {
...
@@ -41,9 +41,9 @@ public interface FanWaringRecordMapper extends BaseMapper<FanWarningRecord> {
@Param
(
"warningName"
)
String
warningName
,
@Param
(
"warningName"
)
String
warningName
,
@Param
(
"stationId"
)
String
stationId
,
@Param
(
"stationId"
)
String
stationId
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"syzGatewayId"
)
String
syzGatewayId
);
List
<
FanWarningRecord
>
getEquipWarningInfoByPage
(
String
arae
,
String
station
,
String
stationType
,
Integer
current
,
Integer
size
,
String
warningName
,
String
stationId
,
String
startDate
,
String
endDate
);
List
<
FanWarningRecord
>
getEquipWarningInfoByPage
(
String
arae
,
String
station
,
String
stationType
,
Integer
current
,
Integer
size
,
String
warningName
,
String
stationId
,
String
startDate
,
String
endDate
,
@Param
(
"syzGatewayId"
)
String
syzGatewayId
);
List
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfoAnalysisByArea
(
String
araeCode
,
String
stationType
);
List
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfoAnalysisByArea
(
String
araeCode
,
String
stationType
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
46b39d15
...
@@ -509,7 +509,7 @@ FROM (
...
@@ -509,7 +509,7 @@ FROM (
FROM
FROM
idx_biz_fan_point_process_variable_classification
idx_biz_fan_point_process_variable_classification
<where>
<where>
EQUIPMENT_NAME LIKE '%#%'
(EQUIPMENT_NAME LIKE '%#%' or EQUIPMENT_NAME='升压站')
<if
test=
"gatewayId != null and gatewayId != ''"
>
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND (GATEWAY_ID = #{gatewayId} or GATEWAY_ID = #{syzGatewayId})
AND (GATEWAY_ID = #{gatewayId} or GATEWAY_ID = #{syzGatewayId})
</if>
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanWarningRecord.xml
View file @
46b39d15
...
@@ -373,7 +373,7 @@
...
@@ -373,7 +373,7 @@
and a.warningname = #{warningName}
and a.warningname = #{warningName}
</if>
</if>
<if
test=
"stationId != '' and stationId != null"
>
<if
test=
"stationId != '' and stationId != null"
>
and
a.gateway_id = #{stationId}
and
(a.gateway_id = #{stationId} or a.gateway_id=#{syzGatewayId})
</if>
</if>
<if
test=
"startDate != '' and startDate != null"
>
<if
test=
"startDate != '' and startDate != null"
>
and a.recDate >= concat(#{startDate}, ' 00:00:00')
and a.recDate >= concat(#{startDate}, ' 00:00:00')
...
@@ -438,7 +438,7 @@
...
@@ -438,7 +438,7 @@
and a.warningname = #{warningName}
and a.warningname = #{warningName}
</if>
</if>
<if
test=
"stationId != '' and stationId != null"
>
<if
test=
"stationId != '' and stationId != null"
>
and
a.gateway_id = #{stationId}
and
(a.gateway_id = #{stationId} or a.gateway_id=#{syzGatewayId})
</if>
</if>
<if
test=
"startDate != '' and startDate != null"
>
<if
test=
"startDate != '' and startDate != null"
>
and a.recDate >= concat(#{startDate}, ' 00:00:00')
and a.recDate >= concat(#{startDate}, ' 00:00:00')
...
...
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