hrm_resource.go 877 B

123456789101112131415161718192021222324252627
  1. package oa
  2. import "eta/eta_bridge/global"
  3. type HrmResource struct {
  4. ID int `gorm:"column:ID"`
  5. LOGINID string `gorm:"column:LOGINID"`
  6. WORKCODE string `gorm:"column:WORKCODE"`
  7. LASTNAME string `gorm:"column:LASTNAME"`
  8. DEPARTMENTID int `gorm:"column:DEPARTMENTID"`
  9. SUBCOMPANYID1 int `gorm:"column:SUBCOMPANYID1"`
  10. SECLEVEL int `gorm:"column:SECLEVEL"`
  11. EMAIL string `gorm:"column:EMAIL"`
  12. MOBILE string `gorm:"column:MOBILE"`
  13. }
  14. func (h *HrmResource) TableName() string {
  15. return "ECOLOGY_TARGET.HRMRESOURCE"
  16. }
  17. func GetEmployeeList() (list []HrmResource, err error) {
  18. err = global.OaDbHT.Select("ID,LOGINID,WORKCODE,LASTNAME,DEPARTMENTID,SUBCOMPANYID1,SECLEVEL,EMAIL,MOBILE").Where("STATUS in (0,1,2,3)").Find(&list).Error
  19. if err != nil {
  20. global.FILE_LOG.Error("获取员工信息列表失败")
  21. }
  22. return
  23. }