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
71f9d999
Commit
71f9d999
authored
Nov 09, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
cfd3c83e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
6 deletions
+28
-6
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+6
-6
FanHealthIndexDayMapper.java
...t/module/jxiop/biz/tdMapper2/FanHealthIndexDayMapper.java
+2
-0
FanHealthIndexDay.xml
...src/main/resources/mapper/tdengine2/FanHealthIndexDay.xml
+20
-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/TDBigScreenAnalyseController.java
View file @
71f9d999
...
@@ -21,10 +21,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvHealthLevelMapper;
...
@@ -21,10 +21,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvHealthLevelMapper;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRuleSetServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRuleSetServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanWaringRecordMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvWaringRecordMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex
;
...
@@ -92,6 +89,8 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -92,6 +89,8 @@ public class TDBigScreenAnalyseController extends BaseController {
@Autowired
@Autowired
PvWaringRecordMapper
pvWaringRecordMapper
;
PvWaringRecordMapper
pvWaringRecordMapper
;
@Autowired
FanHealthIndexDayMapper
fanHealthIndexDayMapper
;
@Autowired
@Autowired
...
@@ -225,7 +224,8 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -225,7 +224,8 @@ public class TDBigScreenAnalyseController extends BaseController {
@GetMapping
(
value
=
"/getHealthInfoByArea"
)
@GetMapping
(
value
=
"/getHealthInfoByArea"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthInfoByArea
()
throws
Exception
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getHealthInfoByArea
()
throws
Exception
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
healthListInfo
=
idxBizFanHealthIndexMapper
.
getHealthInfoByArea
();
// List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getHealthInfoByArea();
List
<
Map
<
String
,
Object
>>
healthListInfo
=
fanHealthIndexDayMapper
.
getHealthInfoByArea
();
Map
<
String
,
Integer
>
collect
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"area"
).
toString
(),
t
->
Integer
.
valueOf
(
t
.
get
(
"healthIndex"
).
toString
().
replace
(
".0"
,
""
))));
Map
<
String
,
Integer
>
collect
=
healthListInfo
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"area"
).
toString
(),
t
->
Integer
.
valueOf
(
t
.
get
(
"healthIndex"
).
toString
().
replace
(
".0"
,
""
))));
// List<String> list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
// List<String> list = Arrays.asList("华中片区", "西北片区", "西南片区", "华南片区", "华东片区", "东北片区", "华北片区");
...
@@ -1143,7 +1143,7 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -1143,7 +1143,7 @@ public class TDBigScreenAnalyseController 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
=
"/queryIndexByArae"
)
@GetMapping
(
value
=
"/queryIndexByArae"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
queryIndexByArae
(
@RequestParam
(
required
=
false
)
String
area
,
String
analysisType
,
String
startTimeTop
,
String
endTimeTop
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
queryIndexByArae
(
@RequestParam
(
required
=
false
)
String
area
,
String
analysisType
,
String
startTimeTop
,
String
endTimeTop
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanHealthIndexDayMapper.java
View file @
71f9d999
...
@@ -33,4 +33,6 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
...
@@ -33,4 +33,6 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
" GROUP BY station,health_level order by sort"
+
" GROUP BY station,health_level order by sort"
+
"</script>"
)
"</script>"
)
List
<
Map
<
String
,
Object
>>
selectEquipStatusByStation
(
@Param
(
"area"
)
String
area
,
@Param
(
"analysisObjType"
)
String
analysisObjType
,
@Param
(
"station"
)
String
station
);
List
<
Map
<
String
,
Object
>>
selectEquipStatusByStation
(
@Param
(
"area"
)
String
area
,
@Param
(
"analysisObjType"
)
String
analysisObjType
,
@Param
(
"station"
)
String
station
);
List
<
Map
<
String
,
Object
>>
getHealthInfoByArea
();
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndexDay.xml
View file @
71f9d999
...
@@ -2,4 +2,24 @@
...
@@ -2,4 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexDayMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexDayMapper"
>
<select
id=
"getHealthInfoByArea"
resultType=
"java.util.Map"
>
select area as area,
ceil(avg(a.avghealthindex)) as healthindex
from (
select avg(health_index) as avghealthindex,
area
from analysis_data.fan_health_index_day
where analysis_obj_type = '片区'
group by area
union all
(
select avg(health_index) as avghealthindex,
area
from analysis_data.pv_health_index_day
where analysis_obj_type = '片区'
group by area
)
) a
group by a.area
</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