213 lines
9.4 KiB
Go
213 lines
9.4 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成api操作代码。
|
|||
|
// 生成日期:2023-10-12 11:41:31
|
|||
|
// 生成路径: api/v1/system/bus_machinery_detail.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"
|
|||
|
)
|
|||
|
|
|||
|
// BusMachineryDetailSearchReq 分页请求参数
|
|||
|
type BusMachineryDetailSearchReq struct {
|
|||
|
g.Meta `path:"/list" tags:"机械详情" method:"get" summary:"机械详情列表"`
|
|||
|
MachineryId string `p:"machineryId" dc:"机械主键ID"`
|
|||
|
CheckoutNumber string `p:"checkoutNumber"` //检验证编号
|
|||
|
Status string `p:"status"` //施工类型状态
|
|||
|
EntryTime string `p:"entryTime" v:"entryTime@datetime#入场时间需为YYYY-MM-DD hh:mm:ss格式"` //入场时间
|
|||
|
commonApi.PageReq
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailSearchRes 列表返回结果
|
|||
|
type BusMachineryDetailSearchRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
List []*model.BusMachineryDetailListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailAddReq 添加操作请求参数
|
|||
|
type BusMachineryDetailAddReq struct {
|
|||
|
g.Meta `path:"/add" tags:"机械详情" method:"post" summary:"机械详情添加"`
|
|||
|
commonApi.Author
|
|||
|
Type int `p:"type" dc:"1出场 2入场" v:"between:1,2"`
|
|||
|
CheckoutNumber string `p:"checkoutNumber" dc:"检验证编号" v:"required#检验证编号不能为空"`
|
|||
|
CheckoutUnit string `p:"checkoutUnit" dc:"检验单位&生产厂家" v:"required#检验单位不能为空"`
|
|||
|
CheckoutDate string `p:"checkoutDate" dc:"检定日期/有效期" v:"required#检定日期不能为空"`
|
|||
|
Picture string `p:"picture" dc:"多个图片用逗号分隔"`
|
|||
|
EntryTime string `p:"entryTime"dc:"入场时间"`
|
|||
|
Remark string `p:"remark" dc:"备注"`
|
|||
|
MachineryId string `p:"machineryId" dc:"机械主键ID"`
|
|||
|
Principal string `p:"principal" dc:"负责人" v:"required#负责人不能为空"`
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailAddRes 添加操作返回结果
|
|||
|
type BusMachineryDetailAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailEditReq 修改操作请求参数
|
|||
|
type BusMachineryDetailEditReq struct {
|
|||
|
g.Meta `path:"/edit" tags:"机械详情" method:"put" summary:"机械详情修改"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键ID不能为空"`
|
|||
|
Type int `p:"type" dc:"1出场 2入场" v:"between:1,2"`
|
|||
|
CheckoutNumber string `p:"checkoutNumber" dc:"检验证编号" v:"required#检验证编号不能为空"`
|
|||
|
CheckoutUnit string `p:"checkoutUnit" dc:"检验单位" v:"required#检验单位不能为空"`
|
|||
|
CheckoutDate string `p:"checkoutDate" dc:"检定日期/有效期" v:"required#检定日期不能为空"`
|
|||
|
EntryTime string `p:"entryTime"dc:"入场时间"`
|
|||
|
Status string `p:"status" dc:"施工类型状态(0正常 1停用)" v:"required#施工类型状态不能为空"`
|
|||
|
Picture string `p:"picture" dc:"多个图片用逗号分隔"`
|
|||
|
Remark string `p:"remark" dc:"备注"`
|
|||
|
Principal string `p:"principal" dc:"负责人" v:"required#负责人不能为空"`
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailEditRes 修改操作返回结果
|
|||
|
type BusMachineryDetailEditRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailGetReq 获取一条数据请求
|
|||
|
type BusMachineryDetailGetReq struct {
|
|||
|
g.Meta `path:"/get" tags:"机械详情" method:"get" summary:"获取机械详情信息"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailGetRes 获取一条数据结果
|
|||
|
type BusMachineryDetailGetRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
*model.BusMachineryDetailGetIdInfoRes
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailDeleteReq 删除数据请求
|
|||
|
type BusMachineryDetailDeleteReq struct {
|
|||
|
g.Meta `path:"/delete" tags:"机械详情" method:"delete" summary:"删除机械详情"`
|
|||
|
commonApi.Author
|
|||
|
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailDeleteRes 删除数据返回
|
|||
|
type BusMachineryDetailDeleteRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
//详情记录
|
|||
|
|
|||
|
// BusMachineryDetailRecordReq 删除数据请求
|
|||
|
type BusMachineryDetailRecordReq struct {
|
|||
|
g.Meta `path:"/recordlist" tags:"机械详情" method:"get" summary:"机械详情记录"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailRecordRes 删除数据返回
|
|||
|
type BusMachineryDetailRecordRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// app
|
|||
|
|
|||
|
// BusMachineryDetailSearchReq 分页请求参数
|
|||
|
type BusMachineryDetailAppSearchReq struct {
|
|||
|
g.Meta `path:"/applist" tags:"机械详情" method:"get" summary:"App机械详情列表"`
|
|||
|
MachineryId string `p:"machineryId" dc:"机械主键ID"`
|
|||
|
AppStatus int `p:"appStatus" dc:"0 全部 1入场 2停用 3出场"` //施工类型状态
|
|||
|
commonApi.PageReq
|
|||
|
commonApi.Author
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailSearchRes 列表返回结果
|
|||
|
type BusMachineryDetailAppSearchRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
commonApi.ListRes
|
|||
|
List []*model.BusMachineryDetailAppListRes `json:"list"`
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailAppAddReq 添加操作请求参数
|
|||
|
type BusMachineryDetailAppAddReq struct {
|
|||
|
g.Meta `path:"/appadd" tags:"机械详情" method:"post" summary:"App机械详情添加"`
|
|||
|
commonApi.Author
|
|||
|
//Type int `p:"type" dc:"1出场 2入场" v:"between:1,2"`
|
|||
|
CheckoutNumber string `p:"checkoutNumber" dc:"检验证编号" v:"required#检验证编号不能为空"`
|
|||
|
CheckoutUnit string `p:"checkoutUnit" dc:"检验单位&生产厂家" v:"required#检验单位不能为空"`
|
|||
|
CheckoutDate string `p:"checkoutDate" dc:"检定日期/有效期" v:"required#检定日期不能为空"`
|
|||
|
Picture string `p:"picture" dc:"多个图片用逗号分隔"`
|
|||
|
EntryTime string `p:"entryTime" dc:"入场时间"` //入场时间
|
|||
|
Status string `p:"status" dc:"施工类型状态(0正常 1停用)" v:"required#施工类型状态不能为空"`
|
|||
|
InspectionFile []model.BusMachineryDetailAddFile `json:"inspectionFile" dc:"上传设备合格校验单"`
|
|||
|
LeaseFile []model.BusMachineryDetailAddFile `json:"leaseFile"dc:"上传设备租赁合同"`
|
|||
|
Remark string `p:"remark" dc:"备注"`
|
|||
|
MachineryId string `p:"machineryId" dc:"机械主键ID"`
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailAppAddRes 添加操作返回结果
|
|||
|
type BusMachineryDetailAppAddRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailAppEditReq 修改操作请求参数
|
|||
|
type BusMachineryDetailAppEditReq struct {
|
|||
|
g.Meta `path:"/appedit" tags:"机械详情" method:"put" summary:"App机械详情修改"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键ID不能为空"`
|
|||
|
Type int `p:"type" dc:"1出场 2入场" v:"between:1,2"`
|
|||
|
CheckoutNumber string `p:"checkoutNumber" dc:"检验证编号" v:"required#检验证编号不能为空"`
|
|||
|
CheckoutUnit string `p:"checkoutUnit" dc:"检验单位" v:"required#检验单位不能为空"`
|
|||
|
CheckoutDate string `p:"checkoutDate" dc:"检定日期/有效期" v:"required#检定日期不能为空"`
|
|||
|
Status string `p:"status" dc:"施工类型状态(0正常 1停用)" v:"required#施工类型状态不能为空"`
|
|||
|
Picture string `p:"picture" dc:"多个图片用逗号分隔"`
|
|||
|
InspectionFile []model.BusMachineryDetailFile `json:"inspectionFile" dc:"上传设备合格校验单"`
|
|||
|
LeaseFile []model.BusMachineryDetailFile `json:"leaseFile"dc:"上传设备租赁合同"`
|
|||
|
DelFile []model.BusMachineryDetailFile `p:"delFile"dc:"删除文件"`
|
|||
|
EntryTime string `p:"entryTime" dc:"入场时间"` //入场时间
|
|||
|
Remark string `p:"remark" dc:"备注"`
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailAppEditRes 修改操作返回结果
|
|||
|
type BusMachineryDetailAppEditRes struct {
|
|||
|
commonApi.EmptyRes
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailAppGetReq 获取一条数据请求
|
|||
|
type BusMachineryDetailAppGetReq struct {
|
|||
|
g.Meta `path:"/appget" tags:"机械详情" method:"get" summary:"App获取机械详情信息"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
// BusMachineryDetailAppGetRes 获取一条数据结果
|
|||
|
type BusMachineryDetailAppGetRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
*model.BusMachineryDetailAppGetIdInfoRes
|
|||
|
}
|
|||
|
|
|||
|
// app退场接口
|
|||
|
type BusMachineryDetailAppExitReq struct {
|
|||
|
g.Meta `path:"/appexit" tags:"机械详情" method:"get" summary:"App一键退场"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
type BusMachineryDetailAppExitRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
}
|
|||
|
|
|||
|
// app入场
|
|||
|
type BusMachineryDetailAppEntranceReq struct {
|
|||
|
g.Meta `path:"/appentrance" tags:"机械详情" method:"get" summary:"App一键入场"`
|
|||
|
commonApi.Author
|
|||
|
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
|
|||
|
}
|
|||
|
|
|||
|
type BusMachineryDetailAppEntranceRes struct {
|
|||
|
g.Meta `mime:"application/json"`
|
|||
|
}
|