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

383 lines
17 KiB
Go
Raw Normal View History

2025-07-07 20:11:59 +08:00
// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期2023-08-07 10:31:18
// 生成路径: api/v1/system/bus_construction_user.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"
comModel "github.com/tiger1103/gfast/v3/internal/app/common/model"
"github.com/tiger1103/gfast/v3/internal/app/system/model"
wxModel "github.com/tiger1103/gfast/v3/internal/app/wxApplet/model"
)
// ExportDataFuncReq 分页请求参数
type ExportDataFuncReq struct {
g.Meta `path:"/list" tags:"施工人员" method:"get" summary:"施工人员列表"`
ProjectId string `p:"projectId" dc:"导出所有"` //项目id
Openid []string `p:"openid" dc:"根据openid导出"` //项目id
commonApi.Author
}
// ExportDataFuncRes 列表返回结果
type ExportDataFuncRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
List []*model.BusConstructionUserListRes `json:"list"`
}
// BusConstructionUserSearchReq 分页请求参数
type BusConstructionUserSearchReq struct {
g.Meta `path:"/list" tags:"施工人员" method:"get" summary:"施工人员列表"`
NickName string `p:"nickName"` //微信名称
UserName string `p:"userName"` //人员姓名
ProjectId string `p:"projectId" v:"projectId@integer#项目id需为整数"` //项目id
Status string `p:"status"` //状态
CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
Phone string `p:"phone"` //电话
Sex string `p:"sex"` //性别
SfzNation string `p:"sfzNation"` //身份证民族
NativePlace string `p:"nativePlace"` //籍贯
commonApi.PageReq
commonApi.Author
}
// BusConstructionUserSearchRes 列表返回结果
type BusConstructionUserSearchRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
List []*model.BusConstructionUserListRes `json:"list"`
}
// BusConstructionUserAddReq 添加操作请求参数
type BusConstructionUserAddReq struct {
g.Meta `path:"/add" tags:"施工人员" method:"post" summary:"施工人员添加"`
commonApi.Author
Openid string `p:"openid" `
NickName string `p:"nickName" v:"required#微信名称不能为空"`
TeamId int64 `p:"teamId" `
HeadIcon string `p:"headIcon" `
PacePhoto string `p:"pacePhoto" `
UserName string `p:"userName" v:"required#人员姓名不能为空"`
ProjectId int64 `p:"projectId" `
Status string `p:"status" v:"required#状态不能为空"`
IsPinch string `p:"isPinch" `
IfManagement string `p:"ifManagement" `
CreateBy string `p:"createBy" `
UpdateBy string `p:"updateBy" `
Phone string `p:"phone" `
Sex string `p:"sex" `
SfzNation string `p:"sfzNation" `
SfzNumber string `p:"sfzNumber" `
SfzStart string `p:"sfzStart" `
SfzEnd string `p:"sfzEnd" `
SfzSite string `p:"sfzSite" `
NativePlace string `p:"nativePlace" `
YhkNumber string `p:"yhkNumber" `
YhkOpeningBank string `p:"yhkOpeningBank" `
YhkCardholder string `p:"yhkCardholder" `
ProjectRecord string `p:"projectRecord" `
RoleIds []int64 `p:"roleIds" dc:"角色ID" v:"array"`
}
// BusConstructionUserAddRes 添加操作返回结果
type BusConstructionUserAddRes struct {
commonApi.EmptyRes
}
// BusConstructionUserEditReq 修改操作请求参数
type BusConstructionUserEditReq struct {
g.Meta `path:"/pcEdit" tags:"施工人员" method:"put" summary:"施工人员修改"`
commonApi.Author
WxOrPc string `p:"wxOrPc" dc:"参数为1表示pc添加 否则为小程序添加"`
SiteNum string `p:"siteNum" dc:"1入场时间 2离场时间 3或零值不操作"`
Id int64 `p:"id" v:"required#主键ID不能为空微信用户"`
Openid string `p:"openid" v:"required-unless:WxOrPc,1#需要填写小程序的openid"`
NickName string `p:"nickName" `
//TeamId int64 `p:"teamId" `
HeadIcon string `p:"headIcon" `
PacePhoto string `p:"pacePhoto" `
UserName string `p:"userName" v:"required#人员姓名不能为空"`
ProjectId int64 `p:"projectId" `
Status string `p:"status" v:"required#状态不能为空"`
IsPinch string `p:"isPinch" `
IfManagement string `p:"ifManagement" `
CreateBy string `p:"createBy" `
UpdateBy string `p:"updateBy" `
Phone string `p:"phone" v:"phone"`
Sex string `p:"sex" `
SfzNation string `p:"sfzNation" `
SfzNumber string `p:"sfzNumber" `
SfzStart string `p:"sfzStart" `
SfzEnd string `p:"sfzEnd" `
SfzSite string `p:"sfzSite" `
NativePlace string `p:"nativePlace" `
YhkNumber string `p:"yhkNumber" `
YhkOpeningBank string `p:"yhkOpeningBank" `
YhkCardholder string `p:"yhkCardholder" `
SfzBirth string `p:"sfzBirth" `
LabourserviceId int64 `p:"labourserviceId"`
TypeOfWork string `p:"typeOfWork"`
EntryDate string `p:"entryDate"`
LeaveDate string `p:"leaveDate"`
Clock string `p:"clock"`
PostReq *model.BusConstructionUserPostInfoRes `json:"postReq"`
ProjectListReq []*model.BusConstructionProjectListRes `json:"projectListReq"`
FilesListReq []*model.BusConstructionUserFileListRes `json:"filesListReq"`
ProjectRecord string `p:"projectRecord" `
DevNum string `p:"devNum" dc:"安全帽标识"`
RoleIds []int64 `p:"roleIds" dc:"角色ID" v:"array"`
}
// BusConstructionUserEditRes 修改操作返回结果
type BusConstructionUserEditRes struct {
commonApi.EmptyRes
}
// BusConstructionUserGetReq 获取一条数据请求
type BusConstructionUserGetReq struct {
g.Meta `path:"/get" tags:"施工人员" method:"get" summary:"获取施工人员信息"`
commonApi.Author
Id int64 `p:"id" v:"required#主键必须"` //通过主键获取
}
// BusConstructionUserGetRes 获取一条数据结果
type BusConstructionUserGetRes struct {
g.Meta `mime:"application/json"`
*model.BusConstructionUserInfoRes
}
// BusConstructionUserDeleteReq 删除数据请求
type BusConstructionUserDeleteReq struct {
g.Meta `path:"/delete" tags:"施工人员" method:"delete" summary:"删除施工人员"`
commonApi.Author
Ids []int64 `p:"ids" v:"required#主键必须"` //通过主键删除
}
// BusConstructionUserDeleteRes 删除数据返回
type BusConstructionUserDeleteRes struct {
commonApi.EmptyRes
}
// BatchImportDataReq 批量导入施工人员的资料
type BatchImportDataReq struct {
g.Meta `path:"/coryBatch" tags:"施工人员" method:"post" summary:"批量导入施工人员的资料(作废)"`
commonApi.Author
File *comModel.UpFile `p:"file"`
}
// BatchImportDataRes 批量导入施工人员的资料
type BatchImportDataRes struct {
commonApi.EmptyRes
}
// ExportSalaryTeamReq 导出施工人员工资组成(项目)
type ExportSalaryTeamReq struct {
g.Meta `path:"/exportSalaryTeam" tags:"施工人员" method:"post" summary:"根据项目或班组导出出勤记录(项目)"`
commonApi.Author
//ProjectId int64 `p:"projectId" dc:"项目主键ID" v:"required#项目主键ID必须"`
//TeamId int64 `p:"teamId" dc:"班组主键ID" `
//Years string `p:"years" dc:"时间格式为2024-02" v:"date-format:Y-m#格式为2024-02"`
FuzzyQuery string `p:"fuzzyQuery" dc:"模糊查询" `
ProjectId int64 `p:"projectId" dc:"项目ID" v:"required#项目ID不能为空"`
TeamId int64 `p:"teamId" dc:"班组ID"`
TypeOfWork string `p:"typeOfWork" dc:"工种"`
DateStr string `p:"dateStr" dc:"日期格式2024-04" v:"date-format:Y-m#时间格式为2024-04"`
}
// ExportSalaryReq 导出施工人员工资组成(班组)
type ExportSalaryReq struct {
g.Meta `path:"/exportSalary" tags:"施工人员" method:"post" summary:"根据项目或班组导出出勤记录(班组)"`
commonApi.Author
FuzzyQuery string `p:"fuzzyQuery" dc:"模糊查询" `
ProjectId int64 `p:"projectId" dc:"项目ID" v:"required#项目ID不能为空"`
TeamId int64 `p:"teamId" dc:"班组ID"`
TypeOfWork string `p:"typeOfWork" dc:"工种"`
DateStr string `p:"dateStr" dc:"日期格式2024-04" v:"date-format:Y-m#时间格式为2024-04"`
}
// ExportSalaryRes 导出施工人员工资组成
type ExportSalaryRes struct {
commonApi.EmptyRes
AttendanceAllOne []model.AttendanceAllEntity `p:"attendanceAllOne" dc:"成员基本信息"`
}
type SigningMessagesReq struct {
g.Meta `path:"/signingMessages" tags:"施工人员" method:"get" summary:"【签名】根据openid获取到指定小程序用户的签名信息"`
commonApi.Author
Openid string `p:"openid" dc:"openid" v:"required#施工人员openid不能为空"`
}
type SigningMessagesRes struct {
commonApi.EmptyRes
Signature *wxModel.BusConstructiomUserSignatureRes `p:"signature" dc:"签名信息"`
}
type SigningUpdateFuncReq struct {
g.Meta `path:"/signingUpdate" tags:"施工人员" method:"put" summary:"【签名】修改指定签名的状态"`
commonApi.Author
Id string `p:"id" dc:"签名主键ID" v:"required#签名主键ID不能为空"`
Change string `p:"change" dc:"是否更改签名1不更改 2更改" v:"required#change状态不能为空"`
}
type SigningUpdateFuncRes struct {
commonApi.EmptyRes
}
type OneClickOpenReq struct {
g.Meta `path:"/oneClickOpen" tags:"施工人员" method:"put" summary:"一键开启/关闭打开"`
commonApi.Author
Type string `p:"type" dc:"1开启 2关闭" v:"between:1,2#取值范围为1~2"`
ProjectId int64 `p:"projectId" dc:"项目ID" v:"required#项目主键ID必须"`
}
type OneClickOpenRes struct {
commonApi.EmptyRes
}
type ClockingConditionReq struct {
g.Meta `path:"/clockingCondition" tags:"施工人员" method:"put" summary:"开启/关闭打开(根据某个人操作)"`
commonApi.Author
Type string `p:"type" dc:"1开启 2关闭" v:"between:1,2#取值范围为1~2"`
Id int64 `p:"id" dc:"ID" v:"required#主键ID必须"`
}
type ClockingConditionRes struct {
commonApi.EmptyRes
}
type TemplateExportReq struct {
g.Meta `path:"/templateExport" tags:"施工人员" method:"get" summary:"施工人员资料文件上传模板导出"`
ProjectId int64 `p:"projectId" v:"required#项目ID必须"`
commonApi.Author
}
type TemplateExportRes struct {
commonApi.EmptyRes
Path string `p:"path" dc:"zip路径"`
}
type ZipFolderuploadReq struct {
g.Meta `path:"/zipFolderupload" tags:"施工人员" method:"post" summary:"批量上传施工人员的资料压缩文件zip上传"`
//File *ghttp.UploadFile `p:"file" `
FilePath string `p:"filePath" `
commonApi.Author
}
type ZipFolderuploadRes struct {
commonApi.EmptyRes
}
type DepartureReq struct {
g.Meta `path:"/departure" tags:"施工人员" method:"post" summary:"离场(成员离开班组)"`
Id string `p:"id" dc:"班组成员主键ID" v:"required#班组成员主键ID必须"`
File []*ghttp.UploadFile `p:"file" dc:"附件"`
Remark string `p:"remark" dc:"备注" v:"max-length:512#最大输入字数为512"`
commonApi.Author
}
type DepartureRes struct {
commonApi.EmptyRes
}
type DepartureRecordReq struct {
g.Meta `path:"/departureRecord" tags:"施工人员" method:"post" summary:"施工人员入场退场历史记录信息(根据身份证信息查询)"`
SfzNumber string `p:"sfzNumber" dc:"身份证号码" v:"required#身份证号码必须"`
commonApi.Author
}
type DepartureRecordRes struct {
commonApi.EmptyRes
List []model.BusConstructionUserDepartureInfoRes `p:"list"`
}
type PcCollectDataForTwoWeeksReq struct {
g.Meta `path:"/pcCollectDataForTwoWeeks" tags:"施工人员" method:"get" summary:"获取最近两周的数据(统计全勤、半勤、缺勤)"`
commonApi.Author
ProjectId string `p:"projectId" dc:"项目ID" v:"required#项目ID不能为空"`
}
type PcCollectDataForTwoWeeksRes struct {
commonApi.EmptyRes
List []*PcCollectDataForTwoWeeksTwoRes `json:"list"`
}
type PcCollectDataForTwoWeeksTwoRes struct {
DateStr string `json:"dateStr" dc:"日期"`
Absenteeism int `json:"absenteeism" dc:"缺勤人数(下班未打卡)"`
HalfDuty int `json:"halfDuty" dc:"半勤人数(只打了上班)"`
Attendance int `json:"attendance" dc:"出勤人数(全勤)"`
}
type PcSelectBelowProjectOfPersonnelReq struct {
g.Meta `path:"/pcSelectBelowProjectOfPersonnel" tags:"施工人员" method:"get" summary:"获取指定项目下的人员打卡信息"`
commonApi.Author
commonApi.PageReq
FuzzyQuery string `p:"fuzzyQuery" dc:"模糊查询" `
ProjectId int64 `p:"projectId" dc:"项目ID" v:"required#项目ID不能为空"`
TeamId int64 `p:"teamId" dc:"班组ID"`
TypeOfWork string `p:"typeOfWork" dc:"工种"`
DateStr string `p:"dateStr" dc:"日期格式2024-04" v:"date-format:Y-m#时间格式为2024-04"`
}
type PcSelectBelowProjectOfPersonnelRes struct {
commonApi.EmptyRes
commonApi.ListRes
List []*PcSelectBelowProjectOfPersonnelTwoRes `json:"list"`
}
type PcSelectBelowProjectOfPersonnelTwoRes struct {
Id string `p:"id" dc:"打卡主键ID"`
Openid string `p:"openid" dc:"openid"`
UserName string `p:"userName" dc:"用户名称"`
TeamName string `p:"teamName" dc:"班组名称"`
TypeOfWork string `p:"typeOfWork" dc:"工种字典type_of_work"`
Attendance int `p:"attendance" dc:"出勤(单位:天)"`
BeLate int `p:"beLate" dc:"迟到(单位:次)"`
LeaveEarly int `p:"leaveEarly" dc:"早退(单位:次)"`
LackOfCard int `p:"lackOfCard" dc:"缺卡(单位:次)"`
List []*wxModel.BusAttendanceInfoRes `json:"list"`
}
type PcQueryBasedOnOpenidReq struct {
g.Meta `path:"/pcQueryBasedOnOpenid" tags:"施工人员" method:"get" summary:"根据openid查询某人指定月份的打卡详情"`
commonApi.Author
Openid string `p:"openid" dc:"openid" `
DateStr string `p:"dateStr" dc:"日期格式2024-04" v:"date-format:Y-m#时间格式为2024-04"`
}
type PcQueryBasedOnOpenidRes struct {
commonApi.EmptyRes
List []*PcQueryBasedOnOpenidTwoRes `json:"list"`
}
type PcQueryBasedOnOpenidTwoRes struct {
Openid string `p:"openid" dc:"openid"`
ProjectId int64 `p:"projectId" dc:"项目ID"`
ProjectName string `p:"projectName" dc:"班组名称"`
TeamId int64 `p:"teamId" dc:"班组ID"`
TeamName string `p:"teamName" dc:"班组名称"`
PrintingDate string `p:"printingDate" dc:"年月日"`
Status []string `p:"status" dc:"1、考勤正常 2迟到早退缺卡 3补卡申请"`
ThreeList []*PcQueryBasedOnOpenidThreeRes `json:"threelist"`
}
type PcQueryBasedOnOpenidThreeRes struct {
Commuter string `p:"commuter" dc:"上下班1上班 2下班"`
Clock string `p:"clock" dc:"打卡日期时间"`
IsPinch string `p:"isPinch" dc:"1正常,2迟到,3早退,4缺勤,5补卡"`
}
type ListOfAttendanceMachinesReq struct {
g.Meta `path:"/listOfAttendanceMachines" tags:"施工人员" method:"get" summary:"考勤机列表"`
ProjectId int64 `p:"projectId" dc:"项目ID"` //项目id
Sn string `p:"sn" dc:"根据openid导出"` //sn
commonApi.Author
}
type ListOfAttendanceMachinesRes struct {
g.Meta `mime:"application/json"`
commonApi.ListRes
List []*model.BusConstructionUserListRes `json:"list"`
}