YZProjectCloud/docsql/2026/04/多考勤系统.md

17 lines
432 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 1.给attendance_cfg表中增加is_default int 1-默认0-非默认
更新历史数据
UPDATE attendance_cfg set is_default=1
更新历史数据
UPDATE pro_mobile_attendance_data pmad
INNER JOIN (
SELECT ac.project_id, ac.id AS cfg_id
FROM attendance_cfg ac
WHERE ac.is_default = 1 AND ac.enabled = 1
) ac ON pmad.project_id = ac.project_id
SET pmad.cfg_id = ac.cfg_id
WHERE pmad.att_device = 'device' AND pmad.cfg_id = 0;