符合性流程-历史数据迁移,sql、接口。

This commit is contained in:
wangzhijiang
2023-04-11 18:29:27 +08:00
parent 7a8b251b41
commit 68eb777be8
4 changed files with 590 additions and 8 deletions
@@ -506,3 +506,88 @@ WHERE
`id` IN (SELECT temp.id FROM (SELECT id FROM project_laws_inventory WHERE verify_flow_status IS NULL ) temp);
-- *********************************************** 法规相关历史数据处理sql *********************************************************
-- 以下sql需要按照顺序执行,否则会出问题。 2023-04-11 未同步生产环境
-- 处理 法规清单确认 待确认状态的数据sql
UPDATE `project_laws_inventory` SET
`design_flow_status` = 'List to be checked',
`verify_flow_status` = 'List to be checked'
where id in (
SELECT temp.id FROM (
SELECT
id
FROM
project_laws_inventory
WHERE inventory_affirm_status = 'List to confirm'
) temp
);
-- 处理待办中心-流程历史,之前的符合性流程数据sql。
-- 1.将之前符合性流程的 发起人审核节点, 处理结果为 符合、不涉及的数据,更新为通过(现在法规工程师审核的时候 处理结果是通过)
update process_history set
operator_result = 'Adopt'
where id in (
SELECT temp.id FROM (
select
id
from
process_history
where task_definition_key = 'fqrsh' and operator_result in ('Compliance','NA')
) temp
);
-- 2.将之前符合性流程的 发起人审核节点,修改为 法规工程师审核节点
update process_history set
task_definition_key = 'fggcssh'
where id in (
SELECT temp.id FROM (
select
id
from
process_history
where task_definition_key = 'fqrsh'
) temp
);
-- 3.将之前符合性流程的 责任人处理任务 节点,修改为 符合性确认节点
update process_history set
task_definition_key = 'zrrtjjfw'
where id in (
SELECT temp.id FROM (
select
id
from
process_history
where task_definition_key = 'zrrclrw'
) temp
);
-- 处理待办中心-流程节点明细,之前的符合性流程节点任务节点keysql
-- 1.将之前符合性流程的 发起人审核节点,修改为 法规工程师审核节点
update process_info_detail set
task_definition_key = 'fggcssh'
where id in (
SELECT temp.id FROM (
select
id
from
process_info_detail
where task_definition_key = 'fqrsh' and `status` = 'haveDone'
) temp
);
-- 2.将之前符合性流程的 责任人处理任务 节点,修改为 符合性确认节点
update process_info_detail set
task_definition_key = 'zrrtjjfw'
where id in (
SELECT temp.id FROM (
select
id
from
process_info_detail
where task_definition_key = 'zrrclrw' and `status` = 'haveDone'
) temp
);