-- 外勤规则初始数据（可按环境重复执行：已存在则跳过）

INSERT INTO `lq_attendance_field_work_rule` (
  `F_Id`, `F_RuleName`, `F_WorkStartTime`, `F_WorkEndTime`, `F_IsEnabled`, `F_Remark`,
  `F_SortCode`, `F_CreateTime`, `F_DeleteMark`, `F_VersionNo`, `F_LastModifyTime`
)
SELECT '1980080509000000001', '总部外勤', '09:00', '18:00', 1, '初始数据：总部外勤标准',
       1, NOW(), 0, 1, NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_attendance_field_work_rule` WHERE `F_Id` = '1980080509000000001'
);

INSERT INTO `lq_attendance_field_work_rule` (
  `F_Id`, `F_RuleName`, `F_WorkStartTime`, `F_WorkEndTime`, `F_IsEnabled`, `F_Remark`,
  `F_SortCode`, `F_CreateTime`, `F_DeleteMark`, `F_VersionNo`, `F_LastModifyTime`
)
SELECT '1980080509300000002', '事业外勤', '09:30', '19:00', 1, '初始数据：事业外勤标准',
       2, NOW(), 0, 1, NOW()
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM `lq_attendance_field_work_rule` WHERE `F_Id` = '1980080509300000002'
);
