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
4870576a
Commit
4870576a
authored
Sep 04, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分类列表添加筛选
parent
2d2dfb09
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
21 deletions
+30
-21
ContingencyPlanController.java
...os/fas/business/controller/ContingencyPlanController.java
+3
-2
PlanDetailMapper.java
...eejoin/amos/fas/business/dao/mapper/PlanDetailMapper.java
+2
-2
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+3
-3
IContingencyPlanService.java
...s/fas/business/service/intfc/IContingencyPlanService.java
+1
-1
PlanDetailMapper.xml
...ysStart/src/main/resources/db/mapper/PlanDetailMapper.xml
+21
-13
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ContingencyPlanController.java
View file @
4870576a
...
@@ -92,14 +92,15 @@ public class ContingencyPlanController extends BaseController {
...
@@ -92,14 +92,15 @@ public class ContingencyPlanController extends BaseController {
@RequestParam
(
value
=
"implementationTimeLeft"
,
required
=
false
)
Long
implementationTimeLeftStamp
,
@RequestParam
(
value
=
"implementationTimeLeft"
,
required
=
false
)
Long
implementationTimeLeftStamp
,
@RequestParam
(
value
=
"implementationTimeRight"
,
required
=
false
)
Long
implementationTimeRightStamp
,
@RequestParam
(
value
=
"implementationTimeRight"
,
required
=
false
)
Long
implementationTimeRightStamp
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"equipmentId"
,
required
=
false
)
String
equipmentId
)
{
@RequestParam
(
value
=
"equipmentId"
,
required
=
false
)
String
equipmentId
,
@RequestParam
(
value
=
"category"
)
String
category
)
{
if
(
current
<
1
||
size
<
1
)
{
if
(
current
<
1
||
size
<
1
)
{
throw
new
YeeException
(
"分页参数有误"
);
throw
new
YeeException
(
"分页参数有误"
);
}
}
Date
implementationTimeLeft
=
implementationTimeLeftStamp
==
null
?
null
:
new
Date
(
implementationTimeLeftStamp
);
Date
implementationTimeLeft
=
implementationTimeLeftStamp
==
null
?
null
:
new
Date
(
implementationTimeLeftStamp
);
Date
implementationTimeRight
=
implementationTimeRightStamp
==
null
?
null
:
new
Date
(
implementationTimeRightStamp
);
Date
implementationTimeRight
=
implementationTimeRightStamp
==
null
?
null
:
new
Date
(
implementationTimeRightStamp
);
Page
page
=
new
Page
(
current
,
size
);
Page
page
=
new
Page
(
current
,
size
);
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
pageFilter
(
page
,
planName
,
classifyId
,
planRange
,
editOrgName
,
implementationTimeLeft
,
implementationTimeRight
,
equipmentId
));
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
pageFilter
(
page
,
planName
,
classifyId
,
planRange
,
editOrgName
,
implementationTimeLeft
,
implementationTimeRight
,
equipmentId
,
category
));
}
}
/**
/**
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PlanDetailMapper.java
View file @
4870576a
...
@@ -38,13 +38,13 @@ public interface PlanDetailMapper {
...
@@ -38,13 +38,13 @@ public interface PlanDetailMapper {
* 筛选预案获得总数
* 筛选预案获得总数
* @return
* @return
*/
*/
Integer
filterCount
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"classifyId"
)
List
<
Long
>
classifyId
,
@Param
(
"planRange"
)
List
<
String
>
planRange
,
@Param
(
"editOrgName"
)
String
editOrgName
,
@Param
(
"implementationTimeLeft"
)
Date
implementationTimeLeft
,
@Param
(
"implementationTimeRight"
)
Date
implementationTimeRight
,
@Param
(
"equipmentId"
)
String
equipmentId
);
Integer
filterCount
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"classifyId"
)
List
<
Long
>
classifyId
,
@Param
(
"planRange"
)
List
<
String
>
planRange
,
@Param
(
"editOrgName"
)
String
editOrgName
,
@Param
(
"implementationTimeLeft"
)
Date
implementationTimeLeft
,
@Param
(
"implementationTimeRight"
)
Date
implementationTimeRight
,
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"category"
)
String
category
);
/**
/**
* 筛选预案获得分页记录
* 筛选预案获得分页记录
* @return
* @return
*/
*/
List
<
PlanDetailVo
>
filterList
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"classifyId"
)
List
<
Long
>
classifyId
,
@Param
(
"planRange"
)
List
<
String
>
planRange
,
@Param
(
"editOrgName"
)
String
editOrgName
,
@Param
(
"implementationTimeLeft"
)
Date
implementationTimeLeft
,
@Param
(
"implementationTimeRight"
)
Date
implementationTimeRight
,
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"equipmentId"
)
String
equipmentId
);
List
<
PlanDetailVo
>
filterList
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"classifyId"
)
List
<
Long
>
classifyId
,
@Param
(
"planRange"
)
List
<
String
>
planRange
,
@Param
(
"editOrgName"
)
String
editOrgName
,
@Param
(
"implementationTimeLeft"
)
Date
implementationTimeLeft
,
@Param
(
"implementationTimeRight"
)
Date
implementationTimeRight
,
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"category"
)
String
category
);
List
<
String
>
getRuleIdByEquipment
(
@Param
(
"id"
)
Long
id
);
List
<
String
>
getRuleIdByEquipment
(
@Param
(
"id"
)
Long
id
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
4870576a
...
@@ -683,7 +683,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -683,7 +683,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
@Override
@Override
public
Page
<
PlanDetailVo
>
pageFilter
(
Page
page
,
String
planName
,
Long
public
Page
<
PlanDetailVo
>
pageFilter
(
Page
page
,
String
planName
,
Long
classifyId
,
List
<
String
>
planRange
,
String
editOrgName
,
Date
implementationTimeLeft
,
Date
classifyId
,
List
<
String
>
planRange
,
String
editOrgName
,
Date
implementationTimeLeft
,
Date
implementationTimeRight
,
String
equipmentId
)
{
implementationTimeRight
,
String
equipmentId
,
String
category
)
{
List
<
Long
>
classifyIdList
=
new
ArrayList
<>();
List
<
Long
>
classifyIdList
=
new
ArrayList
<>();
if
(
classifyId
!=
null
)
{
if
(
classifyId
!=
null
)
{
Collection
<
PlanClassifyTreeVo
>
classifyTreeList
=
planClassifyTreeService
.
getAllChildIncludeMe
(
classifyId
);
Collection
<
PlanClassifyTreeVo
>
classifyTreeList
=
planClassifyTreeService
.
getAllChildIncludeMe
(
classifyId
);
...
@@ -692,7 +692,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -692,7 +692,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
allChildren
.
forEach
(
e
->
classifyIdList
.
add
(
e
.
getId
()));
allChildren
.
forEach
(
e
->
classifyIdList
.
add
(
e
.
getId
()));
}
}
}
}
int
total
=
planDetailMapper
.
filterCount
(
planName
,
classifyIdList
,
planRange
,
editOrgName
,
implementationTimeLeft
,
implementationTimeRight
,
equipmentId
);
int
total
=
planDetailMapper
.
filterCount
(
planName
,
classifyIdList
,
planRange
,
editOrgName
,
implementationTimeLeft
,
implementationTimeRight
,
equipmentId
,
category
);
page
.
setTotal
(
total
);
page
.
setTotal
(
total
);
long
start
=
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
();
long
start
=
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
();
if
(
total
==
0
)
{
if
(
total
==
0
)
{
...
@@ -702,7 +702,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -702,7 +702,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
page
.
setCurrent
(
1
);
page
.
setCurrent
(
1
);
start
=
0
;
start
=
0
;
}
}
List
<
PlanDetailVo
>
planList
=
planDetailMapper
.
filterList
(
planName
,
classifyIdList
,
planRange
,
editOrgName
,
implementationTimeLeft
,
implementationTimeRight
,
(
int
)
start
,
(
int
)
page
.
getSize
(),
equipmentId
);
List
<
PlanDetailVo
>
planList
=
planDetailMapper
.
filterList
(
planName
,
classifyIdList
,
planRange
,
editOrgName
,
implementationTimeLeft
,
implementationTimeRight
,
(
int
)
start
,
(
int
)
page
.
getSize
(),
equipmentId
,
category
);
// 查询并插入绑定数据的信息
// 查询并插入绑定数据的信息
fillBindingInfo
(
planList
);
fillBindingInfo
(
planList
);
page
.
setRecords
(
planList
);
page
.
setRecords
(
planList
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyPlanService.java
View file @
4870576a
...
@@ -98,7 +98,7 @@ public interface IContingencyPlanService {
...
@@ -98,7 +98,7 @@ public interface IContingencyPlanService {
* @param implementationTimeRight 实施时间右界限
* @param implementationTimeRight 实施时间右界限
* @return Page
* @return Page
*/
*/
Page
<
PlanDetailVo
>
pageFilter
(
Page
page
,
String
planName
,
Long
classifyId
,
List
<
String
>
planRange
,
String
editOrgName
,
Date
implementationTimeLeft
,
Date
implementationTimeRight
,
String
equipmentId
);
Page
<
PlanDetailVo
>
pageFilter
(
Page
page
,
String
planName
,
Long
classifyId
,
List
<
String
>
planRange
,
String
editOrgName
,
Date
implementationTimeLeft
,
Date
implementationTimeRight
,
String
equipmentId
,
String
category
);
/**
/**
* 查询预案使用的文档ID
* 查询预案使用的文档ID
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanDetailMapper.xml
View file @
4870576a
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
FROM
FROM
c_plan_detail cpd
c_plan_detail cpd
left join c_plan_equipment as cpe on cpd.id = cpe.plan_id and cpe.is_delete = 0
left join c_plan_equipment as cpe on cpd.id = cpe.plan_id and cpe.is_delete = 0
left join f_equipment c on c.id = cpe.fire_equipment_id
<where>
<where>
<if
test=
"planName != null and planName.length > 0"
>
<if
test=
"planName != null and planName.length > 0"
>
AND cpd.plan_name LIKE concat('%', #{planName}, '%')
AND cpd.plan_name LIKE concat('%', #{planName}, '%')
...
@@ -50,6 +51,9 @@
...
@@ -50,6 +51,9 @@
<if
test=
"equipmentId != null and equipmentId != ''"
>
<if
test=
"equipmentId != null and equipmentId != ''"
>
AND cpe.fire_equipment_id = #{equipmentId}
AND cpe.fire_equipment_id = #{equipmentId}
</if>
</if>
<if
test=
"category != null and category != ''"
>
AND c.category = #{category}
</if>
AND cpd.is_delete = 0
AND cpd.is_delete = 0
</where>
</where>
</select>
</select>
...
@@ -59,21 +63,21 @@
...
@@ -59,21 +63,21 @@
cpd.id AS id,
cpd.id AS id,
cpd.id AS zid,
cpd.id AS zid,
cpd.create_date createDate
cpd.create_date createDate
, plan_name planName
,
cpd.
plan_name planName
, code
, c
pd.c
ode
, classify_id classifyId
, c
pd.c
lassify_id classifyId
, plan_range planRange
,
cpd.
plan_range planRange
, edit_org_name editOrgName
,
cpd.
edit_org_name editOrgName
, edition
,
cpd.
edition
, implementation_time implementationTime
,
cpd.
implementation_time implementationTime
, cpd.remark
, cpd.remark
, status
,
cpd.
status
, creator
, c
pd.c
reator
, reviser
,
cpd.
reviser
, update_time updateTime
,
cpd.
update_time updateTime
, org_code orgCode
,
cpd.
org_code orgCode
, cpd.is_delete isDelete
, cpd.is_delete isDelete
, input_time inputTime
,
cpd.
input_time inputTime
, (SELECT classify_name FROM c_plan_classify_tree cpct WHERE id = cpd.classify_id) classifyName
, (SELECT classify_name FROM c_plan_classify_tree cpct WHERE id = cpd.classify_id) classifyName
, (SELECT count(1) FROM c_plan_operation_record cpor WHERE plan_id = cpd.id) executionTimes
, (SELECT count(1) FROM c_plan_operation_record cpor WHERE plan_id = cpd.id) executionTimes
,fpp.picture
,fpp.picture
...
@@ -81,6 +85,7 @@
...
@@ -81,6 +85,7 @@
c_plan_detail cpd
c_plan_detail cpd
left join c_plan_equipment as cpe on cpd.id = cpe.plan_id and cpe.is_delete = 0
left join c_plan_equipment as cpe on cpd.id = cpe.plan_id and cpe.is_delete = 0
left join f_preplan_picture as fpp on fpp.equipment_id = cpe.fire_equipment_id and fpp.`type` =5
left join f_preplan_picture as fpp on fpp.equipment_id = cpe.fire_equipment_id and fpp.`type` =5
left join f_equipment c on c.id = cpe.fire_equipment_id
<where>
<where>
<if
test=
"planName != null and planName.length > 0"
>
<if
test=
"planName != null and planName.length > 0"
>
AND cpd.plan_name LIKE concat('%', #{planName}, '%')
AND cpd.plan_name LIKE concat('%', #{planName}, '%')
...
@@ -109,6 +114,9 @@
...
@@ -109,6 +114,9 @@
<if
test=
"equipmentId != null and equipmentId != ''"
>
<if
test=
"equipmentId != null and equipmentId != ''"
>
AND cpe.fire_equipment_id = #{equipmentId}
AND cpe.fire_equipment_id = #{equipmentId}
</if>
</if>
<if
test=
"category != null and category != ''"
>
AND c.category = #{category}
</if>
AND cpd.is_delete = 0
AND cpd.is_delete = 0
</where>
</where>
ORDER BY cpd.create_date DESC
ORDER BY cpd.create_date DESC
...
...
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