1.设置为休息日SQL
INSERT INTO backyard
.hr_staff_work_days
(staff_info_id
, month
, date_at
, operator
, remark
, created_at
, updated_at
) VALUES (22504, ‘2019-11’, ‘2019-11-16’, 10000, ‘’, ‘2019-11-15 08:26:30’, ‘2019-11-15 08:26:30’);
2.打卡时间sql缺勤
INSERT INTO backyard
.staff_work_attendance
(id
, staff_info_id
, organization_id
, organization_type
, attendance_date
, shift_start
, shift_end
, working_day
, started_at
, started_state
, started_staff_lat
, started_staff_lng
, started_store_id
, started_store_lng
, started_store_lat
, started_clientid
, started_clientid_num
, started_equipment_type
, started_os
, started_path
, started_bucket
, started_remark
, end_at
, end_state
, end_staff_lat
, end_staff_lng
, end_store_id
, end_store_lng
, end_store_lat
, end_clientid
, end_clientid_num
, end_equipment_type
, end_os
, end_path
, end_bucket
, end_remark
, created_at
, updated_at
) VALUES (1439391, 22504, ‘TH01010101’, 1, ‘2019-11-15’, NULL, NULL, 0, ‘2019-11-15 08:31:15.909’, 1, 40.03013680, 116.41032670, ‘TH01010101’, 116.41037800, 40.03036699, ‘862122049073801460078013055338’, 1, ‘3’, ‘android’, ‘workAttendanceSource/1573806618-b3537b8829bb49949375b93a1ced1d5f.jpg’, ‘fle-staging-asset-internal’, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ‘2019-11-15 08:31:15.913’, ‘2019-11-15 08:31:15.913’);
3全勤SQL
INSERT INTO backyard
.staff_work_attendance
(id
, staff_info_id
, organization_id
, organization_type
, attendance_date
, shift_start
, shift_end
, working_day
, started_at
, started_state
, started_staff_lat
, started_staff_lng
, started_store_id
, started_store_lng
, started_store_lat
, started_clientid
, started_clientid_num
, started_equipment_type
, started_os
, started_path
, started_bucket
, started_remark
, end_at
, end_state
, end_staff_lat
, end_staff_lng
, end_store_id
, end_store_lng
, end_store_lat
, end_clientid
, end_clientid_num
, end_equipment_type
, end_os
, end_path
, end_bucket
, end_remark
, created_at
, updated_at
) VALUES (1439391, 22504, ‘TH01010101’, 1, ‘2019-11-15’, NULL, NULL, 0, ‘2019-11-15 08:31:15.909’, 1, 40.03013680, 116.41032670, ‘TH01010101’, 116.41037800, 40.03036699, ‘862122049073801460078013055338’, 1, ‘3’, ‘android’, ‘workAttendanceSource/1573806618-b3537b8829bb49949375b93a1ced1d5f.jpg’, ‘fle-staging-asset-internal’, NULL, ‘2019-11-15 12:31:15.909’, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ‘2019-11-15 08:31:15.913’, ‘2019-11-15 08:32:52.845’);
#staff_work_attendance 员工打卡记录表在backyard中
#staff_info_id 员工信息id表在backyard中
就可以查询员工id为22344的打卡信息
*使用设置为休息日的SQl语句可以修改员工ID和当月月份、当月具体日期,就可以不用查看员工的打卡信息了(相当于在数据库中手工造员工的考勤数据)
要在backyard客户端上操作如下
最后运行脚本成功打印出的日志如下