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
17e7cde4
Commit
17e7cde4
authored
Oct 20, 2021
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改计划生成
parent
40dff48f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
IPlanDao.java
...in/amos/supervision/business/dao/repository/IPlanDao.java
+2
-2
PlanTaskServiceImpl.java
...upervision/business/service/impl/PlanTaskServiceImpl.java
+4
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IPlanDao.java
View file @
17e7cde4
...
...
@@ -17,8 +17,8 @@ public interface IPlanDao extends BaseDao<Plan, Long> {
@Modifying
@Transactional
@Query
(
value
=
"select * from p_plan WHERE next_gen_date = ?1 and
status = ?2
"
,
nativeQuery
=
true
)
List
<
Plan
>
queryScheduledPlan
(
String
strDate
,
String
status
);
@Query
(
value
=
"select * from p_plan WHERE next_gen_date = ?1 and
(status = ?2 or status = ?3)
"
,
nativeQuery
=
true
)
List
<
Plan
>
queryScheduledPlan
(
String
strDate
,
String
status
,
String
status1
);
@Modifying
@Transactional
...
...
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 @
17e7cde4
...
...
@@ -331,7 +331,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
strDate
=
df
.
format
(
now
);
String
tomorrow
=
DateUtil
.
getIntervalDateStr
(
now
,
1
,
"yyyy-MM-dd"
);
//下一天
List
<
Plan
>
planList
=
iplanDao
.
queryScheduledPlan
(
strDate
,
String
.
valueOf
(
PlanStatusEnum
.
EXAMINE_DEVELOPED
.
getValue
()));
// 根据计划状态5,6和next_gen_date查询需要生成任务的计划
List
<
Plan
>
planList
=
iplanDao
.
queryScheduledPlan
(
strDate
,
String
.
valueOf
(
PlanStatusEnum
.
EXAMINE_DEVELOPED
.
getValue
()),
String
.
valueOf
(
PlanStatusEnum
.
IN_EXECUTION
.
getValue
()));
if
(
planList
==
null
||
planList
.
size
()
<=
0
)
{
log
.
info
(
strDate
+
" "
+
" 暂无待生成执行数据的计划"
);
return
;
...
...
@@ -359,9 +360,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
planMapper
.
updPlanStatusOrGenDate
(
paramMap
);
//更新为明天
continue
;
}
//计划已过期,则更新status =
1,停用
//计划已过期,则更新status =
7,已完成
if
(!
vo
.
getIsGenData
())
{
paramMap
.
put
(
"status"
,
XJConstant
.
PLAN_STATUS_STOP
);
paramMap
.
put
(
"status"
,
PlanStatusEnum
.
COMPLETED
.
getValue
()
);
planMapper
.
updPlanStatusOrGenDate
(
paramMap
);
continue
;
}
...
...
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