init.sql 923 B

12345678910111213141516171819
  1. -- 更新icss_template_info的doctor_id
  2. update `sys-icss`.icss_template_info set doctor_id = CONCAT('-',doctor_id)
  3. where doctor_id in
  4. (SELECT id FROM `sys-tran`.`tran_doctor_info` where hospital_code = 'LT');
  5. -- 更新icss_template_info的hospital_id
  6. update `sys-icss`.icss_template_info set hospital_id = CONCAT('-',hospital_id)
  7. where hospital_id in
  8. (SELECT id FROM `sys-tran`.`tran_hospital_info` where code = 'LT');
  9. -- 更新icss_template_info的hospital_dept_id
  10. update `sys-icss`.icss_template_info set hospital_dept_id = CONCAT('-',hospital_dept_id)
  11. where hospital_dept_id in
  12. (SELECT id FROM `sys-tran`.`tran_hospital_dept` where hospital_code = 'LT');
  13. update `sys-tran`.`tran_doctor_info` set id=CONCAT('-',id) where hospital_code = 'LT';
  14. update `sys-tran`.`tran_hospital_info` set id=CONCAT('-',id) where code = 'LT';
  15. update `sys-tran`.`tran_hospital_dept` set id=CONCAT('-',id) where hospital_code = 'LT';