Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
76ac4874
Commit
76ac4874
authored
Jan 19, 2021
by
吴俊凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预案执行记录分页查询
parent
494b5d5a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
22 deletions
+11
-22
ContingencyPlanController.java
...os/fas/business/controller/ContingencyPlanController.java
+5
-5
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+3
-6
ContingencyPlanService.java
...os/fas/business/service/intfc/ContingencyPlanService.java
+1
-1
PlanOperationRecordMapper.xml
...rc/main/resources/db/mapper/PlanOperationRecordMapper.xml
+2
-10
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ContingencyPlanController.java
View file @
76ac4874
...
@@ -33,12 +33,12 @@ public class ContingencyPlanController extends BaseController {
...
@@ -33,12 +33,12 @@ public class ContingencyPlanController extends BaseController {
}
}
@ApiOperation
(
value
=
"预案启动记录分页列表"
)
@ApiOperation
(
value
=
"预案启动记录分页列表"
)
@RequestMapping
(
value
=
"/recordList"
,
method
=
RequestMethod
.
POS
T
)
@RequestMapping
(
value
=
"/recordList"
,
method
=
RequestMethod
.
GE
T
)
public
ResponseModel
recordList
(
public
ResponseModel
recordList
(
@
ApiParam
(
value
=
"预案名称"
)
@RequestParam
(
required
=
false
)
String
planName
,
@
RequestParam
int
current
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
,
@
RequestParam
int
pageSiz
e
)
{
@
ApiParam
(
value
=
"预案名称"
)
@RequestParam
(
required
=
false
)
String
planNam
e
)
{
Page
page
=
contingencyPlanService
.
recordListByPage
(
planName
,
pageNumber
,
pageSiz
e
);
Page
page
=
contingencyPlanService
.
recordListByPage
(
current
,
pageSize
,
planNam
e
);
return
CommonResponseUtil2
.
success
(
page
);
return
CommonResponseUtil2
.
success
(
page
);
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
76ac4874
...
@@ -13,7 +13,6 @@ import com.yeejoin.amos.fas.core.enums.NumberEnum;
...
@@ -13,7 +13,6 @@ import com.yeejoin.amos.fas.core.enums.NumberEnum;
import
com.yeejoin.amos.fas.core.enums.ReserveEnum
;
import
com.yeejoin.amos.fas.core.enums.ReserveEnum
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.*
;
...
@@ -34,10 +33,8 @@ public class ContingencyPlanServiceImpl implements ContingencyPlanService {
...
@@ -34,10 +33,8 @@ public class ContingencyPlanServiceImpl implements ContingencyPlanService {
private
IRiskSourceService
riskSourceService
;
private
IRiskSourceService
riskSourceService
;
@Autowired
@Autowired
private
IPlanOperationRecordDao
planOperationRecordDao
;
private
IPlanOperationRecordDao
planOperationRecordDao
;
@Qualifier
(
"IEquipmentFireEquipmentDao"
)
@Autowired
@Autowired
private
IEquipmentFireEquipmentDao
equipmentFireEquipmentDao
;
private
IEquipmentFireEquipmentDao
equipmentFireEquipmentDao
;
@Qualifier
(
"iEquipmentDao"
)
@Autowired
@Autowired
private
IEquipmentDao
equipmentDao
;
private
IEquipmentDao
equipmentDao
;
@Autowired
@Autowired
...
@@ -108,10 +105,10 @@ public class ContingencyPlanServiceImpl implements ContingencyPlanService {
...
@@ -108,10 +105,10 @@ public class ContingencyPlanServiceImpl implements ContingencyPlanService {
}
}
@Override
@Override
public
Page
recordListByPage
(
String
planName
,
int
pageNumber
,
int
pageSiz
e
)
{
public
Page
recordListByPage
(
int
current
,
int
pageSize
,
String
planNam
e
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"planName"
,
planName
);
params
.
put
(
"planName"
,
planName
);
params
.
put
(
"
pageNumber"
,
pageNumber
);
params
.
put
(
"
offset"
,(
current
-
1
)*
pageSize
);
params
.
put
(
"pageSize"
,
pageSize
);
params
.
put
(
"pageSize"
,
pageSize
);
List
<
HashMap
<
String
,
Object
>>
result
=
planOperationRecordMapper
.
PlanOperationRecordListByPage
(
params
);
List
<
HashMap
<
String
,
Object
>>
result
=
planOperationRecordMapper
.
PlanOperationRecordListByPage
(
params
);
Integer
count
=
planOperationRecordMapper
.
PlanOperationRecordListByCount
(
params
);
Integer
count
=
planOperationRecordMapper
.
PlanOperationRecordListByCount
(
params
);
...
@@ -119,7 +116,7 @@ public class ContingencyPlanServiceImpl implements ContingencyPlanService {
...
@@ -119,7 +116,7 @@ public class ContingencyPlanServiceImpl implements ContingencyPlanService {
page
.
setRecords
(
result
);
page
.
setRecords
(
result
);
page
.
setTotal
(
count
);
page
.
setTotal
(
count
);
page
.
setSize
(
pageSize
);
page
.
setSize
(
pageSize
);
page
.
set
Pages
(
pageNumber
);
page
.
set
Current
(
current
);
return
page
;
return
page
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/ContingencyPlanService.java
View file @
76ac4874
...
@@ -14,5 +14,5 @@ public interface ContingencyPlanService {
...
@@ -14,5 +14,5 @@ public interface ContingencyPlanService {
ContingencyPlanParamVo
equipmentScene
(
Long
equipmentId
);
ContingencyPlanParamVo
equipmentScene
(
Long
equipmentId
);
Page
recordListByPage
(
String
planName
,
int
pageNumber
,
int
pageSiz
e
);
Page
recordListByPage
(
int
current
,
int
pageSize
,
String
planNam
e
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanOperationRecordMapper.xml
View file @
76ac4874
...
@@ -17,18 +17,12 @@
...
@@ -17,18 +17,12 @@
<where>
<where>
<if
test=
"planName !=null and planName != ''"
>
( detail.plan_name like concat(concat("%",#{planName}),"%"))
</if>
<if
test=
"planName !=null and planName != ''"
>
( detail.plan_name like concat(concat("%",#{planName}),"%"))
</if>
</where>
</where>
limit #{pageNumber} * #{pageSize},
limit #{offset},#{pageSize}
</select>
</select>
<select
id=
"PlanOperationRecordListByCount"
parameterType=
"hashmap"
resultType=
"java.lang.Integer"
>
<select
id=
"PlanOperationRecordListByCount"
parameterType=
"hashmap"
resultType=
"java.lang.Integer"
>
SELECT
SELECT
record.batch_No AS batchNo,
COUNT(*)
detail.plan_name AS planName,
original.fire_Equipment_Name AS fireEquipmentName,
record.start_time AS startTime,
TIMESTAMPDIFF(second,record.start_time,record.end_time) as executionTime,
record.plan_pattern as planPattern,
'' AS executionType
FROM
FROM
`c_plan_operation_record` record
`c_plan_operation_record` record
LEFT JOIN c_plan_detail detail ON detail.id = record.plan_id
LEFT JOIN c_plan_detail detail ON detail.id = record.plan_id
...
@@ -36,6 +30,5 @@
...
@@ -36,6 +30,5 @@
<where>
<where>
<if
test=
"planName !=null and planName != ''"
>
( detail.plan_name like concat(concat("%",#{planName}),"%"))
</if>
<if
test=
"planName !=null and planName != ''"
>
( detail.plan_name like concat(concat("%",#{planName}),"%"))
</if>
</where>
</where>
limit #{pageNumber} * #{pageSize},
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
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