完成员工亲属实体关联改造并清理旧数据

This commit is contained in:
wkc
2026-04-24 08:55:05 +08:00
parent b7d020c0b2
commit b7db711906
25 changed files with 1298 additions and 219 deletions

View File

@@ -0,0 +1,10 @@
-- 清理员工实体关系历史旧数据
-- 说明删除当前无法匹配任何员工亲属关系is_emp_family = 1的旧实体关联记录
-- 执行方式bin/mysql_utf8_exec.sh sql/migration/2026-04-23-clean-legacy-staff-enterprise-relation-data.sql
DELETE ser
FROM ccdi_staff_enterprise_relation ser
LEFT JOIN ccdi_staff_fmy_relation sfr
ON ser.person_id = sfr.relation_cert_no
AND sfr.is_emp_family = 1
WHERE sfr.id IS NULL;