From 5b96f54d714c72503ee9015e6ad8da12a677f968 Mon Sep 17 00:00:00 2001 From: JiaoTianBo Date: Wed, 1 Apr 2026 16:03:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(ai-chat):=20=E9=87=8D=E6=9E=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=80=89=E6=8B=A9=E9=80=BB=E8=BE=91=E5=B9=B6=E5=90=88?= =?UTF-8?q?=E5=B9=B6OpenAPI=E5=AE=9A=E4=B9=89=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将项目选择面板改为下拉选择器,简化UI交互 - 新增 `setDraftByProjectId` 和 `applyProjectSelection` 函数统一处理项目切换 - 删除分散的OpenAPI JSON文件,合并为统一的日报分析查询接口定义 - 在 `project.ts` 中添加 `getDailyReportWithAnalysisReports` API及相关类型定义 - 修复ChatGPT组件样式空格格式问题 --- src/api/AI知识库.openapi.json | 184 --- src/api/project.ts | 96 ++ src/api/日报分析建议.openapi.json | 295 ---- src/api/日报和分析查询.openapi.json | 547 ++++++++ src/api/资源模块.openapi.json | 917 ------------- src/api/项目sse.openapi.json | 606 --------- src/api/项目管理.openapi.json | 396 ------ src/api/项目详情.openapi.json | 594 -------- src/api/风险与工单.openapi.json | 1657 ----------------------- src/api/默认模块.openapi.json | 1467 -------------------- src/views/ai-chat/index.vue | 163 ++- src/views/chatai/components/ChatGPT.vue | 2 +- src/views/project/detail.vue | 466 ++++++- 13 files changed, 1187 insertions(+), 6203 deletions(-) delete mode 100644 src/api/AI知识库.openapi.json delete mode 100644 src/api/日报分析建议.openapi.json create mode 100644 src/api/日报和分析查询.openapi.json delete mode 100644 src/api/资源模块.openapi.json delete mode 100644 src/api/项目sse.openapi.json delete mode 100644 src/api/项目管理.openapi.json delete mode 100644 src/api/项目详情.openapi.json delete mode 100644 src/api/风险与工单.openapi.json delete mode 100644 src/api/默认模块.openapi.json diff --git a/src/api/AI知识库.openapi.json b/src/api/AI知识库.openapi.json deleted file mode 100644 index 45e14b2..0000000 --- a/src/api/AI知识库.openapi.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "默认模块", - "description": "", - "version": "1.0.0" - }, - "tags": [], - "paths": { - "/api/v1/ai/kb/document/{docId}/chunks": { - "get": { - "summary": "获取文档分片列表", - "deprecated": false, - "description": "获取文档分片列表\n获取文档分片列表\n获取指定文档的所有分片信息", - "tags": [], - "parameters": [ - { - "name": "docId", - "in": "path", - "description": "文档UUID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseListDocumentChunkVO", - "description": "分片列表" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/ai/kb/chunk/{chunkId}": { - "get": { - "summary": "获取分片详情", - "deprecated": false, - "description": "获取分片详情\n获取分片详情\n获取指定分片的详细信息", - "tags": [], - "parameters": [ - { - "name": "chunkId", - "in": "path", - "description": "分片ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseDocumentChunkVO", - "description": "分片详情" - } - } - } - } - }, - "security": [] - } - } - }, - "components": { - "schemas": { - "DocumentChunkVO": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "分片ID" - }, - "docId": { - "type": "string", - "description": "原始文档ID" - }, - "content": { - "type": "string", - "description": "分片内容" - }, - "chunkIndex": { - "type": "integer", - "description": "分片序号" - }, - "chunkTotal": { - "type": "integer", - "description": "总分片数" - }, - "title": { - "type": "string", - "description": "文档标题" - }, - "docType": { - "type": "string", - "description": "文档类型" - }, - "sourceType": { - "type": "string", - "description": "来源类型" - }, - "status": { - "type": "string", - "description": "状态" - } - } - }, - "BaseResponseListDocumentChunkVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DocumentChunkVO", - "description": "文档分片VO" - }, - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseDocumentChunkVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/DocumentChunkVO", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - } - }, - "responses": {}, - "securitySchemes": {} - }, - "servers": [], - "security": [] -} diff --git a/src/api/project.ts b/src/api/project.ts index 9fce282..1a97119 100644 --- a/src/api/project.ts +++ b/src/api/project.ts @@ -389,6 +389,102 @@ export const applyDailyReportAnalysisSuggestions = ( ); }; +export type MilestoneRisk = { + milestoneId?: string; + milestoneName?: string; + planDate?: string; + riskLevel?: string; + description?: string; + estimatedDelayDays?: number; + suggestion?: string; +}; + +export type ResourceNeed = { + resourceType?: string; + resourceName?: string; + quantity?: number; + unit?: string; + reason?: string; + suggestedArrivalDate?: string; +}; + +export type ProgressSuggestion = { + taskId?: string; + taskName?: string; + suggestionType?: string; + suggestion?: string; + priority?: string; + expectedEffect?: string; +}; + +export type ProgressUpdateRecommendation = { + targetType?: string; + targetId?: string; + suggestedStatus?: string; + suggestedProgress?: number; + reason?: string; + confidence?: number; +}; + +export type IdentifiedRisk = { + riskName?: string; + category?: string; + description?: string; + probability?: number; + impact?: number; + riskLevel?: string; + impactScope?: string; + triggerCondition?: string; + mitigationPlan?: string; + contingencyPlan?: string; + priority?: string; +}; + +export type DailyReportAnalysisResult = { + reportId?: string; + projectId?: string; + projectName?: string; + reportDate?: string; + overallProgressAssessment?: OverallProgressAssessment; + milestoneRisks?: MilestoneRisk[]; + resourceNeeds?: ResourceNeed[]; + progressSuggestions?: ProgressSuggestion[]; + progressUpdateRecommendations?: ProgressUpdateRecommendation[]; + identifiedRisks?: IdentifiedRisk[]; +}; + +export type DailyReportWithAnalysisVO = { + reportId?: string; + projectId?: string; + reportDate?: string; + submitterUsername?: string; + submitterId?: string; + workContent?: string; + tomorrowPlan?: string; + workIntensity?: number; + needHelp?: boolean; + helpContent?: string; + createTime?: string; + analysisId?: string; + analysisStatus?: string; + analysisResult?: DailyReportAnalysisResult; + analysisSuggestions?: DailyReportUpdateSuggestionVO[]; +}; + +export const getDailyReportWithAnalysisReports = (params: { + projectId: string; + reportDate?: string; + pageNum: number; + pageSize: number; + suggestionStatus?: string; +}) => { + return http.request>>( + "get", + "/api/v1/daily-report/analysis/reports", + { params } + ); +}; + // ==================== 项目初始化(复用 system.ts 中的定义) ==================== /** 项目信息 */ diff --git a/src/api/日报分析建议.openapi.json b/src/api/日报分析建议.openapi.json deleted file mode 100644 index a2a719c..0000000 --- a/src/api/日报分析建议.openapi.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "默认模块", - "description": "", - "version": "1.0.0" - }, - "tags": [], - "paths": { - "/api/v1/daily-report/analysis/suggestions": { - "get": { - "summary": "获取日报进度更新建议", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "项目ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "reportId", - "in": "query", - "description": "日报ID", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "reportDate", - "in": "query", - "description": "日报日期", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "submitterUsername", - "in": "query", - "description": "日报提交人用户名", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseDailyReportAnalysisSuggestionsVO" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/daily-report/analysis/suggestions/apply": { - "post": { - "summary": "应用日报进度回写建议", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplyDailyReportSuggestionsRequest", - "description": "建议ID列表" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseInteger", - "description": "应用结果" - } - } - } - } - }, - "security": [] - } - } - }, - "components": { - "schemas": { - "OverallProgressAssessment": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "进度状态:ahead-提前,on_track-正常,delayed-滞后" - }, - "deviationPercentage": { - "type": "number", - "description": "进度偏差百分比 (正数表示提前,负数表示滞后)" - }, - "description": { - "type": "string", - "description": "评估说明" - }, - "keyIssues": { - "type": "array", - "items": { - "type": "string" - }, - "description": "关键问题" - } - } - }, - "DailyReportUpdateSuggestionVO": { - "type": "object", - "properties": { - "suggestionId": { - "type": "integer", - "description": "", - "format": "int64" - }, - "targetType": { - "type": "string", - "description": "" - }, - "targetId": { - "type": "integer", - "description": "", - "format": "int64" - }, - "targetName": { - "type": "string", - "description": "" - }, - "currentStatus": { - "type": "string", - "description": "" - }, - "currentProgress": { - "type": "integer", - "description": "" - }, - "suggestedStatus": { - "type": "string", - "description": "" - }, - "suggestedProgress": { - "type": "integer", - "description": "" - }, - "reason": { - "type": "string", - "description": "" - }, - "confidence": { - "type": "number", - "description": "" - }, - "status": { - "type": "string", - "description": "" - } - } - }, - "DailyReportAnalysisSuggestionsVO": { - "type": "object", - "properties": { - "analysisId": { - "type": "integer", - "description": "", - "format": "int64" - }, - "reportId": { - "type": "integer", - "description": "", - "format": "int64" - }, - "projectId": { - "type": "integer", - "description": "", - "format": "int64" - }, - "reportDate": { - "type": "string", - "description": "" - }, - "overallProgressAssessment": { - "$ref": "#/components/schemas/OverallProgressAssessment", - "description": "" - }, - "suggestions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DailyReportUpdateSuggestionVO", - "description": "cn.yinlihupo.domain.vo.DailyReportUpdateSuggestionVO" - }, - "description": "" - } - } - }, - "BaseResponseDailyReportAnalysisSuggestionsVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/DailyReportAnalysisSuggestionsVO", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseInteger": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "integer", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "ApplyDailyReportSuggestionsRequest": { - "type": "object", - "properties": { - "projectId": { - "type": "integer", - "description": "", - "format": "int64" - }, - "suggestionIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "" - } - }, - "required": ["projectId", "suggestionIds"] - } - }, - "responses": {}, - "securitySchemes": {} - }, - "servers": [], - "security": [] -} diff --git a/src/api/日报和分析查询.openapi.json b/src/api/日报和分析查询.openapi.json new file mode 100644 index 0000000..af9cf55 --- /dev/null +++ b/src/api/日报和分析查询.openapi.json @@ -0,0 +1,547 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "默认模块", + "description": "", + "version": "1.0.0" + }, + "tags": [], + "paths": { + "/api/v1/daily-report/analysis/reports": { + "get": { + "summary": "分页获取项目日报及分析结果", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "projectId", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "reportDate", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pageNum", + "in": "query", + "description": "", + "required": true, + "example": 1, + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "", + "required": true, + "example": 10, + "schema": { + "type": "integer" + } + }, + { + "name": "suggestionStatus", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", + "schema": { + "type": "string", + "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseResponseTableDataInfoDailyReportWithAnalysisVO" + } + } + } + } + }, + "security": [] + } + } + }, + "components": { + "schemas": { + "OverallProgressAssessment": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "进度状态:ahead-提前,on_track-正常,delayed-滞后" + }, + "deviationPercentage": { + "type": "number", + "description": "进度偏差百分比 (正数表示提前,负数表示滞后)" + }, + "description": { + "type": "string", + "description": "评估说明" + }, + "keyIssues": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关键问题" + } + } + }, + "DailyReportUpdateSuggestionVO": { + "type": "object", + "properties": { + "suggestionId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "analysisId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "reportId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "reportDate": { + "type": "string", + "description": "" + }, + "submitterUsername": { + "type": "string", + "description": "" + }, + "targetType": { + "type": "string", + "description": "" + }, + "targetId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "targetName": { + "type": "string", + "description": "" + }, + "currentStatus": { + "type": "string", + "description": "" + }, + "currentProgress": { + "type": "integer", + "description": "" + }, + "suggestedStatus": { + "type": "string", + "description": "" + }, + "suggestedProgress": { + "type": "integer", + "description": "" + }, + "reason": { + "type": "string", + "description": "" + }, + "confidence": { + "type": "number", + "description": "" + }, + "status": { + "type": "string", + "description": "" + } + } + }, + "MilestoneRisk": { + "type": "object", + "properties": { + "milestoneId": { + "type": "integer", + "description": "里程碑 ID", + "format": "int64" + }, + "milestoneName": { + "type": "string", + "description": "里程碑名称" + }, + "planDate": { + "type": "string", + "description": "计划完成日期" + }, + "riskLevel": { + "type": "string", + "description": "风险等级:critical-严重,high-高,medium-中,low-低" + }, + "description": { + "type": "string", + "description": "风险描述" + }, + "estimatedDelayDays": { + "type": "integer", + "description": "延期天数 (预估)" + }, + "suggestion": { + "type": "string", + "description": "建议措施" + } + } + }, + "ResourceNeed": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "description": "资源类型:human-人力,material-物料,equipment-设备,other-其他" + }, + "resourceName": { + "type": "string", + "description": "资源名称" + }, + "quantity": { + "type": "number", + "description": "需求数量" + }, + "unit": { + "type": "string", + "description": "单位" + }, + "reason": { + "type": "string", + "description": "需求原因" + }, + "suggestedArrivalDate": { + "type": "string", + "description": "建议到位时间" + } + } + }, + "ProgressSuggestion": { + "type": "object", + "properties": { + "taskId": { + "type": "integer", + "description": "任务 ID (如果有明确关联的任务)", + "format": "int64" + }, + "taskName": { + "type": "string", + "description": "任务名称" + }, + "suggestionType": { + "type": "string", + "description": "建议类型:accelerate-加速,adjust_plan-调整计划,add_resource-增加资源,reorder-重新排序" + }, + "suggestion": { + "type": "string", + "description": "具体建议内容" + }, + "priority": { + "type": "string", + "description": "优先级:critical-紧急,high-高,medium-中,low-低" + }, + "expectedEffect": { + "type": "string", + "description": "预期效果" + } + } + }, + "ProgressUpdateRecommendation": { + "type": "object", + "properties": { + "targetType": { + "type": "string", + "description": "建议作用对象:task / milestone" + }, + "targetId": { + "type": "integer", + "description": "任务ID或里程碑ID", + "format": "int64" + }, + "suggestedStatus": { + "type": "string", + "description": "建议状态:pending / in_progress / completed / delayed 等(与现有状态体系保持一致)" + }, + "suggestedProgress": { + "type": "integer", + "description": "建议进度 0-100" + }, + "reason": { + "type": "string", + "description": "建议理由" + }, + "confidence": { + "type": "number", + "description": "置信度 0-1" + } + } + }, + "DailyReportAnalysisResult": { + "type": "object", + "properties": { + "reportId": { + "type": "integer", + "description": "日报ID", + "format": "int64" + }, + "projectId": { + "type": "integer", + "description": "项目 ID", + "format": "int64" + }, + "projectName": { + "type": "string", + "description": "项目名称" + }, + "reportDate": { + "type": "string", + "description": "日报日期" + }, + "overallProgressAssessment": { + "$ref": "#/components/schemas/OverallProgressAssessment", + "description": "整体进度评估" + }, + "milestoneRisks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MilestoneRisk", + "description": "里程碑风险" + }, + "description": "里程碑风险列表" + }, + "resourceNeeds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceNeed", + "description": "资源需求" + }, + "description": "资源需求列表" + }, + "progressSuggestions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProgressSuggestion", + "description": "进度建议" + }, + "description": "进度建议列表" + }, + "progressUpdateRecommendations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProgressUpdateRecommendation", + "description": "进度更新建议(可回写)" + }, + "description": "可直接回写到任务/里程碑的进度更新建议(需要用户确认后才执行)" + }, + "identifiedRisks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IdentifiedRisk", + "description": "识别的风险 (直接入库)" + }, + "description": "识别的风险列表 (直接入库)" + } + } + }, + "DailyReportWithAnalysisVO": { + "type": "object", + "properties": { + "reportId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "projectId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "reportDate": { + "type": "string", + "description": "" + }, + "submitterUsername": { + "type": "string", + "description": "" + }, + "submitterId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "workContent": { + "type": "string", + "description": "" + }, + "tomorrowPlan": { + "type": "string", + "description": "" + }, + "workIntensity": { + "type": "integer", + "description": "" + }, + "needHelp": { + "type": "boolean", + "description": "" + }, + "helpContent": { + "type": "string", + "description": "" + }, + "createTime": { + "type": "string", + "description": "" + }, + "analysisId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "analysisStatus": { + "type": "string", + "description": "" + }, + "analysisResult": { + "$ref": "#/components/schemas/DailyReportAnalysisResult", + "description": "" + }, + "analysisSuggestions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DailyReportUpdateSuggestionVO", + "description": "cn.yinlihupo.domain.vo.DailyReportUpdateSuggestionVO" + }, + "description": "" + } + } + }, + "TableDataInfoDailyReportWithAnalysisVO": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "总记录数", + "format": "int64" + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DailyReportWithAnalysisVO", + "description": "cn.yinlihupo.domain.vo.DailyReportWithAnalysisVO" + }, + "description": "列表数据" + }, + "code": { + "type": "integer", + "description": "消息状态码" + }, + "msg": { + "type": "string", + "description": "消息内容" + } + } + }, + "BaseResponseTableDataInfoDailyReportWithAnalysisVO": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "" + }, + "data": { + "$ref": "#/components/schemas/TableDataInfoDailyReportWithAnalysisVO", + "description": "" + }, + "message": { + "type": "string", + "description": "" + } + } + }, + "IdentifiedRisk": { + "type": "object", + "properties": { + "riskName": { + "type": "string", + "description": "风险名称" + }, + "category": { + "type": "string", + "description": "风险分类: technical-技术风险, schedule-进度风险, cost-成本风险, quality-质量风险, resource-资源风险, external-外部风险, personnel-人员风险" + }, + "description": { + "type": "string", + "description": "风险描述" + }, + "probability": { + "type": "integer", + "description": "发生概率(0-100%)" + }, + "impact": { + "type": "integer", + "description": "影响程度(1-5)" + }, + "riskLevel": { + "type": "string", + "description": "风险等级:calculated from probability * impact" + }, + "impactScope": { + "type": "string", + "description": "影响范围" + }, + "triggerCondition": { + "type": "string", + "description": "触发条件" + }, + "mitigationPlan": { + "type": "string", + "description": "缓解措施" + }, + "contingencyPlan": { + "type": "string", + "description": "应急计划" + }, + "priority": { + "type": "string", + "description": "建议优先级: critical-紧急, high-高, medium-中, low-低" + } + } + } + }, + "responses": {}, + "securitySchemes": {} + }, + "servers": [], + "security": [] +} diff --git a/src/api/资源模块.openapi.json b/src/api/资源模块.openapi.json deleted file mode 100644 index a6a2ce4..0000000 --- a/src/api/资源模块.openapi.json +++ /dev/null @@ -1,917 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "默认模块", - "description": "", - "version": "1.0.0" - }, - "tags": [], - "paths": { - "/api/v1/resource/list": { - "get": { - "summary": "分页查询资源列表", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "pageNum", - "in": "query", - "description": "", - "required": true, - "example": 1, - "schema": { - "type": "integer" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "", - "required": true, - "example": 10, - "schema": { - "type": "integer" - } - }, - { - "name": "projectId", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "resourceType", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "status", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "keyword", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponsePageMapObject" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/resource/{id}": { - "get": { - "summary": "根据ID查询资源详情", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseResource" - } - } - } - } - }, - "security": [] - }, - "delete": { - "summary": "删除资源", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/resource": { - "post": { - "summary": "新增资源", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Resource", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseLong" - } - } - } - } - }, - "security": [] - }, - "put": { - "summary": "修改资源", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceUpdateRequest", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/resource/{id}/status": { - "put": { - "summary": "更新资源状态", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "status", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/resource/{id}/quantity": { - "put": { - "summary": "更新资源数量", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "actualQuantity", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/resource/stats/budget": { - "get": { - "summary": "查询资源预算汇总", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseListMapObject" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/resource/pending-arrival": { - "get": { - "summary": "查询即将到位的资源", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "days", - "in": "query", - "description": "", - "required": true, - "example": 7, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseListResource" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/resource/pending-approval": { - "get": { - "summary": "查询待审批的资源申请", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseListMapObject" - } - } - } - } - }, - "security": [] - } - } - }, - "components": { - "schemas": { - "OrderItem": { - "type": "object", - "properties": { - "column": { - "type": "string", - "description": "需要进行排序的字段" - }, - "asc": { - "type": "boolean", - "description": "是否正序排列,默认 true", - "default": true - } - } - }, - "MapObject": { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/key" - } - } - }, - "PageMapObject": { - "type": "object", - "properties": { - "records": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapObject" - }, - "description": "查询数据列表", - "default": "Collections.emptyList()" - }, - "total": { - "type": "integer", - "description": "总数", - "format": "int64", - "default": 0 - }, - "size": { - "type": "integer", - "description": "每页显示条数,默认 10", - "format": "int64", - "default": 10 - }, - "current": { - "type": "integer", - "description": "当前页", - "format": "int64", - "default": 1 - }, - "orders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrderItem", - "description": "com.baomidou.mybatisplus.core.metadata.OrderItem" - }, - "description": "排序字段信息", - "default": "new ArrayList<>()" - }, - "optimizeCountSql": { - "type": "boolean", - "description": "自动优化 COUNT SQL", - "default": true - }, - "searchCount": { - "type": "boolean", - "description": "是否进行 count 查询", - "default": true - }, - "optimizeJoinOfCountSql": { - "type": "boolean", - "description": "{@link #optimizeJoinOfCountSql()}", - "default": true - }, - "maxLimit": { - "type": "integer", - "description": "单页分页条数限制", - "format": "int64" - }, - "countId": { - "type": "string", - "description": "countId" - }, - "pages": { - "type": "integer", - "format": "int64" - } - } - }, - "BaseResponsePageMapObject": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/PageMapObject", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "Resource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "", - "format": "int64" - }, - "resourceCode": { - "type": "string", - "description": "资源编号" - }, - "projectId": { - "type": "integer", - "description": "项目ID", - "format": "int64" - }, - "resourceType": { - "type": "string", - "description": "资源类型: human-人力, material-物料, equipment-设备, software-软件, finance-资金, other-其他" - }, - "resourceName": { - "type": "string", - "description": "资源名称" - }, - "description": { - "type": "string", - "description": "资源描述" - }, - "specification": { - "type": "string", - "description": "规格型号" - }, - "unit": { - "type": "string", - "description": "单位" - }, - "planQuantity": { - "type": "number", - "description": "计划数量" - }, - "actualQuantity": { - "type": "number", - "description": "实际数量" - }, - "unitPrice": { - "type": "number", - "description": "单价" - }, - "currency": { - "type": "string", - "description": "币种" - }, - "supplier": { - "type": "string", - "description": "供应商/来源" - }, - "status": { - "type": "string", - "description": "状态: planned-计划中, requested-已申请, approved-已批准, procuring-采购中, arrived-已到货, in_use-使用中, completed-已完成" - }, - "planArriveDate": { - "type": "string", - "description": "计划到位日期" - }, - "actualArriveDate": { - "type": "string", - "description": "实际到位日期" - }, - "responsibleId": { - "type": "integer", - "description": "负责人ID", - "format": "int64" - }, - "location": { - "type": "string", - "description": "存放位置" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - }, - "extraData": { - "type": "object", - "properties": {}, - "description": "扩展数据" - }, - "createBy": { - "type": "integer", - "description": "创建人", - "format": "int64" - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateBy": { - "type": "integer", - "description": "更新人", - "format": "int64" - }, - "updateTime": { - "type": "string", - "description": "更新时间" - }, - "deleted": { - "type": "integer", - "description": "删除标记" - } - } - }, - "key": { - "type": "object", - "properties": {} - }, - "BaseResponseLong": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "integer", - "description": "", - "format": "int64" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseResource": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/Resource", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseVoid": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "description": "", - "type": "null" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "ResourceUpdateRequest": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "资源ID(必填)", - "format": "int64" - }, - "resourceType": { - "type": "string", - "description": "资源类型: human-人力, material-物料, equipment-设备, software-软件, finance-资金, other-其他" - }, - "resourceName": { - "type": "string", - "description": "资源名称" - }, - "description": { - "type": "string", - "description": "资源描述" - }, - "specification": { - "type": "string", - "description": "规格型号" - }, - "unit": { - "type": "string", - "description": "单位" - }, - "planQuantity": { - "type": "number", - "description": "计划数量" - }, - "actualQuantity": { - "type": "number", - "description": "实际数量" - }, - "unitPrice": { - "type": "number", - "description": "单价" - }, - "currency": { - "type": "string", - "description": "币种" - }, - "supplier": { - "type": "string", - "description": "供应商/来源" - }, - "status": { - "type": "string", - "description": "状态: planned-计划中, requested-已申请, approved-已批准, procuring-采购中, arrived-已到货, in_use-使用中, completed-已完成" - }, - "planArriveDate": { - "type": "string", - "description": "计划到位日期" - }, - "actualArriveDate": { - "type": "string", - "description": "实际到位日期" - }, - "responsibleId": { - "type": "integer", - "description": "负责人ID(直接传递ID时使用)", - "format": "int64" - }, - "responsibleName": { - "type": "string", - "description": "负责人姓名(根据姓名自动匹配用户ID)" - }, - "location": { - "type": "string", - "description": "存放位置" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - }, - "extraData": { - "type": "object", - "properties": {}, - "description": "扩展数据" - } - } - }, - "BaseResponseListMapObject": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapObject" - }, - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseListResource": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Resource", - "description": "资源实体类\n对应数据库表: resource" - }, - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - } - }, - "responses": {}, - "securitySchemes": {} - }, - "servers": [], - "security": [] -} diff --git a/src/api/项目sse.openapi.json b/src/api/项目sse.openapi.json deleted file mode 100644 index 51a9a2e..0000000 --- a/src/api/项目sse.openapi.json +++ /dev/null @@ -1,606 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "默认模块", - "description": "", - "version": "1.0.0" - }, - "tags": [], - "paths": { - "/api/v1/project-init/sse/submit-task": { - "post": { - "summary": "通过 SSE 提交项目初始化任务", - "deprecated": false, - "description": "使用通用 SSE 通道,通过 userId 推送进度", - "tags": [], - "parameters": [ - { - "name": "userId", - "in": "query", - "description": "用户ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc", - "schema": { - "type": "string", - "default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "description": "项目资料文件", - "type": "string", - "format": "binary" - } - }, - "required": ["file"] - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseMapObject", - "description": "提交结果" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/project-init/my-tasks": { - "get": { - "summary": "查询我的任务列表", - "deprecated": false, - "description": "根据当前登录用户的token查询其所有任务", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc", - "schema": { - "type": "string", - "default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseListProjectInitTaskVO", - "description": "任务列表" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/project-init/my-tasks/stats": { - "get": { - "summary": "查询我的任务统计信息", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc", - "schema": { - "type": "string", - "default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseMapObject", - "description": "统计信息" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/project-init/task/{taskId}": { - "get": { - "summary": "查询单个任务状态", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "taskId", - "in": "path", - "description": "任务ID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc", - "schema": { - "type": "string", - "default": "Bearer 6bf1de0f-9edf-413f-a98f-1103b8dc30fc" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseProjectInitTaskVO", - "description": "任务状态" - } - } - } - } - }, - "security": [] - } - } - }, - "components": { - "schemas": { - "ProjectInfo": { - "type": "object", - "properties": { - "project_name": { - "type": "string", - "description": "" - }, - "project_type": { - "type": "string", - "description": "" - }, - "description": { - "type": "string", - "description": "" - }, - "objectives": { - "type": "string", - "description": "" - }, - "plan_start_date": { - "type": "string", - "description": "" - }, - "plan_end_date": { - "type": "string", - "description": "" - }, - "budget": { - "type": "number", - "description": "" - }, - "currency": { - "type": "string", - "description": "" - }, - "priority": { - "type": "string", - "description": "" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "" - } - } - }, - "MilestoneInfo": { - "type": "object", - "properties": { - "milestone_name": { - "type": "string", - "description": "" - }, - "description": { - "type": "string", - "description": "" - }, - "plan_date": { - "type": "string", - "description": "" - }, - "deliverables": { - "type": "string", - "description": "" - }, - "owner_role": { - "type": "string", - "description": "" - } - } - }, - "TaskInfo": { - "type": "object", - "properties": { - "task_id": { - "type": "string", - "description": "" - }, - "task_name": { - "type": "string", - "description": "" - }, - "parent_task_id": { - "type": "string", - "description": "" - }, - "description": { - "type": "string", - "description": "" - }, - "plan_start_date": { - "type": "string", - "description": "" - }, - "plan_end_date": { - "type": "string", - "description": "" - }, - "estimated_hours": { - "type": "integer", - "description": "" - }, - "priority": { - "type": "string", - "description": "" - }, - "assignee_role": { - "type": "string", - "description": "" - }, - "dependencies": { - "type": "array", - "items": { - "type": "string" - }, - "description": "" - }, - "deliverables": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseMapObject": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "object", - "properties": { - "total": { - "type": "integer" - }, - "processing": { - "type": "integer" - }, - "completed": { - "type": "null" - }, - "failed": { - "type": "null" - } - }, - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "MemberInfo": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "" - }, - "role_code": { - "type": "string", - "description": "" - }, - "responsibility": { - "type": "string", - "description": "" - }, - "department": { - "type": "string", - "description": "" - }, - "weekly_hours": { - "type": "integer", - "description": "" - } - } - }, - "ResourceInfo": { - "type": "object", - "properties": { - "resource_name": { - "type": "string", - "description": "" - }, - "resource_type": { - "type": "string", - "description": "" - }, - "quantity": { - "type": "number", - "description": "" - }, - "unit": { - "type": "string", - "description": "" - }, - "unit_price": { - "type": "number", - "description": "" - }, - "supplier": { - "type": "string", - "description": "" - } - } - }, - "RiskInfo": { - "type": "object", - "properties": { - "risk_name": { - "type": "string", - "description": "" - }, - "category": { - "type": "string", - "description": "" - }, - "description": { - "type": "string", - "description": "" - }, - "probability": { - "type": "integer", - "description": "" - }, - "impact": { - "type": "integer", - "description": "" - }, - "mitigation_plan": { - "type": "string", - "description": "" - } - } - }, - "TimelineNodeInfo": { - "type": "object", - "properties": { - "node_name": { - "type": "string", - "description": "" - }, - "node_type": { - "type": "string", - "description": "" - }, - "plan_date": { - "type": "string", - "description": "" - }, - "description": { - "type": "string", - "description": "" - }, - "kb_scope": { - "type": "array", - "items": { - "type": "string" - }, - "description": "" - } - } - }, - "ProjectInitResult": { - "type": "object", - "properties": { - "project": { - "$ref": "#/components/schemas/ProjectInfo", - "description": "项目基本信息" - }, - "milestones": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MilestoneInfo", - "description": "cn.yinlihupo.domain.dto.ProjectInitResult.MilestoneInfo" - }, - "description": "里程碑列表" - }, - "tasks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaskInfo", - "description": "cn.yinlihupo.domain.dto.ProjectInitResult.TaskInfo" - }, - "description": "任务清单" - }, - "members": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemberInfo", - "description": "cn.yinlihupo.domain.dto.ProjectInitResult.MemberInfo" - }, - "description": "项目成员" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceInfo", - "description": "cn.yinlihupo.domain.dto.ProjectInitResult.ResourceInfo" - }, - "description": "资源需求" - }, - "risks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RiskInfo", - "description": "cn.yinlihupo.domain.dto.ProjectInitResult.RiskInfo" - }, - "description": "风险识别" - }, - "timeline_nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TimelineNodeInfo", - "description": "cn.yinlihupo.domain.dto.ProjectInitResult.TimelineNodeInfo" - }, - "description": "时间节点" - } - } - }, - "ProjectInitTaskVO": { - "type": "object", - "properties": { - "taskId": { - "type": "string", - "description": "任务ID" - }, - "userId": { - "type": "integer", - "description": "用户ID(任务所属用户)", - "format": "int64" - }, - "status": { - "type": "string", - "description": "任务状态: pending-待处理, processing-处理中, completed-已完成, failed-失败" - }, - "statusDesc": { - "type": "string", - "description": "状态描述" - }, - "progress": { - "type": "integer", - "description": "当前进度百分比 (0-100)" - }, - "progressMessage": { - "type": "string", - "description": "进度描述信息" - }, - "originalFilename": { - "type": "string", - "description": "原始文件名" - }, - "createTime": { - "type": "string", - "description": "任务创建时间" - }, - "startTime": { - "type": "string", - "description": "任务开始处理时间" - }, - "completeTime": { - "type": "string", - "description": "任务完成时间" - }, - "result": { - "$ref": "#/components/schemas/ProjectInitResult", - "description": "处理结果(仅当status=completed时有值)" - }, - "errorMessage": { - "type": "string", - "description": "错误信息(仅当status=failed时有值)" - } - } - }, - "BaseResponseListProjectInitTaskVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectInitTaskVO", - "description": "项目初始化异步任务VO" - }, - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseProjectInitTaskVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/ProjectInitTaskVO", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - } - }, - "responses": {}, - "securitySchemes": {} - }, - "servers": [], - "security": [] -} diff --git a/src/api/项目管理.openapi.json b/src/api/项目管理.openapi.json deleted file mode 100644 index 42a362c..0000000 --- a/src/api/项目管理.openapi.json +++ /dev/null @@ -1,396 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "默认模块", - "description": "", - "version": "1.0.0" - }, - "tags": [], - "paths": { - "/api/v1/project": { - "put": { - "summary": "修改项目", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Project", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/project/{id}": { - "delete": { - "summary": "删除项目", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/project/{id}/status": { - "put": { - "summary": "更新项目状态", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "status", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/project/{id}/progress": { - "put": { - "summary": "更新项目进度", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "progress", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/project/{id}/manager": { - "put": { - "summary": "更新项目经理", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "managerId", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - } - }, - "components": { - "schemas": { - "Project": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "", - "format": "int64" - }, - "projectCode": { - "type": "string", - "description": "项目编号" - }, - "projectName": { - "type": "string", - "description": "项目名称" - }, - "projectType": { - "type": "string", - "description": "项目类型" - }, - "description": { - "type": "string", - "description": "项目描述" - }, - "objectives": { - "type": "string", - "description": "项目目标" - }, - "managerId": { - "type": "integer", - "description": "项目经理ID", - "format": "int64" - }, - "sponsorId": { - "type": "integer", - "description": "项目发起人ID", - "format": "int64" - }, - "planStartDate": { - "type": "string", - "description": "计划开始日期" - }, - "planEndDate": { - "type": "string", - "description": "计划结束日期" - }, - "actualStartDate": { - "type": "string", - "description": "实际开始日期" - }, - "actualEndDate": { - "type": "string", - "description": "实际结束日期" - }, - "budget": { - "type": "number", - "description": "项目预算" - }, - "cost": { - "type": "number", - "description": "已花费金额" - }, - "currency": { - "type": "string", - "description": "币种" - }, - "progress": { - "type": "integer", - "description": "进度百分比" - }, - "status": { - "type": "string", - "description": "状态: draft-草稿, planning-规划中, ongoing-进行中, paused-暂停, completed-已完成, cancelled-已取消" - }, - "priority": { - "type": "string", - "description": "优先级: critical-关键, high-高, medium-中, low-低" - }, - "riskLevel": { - "type": "string", - "description": "风险等级: high-高, medium-中, low-低" - }, - "visibility": { - "type": "integer", - "description": "可见性: 1-公开, 2-部门内, 3-项目成员" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签列表" - }, - "extraData": { - "type": "object", - "properties": {}, - "description": "扩展数据" - }, - "createBy": { - "type": "integer", - "description": "创建人", - "format": "int64" - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateBy": { - "type": "integer", - "description": "更新人", - "format": "int64" - }, - "updateTime": { - "type": "string", - "description": "更新时间" - }, - "deleted": { - "type": "integer", - "description": "删除标记" - } - } - }, - "BaseResponseVoid": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "description": "", - "type": "null" - }, - "message": { - "type": "string", - "description": "" - } - } - } - }, - "responses": {}, - "securitySchemes": {} - }, - "servers": [], - "security": [] -} diff --git a/src/api/项目详情.openapi.json b/src/api/项目详情.openapi.json deleted file mode 100644 index ae15ff1..0000000 --- a/src/api/项目详情.openapi.json +++ /dev/null @@ -1,594 +0,0 @@ -{ - "code": 200, - "data": { - "id": "2037831996319100930", - "projectCode": "PRJ15F5BF5B5CAD", - "projectName": "AIHR 智能简历筛选系统", - "projectType": "研发项目", - "description": "利用大语言模型(LLM)和自然语言处理(NLP)技术,实现简历的自动化解析、人岗匹配度评分及候选人排序,提升招聘效率。", - "objectives": "1. 效率提升:单份处理时间降至10秒内。2. 精准匹配:人岗匹配度评分准确率>90%。3. 系统集成:无缝对接主流招聘网站及内部ATS。4. 合规安全:候选人数据脱敏,符合《个人信息保护法》。", - "managerId": null, - "managerName": null, - "sponsorId": null, - "planStartDate": "2026-04-01", - "planEndDate": "2026-09-30", - "actualStartDate": null, - "actualEndDate": null, - "budget": 2850000.0, - "cost": 0.0, - "currency": "CNY", - "progress": 0, - "status": "planning", - "priority": "high", - "riskLevel": "low", - "visibility": 1, - "tags": null, - "createTime": null, - "updateTime": null, - "memberCount": 4, - "taskCount": 8, - "completedTaskCount": 0, - "milestoneCount": 6, - "resourceCount": 6, - "riskCount": 4, - "highRiskCount": 0, - "members": [ - { - "id": "2037831996608507907", - "userId": null, - "userName": null, - "realName": null, - "avatar": null, - "roleCode": "manager", - "department": null, - "responsibility": "负责整体项目规划、进度控制、风险管理及跨部门协调", - "weeklyHours": 40.0, - "joinDate": null, - "status": 1 - }, - { - "id": "2037831996646256642", - "userId": null, - "userName": null, - "realName": null, - "avatar": null, - "roleCode": "leader", - "department": null, - "responsibility": "负责需求梳理、原型设计、用户故事编写及验收测试", - "weeklyHours": 40.0, - "joinDate": null, - "status": 1 - }, - { - "id": "2037831996646256643", - "userId": null, - "userName": null, - "realName": null, - "avatar": null, - "roleCode": "leader", - "department": null, - "responsibility": "负责系统整体技术选型、架构设计、核心技术难点攻关", - "weeklyHours": 20.0, - "joinDate": null, - "status": 1 - }, - { - "id": "2037831996646256644", - "userId": null, - "userName": null, - "realName": null, - "avatar": null, - "roleCode": "member", - "department": null, - "responsibility": "负责测试用例编写、功能测试、性能测试及自动化测试脚本", - "weeklyHours": 40.0, - "joinDate": null, - "status": 1 - } - ], - "milestones": [ - { - "id": "2037831996319100931", - "milestoneName": "需求分析与架构设计", - "description": "完成需求评审及技术架构可行性验证", - "planDate": "2026-04-30", - "actualDate": null, - "status": "pending", - "progress": 0, - "isKey": 0, - "deliverables": null, - "sortOrder": 0 - }, - { - "id": "2037831996319100932", - "milestoneName": "核心算法模型训练与验证", - "description": "模型在测试集上的准确率>85%,解析字段覆盖率>95%", - "planDate": "2026-06-15", - "actualDate": null, - "status": "pending", - "progress": 0, - "isKey": 0, - "deliverables": null, - "sortOrder": 1 - }, - { - "id": "2037831996319100933", - "milestoneName": "系统功能开发完成 (Alpha 版)", - "description": "核心功能(上传、解析、评分、搜索)闭环跑通", - "planDate": "2026-07-31", - "actualDate": null, - "status": "pending", - "progress": 0, - "isKey": 0, - "deliverables": null, - "sortOrder": 2 - }, - { - "id": "2037831996386209793", - "milestoneName": "系统集成与内部测试 (Beta 版)", - "description": "支持并发用户数>50,响应时间<2秒,无严重 Bug", - "planDate": "2026-08-31", - "actualDate": null, - "status": "pending", - "progress": 0, - "isKey": 0, - "deliverables": null, - "sortOrder": 3 - }, - { - "id": "2037831996386209794", - "milestoneName": "用户验收测试 (UAT) 与试点", - "description": "试点部门(人力资源部)确认功能满足业务需求", - "planDate": "2026-09-15", - "actualDate": null, - "status": "pending", - "progress": 0, - "isKey": 0, - "deliverables": null, - "sortOrder": 4 - }, - { - "id": "2037831996386209795", - "milestoneName": "正式上线与交付", - "description": "系统正式部署至生产环境,完成全员培训", - "planDate": "2026-09-30", - "actualDate": null, - "status": "pending", - "progress": 0, - "isKey": 0, - "deliverables": null, - "sortOrder": 5 - } - ], - "tasks": [ - { - "id": "2037831996386209796", - "taskCode": null, - "taskName": "需求分析与产品设计", - "description": "梳理业务需求,输出原型设计与需求规格说明书", - "taskType": null, - "milestoneId": "2037831996319100931", - "assigneeId": null, - "assigneeName": null, - "planStartDate": "2026-04-01", - "planEndDate": "2026-04-20", - "actualStartDate": null, - "actualEndDate": null, - "planHours": 120.0, - "actualHours": null, - "progress": 0, - "priority": "high", - "status": "pending", - "sortOrder": 0 - }, - { - "id": "2037831996449124353", - "taskCode": null, - "taskName": "系统架构与数据库设计", - "description": "完成技术选型、架构设计及数据库表结构设计", - "taskType": null, - "milestoneId": "2037831996319100932", - "assigneeId": null, - "assigneeName": null, - "planStartDate": "2026-04-15", - "planEndDate": "2026-04-30", - "actualStartDate": null, - "actualEndDate": null, - "planHours": 80.0, - "actualHours": null, - "progress": 0, - "priority": "high", - "status": "pending", - "sortOrder": 1 - }, - { - "id": "2037831996449124354", - "taskCode": null, - "taskName": "数据准备与标注", - "description": "处理10万份历史简历并完成5000对简历-JD匹配标注", - "taskType": null, - "milestoneId": "2037831996319100933", - "assigneeId": null, - "assigneeName": null, - "planStartDate": "2026-04-20", - "planEndDate": "2026-05-20", - "actualStartDate": null, - "actualEndDate": null, - "planHours": 160.0, - "actualHours": null, - "progress": 0, - "priority": "high", - "status": "pending", - "sortOrder": 2 - }, - { - "id": "2037831996449124355", - "taskCode": null, - "taskName": "核心算法模型训练", - "description": "基于大模型进行简历解析引擎与匹配算法的训练和调优", - "taskType": null, - "milestoneId": "2037831996386209793", - "assigneeId": null, - "assigneeName": null, - "planStartDate": "2026-05-01", - "planEndDate": "2026-06-15", - "actualStartDate": null, - "actualEndDate": null, - "planHours": 240.0, - "actualHours": null, - "progress": 0, - "priority": "high", - "status": "pending", - "sortOrder": 3 - }, - { - "id": "2037831996449124356", - "taskCode": null, - "taskName": "系统前后端功能开发", - "description": "开发后端服务及前端管理界面,并完成API对接", - "taskType": null, - "milestoneId": "2037831996386209794", - "assigneeId": null, - "assigneeName": null, - "planStartDate": "2026-06-01", - "planEndDate": "2026-07-31", - "actualStartDate": null, - "actualEndDate": null, - "planHours": 320.0, - "actualHours": null, - "progress": 0, - "priority": "high", - "status": "pending", - "sortOrder": 4 - }, - { - "id": "2037831996449124357", - "taskCode": null, - "taskName": "系统集成与内测", - "description": "系统整体集成、性能测试及缺陷修复", - "taskType": null, - "milestoneId": "2037831996386209795", - "assigneeId": null, - "assigneeName": null, - "planStartDate": "2026-08-01", - "planEndDate": "2026-08-31", - "actualStartDate": null, - "actualEndDate": null, - "planHours": 160.0, - "actualHours": null, - "progress": 0, - "priority": "high", - "status": "pending", - "sortOrder": 5 - }, - { - "id": "2037831996449124358", - "taskCode": null, - "taskName": "用户验收测试与试点", - "description": "人力资源部介入试用系统,收集反馈并进行优化", - "taskType": null, - "milestoneId": "2037831996319100931", - "assigneeId": null, - "assigneeName": null, - "planStartDate": "2026-09-01", - "planEndDate": "2026-09-15", - "actualStartDate": null, - "actualEndDate": null, - "planHours": 80.0, - "actualHours": null, - "progress": 0, - "priority": "medium", - "status": "pending", - "sortOrder": 6 - }, - { - "id": "2037831996516233217", - "taskCode": null, - "taskName": "生产部署与交付", - "description": "系统部署上线,组织全员培训,输出总结报告", - "taskType": null, - "milestoneId": "2037831996319100932", - "assigneeId": null, - "assigneeName": null, - "planStartDate": "2026-09-16", - "planEndDate": "2026-09-30", - "actualStartDate": null, - "actualEndDate": null, - "planHours": 80.0, - "actualHours": null, - "progress": 0, - "priority": "high", - "status": "pending", - "sortOrder": 7 - } - ], - "resources": [ - { - "id": "2037831996646256645", - "resourceCode": null, - "resourceType": "equipment", - "resourceName": "高性能云服务器 (16核64G)", - "description": null, - "specification": null, - "unit": "台", - "planQuantity": 5.0, - "actualQuantity": null, - "unitPrice": 2000.0, - "currency": "CNY", - "supplier": "云服务提供商", - "status": "planned", - "planArriveDate": null, - "actualArriveDate": null, - "responsibleId": null, - "location": null, - "tags": null - }, - { - "id": "2037831996709171202", - "resourceCode": null, - "resourceType": "equipment", - "resourceName": "云端 GPU 算力资源 (NVIDIA A100/A800)", - "description": null, - "specification": null, - "unit": "小时", - "planQuantity": 2000.0, - "actualQuantity": null, - "unitPrice": 50.0, - "currency": "CNY", - "supplier": "云算力平台", - "status": "planned", - "planArriveDate": null, - "actualArriveDate": null, - "responsibleId": null, - "location": null, - "tags": null - }, - { - "id": "2037831996709171203", - "resourceCode": null, - "resourceType": "equipment", - "resourceName": "对象存储空间", - "description": null, - "specification": null, - "unit": "TB", - "planQuantity": 5.0, - "actualQuantity": null, - "unitPrice": 300.0, - "currency": "CNY", - "supplier": "云服务提供商", - "status": "planned", - "planArriveDate": null, - "actualArriveDate": null, - "responsibleId": null, - "location": null, - "tags": null - }, - { - "id": "2037831996709171204", - "resourceCode": null, - "resourceType": "material", - "resourceName": "历史简历数据", - "description": null, - "specification": null, - "unit": "份", - "planQuantity": 100000.0, - "actualQuantity": null, - "unitPrice": 0.0, - "currency": "CNY", - "supplier": "企业内部", - "status": "planned", - "planArriveDate": null, - "actualArriveDate": null, - "responsibleId": null, - "location": null, - "tags": null - }, - { - "id": "2037831996709171205", - "resourceCode": null, - "resourceType": "material", - "resourceName": "高质量匹配标注数据集", - "description": null, - "specification": null, - "unit": "对", - "planQuantity": 5000.0, - "actualQuantity": null, - "unitPrice": 10.0, - "currency": "CNY", - "supplier": "数据标注专员", - "status": "planned", - "planArriveDate": null, - "actualArriveDate": null, - "responsibleId": null, - "location": null, - "tags": null - }, - { - "id": "2037831996709171206", - "resourceCode": null, - "resourceType": "human", - "resourceName": "法律合规咨询服务", - "description": null, - "specification": null, - "unit": "项", - "planQuantity": 1.0, - "actualQuantity": null, - "unitPrice": 50000.0, - "currency": "CNY", - "supplier": "外部法律顾问", - "status": "planned", - "planArriveDate": null, - "actualArriveDate": null, - "responsibleId": null, - "location": null, - "tags": null - } - ], - "risks": [ - { - "id": "2037831996780474370", - "riskCode": null, - "category": "technical", - "riskName": "模型准确率不达标风险", - "description": "大语言模型可能出现幻觉或对复杂简历解析不准,导致人岗匹配准确率低于90%", - "probability": 40.0, - "impact": 4.0, - "riskScore": 1.6, - "riskLevel": "medium", - "status": "identified", - "ownerId": null, - "mitigationPlan": "引入高质量标注数据集微调模型,增加人工专家复核机制,持续优化算法", - "dueDate": null, - "discoverTime": "2026-03-28T17:59:43.784116" - }, - { - "id": "2037831996780474369", - "riskCode": null, - "category": "external", - "riskName": "数据隐私与合规风险", - "description": "简历数据包含大量个人敏感信息,处理不当可能违反《个人信息保护法》", - "probability": 30.0, - "impact": 5.0, - "riskScore": 1.5, - "riskLevel": "medium", - "status": "identified", - "ownerId": null, - "mitigationPlan": "聘请法律顾问审核全流程合规性,严格实施数据脱敏处理,建立完善的数据访问权限控制", - "dueDate": null, - "discoverTime": "2026-03-28T17:59:43.778244" - }, - { - "id": "2037831996780474371", - "riskCode": null, - "category": "technical", - "riskName": "第三方ATS系统集成风险", - "description": "对接主流招聘网站及内部ATS时可能遇到API限制或数据格式不兼容问题", - "probability": 50.0, - "impact": 3.0, - "riskScore": 1.5, - "riskLevel": "medium", - "status": "identified", - "ownerId": null, - "mitigationPlan": "提前获取第三方接口文档并进行技术验证,设计高兼容性的中间件适配层", - "dueDate": null, - "discoverTime": "2026-03-28T17:59:43.786088" - }, - { - "id": "2037831996780474372", - "riskCode": null, - "category": "resource", - "riskName": "算力资源短缺风险", - "description": "云端高端GPU(如A100/A800)可能存在排队或租赁不到位的情况,影响训练进度", - "probability": 25.0, - "impact": 4.0, - "riskScore": 1.0, - "riskLevel": "medium", - "status": "identified", - "ownerId": null, - "mitigationPlan": "提前锁定云资源供应商并签订算力保障协议,准备备用算力平台方案", - "dueDate": null, - "discoverTime": "2026-03-28T17:59:43.789088" - } - ], - "timelineNodes": [ - { - "id": "2037831996843388930", - "nodeName": "项目启动", - "nodeType": "event", - "planDate": "2026-04-01", - "actualDate": null, - "description": "项目正式启动,团队入场", - "status": "pending", - "sortOrder": 0, - "kbScope": null - }, - { - "id": "2037831996843388931", - "nodeName": "M1: 需求分析与架构设计完成", - "nodeType": "milestone", - "planDate": "2026-04-30", - "actualDate": null, - "description": "完成需求评审及技术架构可行性验证", - "status": "pending", - "sortOrder": 1, - "kbScope": null - }, - { - "id": "2037831996843388932", - "nodeName": "M2: 核心算法验证通过", - "nodeType": "milestone", - "planDate": "2026-06-15", - "actualDate": null, - "description": "模型准确率达标,解析引擎V1.0产出", - "status": "pending", - "sortOrder": 2, - "kbScope": null - }, - { - "id": "2037831996843388933", - "nodeName": "M3: Alpha版开发完成", - "nodeType": "milestone", - "planDate": "2026-07-31", - "actualDate": null, - "description": "核心功能闭环跑通", - "status": "pending", - "sortOrder": 3, - "kbScope": null - }, - { - "id": "2037831996843388934", - "nodeName": "M4: Beta版内测完成", - "nodeType": "milestone", - "planDate": "2026-08-31", - "actualDate": null, - "description": "性能达标,无严重缺陷", - "status": "pending", - "sortOrder": 4, - "kbScope": null - }, - { - "id": "2037831996906303490", - "nodeName": "M5: UAT与试点完成", - "nodeType": "milestone", - "planDate": "2026-09-15", - "actualDate": null, - "description": "人力资源部验收确认", - "status": "pending", - "sortOrder": 5, - "kbScope": null - }, - { - "id": "2037831996906303491", - "nodeName": "M6: 系统正式上线与交付", - "nodeType": "milestone", - "planDate": "2026-09-30", - "actualDate": null, - "description": "全员培训完成,项目结项", - "status": "pending", - "sortOrder": 6, - "kbScope": null - } - ] - }, - "message": "查询成功" -} diff --git a/src/api/风险与工单.openapi.json b/src/api/风险与工单.openapi.json deleted file mode 100644 index 4805ef4..0000000 --- a/src/api/风险与工单.openapi.json +++ /dev/null @@ -1,1657 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "默认模块", - "description": "", - "version": "1.0.0" - }, - "tags": [], - "paths": { - "/api/v1/risk": { - "post": { - "summary": "创建风险评估", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateRiskRequest", - "description": "创建请求" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseLong", - "description": "风险ID" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/risk/{riskId}": { - "put": { - "summary": "更新风险", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "riskId", - "in": "path", - "description": "风险ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateRiskRequest", - "description": "更新请求" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseBoolean", - "description": "是否成功" - } - } - } - } - }, - "security": [] - }, - "delete": { - "summary": "删除风险", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "riskId", - "in": "path", - "description": "风险ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseBoolean", - "description": "是否成功" - } - } - } - } - }, - "security": [] - }, - "get": { - "summary": "获取风险详情", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "riskId", - "in": "path", - "description": "风险ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseRiskVO", - "description": "风险详情" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/risk/list": { - "get": { - "summary": "分页查询风险列表", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "项目ID", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "pageNum", - "in": "query", - "description": "页码", - "required": true, - "example": 1, - "schema": { - "type": "integer" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "每页大小", - "required": true, - "example": 10, - "schema": { - "type": "integer" - } - }, - { - "name": "category", - "in": "query", - "description": "分类筛选", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "riskLevel", - "in": "query", - "description": "风险等级筛选", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "status", - "in": "query", - "description": "状态筛选", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "keyword", - "in": "query", - "description": "关键词搜索", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseTableDataInfoRiskVO", - "description": "分页风险列表" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/risk/statistics": { - "get": { - "summary": "获取风险统计信息", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "项目ID", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseRiskStatisticsVO", - "description": "统计信息" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/risk/{riskId}/assign-workorder": { - "post": { - "summary": "为风险分配工单", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "riskId", - "in": "path", - "description": "风险ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateWorkOrderRequest", - "description": "工单创建请求" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseLong", - "description": "工单ID" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/risk/batch-status": { - "put": { - "summary": "批量更新风险状态", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "status", - "in": "query", - "description": "新状态", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "风险ID列表" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseBoolean", - "description": "是否成功" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/workorder": { - "post": { - "summary": "创建工单", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateWorkOrderRequest", - "description": "创建请求" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseLong", - "description": "工单ID" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/workorder/{workOrderId}": { - "put": { - "summary": "更新工单", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "workOrderId", - "in": "path", - "description": "工单ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateWorkOrderRequest", - "description": "更新请求" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseBoolean", - "description": "是否成功" - } - } - } - } - }, - "security": [] - }, - "delete": { - "summary": "删除工单", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "workOrderId", - "in": "path", - "description": "工单ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseBoolean", - "description": "是否成功" - } - } - } - } - }, - "security": [] - }, - "get": { - "summary": "获取工单详情", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "workOrderId", - "in": "path", - "description": "工单ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseWorkOrderVO", - "description": "工单详情" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/workorder/list": { - "get": { - "summary": "分页查询工单列表", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "项目ID", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "pageNum", - "in": "query", - "description": "页码", - "required": true, - "example": 1, - "schema": { - "type": "integer" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "每页大小", - "required": true, - "example": 10, - "schema": { - "type": "integer" - } - }, - { - "name": "orderType", - "in": "query", - "description": "类型筛选", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "status", - "in": "query", - "description": "状态筛选", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "priority", - "in": "query", - "description": "优先级筛选", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "keyword", - "in": "query", - "description": "关键词搜索", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseTableDataInfoWorkOrderVO", - "description": "分页工单列表" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/workorder/my": { - "get": { - "summary": "获取我的工单列表", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "pageNum", - "in": "query", - "description": "页码", - "required": true, - "example": 1, - "schema": { - "type": "integer" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "每页大小", - "required": true, - "example": 10, - "schema": { - "type": "integer" - } - }, - { - "name": "status", - "in": "query", - "description": "状态筛选", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "orderType", - "in": "query", - "description": "类型筛选", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseTableDataInfoWorkOrderVO", - "description": "分页工单列表" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/workorder/process": { - "post": { - "summary": "处理工单", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessWorkOrderRequest", - "description": "处理请求" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseBoolean", - "description": "是否成功" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/workorder/{workOrderId}/assign": { - "put": { - "summary": "分配工单给处理人", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "workOrderId", - "in": "path", - "description": "工单ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "handlerId", - "in": "query", - "description": "处理人ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseBoolean", - "description": "是否成功" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/workorder/statistics": { - "get": { - "summary": "获取工单统计信息", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "项目ID(可选)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseWorkOrderStatisticsVO", - "description": "统计信息" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/workorder/my/statistics": { - "get": { - "summary": "获取我的工单统计信息", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b", - "schema": { - "type": "string", - "default": "Bearer f4c67d29-6d97-4552-84e3-11879ef1fc7b" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseWorkOrderStatisticsVO", - "description": "统计信息" - } - } - } - } - }, - "security": [] - } - } - }, - "components": { - "schemas": { - "CreateRiskRequest": { - "type": "object", - "properties": { - "projectId": { - "type": "integer", - "description": "项目ID", - "format": "int64" - }, - "category": { - "type": "string", - "description": "风险分类: technical-技术风险, schedule-进度风险, cost-成本风险, quality-质量风险, resource-资源风险, external-外部风险, other-其他" - }, - "riskName": { - "type": "string", - "description": "风险名称" - }, - "description": { - "type": "string", - "description": "风险描述" - }, - "riskSource": { - "type": "string", - "description": "风险来源: internal-内部, external-外部, manual-手动添加" - }, - "probability": { - "type": "integer", - "description": "发生概率(0-100)" - }, - "impact": { - "type": "integer", - "description": "影响程度(1-5)" - }, - "ownerId": { - "type": "integer", - "description": "负责人ID", - "format": "int64" - }, - "mitigationPlan": { - "type": "string", - "description": "缓解措施" - }, - "contingencyPlan": { - "type": "string", - "description": "应急计划" - }, - "triggerCondition": { - "type": "string", - "description": "触发条件" - }, - "dueDate": { - "type": "string", - "description": "预期解决日期" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - } - } - }, - "BaseResponseBoolean": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "boolean", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "RiskVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "风险ID", - "format": "int64" - }, - "riskCode": { - "type": "string", - "description": "风险编号" - }, - "projectId": { - "type": "integer", - "description": "项目ID", - "format": "int64" - }, - "projectName": { - "type": "string", - "description": "项目名称" - }, - "category": { - "type": "string", - "description": "风险分类" - }, - "riskName": { - "type": "string", - "description": "风险名称" - }, - "description": { - "type": "string", - "description": "风险描述" - }, - "riskSource": { - "type": "string", - "description": "风险来源" - }, - "probability": { - "type": "number", - "description": "发生概率(0-100%)" - }, - "impact": { - "type": "number", - "description": "影响程度(1-5)" - }, - "riskScore": { - "type": "number", - "description": "风险得分" - }, - "riskLevel": { - "type": "string", - "description": "风险等级" - }, - "status": { - "type": "string", - "description": "状态" - }, - "ownerId": { - "type": "integer", - "description": "负责人ID", - "format": "int64" - }, - "ownerName": { - "type": "string", - "description": "负责人姓名" - }, - "ownerAvatar": { - "type": "string", - "description": "负责人头像" - }, - "workOrderCount": { - "type": "integer", - "description": "关联工单数量" - }, - "mitigationPlan": { - "type": "string", - "description": "缓解措施" - }, - "contingencyPlan": { - "type": "string", - "description": "应急计划" - }, - "triggerCondition": { - "type": "string", - "description": "触发条件" - }, - "discoverTime": { - "type": "string", - "description": "发现时间" - }, - "dueDate": { - "type": "string", - "description": "预期解决日期" - }, - "resolvedTime": { - "type": "string", - "description": "解决时间" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "更新时间" - } - } - }, - "BaseResponseRiskVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/RiskVO", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "TableDataInfoRiskVO": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "总记录数", - "format": "int64" - }, - "rows": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RiskVO", - "description": "风险VO\n用于风险列表展示" - }, - "description": "列表数据" - }, - "code": { - "type": "integer", - "description": "消息状态码" - }, - "msg": { - "type": "string", - "description": "消息内容" - } - } - }, - "BaseResponseLong": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "integer", - "description": "", - "format": "int64" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseTableDataInfoRiskVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/TableDataInfoRiskVO", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "RiskStatisticsVO": { - "type": "object", - "properties": { - "totalCount": { - "type": "integer", - "description": "风险总数" - }, - "identifiedCount": { - "type": "integer", - "description": "已识别数量" - }, - "assignedCount": { - "type": "integer", - "description": "已分派工单数量" - }, - "mitigatingCount": { - "type": "integer", - "description": "缓解中数量" - }, - "resolvedCount": { - "type": "integer", - "description": "已解决数量" - }, - "closedCount": { - "type": "integer", - "description": "已关闭数量" - }, - "criticalCount": { - "type": "integer", - "description": "严重风险数量" - }, - "highCount": { - "type": "integer", - "description": "高风险数量" - }, - "mediumCount": { - "type": "integer", - "description": "中风险数量" - }, - "lowCount": { - "type": "integer", - "description": "低风险数量" - }, - "categoryStats": { - "type": "object", - "properties": {}, - "description": "按分类统计" - }, - "levelStats": { - "type": "object", - "properties": {}, - "description": "按等级统计" - }, - "trendData": { - "type": "object", - "properties": {}, - "description": "处理趋势(近6个月)" - }, - "averageRiskScore": { - "type": "number", - "description": "平均风险得分" - }, - "unresolvedHighCount": { - "type": "integer", - "description": "未解决高风险数量" - } - } - }, - "BaseResponseRiskStatisticsVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/RiskStatisticsVO", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "CreateWorkOrderRequest": { - "type": "object", - "properties": { - "projectId": { - "type": "integer", - "description": "项目ID", - "format": "int64" - }, - "riskId": { - "type": "integer", - "description": "关联风险ID", - "format": "int64" - }, - "orderType": { - "type": "string", - "description": "工单类型: bug-缺陷, feature-需求, task-任务, incident-事件, risk_handle-风险处理, other-其他" - }, - "title": { - "type": "string", - "description": "工单标题" - }, - "description": { - "type": "string", - "description": "工单描述" - }, - "priority": { - "type": "string", - "description": "优先级: critical-紧急, high-高, medium-中, low-低" - }, - "handlerId": { - "type": "integer", - "description": "处理人ID", - "format": "int64" - }, - "handlerGroupId": { - "type": "integer", - "description": "处理组ID", - "format": "int64" - }, - "deadline": { - "type": "string", - "description": "截止时间" - }, - "source": { - "type": "string", - "description": "来源: web-网页, mobile-移动端, api-接口, system-系统生成, risk-风险分派" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - } - } - }, - "WorkOrderVO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "工单ID", - "format": "int64" - }, - "orderCode": { - "type": "string", - "description": "工单编号" - }, - "orderType": { - "type": "string", - "description": "工单类型: bug-缺陷, feature-需求, task-任务, incident-事件, risk_handle-风险处理, other-其他" - }, - "projectId": { - "type": "integer", - "description": "项目ID", - "format": "int64" - }, - "projectName": { - "type": "string", - "description": "项目名称" - }, - "riskId": { - "type": "integer", - "description": "关联风险ID", - "format": "int64" - }, - "riskName": { - "type": "string", - "description": "关联风险名称" - }, - "title": { - "type": "string", - "description": "工单标题" - }, - "description": { - "type": "string", - "description": "工单描述" - }, - "creatorId": { - "type": "integer", - "description": "创建人ID", - "format": "int64" - }, - "creatorName": { - "type": "string", - "description": "创建人姓名" - }, - "handlerId": { - "type": "integer", - "description": "处理人ID", - "format": "int64" - }, - "handlerName": { - "type": "string", - "description": "处理人姓名" - }, - "handlerAvatar": { - "type": "string", - "description": "处理人头像" - }, - "handlerGroupId": { - "type": "integer", - "description": "处理组ID", - "format": "int64" - }, - "priority": { - "type": "string", - "description": "优先级: critical-紧急, high-高, medium-中, low-低" - }, - "status": { - "type": "string", - "description": "状态: pending-待处理, assigned-已分派, processing-处理中, resolved-已解决, closed-已关闭, reopened-已重开" - }, - "source": { - "type": "string", - "description": "来源: web-网页, mobile-移动端, api-接口, system-系统生成, risk-风险分派" - }, - "deadline": { - "type": "string", - "description": "截止时间" - }, - "assignedTime": { - "type": "string", - "description": "分派时间" - }, - "firstResponseTime": { - "type": "string", - "description": "首次响应时间" - }, - "resolvedTime": { - "type": "string", - "description": "解决时间" - }, - "closedTime": { - "type": "string", - "description": "关闭时间" - }, - "satisfactionScore": { - "type": "integer", - "description": "满意度评分(1-5)" - }, - "isOverdue": { - "type": "boolean", - "description": "是否超期" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateTime": { - "type": "string", - "description": "更新时间" - } - } - }, - "BaseResponseWorkOrderVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/WorkOrderVO", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "TableDataInfoWorkOrderVO": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "总记录数", - "format": "int64" - }, - "rows": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkOrderVO", - "description": "工单VO\n用于工单列表展示" - }, - "description": "列表数据" - }, - "code": { - "type": "integer", - "description": "消息状态码" - }, - "msg": { - "type": "string", - "description": "消息内容" - } - } - }, - "BaseResponseTableDataInfoWorkOrderVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/TableDataInfoWorkOrderVO", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "ProcessWorkOrderRequest": { - "type": "object", - "properties": { - "workOrderId": { - "type": "integer", - "description": "工单ID", - "format": "int64" - }, - "status": { - "type": "string", - "description": "处理状态: processing-处理中, resolved-已解决, closed-已关闭, reopened-已重开" - }, - "satisfactionScore": { - "type": "integer", - "description": "满意度评分(1-5)" - } - } - }, - "WorkOrderStatisticsVO": { - "type": "object", - "properties": { - "totalCount": { - "type": "integer", - "description": "工单总数" - }, - "pendingCount": { - "type": "integer", - "description": "待处理数量" - }, - "assignedCount": { - "type": "integer", - "description": "已分配数量" - }, - "processingCount": { - "type": "integer", - "description": "处理中数量" - }, - "completedCount": { - "type": "integer", - "description": "已完成数量" - }, - "closedCount": { - "type": "integer", - "description": "已关闭数量" - }, - "rejectedCount": { - "type": "integer", - "description": "已驳回数量" - }, - "overdueCount": { - "type": "integer", - "description": "超期未完成数量" - }, - "aboutToExpireCount": { - "type": "integer", - "description": "即将超期数量(7天内)" - }, - "typeStats": { - "type": "object", - "properties": {}, - "description": "按类型统计" - }, - "priorityStats": { - "type": "object", - "properties": {}, - "description": "按优先级统计" - } - } - }, - "BaseResponseWorkOrderStatisticsVO": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/WorkOrderStatisticsVO", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - } - }, - "responses": {}, - "securitySchemes": {} - }, - "servers": [], - "security": [] -} diff --git a/src/api/默认模块.openapi.json b/src/api/默认模块.openapi.json deleted file mode 100644 index 20171b0..0000000 --- a/src/api/默认模块.openapi.json +++ /dev/null @@ -1,1467 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "默认模块", - "description": "", - "version": "1.0.0" - }, - "tags": [], - "paths": { - "/api/v1/milestone/list": { - "get": { - "summary": "分页查询里程碑列表", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "pageNum", - "in": "query", - "description": "", - "required": true, - "example": 1, - "schema": { - "type": "integer" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "", - "required": true, - "example": 10, - "schema": { - "type": "integer" - } - }, - { - "name": "projectId", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "status", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponsePageMapObject" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/milestone/{id}": { - "get": { - "summary": "根据ID查询里程碑详情", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseProjectMilestone" - } - } - } - } - }, - "security": [] - }, - "delete": { - "summary": "删除里程碑", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/milestone": { - "post": { - "summary": "新增里程碑", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectMilestone", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseLong" - } - } - } - } - }, - "security": [] - }, - "put": { - "summary": "修改里程碑", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectMilestone", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/milestone/{id}/progress": { - "put": { - "summary": "更新里程碑进度", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "progress", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/milestone/{id}/status": { - "put": { - "summary": "更新里程碑状态", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "status", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/milestone/delayed-key": { - "get": { - "summary": "查询已延期的关键里程碑", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseListProjectMilestone" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/milestone/upcoming": { - "get": { - "summary": "查询即将到期的里程碑", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "days", - "in": "query", - "description": "", - "required": true, - "example": 7, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseListProjectMilestone" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/milestone/stats/progress": { - "get": { - "summary": "查询里程碑完成进度统计", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseMapObject" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/task/list": { - "get": { - "summary": "分页查询任务列表", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "pageNum", - "in": "query", - "description": "", - "required": true, - "example": 1, - "schema": { - "type": "integer" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "", - "required": true, - "example": 10, - "schema": { - "type": "integer" - } - }, - { - "name": "projectId", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "milestoneId", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "assigneeId", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "status", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "priority", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "keyword", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponsePageMapObject" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/task/{id}": { - "get": { - "summary": "根据ID查询任务详情", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseTask" - } - } - } - } - }, - "security": [] - }, - "delete": { - "summary": "删除任务", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/task": { - "post": { - "summary": "新增任务", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Task", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseLong" - } - } - } - } - }, - "security": [] - }, - "put": { - "summary": "修改任务", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Task", - "description": "" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/task/my-tasks": { - "get": { - "summary": "查询我的待办任务", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "userId", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "projectId", - "in": "query", - "description": "", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseListTask" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/task/{id}/progress": { - "put": { - "summary": "更新任务进度", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "progress", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/task/{id}/status": { - "put": { - "summary": "更新任务状态", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "status", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseVoid" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/task/{id}/dependencies": { - "get": { - "summary": "查询任务依赖关系", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseListMapObject" - } - } - } - } - }, - "security": [] - } - }, - "/api/v1/task/stats/status": { - "get": { - "summary": "统计项目任务状态分布", - "deprecated": false, - "description": "", - "tags": [], - "parameters": [ - { - "name": "projectId", - "in": "query", - "description": "", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "", - "example": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95", - "schema": { - "type": "string", - "default": "Bearer b35c6f5b-bc0b-4652-bef2-eca04a5cdd95" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseResponseListMapObject" - } - } - } - } - }, - "security": [] - } - } - }, - "components": { - "schemas": { - "OrderItem": { - "type": "object", - "properties": { - "column": { - "type": "string", - "description": "需要进行排序的字段" - }, - "asc": { - "type": "boolean", - "description": "是否正序排列,默认 true", - "default": true - } - } - }, - "MapObject": { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/key" - } - } - }, - "BaseResponseMapObject": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/MapObject", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "PageMapObject": { - "type": "object", - "properties": { - "records": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapObject" - }, - "description": "查询数据列表", - "default": "Collections.emptyList()" - }, - "total": { - "type": "integer", - "description": "总数", - "format": "int64", - "default": 0 - }, - "size": { - "type": "integer", - "description": "每页显示条数,默认 10", - "format": "int64", - "default": 10 - }, - "current": { - "type": "integer", - "description": "当前页", - "format": "int64", - "default": 1 - }, - "orders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrderItem", - "description": "com.baomidou.mybatisplus.core.metadata.OrderItem" - }, - "description": "排序字段信息", - "default": "new ArrayList<>()" - }, - "optimizeCountSql": { - "type": "boolean", - "description": "自动优化 COUNT SQL", - "default": true - }, - "searchCount": { - "type": "boolean", - "description": "是否进行 count 查询", - "default": true - }, - "optimizeJoinOfCountSql": { - "type": "boolean", - "description": "{@link #optimizeJoinOfCountSql()}", - "default": true - }, - "maxLimit": { - "type": "integer", - "description": "单页分页条数限制", - "format": "int64" - }, - "countId": { - "type": "string", - "description": "countId" - }, - "pages": { - "type": "integer", - "format": "int64" - } - } - }, - "BaseResponsePageMapObject": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/PageMapObject", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "ProjectMilestone": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "", - "format": "int64" - }, - "projectId": { - "type": "integer", - "description": "项目ID", - "format": "int64" - }, - "milestoneName": { - "type": "string", - "description": "里程碑名称" - }, - "description": { - "type": "string", - "description": "描述" - }, - "planDate": { - "type": "string", - "description": "计划日期" - }, - "actualDate": { - "type": "string", - "description": "实际日期" - }, - "status": { - "type": "string", - "description": "状态: pending-待开始, in_progress-进行中, completed-已完成, delayed-延期" - }, - "progress": { - "type": "integer", - "description": "完成进度" - }, - "sortOrder": { - "type": "integer", - "description": "排序" - }, - "isKey": { - "type": "integer", - "description": "是否关键里程碑: 1-是, 0-否" - }, - "deliverables": { - "type": "array", - "items": { - "type": "string" - }, - "description": "交付物列表" - }, - "extraData": { - "type": "object", - "properties": {}, - "description": "扩展数据" - }, - "createBy": { - "type": "integer", - "description": "创建人", - "format": "int64" - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateBy": { - "type": "integer", - "description": "更新人", - "format": "int64" - }, - "updateTime": { - "type": "string", - "description": "更新时间" - }, - "deleted": { - "type": "integer", - "description": "删除标记" - } - } - }, - "Task": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "", - "format": "int64" - }, - "taskCode": { - "type": "string", - "description": "任务编号" - }, - "projectId": { - "type": "integer", - "description": "项目ID", - "format": "int64" - }, - "milestoneId": { - "type": "integer", - "description": "所属里程碑ID", - "format": "int64" - }, - "taskName": { - "type": "string", - "description": "任务名称" - }, - "description": { - "type": "string", - "description": "任务描述" - }, - "taskType": { - "type": "string", - "description": "任务类型" - }, - "assigneeId": { - "type": "integer", - "description": "执行人ID", - "format": "int64" - }, - "planStartDate": { - "type": "string", - "description": "计划开始日期" - }, - "planEndDate": { - "type": "string", - "description": "计划结束日期" - }, - "actualStartDate": { - "type": "string", - "description": "实际开始日期" - }, - "actualEndDate": { - "type": "string", - "description": "实际结束日期" - }, - "planHours": { - "type": "number", - "description": "计划工时(小时)" - }, - "actualHours": { - "type": "number", - "description": "实际工时(小时)" - }, - "progress": { - "type": "integer", - "description": "进度百分比" - }, - "priority": { - "type": "string", - "description": "优先级: critical-关键, high-高, medium-中, low-低" - }, - "status": { - "type": "string", - "description": "状态: pending-待开始, in_progress-进行中, completed-已完成, cancelled-已取消" - }, - "sortOrder": { - "type": "integer", - "description": "排序" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "标签" - }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": {} - }, - "description": "附件列表" - }, - "extraData": { - "type": "object", - "properties": {}, - "description": "扩展数据" - }, - "createBy": { - "type": "integer", - "description": "创建人", - "format": "int64" - }, - "createTime": { - "type": "string", - "description": "创建时间" - }, - "updateBy": { - "type": "integer", - "description": "更新人", - "format": "int64" - }, - "updateTime": { - "type": "string", - "description": "更新时间" - }, - "deleted": { - "type": "integer", - "description": "删除标记" - } - } - }, - "key": { - "type": "object", - "properties": {} - }, - "BaseResponseLong": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "integer", - "description": "", - "format": "int64" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseProjectMilestone": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/ProjectMilestone", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseTask": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "$ref": "#/components/schemas/Task", - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseVoid": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "description": "", - "type": "null" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseListProjectMilestone": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectMilestone", - "description": "项目里程碑实体类\n对应数据库表: project_milestone" - }, - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseListTask": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Task", - "description": "任务实体类\n对应数据库表: task" - }, - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - }, - "BaseResponseListMapObject": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MapObject" - }, - "description": "" - }, - "message": { - "type": "string", - "description": "" - } - } - } - }, - "responses": {}, - "securitySchemes": {} - }, - "servers": [], - "security": [] -} diff --git a/src/views/ai-chat/index.vue b/src/views/ai-chat/index.vue index 32aaa05..4ec2eb5 100644 --- a/src/views/ai-chat/index.vue +++ b/src/views/ai-chat/index.vue @@ -35,8 +35,8 @@ const messages = ref([]); const sending = ref(false); const projects = ref([]); const projectLoading = ref(false); -const showProjectSelect = ref(false); const currentProjectId = ref(""); +const selectedProjectId = ref(""); const didInitProjectAndSessions = ref(false); const activeSessionKey = ref(""); const chatRenderKey = ref(0); @@ -108,10 +108,64 @@ function setCurrentProject(project: ProjectItem) { } } +async function setDraftByProjectId(projectId: string) { + const pid = String(projectId || ""); + if (!pid) return; + + const project = projects.value.find(p => String(p.id || "") === pid); + if (!project) return; + + currentProjectId.value = pid; + selectedProjectId.value = pid; + + currentSession.value = { + sessionId: "", + sessionTitle: "新对话", + projectId: pid, + projectName: project.projectName || "", + lastMessageTime: new Date().toISOString(), + messageCount: 0, + createTime: new Date().toISOString() + }; + + messages.value = []; + deepChatHistory.value = []; + activeSessionKey.value = `draft-${pid}-${Date.now()}`; + chatRenderKey.value += 1; +} + +async function applyProjectSelection(projectId: string) { + await setDraftByProjectId(projectId); + if (!currentProjectId.value) return; + + const pid = currentProjectId.value; + await loadSessions(pid); + const firstSession = sessions.value[0]; + if (firstSession?.sessionId) { + await selectSession(firstSession); + } +} + +async function startNewDraftSession() { + const pid = String( + currentProjectId.value || + selectedProjectId.value || + projects.value[0]?.id || + "" + ); + if (!pid) { + ElMessage.warning("请先选择项目"); + return; + } + await setDraftByProjectId(pid); + await loadSessions(pid); +} + // 选择会话 async function selectSession(session: ChatSessionVO) { currentSession.value = session; currentProjectId.value = String(session.projectId || ""); + selectedProjectId.value = String(session.projectId || ""); activeSessionKey.value = String(session.sessionId || ""); deepChatHistory.value = []; chatRenderKey.value += 1; @@ -140,35 +194,8 @@ async function loadMessages(sessionId: string) { // 创建新会话 async function createNewSession() { - if (!currentSession.value?.projectId && projects.value.length === 0) { - await loadProjects(); - } - showProjectSelect.value = true; -} - -// 选择项目后创建会话 -async function handleProjectSelect(project: ProjectItem) { - showProjectSelect.value = false; - const pid = String(project.id || ""); - if (!pid) { - ElMessage.warning("项目ID缺失,无法创建会话"); - return; - } - currentProjectId.value = pid; - currentSession.value = { - sessionId: "", - sessionTitle: "新对话", - projectId: pid, - projectName: project.projectName || "", - lastMessageTime: new Date().toISOString(), - messageCount: 0, - createTime: new Date().toISOString() - }; - messages.value = []; - deepChatHistory.value = []; - activeSessionKey.value = `draft-${pid}-${Date.now()}`; - chatRenderKey.value += 1; - await loadSessions(currentProjectId.value); + if (!projects.value.length) await loadProjects(); + await startNewDraftSession(); } async function requestAssistantReply(messageText: string): Promise { @@ -259,10 +286,7 @@ async function handleDeleteSession(session: ChatSessionVO) { deepChatHistory.value = []; const defaultProject = projects.value[0]; if (defaultProject?.id) { - currentSession.value = null; - setCurrentProject(defaultProject); - activeSessionKey.value = `draft-${String(defaultProject.id)}-${Date.now()}`; - chatRenderKey.value += 1; + await applyProjectSelection(String(defaultProject.id)); } else { currentSession.value = null; activeSessionKey.value = ""; @@ -293,19 +317,10 @@ onUnmounted(() => { async function initPage() { await loadProjects(); if (!didInitProjectAndSessions.value && projects.value.length > 0) { - setCurrentProject(projects.value[0]); + selectedProjectId.value = String(projects.value[0]?.id || ""); didInitProjectAndSessions.value = true; - } - if (!activeSessionKey.value && currentProjectId.value) { - activeSessionKey.value = `draft-${currentProjectId.value}-${Date.now()}`; - } - await loadSessions(); - const firstSession = sessions.value[0]; - if (firstSession?.sessionId) { - await selectSession(firstSession); - } else { - deepChatHistory.value = []; - chatRenderKey.value += 1; + if (selectedProjectId.value) + await applyProjectSelection(selectedProjectId.value); } } @@ -329,25 +344,22 @@ onMounted(() => { - -
-
- 选择项目 - - - -
- -
+ + - - {{ project.projectName }} -
-
+ :key="String(project.id || '')" + :label="project.projectName || ''" + :value="String(project.id || '')" + /> +
@@ -469,28 +481,9 @@ onMounted(() => { } } - .project-select-panel { + .project-select { + padding: 12px 16px; border-bottom: 1px solid var(--el-border-color-light); - - .panel-header { - display: flex; - align-items: center; - justify-content: space-between; - padding: 12px 16px; - font-weight: 500; - } - - .project-item { - display: flex; - align-items: center; - padding: 12px 16px; - cursor: pointer; - transition: background 0.2s; - - &:hover { - background: var(--el-fill-color-light); - } - } } .session-list { diff --git a/src/views/chatai/components/ChatGPT.vue b/src/views/chatai/components/ChatGPT.vue index 8c31bd3..bd4720e 100644 --- a/src/views/chatai/components/ChatGPT.vue +++ b/src/views/chatai/components/ChatGPT.vue @@ -54,7 +54,7 @@ watch(