151 lines
4.7 KiB
Go
151 lines
4.7 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成api操作代码。
|
|||
|
// 生成日期:2023-07-31 11:20:54
|
|||
|
// 生成路径: api/v1/system/qianqi_fangzhen.go
|
|||
|
// 生成人:gfast
|
|||
|
// desc:方阵相关参数
|
|||
|
// company:云南奇讯科技有限公司
|
|||
|
// ==========================================================================
|
|||
|
|
|||
|
package system
|
|||
|
|
|||
|
import (
|
|||
|
"github.com/gogf/gf/v2/frame/g"
|
|||
|
"github.com/gogf/gf/v2/net/ghttp"
|
|||
|
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
|||
|
"github.com/tiger1103/gfast/v3/api/v1/common/shp"
|
|||
|
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
|||
|
)
|
|||
|
|
|||
|
// QianqiFangzhenSearchReq 分页请求参数
|
|||
|
type QianqiFangzhenSearchReq struct {
|
|||
|
g.Meta `path:"/list" tags:"方阵" method:"get" summary:"方阵列表"`
|
|||
|
ProjectId string `p:"projectId" v:"required#项目id不能为空"` // 项目id
|
|||
|
Name string `p:"name"` // 名称
|
|||
|
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` // 创建时间
|
|||
|
|
|||
|
commonApi.PageReq
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// QianqiFangzhenSearchRes 列表返回结果
|
|||
|
type QianqiFangzhenSearchRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
List []*model.QianqiFangzhenListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
// QianqiFangzhenAddReq 添加操作请求参数
|
|||
|
|
|||
|
type QianqiFangzhenAddReq struct {
|
|||
|
g.Meta `path:"/add" tags:"方阵" method:"post" summary:"方阵添加"`
|
|||
|
commonApi.Author
|
|||
|
ProjectId string `p:"projectId" v:"required#项目id不能为空"`
|
|||
|
// Name string `p:"name" `
|
|||
|
// SourceId string `p:"sourceId" `
|
|||
|
// SourcePath string `p:"sourcePath" `
|
|||
|
XiangbianId string `p:"xiangbianId" `
|
|||
|
File []*ghttp.UploadFile `p:"file" `
|
|||
|
}
|
|||
|
|
|||
|
//// QianqiFangzhenAddReq 添加操作请求参数
|
|||
|
//type QianqiFangzhenAddReq struct {
|
|||
|
// g.Meta `path:"/add" tags:"方阵" method:"post" summary:"方阵添加"`
|
|||
|
// commonApi.Author
|
|||
|
// ProjectId string `p:"projectId" v:"required#项目id不能为空"`
|
|||
|
// XiangbianId string `p:"xiangbianId" `
|
|||
|
// FilePath string `p:"filePath" `
|
|||
|
//}
|
|||
|
|
|||
|
// QianqiFangzhenAddRes 添加操作返回结果
|
|||
|
type QianqiFangzhenAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// QianqiFangzhenEditReq 修改操作请求参数
|
|||
|
type QianqiFangzhenEditReq struct {
|
|||
|
g.Meta `path:"/edit" tags:"方阵" method:"put" summary:"方阵修改"`
|
|||
|
commonApi.Author
|
|||
|
Name string `p:"name" `
|
|||
|
SourceId string `p:"sourceId"`
|
|||
|
Detail string `json:"detail"`
|
|||
|
}
|
|||
|
|
|||
|
// QianqiFangzhenEditRes 修改操作返回结果
|
|||
|
type QianqiFangzhenEditRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// QianqiFangzhenGetReq 获取一条数据请求
|
|||
|
type QianqiFangzhenGetReq struct {
|
|||
|
g.Meta `path:"/get" tags:"方阵" method:"get" summary:"获取方阵信息"`
|
|||
|
commonApi.Author
|
|||
|
Id int `p:"id" v:"required#主键必须"` // 通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// QianqiFangzhenGetRes 获取一条数据结果
|
|||
|
type QianqiFangzhenGetRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
*model.QianqiFangzhenInfoRes
|
|||
|
}
|
|||
|
|
|||
|
// QianqiFangzhenDeleteReq 删除数据请求
|
|||
|
type QianqiFangzhenDeleteReq struct {
|
|||
|
g.Meta `path:"/delete" tags:"方阵" method:"delete" summary:"删除方阵"`
|
|||
|
commonApi.Author
|
|||
|
Ids []int `p:"ids" v:"required#主键必须"` // 通过主键删除
|
|||
|
}
|
|||
|
|
|||
|
// QianqiFangzhenDeleteRes 删除数据返回
|
|||
|
type QianqiFangzhenDeleteRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
type QianqiFangzhenEditDetailReq struct {
|
|||
|
g.Meta `path:"/edit_detail" tags:"方阵" method:"put" summary:"方阵修改坐标高程信息"`
|
|||
|
commonApi.Author
|
|||
|
Detail shp.Polyline `json:"detail"`
|
|||
|
SourceId string `p:"sourceId" v:"required#资源id必须"`
|
|||
|
}
|
|||
|
type QianqiFangzhenEditDetailRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
type QianqiFangzhenAddDeviceReq struct {
|
|||
|
g.Meta `path:"/add_device" tags:"方阵" method:"post" summary:"方阵与其施工设备关联"`
|
|||
|
commonApi.Author
|
|||
|
// 方阵id
|
|||
|
FangzhenId string `p:"fangzhenId" v:"required#方阵id不能为空"`
|
|||
|
}
|
|||
|
|
|||
|
type QianqiFangzhenAddDeviceRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
type Component struct {
|
|||
|
Name string // 子设备名
|
|||
|
IsPercentage *int // 是否百分比
|
|||
|
Quantity int // 数量
|
|||
|
TypeNumber int
|
|||
|
}
|
|||
|
|
|||
|
type FacilityGroup struct {
|
|||
|
Name string
|
|||
|
FacilityCount *int
|
|||
|
IsPercentage *int // 是否百分比
|
|||
|
TypeNumber int
|
|||
|
Components []Component
|
|||
|
}
|
|||
|
|
|||
|
// 传入方阵的主键ID 并将其 ViewName 更新到表中
|
|||
|
type QianqiFangzhenUpdateViewNameReq struct {
|
|||
|
g.Meta `path:"/updateView" tags:"方阵" method:"put" summary:"更新方阵的ViewName"`
|
|||
|
commonApi.Author
|
|||
|
Id int `p:"id" dc:"方阵的ID" v:"required#缺少方阵的主键ID"` // 方阵的主键ID
|
|||
|
View string `p:"view" dc:"view的名字" v:"required#缺少方阵的ViewName"` // 方阵的ViewName
|
|||
|
}
|
|||
|
|
|||
|
type QianqiFangzhenUpdateViewNameRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|