Files
zmkgC/api/v1/system/plan_week.go

155 lines
6.9 KiB
Go
Raw Permalink Normal View History

2025-07-07 20:11:59 +08:00
// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期2023-08-04 17:26:59
// 生成路径: api/v1/system/plan_week.go
// 生成人gfast
// desc:周计划相关参数
// company:云南奇讯科技有限公司
// ==========================================================================
package system
import (
"github.com/gogf/gf/v2/frame/g"
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
)
// PlanWeekSearchReq 分页请求参数
type PlanWeekSearchReq struct {
g.Meta `path:"/list" tags:"周计划" method:"get" summary:"周计划列表"`
//Id string `p:"id"` //
ProjectId string `p:"projectId" v:"required#项目id不能为空"` //项目id
DateRange []string `p:"dateRange" dc:"时间范围格式为2023-08-08"` //日期范围
//SourceId string `p:"sourceId"` //资源id
//Name string `p:"name"` //资源名称
//Start string `p:"start"` //开始时间
//End string `p:"end"` //结束时间
//PlanName string `p:"planName"` //计划名称
//PlanId string `p:"planId"` //周id
//CreateBy string `p:"createBy"` //
//UpdateBy string `p:"updateBy"` //
//CreateAt string `p:"createAt" v:"createAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` //
//UpdateAt string `p:"updateAt" v:"updateAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` //
//Table string `p:"table"` //source_id的数据对应的数据表
//Status string `p:"status" v:"status@integer#工作状态0未开始1进行中2已完成需为整数"` //工作状态0未开始1进行中2已完成
//commonApi.PageReq
commonApi.Author
}
// PlanWeekSearchRes 列表返回结果
type PlanWeekSearchRes struct {
g.Meta `mime:"application/json"`
List []*model.PlanWeekListRes `json:"list"`
}
type task struct {
SourceId string `p:"sourceId" v:"required#资源id不能为空"`
Name string `p:"name" v:"required#资源名称不能为空"`
SourceType string `p:"source_type" v:"required#资源类型不能为空"`
Cnt int `p:"cnt" `
//Table string `p:"table" v:"source_id的数据对应的数据表不能为空"`
//Status int `p:"status" v:"工作状态0未开始1进行中2已完成不能为空"`
}
// PlanWeekAddReq 添加操作请求参数
type PlanWeekAddReq struct {
g.Meta `path:"/add" tags:"周计划" method:"post" summary:"周计划添加"`
commonApi.Author
ProjectId string `p:"projectId" v:"required#项目id不能为空"`
Start string `p:"start" v:"required#开始时间不能为空"`
End string `p:"end" v:"required#结束时间不能为空"`
PlanName string `p:"planName" v:"required#计划名称不能为空"`
Tasks []task `p:"tasks" `
}
// PlanWeekAddRes 添加操作返回结果
type PlanWeekAddRes struct {
commonApi.EmptyRes
}
// PlanWeekEditReq 修改操作请求参数
type PlanWeekEditReq struct {
g.Meta `path:"/edit" tags:"周计划" method:"put" summary:"周计划修改"`
commonApi.Author
ProjectId string `p:"projectId" v:"required#项目id不能为空"`
PlanID string `p:"planId" v:"required#计划id不能为空"`
Start string `p:"start" v:"required#开始时间不能为空"`
End string `p:"end" v:"required#结束时间不能为空"`
PlanName string `p:"planName" v:"required#计划名称不能为空"`
Tasks []task `p:"tasks"`
}
// PlanWeekEditRes 修改操作返回结果
type PlanWeekEditRes struct {
commonApi.EmptyRes
}
// PlanWeekGetReq 获取一条数据请求
type PlanWeekGetReq struct {
g.Meta `path:"/get" tags:"周计划" method:"get" summary:"获取周计划信息"`
commonApi.Author
Id int `p:"id" v:"required#主键必须"` //通过主键获取
}
// PlanWeekGetRes 获取一条数据结果
type PlanWeekGetRes struct {
g.Meta `mime:"application/json"`
*model.PlanWeekInfoRes
}
// PlanWeekDeleteReq 删除数据请求
type PlanWeekDeleteReq struct {
g.Meta `path:"/delete" tags:"周计划" method:"delete" summary:"删除周计划"`
commonApi.Author
PlanID string `p:"planId" v:"required"` //通过主键删除
}
// PlanWeekDeleteRes 删除数据返回
type PlanWeekDeleteRes struct {
commonApi.EmptyRes
}
// PlanWeekGetInfoByPlanIDReq 根据计划id获取计划的详情类型
type PlanWeekGetInfoByPlanIDReq struct {
g.Meta `path:"/getInfoByPlanID" tags:"周计划" method:"get" summary:"根据计划id获取计划的详情类型"`
commonApi.Author
PlanID string `json:"planId" v:"required"` //通过主键删除
SourceType string `json:"source_type" ` //通过主键删除
PlanWeekReality bool `json:"plan_week_reality" ` //是否获取实际的
}
type PlanWeekGetInfoByPlanIDRes struct {
g.Meta `mime:"application/json"`
List []*model.Task `json:"list"`
}
// WeekAndWeekRealityListReq 根据条件获取到计划于实际的数据
type WeekAndWeekRealityListReq struct {
g.Meta `path:"/weekAndWeekRealityList" tags:"周计划" method:"get" summary:"总计划、周计划、月计划(根据条件获取到计划于实际的数据)"`
ProjectId string `p:"projectId" dc:"项目id" v:"required#项目id不能为空"` //项目id
DateRange []string `p:"dateRange" dc:"数组string 时间范围格式为2023-08-08"` //日期范围
commonApi.Author
}
// WeekAndWeekRealityListRes 列表返回结果
type WeekAndWeekRealityListRes struct {
g.Meta `mime:"application/json"`
WeekList []*model.PlanWeekListRes `json:"weekList"`
WeekRealityList []*model.PlanWeekRealityListRes `json:"weekRealityList"`
}
// WeeklyAndMonthlyReportDataGenerationReq 周报/月报数据生成周报生成word月报生成压缩包文件夹
type WeeklyAndMonthlyReportDataGenerationReq struct {
g.Meta `path:"/weeklyAndMonthlyReportDataGeneration" tags:"周计划" method:"get" summary:"周报/月报数据生成周报生成word月报生成压缩包文件夹"`
ProjectId int64 `p:"projectId" dc:"项目id" v:"required#项目id不能为空"`
Type string `p:"type" dc:"1周报、2月报" v:"between:1,2#取值范围为1~2"`
PlanId []string `p:"planId" dc:"周计划ID" v:"bail|required#planId不能为空|array#请填写planId有效数据"`
commonApi.Author
}
// WeeklyAndMonthlyReportDataGenerationRes 列表返回结果
type WeeklyAndMonthlyReportDataGenerationRes struct {
g.Meta `mime:"application/json"`
List []*model.ProgressOfWorksListRes `json:"list" dc:"数据"`
}