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.
58 lines
4.2 KiB
58 lines
4.2 KiB
package modelshr
|
|
|
|
import "appPlatform/overall"
|
|
|
|
//人员变动记录
|
|
type PersonnelChangeRecord struct {
|
|
Id int64 `json:"id" gorm:"primaryKey;column:id;type:bigint(20) unsigned;not null;comment:ID"`
|
|
Number string `json:"number" gorm:"column:number;type:varchar(30) unsigned;not null;comment:员工工号"`
|
|
Type int `json:"type" gorm:"column:type;type:tinyint(1) unsigned;default:1;comment:变动类型(1:雇佣入职;2:再入职;3:职位分配;4:转正;5:停薪留职;6:退休;7:辞退;8:离职)"`
|
|
Reason string `json:"reason" gorm:"column:reason;type:text;comment:变动原因"`
|
|
Position int64 `json:"position" gorm:"column:position;type:bigint(20) unsigned;default:0;comment:职位"`
|
|
JobId int64 `json:"jobid" gorm:"column:job_id;type:bigint(20) unsigned;default:0;comment:职务"`
|
|
JobLevel int64 `json:"joblevel" gorm:"column:job_level;type:bigint(20) unsigned;default:'';comment:职务等级"`
|
|
JobClass int64 `json:"jobclass" gorm:"column:job_class;type:bigint(20) unsigned;default:0;comment:职务分类"`
|
|
Company int64 `json:"company" gorm:"column:company;type:bigint(20) unsigned;default:0;comment:入职公司"`
|
|
MainDepartment int64 `json:"maindepartment" gorm:"column:main_department;type:bigint(20) unsigned;default:0;comment:主部门"`
|
|
Department string `json:"department" gorm:"column:department;type:varchar(255) unsigned;default:0;comment:入职分厂"`
|
|
Adminorg int64 `json:"adminorg" gorm:"column:adminorg;type:bigint(20) unsigned;default:0;comment:入职行政组织"`
|
|
Time int64 `json:"time" gorm:"column:time;type:bigint(20) unsigned;default:0;comment:写入时间"`
|
|
Key int64 `json:"key" gorm:"column:key;type:bigint(50) unsigned;default:0;not null;comment:key"`
|
|
}
|
|
|
|
func (PersonnelChangeRecord *PersonnelChangeRecord) TableName() string {
|
|
return "personnel_change_record"
|
|
}
|
|
|
|
//编辑职务分类内容
|
|
func (PersonnelChangeRecord *PersonnelChangeRecord) EiteCont(whereMap interface{}, saveData interface{}) (err error) {
|
|
err = overall.CONSTANT_DB_HR.Model(&PersonnelChangeRecord).Where(whereMap).Updates(saveData).Error
|
|
return
|
|
}
|
|
|
|
type ManTransferLog struct {
|
|
Id int64 `json:"id" gorm:"primaryKey;column:id;type:bigint(20) unsigned;not null;comment:ID"`
|
|
Number string `json:"number" gorm:"column:number;type:varchar(30) unsigned;not null;comment:员工工号"`
|
|
Type int `json:"classtype" gorm:"column:classtype;type:tinyint(1) unsigned;default:1;comment:变动类型(1:雇佣入职;2:再入职;3:职位分配;4:转正;5:停薪留职;6:退休;7:辞退;8:离职)"`
|
|
Reason string `json:"reason" gorm:"column:reason;type:text;comment:变动原因"`
|
|
Position int64 `json:"position" gorm:"column:position;type:bigint(20) unsigned;default:0;comment:职位"`
|
|
JobId int64 `json:"jobid" gorm:"column:job_id;type:bigint(20) unsigned;default:0;comment:职务"`
|
|
JobLevel int64 `json:"joblevel" gorm:"column:job_level;type:bigint(20) unsigned;default:'';comment:职务等级"`
|
|
JobClass int64 `json:"jobclass" gorm:"column:job_class;type:bigint(20) unsigned;default:0;comment:职务分类"`
|
|
Company int64 `json:"company" gorm:"column:company;type:bigint(20) unsigned;default:0;comment:入职公司"`
|
|
MainDepartment int64 `json:"maindepartment" gorm:"column:main_department;type:bigint(20) unsigned;default:0;comment:主部门"`
|
|
Department string `json:"department" gorm:"column:department;type:varchar(255) unsigned;default:0;comment:入职分厂"`
|
|
Adminorg int64 `json:"adminorg" gorm:"column:adminorg;type:bigint(20) unsigned;default:0;comment:入职行政组织"`
|
|
Time int64 `json:"time" gorm:"column:time;type:bigint(20) unsigned;default:0;comment:写入时间"`
|
|
Key int64 `json:"key" gorm:"column:key;type:bigint(50) unsigned;default:0;not null;comment:key"`
|
|
}
|
|
|
|
func (ManTransferLog *ManTransferLog) TableName() string {
|
|
return "man_transfer_log"
|
|
}
|
|
|
|
//编辑职务分类内容
|
|
func (ManTransferLog *ManTransferLog) EiteCont(whereMap interface{}, saveData interface{}) (err error) {
|
|
err = overall.CONSTANT_DB_HR.Model(&ManTransferLog).Where(whereMap).Updates(saveData).Error
|
|
return
|
|
}
|
|
|