- 3表: tk_tickets(状态机+受理角色/人+agent锁)/tk_messages(客户可见/内部备注)/tk_transfers(append-only流水) - core.py: 8态13迁移状态机全乐观锁; 转派候选动态查owner角色+'0'机构用户(不硬编码); 默认受理角色params可配(ticket_default_role=owner.maintainer) - agent.py: 异步poller(bid_flow范式), RAG检索'0'机构KB+历史工单, llm_call(org_id=0) LLM裁决能否回答(严格JSON), 硬门禁reply<20字符转人工, 故障≠答不了(fail_rounds>=3转人工), stale回收10min; 追问回流(agent_processing+owner空)立即拾取不等stale - todos.py: 平台待办provider, 状态派生(客户待确认/角色池待认领/受理人待处理) - init.py: load_ticket注册env+provider+poller(PIPELINE_MODE=web不启动) - wwwroot: 客户我的工单页+建单表单, 运维工单管理页(队列切换), 详情弹窗(正文与操作同屏,按视角出按钮) - load_path.py: logined全部API(业务权限服务端按current_role动态校验)+管理页壳owner三角色 - init/data.json: 7组码表+owner.maintainer角色种子(app_audit先例)
29 lines
1.3 KiB
JSON
29 lines
1.3 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "tk_transfers",
|
|
"title": "工单转派流水",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{"name": "id", "title": "主键ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "ticket_id", "title": "工单ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "action", "title": "动作", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "from_role", "title": "转出角色", "type": "str", "length": 64},
|
|
{"name": "from_user", "title": "转出人", "type": "str", "length": 32},
|
|
{"name": "to_role", "title": "转入角色", "type": "str", "length": 64},
|
|
{"name": "to_user", "title": "转入人", "type": "str", "length": 32},
|
|
{"name": "reason", "title": "原因", "type": "str", "length": 500},
|
|
{"name": "operator_id", "title": "操作人", "type": "str", "length": 32},
|
|
{"name": "created_at", "title": "创建时间", "type": "timestamp", "nullable": "no"}
|
|
],
|
|
"indexes": [
|
|
{"name": "idx_tkt_ticket", "idxtype": "index", "idxfields": ["ticket_id", "created_at"]}
|
|
],
|
|
"codes": [
|
|
{"field": "action", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='tk_transfer_action'"}
|
|
]
|
|
}
|