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
57b2f3a7
Commit
57b2f3a7
authored
Oct 24, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
214dbbc8
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
+18
-1
IdxBizPvHealthIndexMapper.java
...t/module/jxiop/biz/mapper2/IdxBizPvHealthIndexMapper.java
+1
-0
IdxBizPvHealthIndexServiceImpl.java
...xiop/biz/service/impl/IdxBizPvHealthIndexServiceImpl.java
+6
-0
IdxBizPvHealthIndexMapper.xml
...in/resources/mapper/cluster/IdxBizPvHealthIndexMapper.xml
+58
-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 @
57b2f3a7
...
@@ -192,4 +192,21 @@ public class IdxBizPvHealthIndexController extends BaseController {
...
@@ -192,4 +192,21 @@ public class IdxBizPvHealthIndexController extends BaseController {
return
ResponseHelper
.
buildResponse
(
list
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测设备级统计"
,
notes
=
"预警监测设备级统计"
)
@GetMapping
(
value
=
"/queryForPointNum"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
selectPointByANALYSISTYPE
(
@RequestParam
(
required
=
false
)
String
STATION
,
@RequestParam
(
required
=
false
)
String
HEALTHLEVEL
,
@RequestParam
(
required
=
false
)
String
EQUIPMENTNAME
,
@RequestParam
(
required
=
false
)
String
POINTNAME
,
@RequestParam
(
required
=
false
)
String
SUBARRAY
,
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
{
List
<
Map
<
String
,
Object
>>
maps
=
idxBizPvHealthIndexServiceImpl
.
selectPointByANALYSISTYPE
(
STATION
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
,
SUBARRAY
,
startTime
,
endTime
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
List
<
Object
>
seriesData
=
new
ArrayList
<>();
List
<
Object
>
axisData
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
seriesData
.
add
(
map
.
get
(
"value"
));
axisData
.
add
(
map
.
get
(
"REC_DATE"
));
}
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"axisData"
,
axisData
);
return
ResponseHelper
.
buildResponse
(
result
);}
}
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 @
57b2f3a7
...
@@ -30,6 +30,7 @@ public interface IdxBizPvHealthIndexMapper extends BaseMapper<IdxBizPvHealthInde
...
@@ -30,6 +30,7 @@ public interface IdxBizPvHealthIndexMapper extends BaseMapper<IdxBizPvHealthInde
List
<
IdxBizPvWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
List
<
IdxBizPvWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
Integer
pointNum
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
Integer
pointNum
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
List
<
Map
<
String
,
Object
>>
selectPointByANALYSISTYPE
(
String
STATION
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
,
String
SUBARRAY
,
String
startTime
,
String
endTime
);
}
}
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 @
57b2f3a7
...
@@ -66,5 +66,10 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn
...
@@ -66,5 +66,10 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn
return
this
.
getBaseMapper
().
warningData
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
return
this
.
getBaseMapper
().
warningData
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
}
}
public
List
<
Map
<
String
,
Object
>>
selectPointByANALYSISTYPE
(
String
STATION
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
,
String
SUBARRAY
,
String
startTime
,
String
endTime
){
return
this
.
getBaseMapper
().
selectPointByANALYSISTYPE
(
STATION
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
,
SUBARRAY
,
startTime
,
endTime
);
};
}
}
\ 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 @
57b2f3a7
...
@@ -275,4 +275,62 @@
...
@@ -275,4 +275,62 @@
</if>
</if>
</select>
</select>
<select
id=
"selectPointByANALYSISTYPE"
resultType=
"map"
>
SELECT
b.*
FROM
(
SELECT
POINT_NAME,
STATION,
HEALTH_INDEX,
HEALTH_INDEX AS VALUE,
HEALTH_LEVEL,
( CASE HEALTH_LEVEL WHEN '危险' THEN 3 WHEN '警告' THEN 2 WHEN '注意' THEN 1 ELSE 0 END ) AS STATUS,
SUBARRAY,
REC_DATE,
EQUIPMENT_NAME,
INDEX_ADDRESS,
ANALYSIS_OBJ_SEQ,
ANALYSIS_TYPE
FROM
`idx_biz_pv_health_index`
WHERE
ANALYSIS_OBJ_TYPE = '测点'
<if
test=
"(startTime == null or startTime == '' ) and (endTime == null or endTime =='') "
>
AND ( ANALYSIS_TYPE = '按小时' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 15 HOUR ) )
OR ( REC_DATE >=DATE_SUB( NOW(), INTERVAL 15 DAY ) AND ANALYSIS_TYPE = '按天' )
OR ( ANALYSIS_TYPE = '按时刻' AND REC_DATE >= DATE_SUB( NOW( ), INTERVAL 150 MINUTE ) )
</if>
<if
test=
"startTime != null and startTime != '' or endTime != null and endTime != '' "
>
AND REC_DATE >= #{startTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
<![CDATA[ AND REC_DATE <= #{endTime}]]>
</if>
) b
INNER JOIN idx_biz_pv_warning_rule_set rule ON rule.ANALYSIS_POINT_ID = b.ANALYSIS_OBJ_SEQ
AND rule.WARNING_NAME = '注意'
AND rule.ANALYSIS_TYPE = b.ANALYSIS_TYPE
<where>
<if
test=
"STATION != null and STATION != '' "
>
b.STATION = #{STATION}
</if>
<if
test=
"SUBARRAY != null and SUBARRAY != '' "
>
AND b.SUBARRAY = #{SUBARRAY}
</if>
<if
test=
"EQUIPMENTNAME != null and EQUIPMENTNAME != '' "
>
AND b.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if
test=
"HEALTHLEVEL != null and HEALTHLEVEL != '' "
>
AND b.HEALTH_LEVEL = #{HEALTHLEVEL}
</if>
<if
test=
"POINTNAME != null and POINTNAME != '' "
>
AND b.POINT_NAME = #{POINTNAME}
</if>
</where>
</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