Files
37duAutomation/app/service/hrbp/oa/work_overtime/validator.py
T

33 lines
941 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
"""
@Module: hrbp.oa.work_overtime.validator
@FileName: validator.py
@Author: 小布丁
@CreateTime: 2026-08-05 21:35
@Description: 加班流程校验模块(审批规则:驳回/人工复核/通过)
@Version: 1.0.0
"""
from typing import Any, Dict
def validate_doc(doc: Dict[str, Any]) -> Dict[str, Any]:
"""
校验单张加班单据,返回审批决策。
TODO: 加班审批规则在此实现(与请假规则不同,依据加班时长、时段等判定通过/驳回/人工复核)。
Args:
doc: 单据信息(title/creator/time/detail_url)
Returns:
校验结果,包含审批决策
"""
return {
"title": doc.get("title", ""),
"creator": doc.get("creator", ""),
"time": doc.get("time", ""),
"decision": "pending", # pending: 规则未实现,默认待处理
"note": "加班校验规则待补充",
}