v1.0.1: 合同到期智能预警与续聘辅助 - 初版骨架
基于匠厂 skill-template 主仓 v1.0.108 派生的业务技能。 核心业务: - 每日凌晨定时扫描全校教职工合同电子台账 - 距到期日 90 / 60 / 30 天分级预警(黄 / 橙 / 红) - 自动生成个人版《续聘准备任务书》与单位版《本月到期人员清单》 - 30 天红色预警自动抄送分管校领导 输出形态: - 个人版 HTML 任务书 + 单位版 PDF 清单 + 三级预警通知 预期提效:因合同逾期未续签导致的劳动纠纷降为 0;人事处年终集中突击签合同的工作量减少 60%。 业务行生命周期:可续聘 → 预警中(黄 / 橙 / 红)→ 已续签 / 已驳回 / 已过期 Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
1
scripts/cli/__init__.py
Normal file
1
scripts/cli/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""scripts.cli - CLI 参数解析层(占位)"""
|
||||
8
scripts/db/__init__.py
Normal file
8
scripts/db/__init__.py
Normal file
@@ -0,0 +1,8 @@
|
||||
"""scripts.db - 数据库访问层(占位)
|
||||
|
||||
按 references/SCHEMA.md 实现表与字段:
|
||||
- 制度送审稿
|
||||
- 冲突条款清单
|
||||
- 制度库索引
|
||||
- 审查任务日志
|
||||
"""
|
||||
91
scripts/main.py
Normal file
91
scripts/main.py
Normal file
@@ -0,0 +1,91 @@
|
||||
#!/usr/bin/env python3
|
||||
"""合同到期智能预警与续聘辅助 - CLI 入口(占位骨架)"""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# 占位:开发者后续接入 jiangchang_skill_core
|
||||
# from jiangchang_skill_core import ...
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
def health():
|
||||
"""运行检查(占位)。"""
|
||||
print(f"alert-contract-expiring-hr health check (placeholder)")
|
||||
print(f"base_dir: {BASE_DIR}")
|
||||
return 0
|
||||
|
||||
|
||||
def version():
|
||||
"""查看版本(占位)。"""
|
||||
print("alert-contract-expiring-hr v1.0.1")
|
||||
return 0
|
||||
|
||||
|
||||
def config_path():
|
||||
"""查看配置位置(占位)。"""
|
||||
print(f"{BASE_DIR / '.env'}")
|
||||
return 0
|
||||
|
||||
|
||||
def init_db():
|
||||
"""初始化数据库(占位)。"""
|
||||
print("init-db: 后续由开发者按 references/SCHEMA.md 实现")
|
||||
return 0
|
||||
|
||||
|
||||
def scan_expiring_contracts(thresholds: str = "90,60,30"):
|
||||
"""扫描即将到期合同(async)。"""
|
||||
print(f"scan-expiring-contracts: thresholds={thresholds} (待开发者实现)")
|
||||
return 0
|
||||
|
||||
|
||||
def generate_renewal_task(contract_id: str):
|
||||
"""生成续聘任务书。"""
|
||||
print(f"generate-renewal-task: contract_id={contract_id} (待开发者实现)")
|
||||
return 0
|
||||
|
||||
|
||||
def dispatch_task_notice(unit_id: str = "", month: str = ""):
|
||||
"""下发续聘任务通知单。"""
|
||||
print(f"dispatch-task-notice: unit_id={unit_id} month={month} (待开发者实现)")
|
||||
return 0
|
||||
|
||||
|
||||
def mark_contract_renewed(contract_id: str, material_id: str):
|
||||
"""标记合同已续签。"""
|
||||
print(f"mark-contract-renewed: contract_id={contract_id} material_id={material_id} (待开发者实现)")
|
||||
return 0
|
||||
|
||||
|
||||
def render_html(task_id: str):
|
||||
"""在浏览器中打开续聘任务书。"""
|
||||
print(f"render-html: task_id={task_id} (待开发者实现)")
|
||||
return 0
|
||||
|
||||
|
||||
COMMANDS = {
|
||||
"health": health,
|
||||
"version": version,
|
||||
"config-path": config_path,
|
||||
"init-db": init_db,
|
||||
"scan-expiring-contracts": scan_expiring_contracts,
|
||||
"generate-renewal-task": generate_renewal_task,
|
||||
"dispatch-task-notice": dispatch_task_notice,
|
||||
"mark-contract-renewed": mark_contract_renewed,
|
||||
"render-html": render_html,
|
||||
}
|
||||
|
||||
|
||||
def main(argv=None):
|
||||
argv = argv or sys.argv[1:]
|
||||
if not argv or argv[0] not in COMMANDS:
|
||||
print("Usage: python scripts/main.py <command>")
|
||||
print("Commands:", ", ".join(COMMANDS.keys()))
|
||||
return 1
|
||||
return COMMANDS[argv[0]](*argv[1:])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
9
scripts/service/__init__.py
Normal file
9
scripts/service/__init__.py
Normal file
@@ -0,0 +1,9 @@
|
||||
"""scripts.service - 业务核心逻辑层(占位)
|
||||
|
||||
按 development/REQUIREMENTS.md §3 开发目标实现:
|
||||
- 条款解析与向量化
|
||||
- 制度库语义比对
|
||||
- 程序合规体检
|
||||
- 重复发文检测
|
||||
- 报告生成与批注回写
|
||||
"""
|
||||
1
scripts/util/__init__.py
Normal file
1
scripts/util/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
"""scripts.util - 工具函数层(占位)"""
|
||||
Reference in New Issue
Block a user