check_attachment_requirement
Determines whether an attachment is required for a leave type and duration, returning the next action: upload, submit, or reject with a message.
Instructions
根据请假类型检查附件要求。
7 类请假类型的附件规则:
病假:诊断证明或病假条
产假:产检证明
工伤假:工伤证明
婚假:结婚证
丧假:死亡证明,且时长 ≤ 3 天(超出则拒绝)
流产假:诊断证明或病假条
年休假/调休假:无需附件
如果用户已上传附件(has_attachment=true),则 action=submit; 否则需上传时 action=upload。
Args: leave_type: 请假类型名称(如 "病假"、"婚假")。 leave_days: 实际休假天数(字符串,来自 calculate_leave_days)。 has_attachment: 用户是否已上传附件。
Returns: AttachmentCheckResult: 包含 action(upload/submit/reject)和提示信息。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| leave_days | Yes | ||
| leave_type | Yes | ||
| has_attachment | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | 下一步动作:upload(需上传附件)、submit(直接提交)、reject(拒绝,如丧假超3天) | |
| message | No | 执行结果描述 | |
| attachment_message | No | 附件上传提示信息(需上传时返回) | |
| attachment_required | Yes | 该请假类型是否需要附件 |