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
68873b35
Commit
68873b35
authored
Sep 15, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
巡检BUG
parent
a128e36c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
patrol-sql-task.xml
...atrol/src/main/resources/db/changelog/patrol-sql-task.xml
+6
-5
No files found.
amos-boot-system-patrol/src/main/resources/db/changelog/patrol-sql-task.xml
View file @
68873b35
...
@@ -474,21 +474,22 @@
...
@@ -474,21 +474,22 @@
DROP PROCEDURE IF EXISTS `updatePlanTask`;
DROP PROCEDURE IF EXISTS `updatePlanTask`;
</createProcedure>
</createProcedure>
</changeSet>
</changeSet>
<changeSet
author=
"gaodongdong"
id=
"1610421278000-21-230
419
"
runAlways=
"true"
>
<changeSet
author=
"gaodongdong"
id=
"1610421278000-21-230
915
"
runAlways=
"true"
>
<createProcedure
procedureName=
"updatePlanTask"
>
<createProcedure
procedureName=
"updatePlanTask"
>
CREATE PROCEDURE `updatePlanTask`(IN `planTaskId` BIGINT,IN `pointId` BIGINT,IN `planTaskDetailId` BIGINT,IN `executorId` BIGINT)
CREATE
DEFINER=`root`@`%`
PROCEDURE `updatePlanTask`(IN `planTaskId` BIGINT,IN `pointId` BIGINT,IN `planTaskDetailId` BIGINT,IN `executorId` BIGINT)
BEGIN
BEGIN
declare num int ;
declare num int ;
declare orgCode VARCHAR(50) ;
declare orgCode VARCHAR(50) ;
declare currentTaskNum int ;
declare currentTaskNum int ;
declare pointNum int ;
update p_plan_task_detail set is_finish = 1 where id=planTaskDetailId;
update p_plan_task_detail set is_finish = 1 where id=planTaskDetailId;
select finish_num, org_code
from p_plan_task where id = planTaskId into num, orgCode
;
select finish_num, org_code
, point_num from p_plan_task where id = planTaskId into num, orgCode, pointNum
;
select count(1) into currentTaskNum from p_plan_task_detail where task_no = planTaskId and is_finish in(0,2);
select count(1) into currentTaskNum from p_plan_task_detail where task_no = planTaskId and is_finish in(0,2);
UPDATE p_plan_task_detail SET executor_id = executorId,executor_date = current_timestamp where id = planTaskDetailId;
UPDATE p_plan_task_detail SET executor_id = executorId,executor_date = current_timestamp where id = planTaskDetailId;
if currentTaskNum > 0 THEN
if currentTaskNum > 0 THEN
update p_plan_task set finish_num = (num + 1) where id = planTaskId;
update p_plan_task set finish_num = (num + 1) where id = planTaskId
and pointNum > num
;
ELSE
ELSE
update p_plan_task set finish_num = (num + 1), finish_status = 2 where id = planTaskId;
update p_plan_task set finish_num = (num + 1), finish_status = 2 where id = planTaskId
and pointNum > num
;
end if;
end if;
if executorId > 0 then
if executorId > 0 then
call planTaskStatistics(executorId, null, orgCode);
call planTaskStatistics(executorId, null, orgCode);
...
...
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