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
2f6aeaf6
Commit
2f6aeaf6
authored
Oct 20, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
风机 统计接口
parent
5f87d7d8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
0 deletions
+84
-0
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+31
-0
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+7
-0
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+9
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+37
-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 @
2f6aeaf6
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
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.module.jxiop.biz.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanHealthIndexServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanHealthIndexServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -14,6 +16,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -14,6 +16,8 @@ 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
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -154,6 +158,33 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -154,6 +158,33 @@ public class IdxBizFanHealthIndexController extends BaseController {
return
ResponseHelper
.
buildResponse
(
idxBizFanHealthIndexServiceImpl
.
queryForLeftTableListByPointNum
(
STATION
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
));
return
ResponseHelper
.
buildResponse
(
idxBizFanHealthIndexServiceImpl
.
queryForLeftTableListByPointNum
(
STATION
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测设备级统计"
,
notes
=
"预警监测设备级统计"
)
@GetMapping
(
value
=
"/queryForPointNum"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
queryForLeftTableListByPointNum
(
@RequestParam
(
required
=
false
)
String
STATION
,
@RequestParam
(
required
=
false
)
String
SUBARRAY
,
@RequestParam
(
required
=
false
)
String
EQUIPMENTNAME
)
{
List
<
IdxBizFanWarningRecord
>
idxBizPvWarningRecordList
=
idxBizFanHealthIndexServiceImpl
.
warningData
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
int
total
=
idxBizFanHealthIndexServiceImpl
.
pointNum
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
Map
<
String
,
Object
>
warningNum
=
new
HashMap
<>();
warningNum
.
put
(
"name"
,
"注意"
);
warningNum
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"注意"
)).
count
());
warningNum
.
put
(
"name"
,
"警告"
);
warningNum
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"警告"
)).
count
());
warningNum
.
put
(
"name"
,
"危险"
);
warningNum
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"危险"
)).
count
());
Map
<
String
,
Object
>
pointNum
=
new
HashMap
<>();
pointNum
.
put
(
"name"
,
"正常"
);
pointNum
.
put
(
"value"
,
total
-
idxBizPvWarningRecordList
.
size
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
list
.
add
(
pointNum
);
list
.
add
(
warningNum
);
return
ResponseHelper
.
buildResponse
(
list
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"测点运行趋势图"
,
notes
=
"测点运行趋势图"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"测点运行趋势图"
,
notes
=
"测点运行趋势图"
)
@GetMapping
(
value
=
"/getqyt"
)
@GetMapping
(
value
=
"/getqyt"
)
...
...
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 @
2f6aeaf6
...
@@ -5,6 +5,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO;
...
@@ -5,6 +5,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthLevel
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthLevel
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -113,4 +115,9 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
...
@@ -113,4 +115,9 @@ 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
);
Integer
pointNum
(
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/service/impl/IdxBizFanHealthIndexServiceImpl.java
View file @
2f6aeaf6
...
@@ -144,6 +144,14 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
...
@@ -144,6 +144,14 @@ 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
SUBARRAY
,
String
EQUIPMENTNAME
)
{
return
this
.
getBaseMapper
().
pointNum
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
}
public
List
<
IdxBizFanWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
)
{
return
this
.
getBaseMapper
().
warningData
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
}
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
2f6aeaf6
...
@@ -1171,4 +1171,41 @@
...
@@ -1171,4 +1171,41 @@
</where>
</where>
</select>
</select>
<select
id=
"warningData"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord"
>
SELECT
*
FROM
idx_biz_fan_warning_record re
WHERE
re.`STATUS` = 0
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND re.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if
test=
"SUBARRAY != null and SUBARRAY != '' "
>
AND re.SUBARRAY = #{SUBARRAY}
</if>
<if
test=
"STATION != null and STATION != '' "
>
AND re.STATION = #{STATION}
</if>
</select>
<select
id=
"pointNum"
resultType=
"int"
>
SELECT
count(1)
FROM
idx_biz_fan_point_process_variable_classification cl
WHERE
cl.TAG_CODE = '分析变量'
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND cl.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if
test=
"SUBARRAY != null and SUBARRAY != '' "
>
AND cl.SUBARRAY = #{SUBARRAY}
</if>
<if
test=
"STATION != null and STATION != '' "
>
AND cl.STATION = #{STATION}
</if>
</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