${script} update wf_run_task set is_delete = 1 ,update_date = CURRENT_TIMESTAMP where is_delete = 0 and flow_code = #{wfIdCodes} and biz_Id = #{bizId} ; update wf_run_instance set is_delete = 1 ,update_date = CURRENT_TIMESTAMP where is_delete = 0 and flow_code = #{wfIdCodes} and biz_Id = #{bizId} update wf_run_task set status=CASE WHEN receive_id = #{userId} THEN #{status} ELSE #{status}+1 end ,status2 = 0 ,finish_time = NOW() ,finish_time2 = NOW() ,finish_id = #{userId} ,finish_name = #{realName} ,opinion = #{option} ,update_date = CURRENT_TIMESTAMP where is_delete = 0 AND biz_id=#{bizId} and step_id=#{stepId} and status in (0,1) and receive_id in (select user_id from sys_user where dept_ID in (select dept_ID from sys_user where user_id=#{userId})) and receive_id in (select teamgroup from sys_user where user_id =#{userId}) and receive_id = #{userId} and group_id2 in (select role_id from sys_role_user where user_id =#{userId} and is_delete=0) UPDATE wf_run_task SET status2 = ${status} , update_date = CURRENT_TIMESTAMP WHERE is_delete = 0 AND biz_id = #{bizId} AND step_id = #{currentStepId} AND status in (0,1) AND status2 not in (1) UPDATE wf_run_task SET status = ${status} , update_date = CURRENT_TIMESTAMP WHERE is_delete = 0 AND biz_id = #{bizId} AND receive_id = #{receiveId} AND status in (0,1) UPDATE wf_run_task a, sys_user b SET a.status = ${status} , a.update_date = CURRENT_TIMESTAMP WHERE a.is_delete = 0 AND a.biz_id = #{bizId} AND a.receive_id = b.id and b.dept_id = #{receiveDeptId} AND a.status in (0,1) UPDATE wf_run_task SET status2 = ${status} , update_date = CURRENT_TIMESTAMP WHERE is_delete = 0 AND biz_id = #{bizId} AND step_id IN ( SELECT id FROM ( SELECT id FROM wf_def_step WHERE is_delete = 0 AND wf_def_id IN ( SELECT wf_def_id FROM wf_def_step WHERE id = #{currentStepId} ) AND step_no > ( SELECT step_no FROM wf_def_step WHERE id = #{currentStepId} ) ) cc ) UPDATE wf_run_task SET status = 0 , update_date = CURRENT_TIMESTAMP WHERE is_delete = 0 AND id = #{taskId} and (CONCAT('', flow_id) = #{wfIdCode} or flow_code = #{wfIdCode}); UPDATE wf_run_task SET is_delete = 1 , update_date = CURRENT_TIMESTAMP WHERE is_delete = 0 AND prev_id = #{taskId} update `wf_run_task` set is_delete =1,update_date = CURRENT_TIMESTAMP where step_marker in ('yxsc_bb', 'sgqd_bb', 'plan_tybx') and status in (0, 1) and receive_id in (select user_id from sys_user where dept_id = #{oldShipTeam}) and is_delete = 0 update `wf_run_task` set status = 150,update_date = CURRENT_TIMESTAMP where flow_code = #{wfIdCode} and biz_id = #{bizId} and is_delete = 0 delete from wf_run_task where flow_code = #{wfIdCode} and step_marker = #{stepIdMark} and biz_id = #{bizId}