Skip to content

Time and Attendance — Business Rules

Tổng quan

Domain này gom các cấu hình cho:

  • work shift,
  • shift group,
  • holiday,
  • annual leave,
  • shift page,
  • approver cho các request liên quan thời gian/chấm công.

Điểm quan trọng nhất là persistence đang bị chia làm hai kiểu:

  • bảng HRM chuẩn hóa cho work shift, shift group, holiday, request_approver,
  • singleton app_setting cho annual leaveshift page.

Nhóm nghiệp vụ

NhómVai trò
Work shiftĐịnh nghĩa khung ca làm việc
Shift groupGom ca + user assignment rule
HolidayDanh sách ngày nghỉ và cờ payroll liên quan
Annual leaveGlobal config cho request nghỉ phép
Shift pageGlobal config cho working page money
ApproverMa trận người duyệt cho leave/overtime/remote/change shift/clocking

Quy tắc nghiệp vụ

Quy tắc
BR-TA-001work shift, shift group, holiday và phần lớn approver thuộc HRM/timekeeping config, không phải app-setting singleton.
BR-TA-002annual leaveshift page lại được lưu trong app_setting.app_settings, nên cùng subdomain nhưng khác persistence model.
BR-TA-003request_approver dùng scope branch_id hoặc department_id, và còn phục vụ nhiều domain khác ngoài time-attendance.
BR-TA-004shift group là config assignment layer; runtime schedule/user apply nằm downstream ở HRM/timekeeping.
BR-TA-005Holiday config ảnh hưởng trực tiếp sang engine timekeeping qua data materialized ở bảng chấm công.

Boundary

BoundaryGhi chú
timekeepingDownstream consumer của holiday, shift, approver
hrmOwner chính của phần dữ liệu normalized
settings/app_settingOwner của annual leave và shift page

Rủi ro / Findings

MứcFinding
P1Cùng một subdomain nhưng persistence model bị tách đôi giữa HRM table và singleton JSON config.
P1Permission route-level và action-level đang lệch nhau ở work shift / holiday.
P1request_approver đang có drift schema giữa HRM metadata và ecommerce metadata.
P2ApproverPage gom cả time-attendance approver với non-timekeeping approver trong cùng shell/tab ordering.