import requests import json import time from datetime import datetime BASE_URL = "http://localhost:7891/api" print("="*80) print(" 🎯 创建新任务测试(映射关系已修正)") print("="*80) # 创建任务 task_title = "最终测试:太子(庞统)→ 中书省(司马懿)→ 门下省 → 尚书省 → 户部(赵云)" print(f"\n[1] 创建任务: {task_title}") r = requests.post( f"{BASE_URL}/create-task", json={ 'title': task_title, 'org': '户部', 'official': '赵云', 'priority': 'high', 'targetDept': '户部' } ) result = r.json() print(f" 创建结果: {json.dumps(result, ensure_ascii=False, indent=2)}") if not result.get('ok'): print("\n ❌ 任务创建失败!") else: task_id = result.get('taskId') print(f"\n ✅ 任务创建成功!任务ID: {task_id}") print(f"\n 📋 现在开始监控任务流转...") print(f" (我只监控,不干预)") print(f"\n 提示: 你可以访问看板 http://192.168.2.153:7891 实时查看")