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

184 lines
7.0 KiB
Go
Raw Permalink Normal View History

2025-07-07 20:11:59 +08:00
// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期2025-03-03 10:32:47
// 生成路径: api/v1/system/bus_attendance_machine.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"
)
// BusAttendanceMachineSearchReq 分页请求参数
type BusAttendanceMachineSearchReq struct {
g.Meta `path:"/list" tags:"考勤机" method:"get" summary:"考勤机列表"`
ProjectId string `p:"projectId" dc:"项目ID"`
Sn string `p:"sn" dc:"设备sn"`
commonApi.PageReq
commonApi.Author
}
// BusAttendanceMachineSearchRes 列表返回结果
type BusAttendanceMachineSearchRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
List []*model.BusAttendanceMachineExtendRes `json:"list"`
}
// BusAttendanceMachineAddReq 添加操作请求参数
type BusAttendanceMachineAddReq struct {
g.Meta `path:"/add" tags:"考勤机" method:"post" summary:"考勤机添加"`
commonApi.Author
ProjectId uint64 `p:"projectId" v:"required#项目ID不能为空"`
Sn string `p:"sn" v:"required#设备sn不能为空"`
Teams string `p:"teams" `
CreateBy string `p:"createBy" `
Remark string `p:"remark" `
}
// BusAttendanceMachineAddRes 添加操作返回结果
type BusAttendanceMachineAddRes struct {
commonApi.EmptyRes
}
// BusAttendanceMachineEditReq 修改操作请求参数
type BusAttendanceMachineEditReq struct {
g.Meta `path:"/edit" tags:"考勤机" method:"put" summary:"考勤机修改"`
commonApi.Author
Sn string `p:"sn" v:"required#设备sn不能为空"`
Id uint64 `p:"id" v:"required#主键ID不能为空"`
ProjectId uint64 `p:"projectId" v:"required#项目ID不能为空"`
Teams string `p:"teams" dc:"班组ID多个逗号分割" v:"required#班组ID不能为空"`
Remark string `p:"remark" dc:"备注"`
}
// BusAttendanceMachineEditRes 修改操作返回结果
type BusAttendanceMachineEditRes struct {
commonApi.EmptyRes
}
// BusAttendanceMachineGetReq 获取一条数据请求
type BusAttendanceMachineGetReq struct {
g.Meta `path:"/get" tags:"考勤机" method:"get" summary:"获取考勤机信息"`
commonApi.Author
Id uint64 `p:"id" v:"required#主键必须"` //通过主键获取
}
// BusAttendanceMachineGetRes 获取一条数据结果
type BusAttendanceMachineGetRes struct {
g.Meta `mime:"application/json"`
*model.BusAttendanceMachineExtendRes
}
// BusAttendanceMachineDeleteReq 删除数据请求
type BusAttendanceMachineDeleteReq struct {
g.Meta `path:"/delete" tags:"考勤机" method:"delete" summary:"删除考勤机"`
commonApi.Author
Ids []uint64 `p:"ids" v:"required#主键必须"` //通过主键删除
}
// BusAttendanceMachineDeleteRes 删除数据返回
type BusAttendanceMachineDeleteRes struct {
commonApi.EmptyRes
}
/**
===============================================================
===============================================================
===============================================================
*/
type BusAttendanceMachineRegisterReq struct {
g.Meta `path:"/busAttendanceMachineRegister" tags:"考勤机" method:"post" summary:"考勤机注册"`
commonApi.Author
Sn string `p:"sn" v:"required#设备sn不能为空"`
Remark string `p:"remark" `
}
type BusAttendanceMachineRegisterRes struct {
commonApi.EmptyRes
}
type BusAttendanceMachineChangeReq struct {
g.Meta `path:"/busAttendanceMachineChange" tags:"考勤机" method:"post" summary:"变更考勤机状态"`
commonApi.Author
Sn string `p:"sn" v:"required#设备sn不能为空"`
Status string `p:"status" dc:"考勤机在线状态"`
}
type BusAttendanceMachineChangeRes struct {
commonApi.EmptyRes
}
type BindUserInformationToDevicesInBatchesReq struct {
g.Meta `path:"/bindUserInformationToDevicesInBatches" tags:"考勤机" method:"post" summary:"将用户信息与考勤机绑定"`
commonApi.Author
Bind []BindUserInformationToDevicesInBatchesTwoReq `p:"bind" v:"required#用户信息"`
}
type BindUserInformationToDevicesInBatchesTwoReq struct {
MachineId int64 `p:"machineId" v:"required#考勤机ID不能为空"`
TeamId int64 `p:"teamId" v:"required#班组ID不能为空"`
UserId string `p:"userId" v:"required#用户ID不能为空"`
}
type BindUserInformationToDevicesInBatchesRes struct {
commonApi.EmptyRes
}
type SendTheUserInformationToTheAttendanceMachineReq struct {
g.Meta `path:"/sendTheUserInformationToTheAttendanceMachine" tags:"考勤机" method:"post" summary:"将用户信息下发到考勤机上"`
commonApi.Author
Sn string `p:"sn" dc:"设备唯一标识" v:"required#sn不能为空"`
MachineId string `p:"machineId" dc:"自增id" v:"required#machineIdsn不能为空"`
Type int `p:"type" dc:"1全部 2批量 3指定" v:"between:1,3#参数传递为1~3"`
UserId []string `p:"userId" dc:"type为1不传递 2传递部分 3传递一个"`
}
type SendTheUserInformationToTheAttendanceMachineRes struct {
commonApi.EmptyRes
}
type DeleteTheUserBoundToTheAttendanceMachineAndDeviceReq struct {
g.Meta `path:"/deleteTheUserBoundToTheAttendanceMachineAndDevice" tags:"考勤机" method:"post" summary:"将考勤机和设备绑定的用户删除掉"`
commonApi.Author
Sn string `p:"sn" dc:"设备唯一标识" v:"required#sn不能为空"`
MachineId string `p:"machineId" dc:"自增id" v:"required#machineIdsn不能为空"`
TeamId int64 `p:"teamId" v:"required#班组ID不能为空"`
UserId string `p:"userId" dc:"用户openid" v:"required#用户openid不能为空"`
}
type DeleteTheUserBoundToTheAttendanceMachineAndDeviceRes struct {
commonApi.EmptyRes
}
type ObtainInformationAboutPersonnelAssociatedWithTheAttendanceDeviceReq struct {
g.Meta `path:"/obtainInformationAboutPersonnelAssociatedWithTheAttendanceDevice" tags:"考勤机" method:"get" summary:"获取考勤设备关联的人员信息"`
Sn string `p:"sn" dc:"设备唯一标识" v:"required#sn不能为空"`
MachineId string `p:"machineId" dc:"自增id" v:"required#machineIdsn不能为空"`
TeamId string `p:"teamId" dc:"班组ID" v:"required#班组ID不能为空"`
UserName string `p:"name" dc:"用户名称"`
commonApi.Paging
commonApi.PageReq
commonApi.Author
}
type ObtainInformationAboutPersonnelAssociatedWithTheAttendanceDeviceRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
UserList []*ObtainInformationAboutPersonnelAssociatedWithTheAttendanceDeviceTwo `p:"userList" dc:"用户信息列表"`
}
type ObtainInformationAboutPersonnelAssociatedWithTheAttendanceDeviceTwo struct {
Openid string `p:"openid" dc:"用户openId"`
UserName string `p:"userName" dc:"用户名称"`
TeamId string `p:"teamId" dc:"班组ID"`
PacePhoto string `p:"pacePhoto" dc:"人脸照"`
XFStatus string `p:"xFStatus" dc:"是否已绑定设备(1绑定 0未绑定)"`
Status string `p:"status" dc:"是否存在考勤设备中(1存在 0不存在)"`
}