Files
zmkgC/api/v1/system/qianqi_pingchang.go
2025-07-07 20:11:59 +08:00

213 lines
9.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期2023-08-08 10:08:24
// 生成路径: api/v1/system/qianqi_pingchang.go
// 生成人gfast
// desc:平场数据相关参数
// company:云南奇讯科技有限公司
// ==========================================================================
package system
import (
"github.com/gogf/gf/v2/frame/g"
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
)
type PingchangCalculateReq struct {
g.Meta `path:"calculate" summary:"计算平场" method:"post" tags:"平场相关"`
commonApi.Author
PcID string `json:"pc_id" dc:"平场id"`
Locations []Point `json:"locations" v:"required" dc:"采样的坐标点"`
//GridWidth float64 `json:"grid_width" v:"required" dc:"采样精度"`
//Area float64 `json:"area" dc:"面积" `
//Cut float64 `json:"cut" dc:"挖方" `
//Fill float64 `json:"fill" dc:"填方" `
//Total float64 `json:"total" dc:"挖填平衡值" `
//Radius int `json:"radius" dc:"邻居范围1为附近1圈2为附近2圈"`
}
type PingchangImportReq struct {
g.Meta `path:"import" summary:"导入平场区域" method:"post" tags:"平场相关"`
commonApi.Author
ProjectID string `json:"project_id" v:"required" dc:"项目id" `
}
type UsualRes struct {
commonApi.EmptyRes
}
type PingchangUpdateReq struct {
g.Meta `path:"update" summary:"更新平场区域相关数据" method:"post" tags:"平场相关"`
commonApi.Author
PcID string `json:"pc_id" v:"required" dc:"平场id"`
Points []Point `json:"points" dc:"平滑处理前的高程点" `
GridWidth float64 `json:"grid_width" v:"required" dc:"采点精度"`
PCName string `json:"pc_name" v:"required" dc:"平场范围名称"`
}
type Point struct {
Lng float64 `json:"lng" v:"required" dc:"经度"`
Lat float64 `json:"lat" v:"required" dc:"纬度"`
Alt float64 `json:"alt" dc:"高度"`
}
type PingChangListReq struct {
g.Meta `path:"list" summary:"根据项目id分页获取平场区域" method:"post" tags:"平场相关"`
commonApi.Author
ProjectID string `json:"project_id" v:"required" dc:"项目id" `
Page int `json:"page" v:"required" dc:"页数从1开始" `
PageSize int `json:"page_size" v:"required" dc:"每页数量" `
}
type PC1 struct {
ProjectID string `json:"project_id" dc:"项目id" `
PcID string `json:"pc_id" dc:"平场id"`
PCName string `json:"pc_name" dc:"平场范围名称"`
GridWidth float64 `json:"grid_width" dc:"采点精度"`
Progress float64 `json:"progress" dc:"计算进度"`
Cut float64 `json:"cut" dc:"挖方"`
Fill float64 `json:"fill" dc:"填方"`
Total float64 `json:"total" dc:"挖填平衡值"`
Area float64 `json:"area" dc:"面积"`
Shp string `json:"shp" dc:"计算后生成的shp"`
Range []Point `json:"range" dc:"平场范围"`
Points []Point `json:"points" dc:"平滑处理前的高程点" `
SmoothPoints []Point `json:"smooth_points" dc:"平滑处理后的高程点" `
}
type PingChangListRes struct {
Range []PC1 `json:"range" v:"required" dc:"平场范围"`
}
type PingChangAddReq struct {
g.Meta `path:"add" summary:"添加平场区域" method:"post" tags:"平场相关"`
commonApi.Author
ProjectID string `json:"project_id" v:"required" dc:"项目id" `
PCName string `json:"pc_name" v:"required" dc:"平场范围名称"`
GridWidth float64 `json:"grid_width" v:"required" dc:"采点精度"`
Range []Point `json:"range" v:"required" dc:"平场范围"`
}
type PC struct {
ProjectID string `json:"project_id" gorm:"type:varchar(128);comment:'项目id'" `
PcID string `json:"pc_id" gorm:"type:varchar(128);comment:'平场id'"`
PCName string `json:"pc_name" gorm:"type:varchar(128);comment:'平场范围名称'"`
GridWidth float64 `json:"grid_width" gorm:"comment:'采点精度'"`
Progress float64 `json:"progress" gorm:"comment:'计算进度'"`
Range string `json:"range" gorm:"comment:'平场范围'"`
Points string `json:"points" gorm:"comment:'平滑处理前的高程点'"`
SmoothPoints string `json:"smooth_points" gorm:"comment:'平滑处理后的高程点'"`
SHP string `json:"shp" gorm:"comment:'经过计算生成的shp文件'" `
Area float64 `json:"area" gorm:"comment:'面积'" `
Cut float64 `json:"cut" gorm:"comment:'挖方'" `
Fill float64 `json:"fill" gorm:"comment:'填方'" `
Total float64 `json:"total" gorm:"comment:'挖填平衡值'" `
Imported bool `json:"imported" gorm:"comment:'是否为导入的值'" `
}
type PingchangDelReq struct {
g.Meta `path:"del" summary:"删除平场区域" method:"post" tags:"平场相关"`
commonApi.Author
PcID string `json:"pc_id" v:"required" dc:"平场id"`
}
//// QianqiPingchangSearchReq 分页请求参数
//type QianqiPingchangSearchReq struct {
// g.Meta `path:"/list" tags:"平场数据" method:"get" summary:"平场数据列表"`
// Id string `p:"id"` //
// 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格式"` //
// DeleteAt string `p:"deleteAt" v:"deleteAt@datetime#需为YYYY-MM-DD hh:mm:ss格式"` //
// ProjectId string `p:"projectId"` //'项目id'
// PcId string `p:"pcId"` //'平场id'
// PcName string `p:"pcName"` //'平场范围名称'
// GridWidth string `p:"gridWidth" v:"gridWidth@float#'采点精度'需为浮点数"` //'采点精度'
// Progress string `p:"progress" v:"progress@float#'计算进度'需为浮点数"` //'计算进度'
// Range string `p:"range"` //'平场范围'
// Points string `p:"points"` //'平滑处理前的高程点'
// SmoothPoints string `p:"smoothPoints"` //'平滑处理后的高程点'
// Shp string `p:"shp"` //'经过计算生成的shp文件'
// Area string `p:"area" v:"area@float#'面积'需为浮点数"` //'面积'
// Cut string `p:"cut" v:"cut@float#'挖方'需为浮点数"` //'挖方'
// Fill string `p:"fill" v:"fill@float#'填方'需为浮点数"` //'填方'
// Total string `p:"total" v:"total@float#'挖填平衡值'需为浮点数"` //'挖填平衡值'
// Imported string `p:"imported" v:"imported@integer#'是否为导入的值'需为整数"` //'是否为导入的值'
// commonApi.PageReq
// commonApi.Author
//}
//
//// QianqiPingchangSearchRes 列表返回结果
//type QianqiPingchangSearchRes struct {
// g.Meta `mime:"application/json"`
// commonApi.ListRes
// List []*model.QianqiPingchangListRes `json:"list"`
//}
//
//// QianqiPingchangAddReq 添加操作请求参数
//type QianqiPingchangAddReq struct {
// g.Meta `path:"/add" tags:"平场数据" method:"post" summary:"平场数据添加"`
// commonApi.Author
// ProjectId string `p:"projectId" `
// File []*ghttp.UploadFile `p:"file" `
//}
//
//// QianqiPingchangAddRes 添加操作返回结果
//type QianqiPingchangAddRes struct {
// commonApi.EmptyRes
//}
//
//// QianqiPingchangEditReq 修改操作请求参数
//type QianqiPingchangEditReq struct {
// g.Meta `path:"/edit" tags:"平场数据" method:"put" summary:"平场数据修改"`
// commonApi.Author
// Id uint64 `p:"id" v:"required#主键ID不能为空"`
// CreateAt *gtime.Time `p:"createAt" `
// UpdateAt *gtime.Time `p:"updateAt" `
// DeleteAt *gtime.Time `p:"deleteAt" `
// ProjectId string `p:"projectId" `
// PcId string `p:"pcId" `
// PcName string `p:"pcName" v:"required#'平场范围名称'不能为空"`
// GridWidth float64 `p:"gridWidth" `
// Progress float64 `p:"progress" `
// Range string `p:"range" `
// Points string `p:"points" `
// SmoothPoints string `p:"smoothPoints" `
// Shp string `p:"shp" `
// Area float64 `p:"area" `
// Cut float64 `p:"cut" `
// Fill float64 `p:"fill" `
// Total float64 `p:"total" `
// Imported int `p:"imported" `
//}
//
//// QianqiPingchangEditRes 修改操作返回结果
//type QianqiPingchangEditRes struct {
// commonApi.EmptyRes
//}
//
//// QianqiPingchangGetReq 获取一条数据请求
//type QianqiPingchangGetReq struct {
// g.Meta `path:"/get" tags:"平场数据" method:"get" summary:"获取平场数据信息"`
// commonApi.Author
// Id uint64 `p:"id" v:"required#主键必须"` //通过主键获取
//}
//
//// QianqiPingchangGetRes 获取一条数据结果
//type QianqiPingchangGetRes struct {
// g.Meta `mime:"application/json"`
// *model.QianqiPingchangInfoRes
//}
//
//// QianqiPingchangDeleteReq 删除数据请求
//type QianqiPingchangDeleteReq struct {
// g.Meta `path:"/delete" tags:"平场数据" method:"delete" summary:"删除平场数据"`
// commonApi.Author
// Ids []uint64 `p:"ids" v:"required#主键必须"` //通过主键删除
//}
//
//// QianqiPingchangDeleteRes 删除数据返回
//type QianqiPingchangDeleteRes struct {
// commonApi.EmptyRes
//}