From 55b648c4b63ef101112147af7b9b0fe9473217dd Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Thu, 1 Sep 2022 10:55:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../administrativeorganization/position.go | 20 +-- .../administrativeorganization/type.go | 51 +++--- api/version1/personnelapi/staffarchives.go | 149 +++++++++++------- api/version1/personnelapi/type.go | 58 +++---- 4 files changed, 158 insertions(+), 120 deletions(-) diff --git a/api/version1/administrativeorganization/position.go b/api/version1/administrativeorganization/position.go index 4e846fb..fcc6df5 100644 --- a/api/version1/administrativeorganization/position.go +++ b/api/version1/administrativeorganization/position.go @@ -12,7 +12,7 @@ import ( "github.com/gin-gonic/gin" ) -//职位(岗位)列表 +// 职位(岗位)列表 func (o *OrganizationApi) PositionList(c *gin.Context) { var requestData lookPositionList c.ShouldBindJSON(&requestData) @@ -66,6 +66,8 @@ func (o *OrganizationApi) PositionList(c *gin.Context) { getSpurDepart.GetCont(getWheDepart, "name") positionAry[i].DepartmentName = getSpurDepart.Name + positionAry[i].IdStr = strconv.FormatInt(v.Id, 10) + } if errGorm != nil { overallhandle.Result(105, errGorm, c) @@ -74,7 +76,7 @@ func (o *OrganizationApi) PositionList(c *gin.Context) { } } -//添加职位(岗位) +// 添加职位(岗位) func (o *OrganizationApi) AddPositionCont(c *gin.Context) { var requestData addPositionInfo err := c.ShouldBindJSON(&requestData) @@ -154,7 +156,7 @@ func (o *OrganizationApi) AddPositionCont(c *gin.Context) { } } -//获取职位(岗位)详情 +// 获取职位(岗位)详情 func (o *OrganizationApi) GetPositionCont(c *gin.Context) { var requestData overallhandle.GetId err := c.ShouldBindJSON(&requestData) @@ -188,7 +190,7 @@ func (o *OrganizationApi) GetPositionCont(c *gin.Context) { } } -//编辑职位(岗位) +// 编辑职位(岗位) func (o *OrganizationApi) EitePositionCont(c *gin.Context) { var requestData eitePositionInfo err := c.ShouldBindJSON(&requestData) @@ -267,7 +269,7 @@ func (o *OrganizationApi) EitePositionCont(c *gin.Context) { } } -//编辑职位(岗位)状态或删除 +// 编辑职位(岗位)状态或删除 func (o *OrganizationApi) EitePositionStateOrDel(c *gin.Context) { var requestData EiteJobStateDel err := c.ShouldBindJSON(&requestData) @@ -329,7 +331,7 @@ func (o *OrganizationApi) EitePositionStateOrDel(c *gin.Context) { } } -//获取职位权限配置清单 +// 获取职位权限配置清单 func (o *OrganizationApi) GetPositionRole(c *gin.Context) { var requestData overallhandle.GetId err := c.ShouldBindJSON(&requestData) @@ -359,7 +361,7 @@ func (o *OrganizationApi) GetPositionRole(c *gin.Context) { overallhandle.Result(0, datahhh, c) } -//遍历确权 +// 遍历确权 func GetMenuOperation(menuStr, menuOperStr string) (isTrue bool, sendData []powerConfigList) { isTrue = false var menuStrMap []int64 @@ -378,7 +380,7 @@ func GetMenuOperation(menuStr, menuOperStr string) (isTrue bool, sendData []powe return } -//递归无限树 +// 递归无限树 func GetMenuPowerThree(jurisd int, parentId int64, threeData []models.SystemMenu, menuStrMap, menuOperStrMap []int64) []powerConfigList { // treeList := []SystemMenuThree{} treeListPower := []powerConfigList{} @@ -409,7 +411,7 @@ func GetMenuPowerThree(jurisd int, parentId int64, threeData []models.SystemMenu return treeListPower } -//获取菜单操作项目 +// 获取菜单操作项目 func MenuOperation(jurisd int, menuId int64) (isTrue bool, operation []models.MenuOperation) { isTrue = false // if jurisd != 1 { diff --git a/api/version1/administrativeorganization/type.go b/api/version1/administrativeorganization/type.go index 51114f3..0e6d655 100644 --- a/api/version1/administrativeorganization/type.go +++ b/api/version1/administrativeorganization/type.go @@ -9,51 +9,51 @@ import ( type OrganizationApi struct{} -//入口 +// 入口 func (o *OrganizationApi) Index(c *gin.Context) { outputCont := overallhandle.MapOut() outputCont["index"] = "组织管理入口" overallhandle.Result(0, outputCont, c) } -//名称 +// 名称 type NameVal struct { Name string `json:"name"` //名称 } -//职务类型翻页 +// 职务类型翻页 type JobClassPageSelect struct { overallhandle.PageTurning NameVal } -//修改职务类型信息 +// 修改职务类型信息 type EiteJobClassInfo struct { overallhandle.GetId NameVal overallhandle.StateOverall } -//状态修改及删除操作 +// 状态修改及删除操作 type EiteJobStateDel struct { overallhandle.GetId overallhandle.StateOverall IsTrue int `json:"istrue"` } -//获取职务列表 +// 获取职务列表 type dutiesListType struct { JobClassPageSelect JobId string `json:"jobid"` } -//职务输出 +// 职务输出 type dutiesOutCont struct { models.Duties DutiesClassName string `json:"dutiesclassname" gorm:"column:classname;type:varchar(255) unsigned;default:'';not null;comment:职务分类名称"` } -//添加职务 +// 添加职务 type addDutiesInfo struct { NameVal JobType string `json:"jobtype"` //归属职务类型 @@ -61,12 +61,12 @@ type addDutiesInfo struct { overallhandle.NmuberOverall } -//职务详情输出 +// 职务详情输出 type getDutiesInfo struct { dutiesOutCont } -//修改职务详情 +// 修改职务详情 type eiteDutiesCont struct { overallhandle.GetId NameVal @@ -74,26 +74,26 @@ type eiteDutiesCont struct { Weight int64 `json:weight` //权重 } -//查询名称和状态 +// 查询名称和状态 type selectNameOrState struct { JobClassPageSelect overallhandle.StateOverall Level int `json:"level"` } -//添加行政类型 +// 添加行政类型 type addGovClassInfo struct { NameVal Level int64 `json:"level"` } -//修改行政类型内容 +// 修改行政类型内容 type eiteGovClassInfo struct { overallhandle.GetId addGovClassInfo } -//获取行政组织列表 +// 获取行政组织列表 type govListType struct { JobClassPageSelect Number string `json:"number"` @@ -103,14 +103,14 @@ type govListType struct { Level int `json:"level"` } -//输出行政组织信息 +// 输出行政组织信息 type outGovCont struct { models.AdministrativeOrganization ClassName string `json:"classname" gorm:"column:classname;type:varchar(255) unsigned;default:'';not null;comment:行政组织分类名称"` Level int64 `json:"level" gorm:"column:level;type:int(5) unsigned;default:1;not null;comment:级别"` } -//添加行政组织 +// 添加行政组织 type addGovInfo struct { NameVal Number string `json:"number"` @@ -120,13 +120,13 @@ type addGovInfo struct { WechatId int `json:"wechatid"` } -//修改行政组织 +// 修改行政组织 type eiteGovInfo struct { overallhandle.GetId addGovInfo } -//添加职位(岗位) +// 添加职位(岗位) type addPositionInfo struct { Number string `json:"number"` //职位编码 NameVal //职位名称 @@ -137,13 +137,13 @@ type addPositionInfo struct { Department string `json:"department"` //部门 } -//编辑职位(岗位) +// 编辑职位(岗位) type eitePositionInfo struct { overallhandle.GetId addPositionInfo } -//查看职位 +// 查看职位 type lookPositionList struct { JobClassPageSelect Number string `json:"number"` //职位编码 @@ -153,7 +153,7 @@ type lookPositionList struct { Department string `json:"department"` //部门 } -//职务列表输出 +// 职务列表输出 type positionOutInfo struct { models.Position DutiesName string `json:"dutiesname" gorm:"column:dutiesname;type:varchar(255) unsigned;default:'';not null;comment:职务名称"` @@ -164,9 +164,10 @@ type positionOutInfo struct { SuperiorName string `json:"superiorname"` //上级名称 SuperiorNumber string `json:"superiornumber"` //上级编号 DepartmentName string `json:"departmentname"` + IdStr string `json:"idstr"` } -//行政组织树查询 +// 行政组织树查询 type govThreeType struct { overallhandle.GetId Level int `json:"level"` @@ -183,21 +184,21 @@ type powerCont struct { IsTrue bool `json:"istrue"` } -//权限树 +// 权限树 type powerConfigList struct { powerCont Child []powerConfigList `json:"child"` MenuOperation []powerCont `json:"menuOperation"` } -//输出职务分类列表 +// 输出职务分类列表 type outJobClassList struct { Id string `json:"id"` Name string `json:"name"` State int `json:"state"` } -//修改班组 +// 修改班组 type eidtTeamCont struct { Id string `json:"id"` Name string `json:"name"` diff --git a/api/version1/personnelapi/staffarchives.go b/api/version1/personnelapi/staffarchives.go index f1b1ceb..6ad9661 100644 --- a/api/version1/personnelapi/staffarchives.go +++ b/api/version1/personnelapi/staffarchives.go @@ -11,7 +11,7 @@ import ( "github.com/gin-gonic/gin" ) -//人员列表 +// 人员列表 func (s *StaffApi) ArchivesList(c *gin.Context) { var requestData peopleList c.ShouldBindJSON(&requestData) @@ -134,8 +134,8 @@ func (s *StaffApi) ArchivesList(c *gin.Context) { } } -//获取单个人员档案 -//人员列表 +// 获取单个人员档案 +// 人员列表 func (s *StaffApi) ArchivesCon(c *gin.Context) { var requestData overallhandle.GetId c.ShouldBindJSON(&requestData) @@ -158,11 +158,30 @@ func (s *StaffApi) ArchivesCon(c *gin.Context) { var staffCenter staffArchivesCont staffCenter.ManCont = satffCont staffCenter.IdStr = strconv.FormatInt(satffCont.Id, 10) - staffCenter.BirthdayTime = overallhandle.UnixTimeToDay(satffCont.Birthday, 14) //生日 - staffCenter.IdCardStartTimeData = overallhandle.UnixTimeToDay(satffCont.Idcardstartdate, 14) //身份证有效期开始时间 - staffCenter.IdCardEndTimeData = overallhandle.UnixTimeToDay(satffCont.Idcardenddate, 14) //身份证有效期结束时间 - staffCenter.EntrydateTime = overallhandle.UnixTimeToDay(satffCont.Entrydate, 14) //入职日期 - staffCenter.PlanformaldateTime = overallhandle.UnixTimeToDay(satffCont.Planformaldate, 14) //预计转正日期 + if satffCont.Birthday != 0 { + staffCenter.BirthdayTime = overallhandle.UnixTimeToDay(satffCont.Birthday, 14) //生日 + } + if satffCont.Idcardstartdate != 0 { + staffCenter.IdCardStartTimeData = overallhandle.UnixTimeToDay(satffCont.Idcardstartdate, 14) //身份证有效期开始时间 + } + if satffCont.Idcardenddate != 0 { + staffCenter.IdCardEndTimeData = overallhandle.UnixTimeToDay(satffCont.Idcardenddate, 14) //身份证有效期结束时间 + } + if satffCont.Entrydate != 0 { + staffCenter.EntrydateTime = overallhandle.UnixTimeToDay(satffCont.Entrydate, 14) //入职日期 + } + if satffCont.Planformaldate != 0 { + staffCenter.PlanformaldateTime = overallhandle.UnixTimeToDay(satffCont.Planformaldate, 14) //预计转正日期 + } + + if satffCont.Jobstartdate != 0 { + staffCenter.JobstartdateStr = overallhandle.UnixTimeToDay(satffCont.Jobstartdate, 14) //参加工作日期 + } + + if satffCont.Entrydate != 0 { + staffCenter.EntrydateStr = overallhandle.UnixTimeToDay(satffCont.Entrydate, 14) //入职日期 + } + if satffCont.Company != 0 { var groupInfos models.AdministrativeOrganization groupInfos.GetCont(map[string]interface{}{"`id`": satffCont.Company}, "`name`") @@ -230,7 +249,7 @@ func (s *StaffApi) ArchivesCon(c *gin.Context) { return } -//获取双职工信息 +// 获取双职工信息 func getDoubleWorkerCont(key int64) (doubleworkerlist []DoubleWorkerCont) { defer synPro.Done() var dowWorkMan []models.DoubleWorker @@ -252,7 +271,7 @@ func getDoubleWorkerCont(key int64) (doubleworkerlist []DoubleWorkerCont) { return } -//紧急联系人 +// 紧急联系人 func getEmercyCallMan(key int64) (callMan []emergencyContact) { defer synPro.Done() var dowWorkMan []models.EmergencyContact @@ -271,7 +290,7 @@ func getEmercyCallMan(key int64) (callMan []emergencyContact) { return } -//获取家庭成员 +// 获取家庭成员 func getMemberOfFamily(key int64) (callMan []memberOfFamily) { defer synPro.Done() var dowWorkMan []models.FamilyMembers @@ -293,20 +312,25 @@ func getMemberOfFamily(key int64) (callMan []memberOfFamily) { return } -//获取教育经历 +// 获取教育经历 func getEducationalExperience(key int64) (callMan []educatExp) { defer synPro.Done() var dowWorkMan []models.PersonnelEducation err := overall.CONSTANT_DB_HR.Select("`id`", "`education`", "`graduation_school`", "`subject`", "`admission_time`", "`graduation_time`", "`level`,`academic_degree`").Where("`state` = 1 AND `key` = ?", key).Find(&dowWorkMan).Error if err == nil { for _, v := range dowWorkMan { - var dwManCont educatExp // - dwManCont.GraduationSchool = v.GraduationSchool //毕业学校 - dwManCont.Subject = v.Subject //专业 - dwManCont.Education = v.Education //学历 - dwManCont.AdmissionTime = overallhandle.UnixTimeToDay(v.AdmissionTime, 14) //入学时间 - dwManCont.GraduationTime = overallhandle.UnixTimeToDay(v.GraduationTime, 14) //毕业时间 - dwManCont.AcademicDegree = getXueWei(v.AcademicDegree) //学位 + var dwManCont educatExp // + dwManCont.GraduationSchool = v.GraduationSchool //毕业学校 + dwManCont.Subject = v.Subject //专业 + dwManCont.Education = v.Education //学历 + if v.AdmissionTime != 0 { + dwManCont.AdmissionTime = overallhandle.UnixTimeToDay(v.AdmissionTime, 14) //入学时间 + } + if v.GraduationTime != 0 { + dwManCont.GraduationTime = overallhandle.UnixTimeToDay(v.GraduationTime, 14) //毕业时间 + } + + dwManCont.AcademicDegree = getXueWei(v.AcademicDegree) //学位 dwManCont.AcademicDegreeId = v.AcademicDegree dwManCont.Level = getXueWeiClass(v.Level) dwManCont.LevelId = v.Level //学历类型 @@ -317,7 +341,7 @@ func getEducationalExperience(key int64) (callMan []educatExp) { return } -//学位 +// 学位 func getXueWei(id int) string { switch id { case 1: @@ -334,7 +358,7 @@ func getXueWei(id int) string { return "无" } -//学历类型 +// 学历类型 func getXueWeiClass(id int) string { switch id { case 2: @@ -347,7 +371,7 @@ func getXueWeiClass(id int) string { return "普通" } -//工作履历 +// 工作履历 func getWorkHistoryList(key int64) (workHisList []workHistoryAry) { defer synPro.Done() var workHisContList []models.WorkHistory @@ -355,21 +379,26 @@ func getWorkHistoryList(key int64) (workHisList []workHistoryAry) { if workHisContListErr == nil { for _, v := range workHisContList { var workCont workHistoryAry - workCont.Company = v.Company //公司 - workCont.Department = v.Deparment //部门 - workCont.Position = v.Job //职务 - workCont.EntryTime = overallhandle.UnixTimeToDay(v.EntryTime, 14) //入职时间 - workCont.LeaveDate = overallhandle.UnixTimeToDay(v.Leavedate, 14) //离职日期 - workCont.Witness = v.Witness //证明人 - workCont.WitnessTel = v.WitnessTel //证明人电话 - workCont.Remarks = v.Remarks //备注 + workCont.Company = v.Company //公司 + workCont.Department = v.Deparment //部门 + workCont.Position = v.Job //职务 + if v.EntryTime != 0 { + workCont.EntryTime = overallhandle.UnixTimeToDay(v.EntryTime, 14) //入职时间 + } + if v.Leavedate != 0 { + workCont.LeaveDate = overallhandle.UnixTimeToDay(v.Leavedate, 14) //离职日期 + } + + workCont.Witness = v.Witness //证明人 + workCont.WitnessTel = v.WitnessTel //证明人电话 + workCont.Remarks = v.Remarks //备注 workHisList = append(workHisList, workCont) } } return } -//添加双职工 +// 添加双职工 func (s *StaffApi) AddDoubleWorkerApi(c *gin.Context) { var requestData DoubleWorkerCont c.ShouldBindJSON(&requestData) @@ -410,7 +439,7 @@ func (s *StaffApi) AddDoubleWorkerApi(c *gin.Context) { overallhandle.Result(0, addErr, c) } -//编辑双职工 +// 编辑双职工 func (s *StaffApi) EidtDoubleWorkerApi(c *gin.Context) { var requestData DoubleWorkerCont c.ShouldBindJSON(&requestData) @@ -459,7 +488,7 @@ func (s *StaffApi) EidtDoubleWorkerApi(c *gin.Context) { } } -//编辑双职工状态 +// 编辑双职工状态 func (s *StaffApi) EidtDoubleWorkerState(c *gin.Context) { var requestData eidtWorkState c.ShouldBindJSON(&requestData) @@ -510,7 +539,7 @@ func (s *StaffApi) EidtDoubleWorkerState(c *gin.Context) { } } -//添加紧急联系人 +// 添加紧急联系人 func (s *StaffApi) AddEmercyCall(c *gin.Context) { var requestData addEmergencyContact c.ShouldBindJSON(&requestData) @@ -562,7 +591,7 @@ func (s *StaffApi) AddEmercyCall(c *gin.Context) { } } -//编辑紧急联系人 +// 编辑紧急联系人 func (s *StaffApi) EditEmercyCall(c *gin.Context) { var requestData emergencyContact c.ShouldBindJSON(&requestData) @@ -599,7 +628,7 @@ func (s *StaffApi) EditEmercyCall(c *gin.Context) { } } -//编辑紧急联系人 +// 编辑紧急联系人 func (s *StaffApi) EditEmercyCallState(c *gin.Context) { var requestData eidtWorkState c.ShouldBindJSON(&requestData) @@ -650,7 +679,7 @@ func (s *StaffApi) EditEmercyCallState(c *gin.Context) { } } -//添加家庭成员 +// 添加家庭成员 func (s *StaffApi) AddFamilyMembers(c *gin.Context) { var requestData addFamilyPeople err := c.ShouldBindJSON(&requestData) @@ -714,7 +743,7 @@ func (s *StaffApi) AddFamilyMembers(c *gin.Context) { } } -//编辑家属信息 +// 编辑家属信息 func (s *StaffApi) EditFamilyMembers(c *gin.Context) { var requestData memberOfFamily c.ShouldBindJSON(&requestData) @@ -764,7 +793,7 @@ func (s *StaffApi) EditFamilyMembers(c *gin.Context) { } } -//编辑家属状态 +// 编辑家属状态 func (s *StaffApi) EditFamilyMembersSatte(c *gin.Context) { var requestData eidtWorkState c.ShouldBindJSON(&requestData) @@ -815,7 +844,7 @@ func (s *StaffApi) EditFamilyMembersSatte(c *gin.Context) { } } -//添加教育经历 +// 添加教育经历 func (s *StaffApi) AddEducationalExperience(c *gin.Context) { var requestData addExpToSchool c.ShouldBindJSON(&requestData) @@ -904,7 +933,7 @@ func (s *StaffApi) AddEducationalExperience(c *gin.Context) { } } -//编辑教育经历 +// 编辑教育经历 func (s *StaffApi) EditEducationalExperience(c *gin.Context) { var requestData editExpToSchool c.ShouldBindJSON(&requestData) @@ -982,7 +1011,7 @@ func (s *StaffApi) EditEducationalExperience(c *gin.Context) { } } -//编辑教育经历状态 +// 编辑教育经历状态 func (s *StaffApi) EditEduExpState(c *gin.Context) { var requestData eidtWorkState c.ShouldBindJSON(&requestData) @@ -1033,7 +1062,7 @@ func (s *StaffApi) EditEduExpState(c *gin.Context) { } } -//添加工作履历 +// 添加工作履历 func (s *StaffApi) AddWorkHistoryCont(c *gin.Context) { var requestData addWorkHistory c.ShouldBindJSON(&requestData) @@ -1105,7 +1134,7 @@ func (s *StaffApi) AddWorkHistoryCont(c *gin.Context) { } } -//编辑工作履历 +// 编辑工作履历 func (s *StaffApi) EditWorkHistoryCont(c *gin.Context) { var requestData editWorkHistory c.ShouldBindJSON(&requestData) @@ -1167,7 +1196,7 @@ func (s *StaffApi) EditWorkHistoryCont(c *gin.Context) { } } -//编辑工作履历状态 +// 编辑工作履历状态 func (s *StaffApi) EditWorkHistoryState(c *gin.Context) { var requestData eidtWorkState c.ShouldBindJSON(&requestData) @@ -1218,7 +1247,7 @@ func (s *StaffApi) EditWorkHistoryState(c *gin.Context) { } } -//集团内部工作履历 +// 集团内部工作履历 func getGroupWorkHistoryList(key int64) (workHisList []insideHistory) { defer synPro.Done() var workHisContList []models.InsideWorkHistory @@ -1248,17 +1277,21 @@ func getGroupWorkHistoryList(key int64) (workHisList []insideHistory) { workCont.Position = positCont.Name //职务 workCont.GradePositions = v.GradePositions //职务 + if v.StartTime != 0 { + workCont.StartTime = overallhandle.UnixTimeToDay(v.StartTime, 14) //开始日期 + } + if v.EndTime != 0 { + workCont.EndTime = overallhandle.UnixTimeToDay(v.EndTime, 14) //结束日期 + } - workCont.StartTime = overallhandle.UnixTimeToDay(v.StartTime, 14) //开始日期 - workCont.EndTime = overallhandle.UnixTimeToDay(v.EndTime, 14) //结束日期 - workCont.ChangeType = v.ChangeType // + workCont.ChangeType = v.ChangeType // workHisList = append(workHisList, workCont) } } return } -//添加工作履历 +// 添加工作履历 func (s *StaffApi) AddInsideHistory(c *gin.Context) { var requestData eidtInsideHistoryWork err := c.ShouldBindJSON(&requestData) @@ -1322,7 +1355,7 @@ func (s *StaffApi) AddInsideHistory(c *gin.Context) { } } -//编辑集团内部工作 +// 编辑集团内部工作 func (s *StaffApi) EidtInsideHistoryWorkCont(c *gin.Context) { var requestData eidtInsideHistoryWork err := c.ShouldBindJSON(&requestData) @@ -1414,7 +1447,7 @@ func (s *StaffApi) EidtInsideHistoryWorkCont(c *gin.Context) { } } -//编辑或删除集团内工作记录 +// 编辑或删除集团内工作记录 func (s *StaffApi) EditOrDelInsideWorkHistoryState(c *gin.Context) { var requestData eidtWorkState c.ShouldBindJSON(&requestData) @@ -1465,7 +1498,7 @@ func (s *StaffApi) EditOrDelInsideWorkHistoryState(c *gin.Context) { } } -//集团内部工作经历列表 +// 集团内部工作经历列表 func (s *StaffApi) InsideWorkHistoryList(c *gin.Context) { var requestData allocationOfRightsToRole c.ShouldBindJSON(&requestData) @@ -1483,7 +1516,7 @@ func (s *StaffApi) InsideWorkHistoryList(c *gin.Context) { } } -//工作履历列表 +// 工作履历列表 func (s *StaffApi) WorkHistoryList(c *gin.Context) { var requestData allocationOfRightsToRole c.ShouldBindJSON(&requestData) @@ -1501,7 +1534,7 @@ func (s *StaffApi) WorkHistoryList(c *gin.Context) { } } -//教育经历列表 +// 教育经历列表 func (s *StaffApi) PersonnelEducationList(c *gin.Context) { var requestData allocationOfRightsToRole c.ShouldBindJSON(&requestData) @@ -1519,7 +1552,7 @@ func (s *StaffApi) PersonnelEducationList(c *gin.Context) { } } -//家庭成员列表 +// 家庭成员列表 func (s *StaffApi) FamilyMemBersList(c *gin.Context) { var requestData allocationOfRightsToRole c.ShouldBindJSON(&requestData) @@ -1537,7 +1570,7 @@ func (s *StaffApi) FamilyMemBersList(c *gin.Context) { } } -//紧急联系人列表 +// 紧急联系人列表 func (s *StaffApi) EmergencyContactList(c *gin.Context) { var requestData allocationOfRightsToRole c.ShouldBindJSON(&requestData) @@ -1555,7 +1588,7 @@ func (s *StaffApi) EmergencyContactList(c *gin.Context) { } } -//双职工列表 +// 双职工列表 func (s *StaffApi) DoubleWorkerList(c *gin.Context) { var requestData allocationOfRightsToRole c.ShouldBindJSON(&requestData) diff --git a/api/version1/personnelapi/type.go b/api/version1/personnelapi/type.go index ef7bab8..545430e 100644 --- a/api/version1/personnelapi/type.go +++ b/api/version1/personnelapi/type.go @@ -8,20 +8,20 @@ import ( "github.com/gin-gonic/gin" ) -//协程 +// 协程 var synPro = sync.WaitGroup{} -//人员API +// 人员API type StaffApi struct{} -//入口 +// 入口 func (s *StaffApi) Index(c *gin.Context) { outputCont := overallhandle.MapOut() outputCont["index"] = "人员档案API" overallhandle.Result(0, outputCont, c) } -//人员列表查询 +// 人员列表查询 type peopleList struct { overallhandle.PageTurning Number string `json:"number"` //工号 @@ -35,7 +35,7 @@ type peopleList struct { Role string `json:"role"` } -//人员列表输出 +// 人员列表输出 type peopleOutList struct { models.Personnel Mobilephone string `json:"mobilephone" gorm:"column:mobilephone;type:varchar(50) unsigned;default:'';not null;comment:手机号码"` @@ -62,14 +62,14 @@ type peopleManOutList struct { KeyStr string `json:"keystr"` //身份认证 } -//获取部门细腻些 +// 获取部门细腻些 type getDepartmentInfo struct { Id int64 `json:"id"` //id Number string `json:"number"` //行政编码 Name string `json:"name"` //组织名称 } -//添加员工参数 +// 添加员工参数 type addPersonnel struct { //员工主表 Number string `json:"number"` //工号1 @@ -122,7 +122,7 @@ type addPersonnel struct { InsideWorkHistory []insideHistoryerMy `json:"insideworkhistory"` //工作履历 } -//集团内部工作履历 +// 集团内部工作履历 type insideHistoryerMy struct { OrgId string `json:"orgid"` //行政组织 Position string `json:"position"` //职位 @@ -134,7 +134,7 @@ type insideHistoryerMy struct { Team string `json:"team"` //班组 } -//教育经历 +// 教育经历 type educationalExperience struct { GraduationSchool string `json:"graduationschool"` //毕业学校 Subject string `json:"subject"` //专业 @@ -146,7 +146,7 @@ type educationalExperience struct { } -//紧急联系人 +// 紧急联系人 type emergencyContact struct { Id string `json:"id"` Name string `json:"name"` //姓名 @@ -154,7 +154,7 @@ type emergencyContact struct { Mobilephone string `json:"mobilephone"` //联系电话 } -//家庭成员 +// 家庭成员 type memberOfFamily struct { emergencyContact Company string `json:"company"` //公司 @@ -164,7 +164,7 @@ type memberOfFamily struct { IdStr string `json:"idstr"` } -//职务相关 +// 职务相关 type jobAttber struct { Id int64 `json:"id" gorm:"primaryKey;column:id;type:bigint(20) unsigned;not null;comment:Id;index"` Number string `json:"number" gorm:"column:number;type:varchar(255) unsigned;default:'';not null;comment:编号"` @@ -177,13 +177,13 @@ type jobAttber struct { JobName string `json:"jobname" gorm:"column:jobname;type:varchar(255) unsigned;default:'';not null;comment:职务分类名称"` } -//配权 +// 配权 type allocationOfRightsToRole struct { Id string `json:"id"` RoleId string `json:"roleid"` } -//添加员工参数 +// 添加员工参数 type addKingdeePersonnel struct { Number string `json:"number"` //工号1 Name string `json:"name"` //姓名1 @@ -269,7 +269,7 @@ type addKingdeePersonnel struct { InsideWorkHistory []insideHistory `json:"insideworkhistory"` //工作履历 } -//人员档案详情 +// 人员档案详情 type staffArchivesCont struct { models.ManCont BirthdayTime string `json:"birthdaytime"` //生日 @@ -291,9 +291,11 @@ type staffArchivesCont struct { JobClassName string `json:"jobclassname"` //职务分类 JobIdName string `json:"jobidname"` //职务 PoliticalOutlookName string `json:"politicaloutlookname"` //政治面貌 + JobstartdateStr string `json:"jobstartdatestr"` //参加工作日期"` + EntrydateStr string `json:"entrydatestr" ` //`入职日期"` } -//双职工 +// 双职工 type DoubleWorkerCont struct { Id string `json:"id"` Number string `json:"number"` //工号 @@ -319,7 +321,7 @@ type educatExp struct { Id string `json:"id"` } -//工作履历 +// 工作履历 type workHistoryAry struct { Company string `json:"company"` //公司 Department string `json:"department"` //部门 @@ -331,21 +333,21 @@ type workHistoryAry struct { Remarks string `json:"remarks"` //备注 } -//判断是否需要编辑工作履历 +// 判断是否需要编辑工作履历 type judgeWorkHistory struct { Company string `json:"company"` //公司 Department string `json:"department"` //部门 Position string `json:"position"` //职务 } -//编辑双职工状态 +// 编辑双职工状态 type eidtWorkState struct { Id string `json:"id"` State int `json:"state"` IsDel int `json:"isdel"` } -//编辑员工参数 +// 编辑员工参数 type eitePersonnel struct { Id string `json:"id"` //员工主表 @@ -392,43 +394,43 @@ type eitePersonnel struct { } -//添加紧急联系人 +// 添加紧急联系人 type addEmergencyContact struct { Id string `json:"id"` List []emergencyContact `json:"list"` } -//添加家庭成员 +// 添加家庭成员 type addFamilyPeople struct { Id string `json:"id"` List []memberOfFamily `json:"list"` } -//添加教育经历 +// 添加教育经历 type addExpToSchool struct { Id string `json:"id"` List []educationalExperience `json:"list"` } -//编辑教育经历 +// 编辑教育经历 type editExpToSchool struct { Id string `json:"id"` educationalExperience } -//添加工作履历 +// 添加工作履历 type addWorkHistory struct { Id string `json:"id"` List []workHistoryAry `json:"list"` } -//编辑教育经历 +// 编辑教育经历 type editWorkHistory struct { Id string `json:"id"` workHistoryAry } -//集团内部工作履历 +// 集团内部工作履历 type insideHistory struct { Group string `json:"group"` //集团 Company string `json:"company"` //公司 @@ -442,7 +444,7 @@ type insideHistory struct { ChangeType int `json:"changetype"` //变动类型(1:预入职;2:雇佣入职;3:转正;4:晋升;5:降级;6:职等调整;7:调动调入;8:跨公司调动调入;9:借调;10:平调;11:兼职;12:预离职;13:离职;14:退休;15:返聘;16:员工初始化;) } -//编辑集团工作履历 +// 编辑集团工作履历 type eidtInsideHistoryWork struct { Id string `json:"id"` insideHistoryerMy