123456789101112131415161718192021222324252627282930313233343536 |
- package gn
- import "eta_gn/eta_bridge/global"
- // OaDept OA部门
- type OaDept struct {
- DepartmentId string `json:"dept_id" description:"部门ID"`
- DepartmentName string `json:"deptname" description:"部门名称"`
- ParentDepartmentId string `json:"pdeptid" description:"上级部门名称"`
- }
- // OaUser OA用户
- type OaUser struct {
- AddrName string `gorm:"column:addr_name" json:"addr_name" description:"姓名"`
- AddrUserId string `gorm:"column:addr_Userid" json:"addr_Userid" description:"用户ID"`
- AddrOfficeTel string `gorm:"column:addr_OfficeTel" json:"addr_OfficeTel" description:"办公电话"`
- AddrMobilePhone string `gorm:"column:addr_MobilePhone" json:"addr_MobilePhone" description:"手机号"`
- AddrJobTitle string `gorm:"column:addr_JobTitle" json:"addr_JobTitle" description:"职位"`
- AddrEmployeeId string `gorm:"column:addr_EMPLOYEEID" json:"addr_EMPLOYEEID" description:""`
- AddrDepartmentFullName string `gorm:"column:addr_DepFullname" json:"addr_DepFullname" description:"部门全称, 格式:直属部门/上级部门/顶级部门, 层级不定"`
- OEmployeeNo string `gorm:"column:o_EMPLOYEENO" json:"o_EMPLOYEENO" description:"OA工号"`
- }
- // GetGnOaDepartment 获取OA部门
- func GetGnOaDepartment() (items []*OaDept, err error) {
- sql := `SELECT * FROM oa_dept `
- err = global.MYSQL["oa_user"].Raw(sql).Find(&items).Error
- return
- }
- // GetGnOaUser 获取OA用户
- func GetGnOaUser() (items []*OaUser, err error) {
- sql := `SELECT * FROM oa_user `
- err = global.MYSQL["oa_user"].Raw(sql).Find(&items).Error
- return
- }
|