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
f0b14a47
Commit
f0b14a47
authored
Nov 07, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
风电预警设备层接口
parent
9f7d2709
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
153 additions
and
6 deletions
+153
-6
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+34
-0
IdxBizFanWarningRecordController.java
...xiop/biz/controller/IdxBizFanWarningRecordController.java
+21
-0
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+1
-1
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+2
-2
FanWaringRecordMapper.java
...oot/module/jxiop/biz/tdMapper2/FanWaringRecordMapper.java
+6
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+3
-3
FanWarningRecord.xml
.../src/main/resources/mapper/tdengine2/FanWarningRecord.xml
+86
-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/IdxBizFanHealthIndexController.java
View file @
f0b14a47
...
@@ -15,7 +15,9 @@ import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointTagMapper;
...
@@ -15,7 +15,9 @@ import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointTagMapper;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointTagMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointTagMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanHealthIndexServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanHealthIndexServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexDayMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexDayMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanWaringRecordMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -51,6 +53,8 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -51,6 +53,8 @@ public class IdxBizFanHealthIndexController extends BaseController {
IdxBizPvPointTagMapper
idxBizPvPointTagMapper
;
IdxBizPvPointTagMapper
idxBizPvPointTagMapper
;
@Autowired
@Autowired
FanHealthIndexDayMapper
fanHealthIndexDayMapper
;
FanHealthIndexDayMapper
fanHealthIndexDayMapper
;
@Autowired
FanWaringRecordMapper
fanWarningRecord
;
/**
/**
* 新增
* 新增
*
*
...
@@ -403,4 +407,34 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -403,4 +407,34 @@ public class IdxBizFanHealthIndexController extends BaseController {
return
ResponseHelper
.
buildResponse
(
maps
);
return
ResponseHelper
.
buildResponse
(
maps
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测设备级统计td"
,
notes
=
"预警监测设备级统计td"
)
@GetMapping
(
value
=
"/selectPointNum"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectPointNum
(
@RequestParam
(
required
=
false
)
String
STATION
,
@RequestParam
(
required
=
false
)
String
SUBSYSTEM
,
@RequestParam
(
required
=
false
)
String
EQUIPMENTNAME
)
{
List
<
FanWarningRecord
>
idxBizPvWarningRecordList
=
fanWarningRecord
.
warningData
(
STATION
,
EQUIPMENTNAME
,
SUBSYSTEM
);
int
total
=
idxBizFanHealthIndexServiceImpl
.
pointNum
(
STATION
,
SUBSYSTEM
,
EQUIPMENTNAME
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
warningNum
=
new
HashMap
<>();
Map
<
String
,
Object
>
pointNum
=
new
HashMap
<>();
map1
.
put
(
"name"
,
"危险"
);
map1
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"危险"
)).
count
());
map
.
put
(
"name"
,
"警告"
);
map
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"警告"
)).
count
());
warningNum
.
put
(
"name"
,
"注意"
);
warningNum
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"注意"
)).
count
());
pointNum
.
put
(
"name"
,
"安全"
);
pointNum
.
put
(
"value"
,
total
-
idxBizPvWarningRecordList
.
size
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
list
.
add
(
pointNum
);
list
.
add
(
warningNum
);
list
.
add
(
map
);
list
.
add
(
map1
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWarningRecordController.java
View file @
f0b14a47
...
@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRecor
...
@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRecor
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.FanWaringRecordMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanWaringRecordMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.beanutils.BeanMap
;
import
org.apache.commons.beanutils.BeanMap
;
...
@@ -341,4 +342,24 @@ public class IdxBizFanWarningRecordController extends BaseController {
...
@@ -341,4 +342,24 @@ public class IdxBizFanWarningRecordController extends BaseController {
return
ResponseHelper
.
buildResponse
(
maps
);
return
ResponseHelper
.
buildResponse
(
maps
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectEquipWarningTotal"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警信息统计富文本"
,
notes
=
"预警信息统计富文本"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectEquipWarningTotal
(
@RequestParam
String
STATION
,
@RequestParam
String
EQUIPMENTNAME
)
{
List
<
Map
<
String
,
Object
>>
maps
=
fanWaringRecordMapper
.
selectEquipWarningTotal
(
STATION
,
EQUIPMENTNAME
);
return
ResponseHelper
.
buildResponse
(
maps
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectWarningPoint"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测设备右侧预警重复列表"
,
notes
=
"预警监测设备右侧预警重复列表"
)
public
ResponseModel
<
List
<
FanWarningRecord
>>
selectFanWarningNum
(
@RequestParam
String
STATION
,
@RequestParam
String
EQUIPMENTNAME
)
{
List
<
FanWarningRecord
>
maps
=
fanWaringRecordMapper
.
selectWarningPoint
(
STATION
,
EQUIPMENTNAME
);
return
ResponseHelper
.
buildResponse
(
maps
);
}
}
}
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 @
f0b14a47
...
@@ -131,7 +131,7 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
...
@@ -131,7 +131,7 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
Map
<
String
,
Object
>
queryForLeftTableListByPointNum
(
String
STATION
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
);
Map
<
String
,
Object
>
queryForLeftTableListByPointNum
(
String
STATION
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
);
List
<
IdxBizFanWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
List
<
IdxBizFanWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
Integer
pointNum
(
String
STATION
,
String
SUB
ARRAY
,
String
EQUIPMENTNAME
);
Integer
pointNum
(
String
STATION
,
String
SUB
SYSTEM
,
String
EQUIPMENTNAME
);
Map
<
String
,
Object
>
getPvEquipStatusByStation
(
String
station
);
Map
<
String
,
Object
>
getPvEquipStatusByStation
(
String
station
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
View file @
f0b14a47
...
@@ -203,8 +203,8 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
...
@@ -203,8 +203,8 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
return
this
.
getBaseMapper
().
queryForLeftTableListByPointNum
(
STATION
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
);
return
this
.
getBaseMapper
().
queryForLeftTableListByPointNum
(
STATION
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
);
}
}
public
int
pointNum
(
String
STATION
,
String
SUB
ARRAY
,
String
EQUIPMENTNAME
)
{
public
int
pointNum
(
String
STATION
,
String
SUB
SYSTEM
,
String
EQUIPMENTNAME
)
{
return
this
.
getBaseMapper
().
pointNum
(
STATION
,
SUB
ARRAY
,
EQUIPMENTNAME
);
return
this
.
getBaseMapper
().
pointNum
(
STATION
,
SUB
SYSTEM
,
EQUIPMENTNAME
);
}
}
public
List
<
IdxBizFanWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
)
{
public
List
<
IdxBizFanWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
)
{
...
...
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 @
f0b14a47
...
@@ -10,4 +10,10 @@ import java.util.Map;
...
@@ -10,4 +10,10 @@ import java.util.Map;
public
interface
FanWaringRecordMapper
extends
BaseMapper
<
FanWarningRecord
>
{
public
interface
FanWaringRecordMapper
extends
BaseMapper
<
FanWarningRecord
>
{
public
List
<
Map
<
String
,
Object
>>
selectFanWarningNum
(
String
station
);
public
List
<
Map
<
String
,
Object
>>
selectFanWarningNum
(
String
station
);
public
List
<
FanWarningRecord
>
warningData
(
String
STATION
,
String
EQUIPMENTNAME
,
String
SUBSYSTEM
);
public
List
<
FanWarningRecord
>
selectWarningPoint
(
String
STATION
,
String
EQUIPMENTNAME
);
public
List
<
Map
<
String
,
Object
>>
selectEquipWarningTotal
(
String
STATION
,
String
EQUIPMENTNAME
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
f0b14a47
...
@@ -1180,7 +1180,7 @@
...
@@ -1180,7 +1180,7 @@
<if
test=
"STATION != null and STATION != '' "
>
<if
test=
"STATION != null and STATION != '' "
>
AND re.STATION = #{STATION}
AND re.STATION = #{STATION}
</if>
</if>
</select>
</select>
<select
id=
"pointNum"
resultType=
"int"
>
<select
id=
"pointNum"
resultType=
"int"
>
SELECT
SELECT
...
@@ -1192,8 +1192,8 @@
...
@@ -1192,8 +1192,8 @@
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND cl.EQUIPMENT_NAME = #{EQUIPMENTNAME}
AND cl.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
</if>
<if
test=
"SUB
ARRAY != null and SUBARRAY
!= '' "
>
<if
test=
"SUB
SYSTEM != null and SUBSYSTEM
!= '' "
>
AND cl.SUB
ARRAY = #{SUBARRAY
}
AND cl.SUB
_SYSTEM = #{SUBSYSTEM
}
</if>
</if>
<if
test=
"STATION != null and STATION != '' "
>
<if
test=
"STATION != null and STATION != '' "
>
AND cl.STATION = #{STATION}
AND cl.STATION = #{STATION}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanWarningRecord.xml
View file @
f0b14a47
...
@@ -37,4 +37,90 @@
...
@@ -37,4 +37,90 @@
</select>
</select>
<select
id=
"warningData"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord"
>
SELECT
warning_name as WarningName
FROM
analysis_data.fan_warning_record re
WHERE
re.`status` = 0
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND re.equipment_name = #{EQUIPMENTNAME}
</if>
<if
test=
"SUBSYSTEM != null and SUBSYSTEM != '' "
>
AND re.sub_system = #{SUBSYSTEM}
</if>
<if
test=
"STATION != null and STATION != '' "
>
AND re.station = #{STATION}
</if>
</select>
<select
id=
"selectWarningPoint"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord"
>
SELECT
a.station,
a.warning_name,
a.content,
a.equipment_name,
a.point_name,
a.rec_date
from
analysis_data.fan_warning_record a
where
a.status = 0
<if
test=
"STATION != null and STATION != '' "
>
AND a.station = #{STATION}
</if>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND a.equipment_name = #{EQUIPMENTNAME}
</if>
group by
station,
equipment_name,
point_name,
rec_date ,
content,
warning_name
</select>
<select
id=
"selectEquipWarningTotal"
resultType=
"map"
>
SELECT
`STATION` AS `STATION`,
`EQUIPMENT_NAME` AS `EQUIPMENT_NAME`,
max( ( case `WARNING_NAME` WHEN '注意' THEN `num` ELSE 0 END ) ) AS `zhuyi`,
max( ( case `WARNING_NAME` WHEN '警告' THEN `num` ELSE 0 END ) ) AS `jinggao`,
max( ( case `WARNING_NAME` WHEN '危险' THEN `num` ELSE 0 END ) ) AS `weixian`,
sum(
(
(
( CASE `WARNING_NAME` WHEN '注意' THEN `num` ELSE 0 END ) + ( case `WARNING_NAME` WHEN '警告' THEN `num` ELSE 0 END
)
) + ( case `WARNING_NAME` WHEN '危险' THEN `num` ELSE 0 END )
)
) AS `total`
FROM
(
select
`z`.`station` as `STATION`,
`z`.`equipment_name` as `EQUIPMENT_NAME`,
`z`.`warning_name` as `WARNING_NAME`,
count( 1 ) as `num`
from
analysis_data.fan_warning_record z where
( `z`.`status` = 0 )
<if
test=
"STATION != null and STATION != '' "
>
AND z.station = #{STATION}
</if>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND z.equipment_name = #{EQUIPMENTNAME}
</if>
group by
`z`.`station`,
`z`.`warning_name`,
`z`.`equipment_name`
) b
GROUP BY
`b`.`STATION`,
`b`.`EQUIPMENT_NAME`
</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