初始
This commit is contained in:
126
api/app/project/res.go
Normal file
126
api/app/project/res.go
Normal file
@ -0,0 +1,126 @@
|
||||
package project
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/tiger1103/gfast/v3/api/v1/common"
|
||||
)
|
||||
|
||||
// 项目列表响应数据
|
||||
type ProjectListRes struct {
|
||||
ProjectTotal int `json:"projectTotal"` // 项目总数
|
||||
BuildProject int `json:"buildProject"` // 在建项目数量
|
||||
ProjectCapacity int `json:"projectCapacity"` // 项目容量
|
||||
ProjectListModels []ProjectListModel `json:"projectListModels"` // 列表数据
|
||||
}
|
||||
type ProjectListModel struct {
|
||||
ProjectID int `json:"projectId"` // 项目ID
|
||||
ProjectName string `json:"projectName"` // 项目名称
|
||||
ProductionDays int `json:"productionDays"` // 安全生产天数
|
||||
Status string `json:"status"` // 项目状态
|
||||
TotalQuantity int `json:"totalQuantity"` // 总数量
|
||||
CompletedQuantity int `json:"completedQuantity"` // 已完成数量
|
||||
ProjectLeader string `json:"projectLeader"` // 项目负责人
|
||||
OnStreamTime string `json:"onStreamTime"` // 开工时间
|
||||
}
|
||||
|
||||
// 项目详情响应数据【基础数据部分】
|
||||
type ProjectDetailModelRes struct {
|
||||
ProjectID int `json:"projectId"` // 项目ID
|
||||
ProjectName string `json:"projectName"` // 项目名称
|
||||
ProjectLeader string `json:"projectLeader"` // 项目负责人
|
||||
OnStreamTime string `json:"onStreamTime"` // 开工时间(计划开工)
|
||||
ProductionDays int `json:"productionDays"` // 安全生产天数
|
||||
TotalQuantity int `json:"totalQuantity"` // 总数量
|
||||
CompletedQuantity int `json:"completedQuantity"` // 已完成数量
|
||||
}
|
||||
|
||||
// 项目详情响应数据【项目计划】
|
||||
type ProjectPlanDetailRes struct {
|
||||
ProjectPlan
|
||||
}
|
||||
type ProjectPlan struct {
|
||||
PendingPlan int `json:"pendingTasks"` // 待开始计划
|
||||
ProcessingPlan int `json:"processingTasks"` // 进行中计划
|
||||
CompletedPlan int `json:"completedTasks"` // 已完成计划
|
||||
DeferredPlan int `json:"deferredTasks"` // 滞后计划
|
||||
}
|
||||
|
||||
type ProjectPlanDetailStatusRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
common.ListRes
|
||||
List []SchduleList `json:"list"`
|
||||
}
|
||||
|
||||
// SchduleList 计划详情
|
||||
type SchduleList struct {
|
||||
// 工作名称
|
||||
WorkName string `json:"work_name"`
|
||||
// 计划数量
|
||||
PlanNum int `json:"plan_num"`
|
||||
// 实际完成数量
|
||||
FinishedNum int `json:"finished_num"`
|
||||
// 开始时间
|
||||
StartTime string `json:"start_at"`
|
||||
// 结束时间
|
||||
EndTime string `json:"end_at"`
|
||||
// 工日
|
||||
WorkDay int `json:"work_day"`
|
||||
// 工作量百分比
|
||||
WorkPercent int `json:"work_percent"`
|
||||
// 负责人
|
||||
Leader string `json:"principal"`
|
||||
}
|
||||
|
||||
// 项目详情响应数据【视频监控】
|
||||
type ProjectVideoDetailRes struct {
|
||||
YS7Devices []YS7Device
|
||||
}
|
||||
|
||||
type YS7Device struct {
|
||||
ID int `json:"id"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
DeviceSerial string `json:"deviceSerial"`
|
||||
DeviceName string `json:"deviceName"`
|
||||
DeviceType string `json:"deviceType"`
|
||||
Status int `json:"status"`
|
||||
Defence int `json:"defence"`
|
||||
DeviceVersion string `json:"deviceVersion"`
|
||||
ProjectID string `json:"projectId"`
|
||||
Detail string `json:"detail"`
|
||||
Position string `json:"position"`
|
||||
Remark string `json:"remark"`
|
||||
VideoEncrypted int `json:"videoEncrypted"`
|
||||
}
|
||||
|
||||
// 项目详情响应数据【施工日志】
|
||||
type ProjectLogRes struct {
|
||||
Logs []ConstructionLog `json:"logs"`
|
||||
}
|
||||
|
||||
type ConstructionLog struct {
|
||||
ID int64 `json:"id"`
|
||||
DateOfOccurrence string `json:"dateOfOccurrence"`
|
||||
Condition string `json:"condition"`
|
||||
TechnologyQuality string `json:"technologyQuality"`
|
||||
Remark string `json:"remark"`
|
||||
Path string `json:"path"`
|
||||
CreatedBy string `json:"createdBy"`
|
||||
UpdatedBy string `json:"updatedBy"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt time.Time `json:"deletedAt"`
|
||||
}
|
||||
|
||||
type VisualProgress struct {
|
||||
Id int64 `json:"id" dc:"主键"`
|
||||
ProjectID int64 `json:"projectId" dc:"项目ID"`
|
||||
ProjectName string `json:"projectName" dc:"项目名称"`
|
||||
ReporterID int64 `json:"reporterId" dc:"上报人ID"`
|
||||
ReporterName string `json:"reporterName" dc:"上报人名字"`
|
||||
ReportTime time.Time `json:"reportTime" dc:"上报时间"`
|
||||
Title string `json:"title" dc:"形象标题"`
|
||||
ProgressDesc string `json:"progressDesc" dc:"进度描述"`
|
||||
AttachmentURL string `json:"attachmentUrl" dc:"附件URL"`
|
||||
}
|
Reference in New Issue
Block a user