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
5ae1804b
Commit
5ae1804b
authored
Oct 13, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
aee9ff54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
12 deletions
+20
-12
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+16
-10
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+4
-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/BigScreenAnalyseController.java
View file @
5ae1804b
...
@@ -40,6 +40,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -40,6 +40,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.io.UnsupportedEncodingException
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -77,12 +78,14 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -77,12 +78,14 @@ public class BigScreenAnalyseController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站设备健康状态指数与趋势 - 仪表盘"
,
notes
=
"场站设备健康状态指数与趋势 - 仪表盘"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"场站设备健康状态指数与趋势 - 仪表盘"
,
notes
=
"场站设备健康状态指数与趋势 - 仪表盘"
)
@GetMapping
(
value
=
"/getHealthScoreInfo"
)
@GetMapping
(
value
=
"/getHealthScoreInfo"
)
public
ResponseModel
<
Map
<
String
,
BigDecimal
>>
getHealthScoreInfo
(
@RequestParam
(
required
=
false
)
String
areaCode
,
@RequestParam
(
required
=
false
)
String
stationCode
)
{
public
ResponseModel
<
Map
<
String
,
BigDecimal
>>
getHealthScoreInfo
(
@RequestParam
(
required
=
false
)
String
areaCode
,
@RequestParam
(
required
=
false
)
String
stationCode
,
@RequestParam
(
required
=
false
)
String
tableName
)
{
HashMap
<
String
,
BigDecimal
>
stringBigDecimalHashMap
=
new
HashMap
<>();
HashMap
<
String
,
BigDecimal
>
stringBigDecimalHashMap
=
new
HashMap
<>();
if
(
CharSequenceUtil
.
isNotEmpty
(
stationCode
))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
stationCode
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
stationCode
=
stationBasic
.
getFanGatewayId
();
stationCode
=
stationBasic
.
getFanGatewayId
();
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByStation
(
areaCode
,
stationCod
e
));
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByStation
(
stationCode
,
tableNam
e
));
return
ResponseHelper
.
buildResponse
(
stringBigDecimalHashMap
);
return
ResponseHelper
.
buildResponse
(
stringBigDecimalHashMap
);
}
}
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfo
(
areaCode
,
stationCode
));
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfo
(
areaCode
,
stationCode
));
...
@@ -142,9 +145,9 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -142,9 +145,9 @@ public class BigScreenAnalyseController extends BaseController {
FeignClientResult
<
Collection
<
CompanyModel
>>
listFeignClientResult
=
Privilege
.
companyClient
.
queryAgencyList
(
"AREA"
);
FeignClientResult
<
List
<
CompanyModel
>>
listFeignClientResult
=
Privilege
.
companyClient
.
queryAgencyList
(
"AREA"
);
Collection
<
CompanyModel
>
companyModels
=
new
ArrayList
<>();
List
<
CompanyModel
>
companyModels
=
new
ArrayList
<>();
if
(!
ObjectUtils
.
isEmpty
(
listFeignClientResult
))
{
if
(!
ObjectUtils
.
isEmpty
(
listFeignClientResult
))
{
if
(
listFeignClientResult
.
getStatus
()
==
200
)
{
if
(
listFeignClientResult
.
getStatus
()
==
200
)
{
...
@@ -159,6 +162,7 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -159,6 +162,7 @@ public class BigScreenAnalyseController extends BaseController {
list
=
collect
;
list
=
collect
;
// list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
// list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
}
else
{
}
else
{
list
=
collect
;
Collections
.
reverse
(
list
);
Collections
.
reverse
(
list
);
// list = Arrays.asList("华北片区", "东北片区", "华东片区", "华南片区", "西南片区", "西北片区", "华中片区");
// list = Arrays.asList("华北片区", "东北片区", "华东片区", "华南片区", "西南片区", "西北片区", "华中片区");
}
}
...
@@ -196,9 +200,9 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -196,9 +200,9 @@ public class BigScreenAnalyseController extends BaseController {
List
<
String
>
list
=
new
ArrayList
<>();
List
<
String
>
list
=
new
ArrayList
<>();
FeignClientResult
<
Collection
<
CompanyModel
>>
listFeignClientResult
=
Privilege
.
companyClient
.
queryAgencyList
(
"AREA"
);
FeignClientResult
<
List
<
CompanyModel
>>
listFeignClientResult
=
Privilege
.
companyClient
.
queryAgencyList
(
"AREA"
);
Collection
<
CompanyModel
>
companyModels
=
new
ArrayList
<>();
List
<
CompanyModel
>
companyModels
=
new
ArrayList
<>();
if
(!
ObjectUtils
.
isEmpty
(
listFeignClientResult
))
{
if
(!
ObjectUtils
.
isEmpty
(
listFeignClientResult
))
{
if
(
listFeignClientResult
.
getStatus
()
==
200
)
{
if
(
listFeignClientResult
.
getStatus
()
==
200
)
{
...
@@ -491,8 +495,8 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -491,8 +495,8 @@ public class BigScreenAnalyseController extends BaseController {
@ApiOperation
(
value
=
"该子系统各指标预警 - 风站中间 下方列表"
)
@ApiOperation
(
value
=
"该子系统各指标预警 - 风站中间 下方列表"
)
@GetMapping
(
"/getSubSystemPointInfo"
)
@GetMapping
(
"/getSubSystemPointInfo"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getSubSystemPointInfo
(
@RequestParam
(
value
=
"subSystem"
,
required
=
false
)
String
subSystem
,
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getSubSystemPointInfo
(
@RequestParam
(
value
=
"subSystem"
,
required
=
false
)
String
subSystem
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
throws
UnsupportedEncodingException
{
subSystem
=
java
.
net
.
URLDecoder
.
decode
(
subSystem
,
"UTF-8"
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getHealthInfoBySubSystem
(
subSystem
,
stationBasic
.
getFanGatewayId
());
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getHealthInfoBySubSystem
(
subSystem
,
stationBasic
.
getFanGatewayId
());
...
@@ -552,6 +556,8 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -552,6 +556,8 @@ public class BigScreenAnalyseController extends BaseController {
item
.
put
(
"warningName"
,
idxBizFanHealthLevel
.
getHealthLevel
());
item
.
put
(
"warningName"
,
idxBizFanHealthLevel
.
getHealthLevel
());
}
}
item
.
put
(
"healthIndex"
,
equipmentHealthScore
);
item
.
put
(
"healthIndex"
,
equipmentHealthScore
);
String
subarray
=
CharSequenceUtil
.
replace
(
item
.
get
(
"subarray"
).
toString
(),
"#"
,
""
);
item
.
put
(
"subarray"
,
subarray
);
});
});
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
...
@@ -594,8 +600,8 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -594,8 +600,8 @@ public class BigScreenAnalyseController extends BaseController {
@ApiOperation
(
value
=
"光伏 该装备下各指标预警 - 风站中间 下方列表"
)
@ApiOperation
(
value
=
"光伏 该装备下各指标预警 - 风站中间 下方列表"
)
@GetMapping
(
"/getPvSubSystemPointInfo"
)
@GetMapping
(
"/getPvSubSystemPointInfo"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getPvSubSystemPointInfo
(
@RequestParam
(
value
=
"equipmentName"
,
required
=
false
)
String
equipmentName
,
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getPvSubSystemPointInfo
(
@RequestParam
(
value
=
"equipmentName"
,
required
=
false
)
String
equipmentName
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
throws
UnsupportedEncodingException
{
equipmentName
=
java
.
net
.
URLDecoder
.
decode
(
equipmentName
,
"UTF-8"
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getPvHealthInfoBySubSystem
(
equipmentName
,
stationBasic
.
getFanGatewayId
());
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getPvHealthInfoBySubSystem
(
equipmentName
,
stationBasic
.
getFanGatewayId
());
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
5ae1804b
...
@@ -479,6 +479,8 @@
...
@@ -479,6 +479,8 @@
</where>
</where>
GROUP BY
GROUP BY
SUBARRAY
SUBARRAY
ORDER BY
SUBARRAY
</select>
</select>
<select
id=
"getPvHealthInfoList"
resultType=
"java.util.Map"
>
<select
id=
"getPvHealthInfoList"
resultType=
"java.util.Map"
>
...
@@ -512,7 +514,7 @@
...
@@ -512,7 +514,7 @@
AND ANALYSIS_TYPE = '按天'
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE
<if
test=
"subarray != null and subarray != ''"
>
<if
test=
"subarray != null and subarray != ''"
>
AND SUBARRAY =
#{subarray}
AND SUBARRAY =
concat('#', #{subarray})
</if>
</if>
<if
test=
"gatewayId != null and gatewayId != ''"
>
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND GATEWAY_ID = #{gatewayId}
AND GATEWAY_ID = #{gatewayId}
...
@@ -530,7 +532,7 @@
...
@@ -530,7 +532,7 @@
idx_biz_pv_point_process_variable_classification
idx_biz_pv_point_process_variable_classification
<where>
<where>
<if
test=
"subarray != null and subarray != ''"
>
<if
test=
"subarray != null and subarray != ''"
>
AND SUBARRAY =
#{subarray}
AND SUBARRAY =
concat('#', #{subarray})
</if>
</if>
<if
test=
"gatewayId != null and gatewayId != ''"
>
<if
test=
"gatewayId != null and gatewayId != ''"
>
AND GATEWAY_ID = #{gatewayId}
AND GATEWAY_ID = #{gatewayId}
...
...
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