You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
2.3 KiB
40 lines
2.3 KiB
|
3 years ago
|
package modelshr
|
||
|
|
|
||
|
|
import (
|
||
|
|
"appPlatform/overall"
|
||
|
|
"strings"
|
||
|
|
)
|
||
|
|
|
||
|
|
type InsideWorkView struct {
|
||
|
|
InsideWorkHistory
|
||
|
|
GroupNumber string `json:"groupnumber" gorm:"column:g_number;type:varchar(50) unsigned;default:'';not null;comment:行政编码"`
|
||
|
|
GroupName string `json:"groupname" gorm:"column:g_name;type:varchar(255) unsigned;default:'';not null;comment:组织名称"`
|
||
|
|
CompanyNumber string `json:"companynumber" gorm:"column:c_number;type:varchar(50) unsigned;default:'';not null;comment:行政编码"`
|
||
|
|
CompanyName string `json:"companyname" gorm:"column:c_name;type:varchar(255) unsigned;default:'';not null;comment:组织名称"`
|
||
|
|
DepartmentNumber string `json:"departmentnumber" gorm:"column:d_number;type:varchar(50) unsigned;default:'';not null;comment:行政编码"`
|
||
|
|
DepartmentName string `json:"departmentname" gorm:"column:d_name;type:varchar(255) unsigned;default:'';not null;comment:组织名称"`
|
||
|
|
WorkShopNumber string `json:"workshopnumber" gorm:"column:ws_number;type:varchar(50) unsigned;default:'';not null;comment:行政编码"`
|
||
|
|
WorkShopName string `json:"workshopname" gorm:"column:ws_name;type:varchar(255) unsigned;default:'';not null;comment:组织名称"`
|
||
|
|
SectionNumber string `json:"sectionnumber" gorm:"column:w_number;type:varchar(50) unsigned;default:'';not null;comment:行政编码"`
|
||
|
|
SectionName string `json:"sectionnasectionme" gorm:"column:w_name;type:varchar(255) unsigned;default:'';not null;comment:组织名称"`
|
||
|
|
PostJobNumber string `json:"postjobnumber" gorm:"column:p_number;type:varchar(50) unsigned;default:'';not null;comment:职位编码"`
|
||
|
|
PostJobName string `json:"postjobname" gorm:"column:p_name;type:varchar(255) unsigned;default:'';not null;comment:职位名称"`
|
||
|
|
TeamName string `json:"teamname" gorm:"column:r_name;type:varchar(255) unsigned;default:'';not null;comment:班组名称"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (InsideWorkView *InsideWorkView) TableName() string {
|
||
|
|
return "inside_work_view"
|
||
|
|
}
|
||
|
|
|
||
|
|
// 获取详细内容
|
||
|
|
func (cont *InsideWorkView) GetCont(whereMap interface{}, field ...string) (err error) {
|
||
|
|
gormDb := overall.CONSTANT_DB_HR.Model(&cont)
|
||
|
|
if len(field) > 0 {
|
||
|
|
fieldStr := strings.Join(field, ",")
|
||
|
|
gormDb = gormDb.Select(fieldStr)
|
||
|
|
}
|
||
|
|
gormDb = gormDb.Where(whereMap)
|
||
|
|
err = gormDb.First(&cont).Error
|
||
|
|
return
|
||
|
|
}
|