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
44cadb63
Commit
44cadb63
authored
May 27, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
防火监督 Web端计划添加已超时判断
parent
b9b6b243
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
PlanStatusEnum.java
...yeejoin/amos/supervision/common/enums/PlanStatusEnum.java
+3
-1
PlanTaskServiceImpl.java
...upervision/business/service/impl/PlanTaskServiceImpl.java
+17
-1
dbTemplate_plan_task.xml
...ion/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+3
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/common/enums/PlanStatusEnum.java
View file @
44cadb63
...
@@ -14,7 +14,9 @@ public enum PlanStatusEnum {
...
@@ -14,7 +14,9 @@ public enum PlanStatusEnum {
EXAMINE_FORMULATE
(
"已审核/检查内容未制定"
,
4
,
5
),
EXAMINE_FORMULATE
(
"已审核/检查内容未制定"
,
4
,
5
),
EXAMINE_DEVELOPED
(
"检查内容已制定/未执行"
,
5
,
6
),
EXAMINE_DEVELOPED
(
"检查内容已制定/未执行"
,
5
,
6
),
IN_EXECUTION
(
"执行中"
,
6
,
7
),
IN_EXECUTION
(
"执行中"
,
6
,
7
),
COMPLETED
(
"已完成"
,
7
,
7
);
COMPLETED
(
"已完成"
,
7
,
7
),
OUT_TIME
(
"已超时"
,
8
,
8
);
/**
/**
* 名称
* 名称
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanTaskServiceImpl.java
View file @
44cadb63
...
@@ -396,7 +396,23 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -396,7 +396,23 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
}
// 计划已过期,则更新status = 7,已完成
// 计划已过期,则更新status = 7,已完成
if
(!
vo
.
getIsGenData
())
{
if
(!
vo
.
getIsGenData
())
{
paramMap
.
put
(
"status"
,
PlanStatusEnum
.
COMPLETED
.
getValue
());
int
num
=
0
;
//根据计划id查询关联的任务
List
<
PlanTask
>
planTaskByRouteId
=
planTaskMapper
.
getPlanTaskByRouteId
(
plan
.
getId
());
if
(!
ValidationUtil
.
isEmpty
(
planTaskByRouteId
)){
HashMap
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
param
.
put
(
"pointId"
,
plan
.
getId
());
//根据任务id查询关联的任务是否存在未完成的 如果存在 则修改状态为已超时
List
<
Map
<
String
,
Object
>>
planTaskPoints
=
planTaskMapper
.
getPlanTaskPoints
(
param
);
if
(!
ValidationUtil
.
isEmpty
(
planTaskPoints
)){
num
=
(
int
)
planTaskPoints
.
stream
().
filter
(
c
->
c
.
containsKey
(
"finish"
)
&&
!
String
.
valueOf
(
c
.
get
(
"finish"
)).
equals
(
"2"
)).
count
();
}
if
(
num
>=
1
){
paramMap
.
put
(
"status"
,
PlanStatusEnum
.
OUT_TIME
.
getValue
());
}
else
{
paramMap
.
put
(
"status"
,
PlanStatusEnum
.
COMPLETED
.
getValue
());
}
}
planMapper
.
updPlanStatusOrGenDate
(
paramMap
);
planMapper
.
updPlanStatusOrGenDate
(
paramMap
);
continue
;
continue
;
}
}
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
44cadb63
...
@@ -398,7 +398,9 @@
...
@@ -398,7 +398,9 @@
<if
test=
"taskType != null and taskType != ''"
>
and ppn.check_type_id = #{taskType}
</if>
<if
test=
"taskType != null and taskType != ''"
>
and ppn.check_type_id = #{taskType}
</if>
<if
test=
"planTaskId != null and planTaskId > 0 "
>
and ptd.task_no = #{planTaskId}
</if>
<if
test=
"planTaskId != null and planTaskId > 0 "
>
and ptd.task_no = #{planTaskId}
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
limit #{offset},#{pageSize}
<if
test=
"offset != null and pageSize != null"
>
limit #{offset},#{pageSize}
</if>
</select>
</select>
<select
id=
"getPlanTaskPointsCount"
resultType=
"long"
>
<select
id=
"getPlanTaskPointsCount"
resultType=
"long"
>
...
...
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