员工异步导入

This commit is contained in:
wkc
2026-02-06 11:19:40 +08:00
parent 61e8d45212
commit 3d4a42b9fb
10 changed files with 357 additions and 406 deletions

View File

@@ -44,7 +44,7 @@
ORDER BY e.create_time DESC
</select>
<!-- 批量插入或更新员工信息 -->
<!-- 批量插入或更新员工信息只更新非null字段 -->
<insert id="insertOrUpdateBatch" parameterType="java.util.List">
INSERT INTO ccdi_employee
(employee_id, name, dept_id, id_card, phone, hire_date, status,
@@ -56,13 +56,12 @@
#{item.createBy}, #{item.updateBy}, NOW())
</foreach>
ON DUPLICATE KEY UPDATE
name = VALUES(name),
dept_id = VALUES(dept_id),
id_card = VALUES(id_card),
phone = VALUES(phone),
hire_date = VALUES(hire_date),
status = VALUES(status),
update_by = VALUES(update_by),
name = COALESCE(VALUES(name), name),
dept_id = COALESCE(VALUES(dept_id), dept_id),
phone = COALESCE(VALUES(phone), phone),
hire_date = COALESCE(VALUES(hire_date), hire_date),
status = COALESCE(VALUES(status), status),
update_by = COALESCE(VALUES(update_by), update_by),
update_time = NOW()
</insert>