33 lines
924 B
Python
33 lines
924 B
Python
# -*- coding: utf-8 -*-
|
||
"""
|
||
@Module: hrbp.oa.leave.validator
|
||
@FileName: validator.py
|
||
@Author: 小布丁
|
||
@CreateTime: 2026-08-05 17:11
|
||
@Description: 请假流程校验模块(审批规则:驳回/人工复核/通过)
|
||
@Version: 1.1.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": "请假校验规则待补充",
|
||
}
|