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
af330ea3
Commit
af330ea3
authored
Feb 02, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 预警接口增加请求参数
parent
fa923e44
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
13 deletions
+46
-13
IMcbWarningService.java
...mos/boot/module/jxiop/api/service/IMcbWarningService.java
+2
-2
McbWarningMapper.xml
...pi/src/main/resources/mapper/warning/McbWarningMapper.xml
+20
-0
McbWarningController.java
...oot/module/jxiop/biz/controller/McbWarningController.java
+11
-4
McbWarningMapper.java
...t/module/jxiop/biz/mcbwarningmapper/McbWarningMapper.java
+8
-2
McbWarningServiceImpl.java
.../module/jxiop/biz/service/impl/McbWarningServiceImpl.java
+5
-5
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/service/IMcbWarningService.java
View file @
af330ea3
...
@@ -28,14 +28,14 @@ public interface IMcbWarningService {
...
@@ -28,14 +28,14 @@ public interface IMcbWarningService {
*
*
* @return 预警信息列表
* @return 预警信息列表
*/
*/
Page
<
Map
<
String
,
Object
>>
queryWarningPage
(
Page
<
Map
<
String
,
Object
>>
page
,
Integer
processingStatus
);
Page
<
Map
<
String
,
Object
>>
queryWarningPage
(
Page
<
Map
<
String
,
Object
>>
page
,
Integer
processingStatus
,
String
eventLevel
,
String
createDate
,
String
warningSourceType
);
/**
/**
* 预警信息总数
* 预警信息总数
*
*
* @return 预警信息总数
* @return 预警信息总数
*/
*/
Long
queryWarningCount
(
Integer
processingStatus
);
Long
queryWarningCount
(
Integer
processingStatus
,
String
eventLevel
,
String
createDate
,
String
warningSourceType
);
/**
/**
* 问题信息列表
* 问题信息列表
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/warning/McbWarningMapper.xml
View file @
af330ea3
...
@@ -94,6 +94,16 @@
...
@@ -94,6 +94,16 @@
<if
test=
"processingStatus != null"
>
<if
test=
"processingStatus != null"
>
AND log.PROCESSING_STATUS = #{processingStatus}
AND log.PROCESSING_STATUS = #{processingStatus}
</if>
</if>
<if
test=
"eventLevel != null and eventLevel != ''"
>
AND log.EVENT_LEVEL = #{eventLevel}
</if>
<if
test=
"createDate != null and createDate != ''"
>
AND log.CREATE_DATE
>
= concat(#{createDate}, ' 00:00:00')
AND log.CREATE_DATE
<
= concat(#{createDate}, ' 23:59:59')
</if>
<if
test=
"warningSourceType != null and warningSourceType != ''"
>
AND log.WARNING_SOURCE_TYPE = #{warningSourceType}
</if>
</where>
</where>
ORDER BY
ORDER BY
log.CREATE_DATE DESC
log.CREATE_DATE DESC
...
@@ -117,6 +127,16 @@
...
@@ -117,6 +127,16 @@
<if
test=
"processingStatus != null"
>
<if
test=
"processingStatus != null"
>
AND log.PROCESSING_STATUS = #{processingStatus}
AND log.PROCESSING_STATUS = #{processingStatus}
</if>
</if>
<if
test=
"eventLevel != null and eventLevel != ''"
>
AND log.EVENT_LEVEL = #{eventLevel}
</if>
<if
test=
"createDate != null and createDate != ''"
>
AND log.CREATE_DATE
>
= concat(#{createDate}, ' 00:00:00')
AND log.CREATE_DATE
<
= concat(#{createDate}, ' 23:59:59')
</if>
<if
test=
"warningSourceType != null and warningSourceType != ''"
>
AND log.WARNING_SOURCE_TYPE = #{warningSourceType}
</if>
</where>
</where>
</select>
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/McbWarningController.java
View file @
af330ea3
...
@@ -45,16 +45,23 @@ public class McbWarningController {
...
@@ -45,16 +45,23 @@ public class McbWarningController {
@GetMapping
(
value
=
"/warning/page"
)
@GetMapping
(
value
=
"/warning/page"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
queryWarningPage
(
@RequestParam
(
value
=
"pageNumber"
,
defaultValue
=
"1"
)
Integer
pageNumber
,
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
queryWarningPage
(
@RequestParam
(
value
=
"pageNumber"
,
defaultValue
=
"1"
)
Integer
pageNumber
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"20"
)
Integer
pageSize
,
@RequestParam
(
value
=
"processingStatus"
,
required
=
false
)
Integer
processingStatus
)
{
@RequestParam
(
value
=
"processingStatus"
,
required
=
false
)
Integer
processingStatus
,
@RequestParam
(
value
=
"eventLevel"
,
required
=
false
)
String
eventLevel
,
@RequestParam
(
value
=
"createDate"
,
required
=
false
)
String
createDate
,
@RequestParam
(
value
=
"warningSourceType"
,
required
=
false
)
String
warningSourceType
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
pageNumber
,
pageSize
);
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
pageNumber
,
pageSize
);
return
ResponseHelper
.
buildResponse
(
mcbWarningService
.
queryWarningPage
(
page
,
processingStatus
));
return
ResponseHelper
.
buildResponse
(
mcbWarningService
.
queryWarningPage
(
page
,
processingStatus
,
eventLevel
,
createDate
,
warningSourceType
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"[监测总览]预警信息总数"
,
notes
=
"[监测总览]预警信息总数"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"[监测总览]预警信息总数"
,
notes
=
"[监测总览]预警信息总数"
)
@GetMapping
(
value
=
"/warning/count"
)
@GetMapping
(
value
=
"/warning/count"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
queryWarningCount
(
@RequestParam
(
value
=
"processingStatus"
,
required
=
false
)
Integer
processingStatus
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
queryWarningCount
(
@RequestParam
(
value
=
"processingStatus"
,
required
=
false
)
Integer
processingStatus
,
Long
count
=
mcbWarningService
.
queryWarningCount
(
processingStatus
);
@RequestParam
(
value
=
"eventLevel"
,
required
=
false
)
String
eventLevel
,
@RequestParam
(
value
=
"createDate"
,
required
=
false
)
String
createDate
,
@RequestParam
(
value
=
"warningSourceType"
,
required
=
false
)
String
warningSourceType
)
{
Long
count
=
mcbWarningService
.
queryWarningCount
(
processingStatus
,
eventLevel
,
createDate
,
warningSourceType
);
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>()
{{
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>()
{{
this
.
put
(
"count"
,
count
);
this
.
put
(
"count"
,
count
);
}};
}};
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mcbwarningmapper/McbWarningMapper.java
View file @
af330ea3
...
@@ -37,7 +37,10 @@ public interface McbWarningMapper extends BaseMapper {
...
@@ -37,7 +37,10 @@ public interface McbWarningMapper extends BaseMapper {
@Param
(
"start"
)
Long
start
,
@Param
(
"start"
)
Long
start
,
@Param
(
"offset"
)
Long
offset
,
@Param
(
"offset"
)
Long
offset
,
@Param
(
"projectOrgCodes"
)
List
<
String
>
projectOrgCodes
,
@Param
(
"projectOrgCodes"
)
List
<
String
>
projectOrgCodes
,
@Param
(
"processingStatus"
)
Integer
processingStatus
@Param
(
"processingStatus"
)
Integer
processingStatus
,
@Param
(
"eventLevel"
)
String
eventLevel
,
@Param
(
"createDate"
)
String
createDate
,
@Param
(
"warningSourceType"
)
String
warningSourceType
);
);
/**
/**
...
@@ -47,7 +50,10 @@ public interface McbWarningMapper extends BaseMapper {
...
@@ -47,7 +50,10 @@ public interface McbWarningMapper extends BaseMapper {
*/
*/
Long
queryWarningCount
(
Long
queryWarningCount
(
@Param
(
"projectOrgCodes"
)
List
<
String
>
projectOrgCodes
,
@Param
(
"projectOrgCodes"
)
List
<
String
>
projectOrgCodes
,
@Param
(
"processingStatus"
)
Integer
processingStatus
@Param
(
"processingStatus"
)
Integer
processingStatus
,
@Param
(
"eventLevel"
)
String
eventLevel
,
@Param
(
"createDate"
)
String
createDate
,
@Param
(
"warningSourceType"
)
String
warningSourceType
);
);
/**
/**
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/McbWarningServiceImpl.java
View file @
af330ea3
...
@@ -54,12 +54,12 @@ public class McbWarningServiceImpl implements IMcbWarningService {
...
@@ -54,12 +54,12 @@ public class McbWarningServiceImpl implements IMcbWarningService {
* @return 预警信息列表
* @return 预警信息列表
*/
*/
@Override
@Override
public
Page
<
Map
<
String
,
Object
>>
queryWarningPage
(
Page
<
Map
<
String
,
Object
>>
page
,
Integer
processingStatus
)
{
public
Page
<
Map
<
String
,
Object
>>
queryWarningPage
(
Page
<
Map
<
String
,
Object
>>
page
,
Integer
processingStatus
,
String
eventLevel
,
String
createDate
,
String
warningSourceType
)
{
List
<
String
>
projectOrgCodes
=
this
.
getProjectOrgCodes
();
List
<
String
>
projectOrgCodes
=
this
.
getProjectOrgCodes
();
long
start
=
page
.
getCurrent
()
-
1
;
long
start
=
page
.
getCurrent
()
-
1
;
long
offset
=
page
.
getSize
()
*
page
.
getCurrent
();
long
offset
=
page
.
getSize
()
*
page
.
getCurrent
();
List
<
Map
<
String
,
Object
>>
records
=
mcbWarningMapper
.
queryWarningList
(
start
,
offset
,
projectOrgCodes
,
processingStatus
);
List
<
Map
<
String
,
Object
>>
records
=
mcbWarningMapper
.
queryWarningList
(
start
,
offset
,
projectOrgCodes
,
processingStatus
,
eventLevel
,
createDate
,
warningSourceType
);
Long
total
=
mcbWarningMapper
.
queryWarningCount
(
projectOrgCodes
,
processingStatus
);
Long
total
=
mcbWarningMapper
.
queryWarningCount
(
projectOrgCodes
,
processingStatus
,
eventLevel
,
createDate
,
warningSourceType
);
page
.
setRecords
(
records
);
page
.
setRecords
(
records
);
page
.
setTotal
(
total
);
page
.
setTotal
(
total
);
return
page
;
return
page
;
...
@@ -72,9 +72,9 @@ public class McbWarningServiceImpl implements IMcbWarningService {
...
@@ -72,9 +72,9 @@ public class McbWarningServiceImpl implements IMcbWarningService {
* @return 预警信息总数
* @return 预警信息总数
*/
*/
@Override
@Override
public
Long
queryWarningCount
(
Integer
processingStatus
)
{
public
Long
queryWarningCount
(
Integer
processingStatus
,
String
eventLevel
,
String
createDate
,
String
warningSourceType
)
{
List
<
String
>
projectOrgCodes
=
this
.
getProjectOrgCodes
();
List
<
String
>
projectOrgCodes
=
this
.
getProjectOrgCodes
();
return
mcbWarningMapper
.
queryWarningCount
(
projectOrgCodes
,
processingStatus
);
return
mcbWarningMapper
.
queryWarningCount
(
projectOrgCodes
,
processingStatus
,
eventLevel
,
createDate
,
warningSourceType
);
}
}
/**
/**
...
...
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