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
a56f1753
Commit
a56f1753
authored
Oct 19, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测点状态统计图
parent
ab634637
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
1 deletion
+83
-1
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+24
-0
IdxBizPvHealthIndexMapper.java
...t/module/jxiop/biz/mapper2/IdxBizPvHealthIndexMapper.java
+7
-1
IdxBizPvHealthIndexServiceImpl.java
...xiop/biz/service/impl/IdxBizPvHealthIndexServiceImpl.java
+9
-0
IdxBizPvHealthIndexMapper.xml
...in/resources/mapper/cluster/IdxBizPvHealthIndexMapper.xml
+43
-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/IdxBizPvHealthIndexController.java
View file @
a56f1753
...
...
@@ -14,6 +14,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -159,4 +161,26 @@ public class IdxBizPvHealthIndexController extends BaseController {
return
ResponseHelper
.
buildResponse
(
idxBizPvHealthIndexServiceImpl
.
queryForLeftTableListByPointNum
(
STATION
,
SUBARRAY
,
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
<
Map
<
String
,
Object
>>
maps
=
idxBizPvHealthIndexServiceImpl
.
warningData
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
int
total
=
idxBizPvHealthIndexServiceImpl
.
pointNum
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
Map
<
String
,
Object
>
warningNum
=
new
HashMap
<>();
warningNum
.
put
(
"name"
,
"异常"
);
warningNum
.
put
(
"value"
,
maps
.
size
());
Map
<
String
,
Object
>
pointNum
=
new
HashMap
<>();
pointNum
.
put
(
"name"
,
"正常"
);
pointNum
.
put
(
"value"
,
total
-
maps
.
size
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
list
.
add
(
pointNum
);
list
.
add
(
warningNum
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizPvHealthIndexMapper.java
View file @
a56f1753
...
...
@@ -18,11 +18,17 @@ public interface IdxBizPvHealthIndexMapper extends BaseMapper<IdxBizPvHealthInde
List
<
Map
<
String
,
Object
>>
queryForLeftTableListByEquip
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
Integer
current
,
Integer
size
);
Map
<
String
,
Object
>
queryForLeftTableListByEquipNum
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
);
Map
<
String
,
Object
>
queryForLeftTableListByPointNum
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
);
Map
<
String
,
Object
>
queryForLeftTableListByPointNum
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
);
int
queryForLeftTableListByEquipCount
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
);
List
<
Map
<
String
,
Object
>>
queryForLeftTableListByPoint
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
,
Integer
current
,
Integer
size
);
int
queryForLeftTableListByPointCount
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
);
List
<
Map
<
String
,
Object
>>
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/IdxBizPvHealthIndexServiceImpl.java
View file @
a56f1753
...
...
@@ -57,5 +57,13 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn
return
this
.
getBaseMapper
().
queryForLeftTableListByEquipCount
(
STATION
,
SUBARRAY
,
HEALTHLEVEL
,
EQUIPMENTNAME
);
}
public
int
pointNum
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
)
{
return
this
.
getBaseMapper
().
pointNum
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
}
public
List
<
Map
<
String
,
Object
>>
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/IdxBizPvHealthIndexMapper.xml
View file @
a56f1753
...
...
@@ -235,4 +235,47 @@
</where>
</select>
<select
id=
"warningData"
resultType=
"map"
>
SELECT * FROM (SELECT
*
FROM
idx_biz_pv_point_process_variable_classification cl
INNER JOIN idx_biz_pv_warning_record re ON re.EQUIPMENT_NAME = cl.EQUIPMENT_NAME AND re.STATION = cl.STATION AND re.SUBARRAY = cl.SUBARRAY
AND re.`STATUS` = 0
WHERE
cl.TAG_CODE = '分析变量'
GROUP BY cl.EQUIPMENT_NAME) a
<where>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND a.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if
test=
"SUBARRAY != null and SUBARRAY != '' "
>
AND a.SUBARRAY = #{SUBARRAY}
</if>
<if
test=
"STATION != null and STATION != '' "
>
AND a.STATION = #{STATION}
</if>
</where>
</select>
<select
id=
"pointNum"
resultType=
"int"
>
SELECT
*
FROM
idx_biz_pv_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>
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