信息化3.x,删除已停用的包保履职计划

问题现象:停用的包保履职计划不能删除

解决方法:数据库删除数据
1、获取需要删除的履职计划的编号找到对应的id

2、连接mysql数据库,参考:http://svn.seekcy.com:33382/676
3、双击创建的数据库连接打开数据库

4、数据表备份(切记!!!切记!!!切记!!!)

方式一、双击进入tiji_risk_prevention数据库找到mh_performance_plan,mh_performance_task,mh_performance_task_item,mh_performance_plan_item,这4个数据表和双击tiji_master_data数据库找到md_qr_business_record这个数据表进行备份
方式二、直接备份tiji_risk_prevention和tiji_master_data这两个数据库(图中只是示例方法)

5、点击新建查询,将下列语句复制到窗口中(语句中的括号内的内容更换成第1步查到的id)

  1. update tiji_risk_prevention.mh_performance_plan set is_deleted = id, update_time = now(), update_user_name = '手动删除' where id in (履职计划id,多个时使用英文标点','隔开);
  2. update tiji_risk_prevention.mh_performance_task set is_deleted = id, update_time = now(), update_user_name = '手动删除' where tiji_risk_prevention.mh_performance_task.plan_id in (履职计划id,多个时使用英文标点','隔开);
  3. update tiji_risk_prevention.mh_performance_task_item set is_deleted = id, update_time = now(), update_user_name = '手动删除' where tiji_risk_prevention.mh_performance_task_item.task_id in (select id from tiji_risk_prevention.mh_performance_task where plan_id in (履职计划id,多个时使用英文标点','隔开));
  4. update tiji_risk_prevention.mh_performance_plan_item set is_deleted = id, update_time = now(), update_user_name = '手动删除' where tiji_risk_prevention.mh_performance_plan_item.plan_id in (履职计划id,多个时使用英文标点','隔开);
  5. update tiji_master_data.md_qr_business_record set is_deleted = id, update_time = now(), update_user_name = '手动删除' where tiji_master_data.md_qr_business_record.business_id in (履职计划id,多个时使用英文标点','隔开) and tiji_master_data.md_qr_business_record.business_type = 3 and tiji_master_data.md_qr_business_record.function_type = 1;

编写人:产品技术保障组–乔斌

转载请注明作者和出处,并添加本页链接。
原文链接: //svn.seekcy.com:33382/766