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
59eec70b
Commit
59eec70b
authored
Oct 13, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
594c8984
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
14 deletions
+43
-14
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+21
-14
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+3
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+19
-0
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 @
59eec70b
...
@@ -2,13 +2,13 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
...
@@ -2,13 +2,13 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import
cn.hutool.core.text.CharSequenceUtil
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.yeejoin.amos.boot.module.jxiop.api.feign.AgencyuserFeign
;
import
com.yeejoin.amos.boot.module.jxiop.api.feign.RiskWarningFeign
;
import
com.yeejoin.amos.boot.module.jxiop.api.feign.RiskWarningFeign
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO
;
...
@@ -78,12 +78,13 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -78,12 +78,13 @@ public class BigScreenAnalyseController extends BaseController {
@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
)
{
HashMap
<
String
,
BigDecimal
>
stringBigDecimalHashMap
=
new
HashMap
<>();
if
(
Str
Util
.
isNotEmpty
(
stationCode
))
{
if
(
CharSequence
Util
.
isNotEmpty
(
stationCode
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
stationCode
=
stationBasic
.
getFanGatewayId
();
stationCode
=
stationBasic
.
getFanGatewayId
();
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByStation
(
areaCode
,
stationCode
));
return
ResponseHelper
.
buildResponse
(
stringBigDecimalHashMap
);
}
}
HashMap
<
String
,
BigDecimal
>
stringBigDecimalHashMap
=
new
HashMap
<>();
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfo
(
areaCode
,
stationCode
));
stringBigDecimalHashMap
.
put
(
"value"
,
idxBizFanHealthIndexMapper
.
getHealthScoreInfo
(
areaCode
,
stationCode
));
return
ResponseHelper
.
buildResponse
(
stringBigDecimalHashMap
);
return
ResponseHelper
.
buildResponse
(
stringBigDecimalHashMap
);
}
}
...
@@ -115,8 +116,6 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -115,8 +116,6 @@ public class BigScreenAnalyseController extends BaseController {
resultMap
.
put
(
"seriesData"
,
arrayList
);
resultMap
.
put
(
"seriesData"
,
arrayList
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
}
}
@Autowired
AgencyuserFeign
agencyuserFeign
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"全域各片区设备预警情况(条) "
,
notes
=
"全域各片区设备预警情况(条) "
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"全域各片区设备预警情况(条) "
,
notes
=
"全域各片区设备预警情况(条) "
)
...
@@ -141,7 +140,9 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -141,7 +140,9 @@ public class BigScreenAnalyseController extends BaseController {
List
<
Integer
>
jgList
=
new
ArrayList
<>();
List
<
Integer
>
jgList
=
new
ArrayList
<>();
List
<
String
>
list
=
new
ArrayList
<>();
List
<
String
>
list
=
new
ArrayList
<>();
FeignClientResult
<
Collection
<
CompanyModel
>>
listFeignClientResult
=
Privilege
.
companyClient
.
queryAgencyList
(
"area"
);
FeignClientResult
<
Collection
<
CompanyModel
>>
listFeignClientResult
=
Privilege
.
companyClient
.
queryAgencyList
(
"AREA"
);
Collection
<
CompanyModel
>
companyModels
=
new
ArrayList
<>();
Collection
<
CompanyModel
>
companyModels
=
new
ArrayList
<>();
...
@@ -152,8 +153,8 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -152,8 +153,8 @@ public class BigScreenAnalyseController extends BaseController {
throw
new
RuntimeException
(
listFeignClientResult
.
getMessage
());
throw
new
RuntimeException
(
listFeignClientResult
.
getMessage
());
}
}
}
}
List
<
String
>
collect
=
companyModels
.
stream
().
map
(
CompanyModel:
:
getCompanyName
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
companyModels
.
stream
().
map
(
t
->
t
.
getCompanyName
()).
collect
(
Collectors
.
toList
());
if
(
"idx_biz_fan_warning_record"
.
equals
(
tableName
))
{
if
(
"idx_biz_fan_warning_record"
.
equals
(
tableName
))
{
list
=
collect
;
list
=
collect
;
// list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
// list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
...
@@ -436,12 +437,18 @@ public class BigScreenAnalyseController extends BaseController {
...
@@ -436,12 +437,18 @@ public class BigScreenAnalyseController extends BaseController {
item
.
put
(
"warningName"
,
idxBizFanHealthLevel
.
getHealthLevel
());
item
.
put
(
"warningName"
,
idxBizFanHealthLevel
.
getHealthLevel
());
}
}
item
.
put
(
"healthIndex"
,
equipmentHealthScore
);
item
.
put
(
"healthIndex"
,
equipmentHealthScore
);
String
equipmentName
=
CharSequenceUtil
.
replace
(
item
.
get
(
"equipmentName"
).
toString
(),
"集电Ⅳ线#"
,
""
);
// String equipmentName = CharSequenceUtil.replace(item.get("equipmentName").toString(), "集电Ⅳ线#", "");
String
replace
=
CharSequenceUtil
.
replace
(
equipmentName
,
"集电Ⅲ线#"
,
""
);
// String replace = CharSequenceUtil.replace(equipmentName, "集电Ⅲ线#", "");
String
replace1
=
CharSequenceUtil
.
replace
(
replace
,
"集电Ⅱ线#"
,
""
);
// String replace1 = CharSequenceUtil.replace(replace, "集电Ⅱ线#", "");
String
replace2
=
CharSequenceUtil
.
replace
(
replace1
,
"集电Ⅰ线#"
,
""
);
// String replace2 = CharSequenceUtil.replace(replace1, "集电Ⅰ线#", "");
String
replace3
=
CharSequenceUtil
.
replace
(
replace2
,
"风机"
,
""
);
// String replace3 = CharSequenceUtil.replace(replace2, "风机", "");
item
.
put
(
"equipmentNameSimple"
,
replace3
);
String
equipmentName
=
item
.
get
(
"equipmentName"
).
toString
();
String
str1
=
equipmentName
.
substring
(
0
,
equipmentName
.
indexOf
(
"#"
));
String
str2
=
equipmentName
.
substring
(
str1
.
length
()+
1
,
equipmentName
.
length
());
String
str3
=
CharSequenceUtil
.
replace
(
str2
,
"风机"
,
""
);
item
.
put
(
"equipmentNameSimple"
,
str3
);
});
});
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
View file @
59eec70b
...
@@ -20,6 +20,9 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
...
@@ -20,6 +20,9 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
BigDecimal
getHealthScoreInfo
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
);
BigDecimal
getHealthScoreInfo
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
);
BigDecimal
getHealthScoreInfoByStation
(
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"tableName"
)
String
tableName
);
List
<
Map
<
String
,
Object
>>
getHealthListInfo
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
);
List
<
Map
<
String
,
Object
>>
getHealthListInfo
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
);
List
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfo
(
@Param
(
"tableName"
)
String
tableName
);
List
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfo
(
@Param
(
"tableName"
)
String
tableName
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
59eec70b
...
@@ -53,6 +53,25 @@
...
@@ -53,6 +53,25 @@
) a
) a
</select>
</select>
<select
id=
"getHealthScoreInfoByStation"
resultType=
"java.math.BigDecimal"
>
SELECT
IFNULL( HEALTH_INDEX , 100 ) AS healthIndex
FROM
${tableName}
<where>
ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE
<if
test=
"stationCode != null and stationCode != ''"
>
AND GATEWAY_ID = #{stationCode}
AND ANALYSIS_OBJ_TYPE = '场站'
</if>
</where>
limit 1
</select>
<select
id=
"getHealthListInfo"
resultType=
"java.util.Map"
>
<select
id=
"getHealthListInfo"
resultType=
"java.util.Map"
>
SELECT
SELECT
IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
IFNULL( AVG( HEALTH_INDEX ), 100 ) AS avgHealthIndex,
...
...
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