feat(core): 完成AI项目管理平台基础模块开发
- 新增Spring Boot配置文件,支持多环境切换与数据库配置 - 集成PostgreSQL数据库和MyBatis Plus实现数据访问层 - 配置Spring AI和MinIO对象存储服务,支持文件上传下载功能 - 自定义错误码枚举,提供统一错误处理标准 - 实现MinIO客户端自动配置及服务端上传、下载和删除文件功能 - 开发OSS控制器及服务接口,实现文件管理API及文件存储操作 - 开发AI项目初始化模块,支持通过文本和文件生成结构化项目数据 - 设计项目初始化结果DTO,定义项目、里程碑、任务、成员、资源、风险等数据结构 - 实现项目初始化服务,调用AI聊天模型解析项目文档生成结构化输出 - 添加分页查询工具类,支持动态排序和分页参数构建 - 项目构建配置完善,集成必要依赖,支持Spring Boot 3和Java 17环境 - 代码结构规范,增加模块包说明及统一响应结果封装体系
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package cn.yinlihupo.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 项目初始化请求DTO
|
||||
*/
|
||||
@Data
|
||||
public class ProjectInitRequest {
|
||||
|
||||
/**
|
||||
* 项目资料文本内容(直接输入)
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* MinIO文件URL(已上传的文件)
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 文件类型:text, pdf, word等
|
||||
*/
|
||||
private String fileType;
|
||||
}
|
||||
222
src/main/java/cn/yinlihupo/domain/dto/ProjectInitResult.java
Normal file
222
src/main/java/cn/yinlihupo/domain/dto/ProjectInitResult.java
Normal file
@@ -0,0 +1,222 @@
|
||||
package cn.yinlihupo.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* AI项目初始化结果DTO
|
||||
* 对应系统提示词中定义的JSON输出格式
|
||||
*/
|
||||
@Data
|
||||
public class ProjectInitResult {
|
||||
|
||||
/**
|
||||
* 项目基本信息
|
||||
*/
|
||||
@JsonProperty("project")
|
||||
private ProjectInfo project;
|
||||
|
||||
/**
|
||||
* 里程碑列表
|
||||
*/
|
||||
@JsonProperty("milestones")
|
||||
private List<MilestoneInfo> milestones;
|
||||
|
||||
/**
|
||||
* 任务清单
|
||||
*/
|
||||
@JsonProperty("tasks")
|
||||
private List<TaskInfo> tasks;
|
||||
|
||||
/**
|
||||
* 项目成员
|
||||
*/
|
||||
@JsonProperty("members")
|
||||
private List<MemberInfo> members;
|
||||
|
||||
/**
|
||||
* 资源需求
|
||||
*/
|
||||
@JsonProperty("resources")
|
||||
private List<ResourceInfo> resources;
|
||||
|
||||
/**
|
||||
* 风险识别
|
||||
*/
|
||||
@JsonProperty("risks")
|
||||
private List<RiskInfo> risks;
|
||||
|
||||
/**
|
||||
* 时间节点
|
||||
*/
|
||||
@JsonProperty("timeline_nodes")
|
||||
private List<TimelineNodeInfo> timelineNodes;
|
||||
|
||||
// ==================== 内部类定义 ====================
|
||||
|
||||
@Data
|
||||
public static class ProjectInfo {
|
||||
@JsonProperty("project_name")
|
||||
private String projectName;
|
||||
|
||||
@JsonProperty("project_type")
|
||||
private String projectType;
|
||||
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty("objectives")
|
||||
private String objectives;
|
||||
|
||||
@JsonProperty("plan_start_date")
|
||||
private LocalDate planStartDate;
|
||||
|
||||
@JsonProperty("plan_end_date")
|
||||
private LocalDate planEndDate;
|
||||
|
||||
@JsonProperty("budget")
|
||||
private BigDecimal budget;
|
||||
|
||||
@JsonProperty("currency")
|
||||
private String currency;
|
||||
|
||||
@JsonProperty("priority")
|
||||
private String priority;
|
||||
|
||||
@JsonProperty("tags")
|
||||
private List<String> tags;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class MilestoneInfo {
|
||||
@JsonProperty("milestone_name")
|
||||
private String milestoneName;
|
||||
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty("plan_date")
|
||||
private LocalDate planDate;
|
||||
|
||||
@JsonProperty("deliverables")
|
||||
private String deliverables;
|
||||
|
||||
@JsonProperty("owner_role")
|
||||
private String ownerRole;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class TaskInfo {
|
||||
@JsonProperty("task_name")
|
||||
private String taskName;
|
||||
|
||||
@JsonProperty("parent_task_id")
|
||||
private String parentTaskId;
|
||||
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty("plan_start_date")
|
||||
private LocalDate planStartDate;
|
||||
|
||||
@JsonProperty("plan_end_date")
|
||||
private LocalDate planEndDate;
|
||||
|
||||
@JsonProperty("estimated_hours")
|
||||
private Integer estimatedHours;
|
||||
|
||||
@JsonProperty("priority")
|
||||
private String priority;
|
||||
|
||||
@JsonProperty("assignee_role")
|
||||
private String assigneeRole;
|
||||
|
||||
@JsonProperty("dependencies")
|
||||
private List<String> dependencies;
|
||||
|
||||
@JsonProperty("deliverables")
|
||||
private String deliverables;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class MemberInfo {
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty("role_code")
|
||||
private String roleCode;
|
||||
|
||||
@JsonProperty("responsibility")
|
||||
private String responsibility;
|
||||
|
||||
@JsonProperty("department")
|
||||
private String department;
|
||||
|
||||
@JsonProperty("weekly_hours")
|
||||
private Integer weeklyHours;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ResourceInfo {
|
||||
@JsonProperty("resource_name")
|
||||
private String resourceName;
|
||||
|
||||
@JsonProperty("resource_type")
|
||||
private String resourceType;
|
||||
|
||||
@JsonProperty("quantity")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@JsonProperty("unit")
|
||||
private String unit;
|
||||
|
||||
@JsonProperty("unit_price")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@JsonProperty("supplier")
|
||||
private String supplier;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class RiskInfo {
|
||||
@JsonProperty("risk_name")
|
||||
private String riskName;
|
||||
|
||||
@JsonProperty("category")
|
||||
private String category;
|
||||
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty("probability")
|
||||
private Integer probability;
|
||||
|
||||
@JsonProperty("impact")
|
||||
private Integer impact;
|
||||
|
||||
@JsonProperty("mitigation_plan")
|
||||
private String mitigationPlan;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class TimelineNodeInfo {
|
||||
@JsonProperty("node_name")
|
||||
private String nodeName;
|
||||
|
||||
@JsonProperty("node_type")
|
||||
private String nodeType;
|
||||
|
||||
@JsonProperty("plan_date")
|
||||
private LocalDate planDate;
|
||||
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty("kb_scope")
|
||||
private List<String> kbScope;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user