|
|
@ -53,24 +53,86 @@ func ResultList(code, page, pageSize int, total, count int64, data interface{}, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 登录信息转换
|
|
|
// 登录信息转换
|
|
|
func LoginMyCont(c *gin.Context) (myCont modelshr.ManCont, err error) { |
|
|
func LoginMyCont(c *gin.Context) (myCont AuthenticationPower, err error) { |
|
|
|
|
|
var myContInfo modelshr.ManCont |
|
|
context, exi := c.Get(overall.MyContJwt) |
|
|
context, exi := c.Get(overall.MyContJwt) |
|
|
|
|
|
contextPower, exiPower := c.Get(overall.MyContJwtPower) |
|
|
if exi != true { |
|
|
if exi != true { |
|
|
err = errors.New("对不起!你没有该功能的操作权限!1") |
|
|
err = errors.New("对不起!你没有该功能的操作权限!1") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
jsonCont, jsonErr := json.Marshal(context) |
|
|
jsonCont, jsonErr := json.Marshal(context) |
|
|
// fmt.Printf("LoginMyCont--------->%v\n", string(jsonCont))
|
|
|
// fmt.Printf("LoginMyCont--------->%v--------->%v\n", contextPower, exiPower)
|
|
|
if jsonErr != nil { |
|
|
if jsonErr != nil { |
|
|
err = jsonErr |
|
|
err = jsonErr |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
jsonUnErr := json.Unmarshal(jsonCont, &myCont) |
|
|
jsonUnErr := json.Unmarshal(jsonCont, &myContInfo) |
|
|
if jsonUnErr != nil { |
|
|
if jsonUnErr != nil { |
|
|
err = jsonUnErr |
|
|
err = jsonUnErr |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
var powerInfo SystemPowerInfo |
|
|
|
|
|
if exiPower == true { |
|
|
|
|
|
jsonPowerCont, _ := json.Marshal(contextPower) |
|
|
|
|
|
json.Unmarshal(jsonPowerCont, &powerInfo) |
|
|
|
|
|
fmt.Printf("LoginMyCont--------->%v--------->%v\n", powerInfo, string(jsonPowerCont)) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
myCont.Id = myContInfo.Id |
|
|
|
|
|
myCont.Number = myContInfo.Number //员工工号"`
|
|
|
|
|
|
myCont.Name = myContInfo.Name //姓名"`
|
|
|
|
|
|
myCont.Icon = myContInfo.Icon //头像"`
|
|
|
|
|
|
myCont.HireClass = myContInfo.HireClass //雇佣类型(1:雇佣入职;2:再入职;)"`
|
|
|
|
|
|
myCont.EmpType = myContInfo.EmpType //用工关系(1:临时工 , 2:编外人员 ;3:实习&实习生;4:试用员工;5:待分配;6:待岗;7:临时调入;8:正式员工;9:长期病假;10:停薪留职;11:退休;12:辞职;13:辞退;14:离职)"`
|
|
|
|
|
|
myCont.Company = myContInfo.Company //入职公司"`
|
|
|
|
|
|
myCont.MainDeparment = myContInfo.MainDeparment //主部门"`
|
|
|
|
|
|
myCont.SunMainDeparment = myContInfo.SunMainDeparment //二级主部门"`
|
|
|
|
|
|
myCont.Deparment = myContInfo.Deparment //部门
|
|
|
|
|
|
myCont.AdminOrg = myContInfo.AdminOrg // 所属行政组织"`
|
|
|
|
|
|
myCont.TeamId = myContInfo.TeamId //班组"`
|
|
|
|
|
|
myCont.Position = myContInfo.Position //职位"`
|
|
|
|
|
|
myCont.JobClass = myContInfo.JobClass // 职务分类"`
|
|
|
|
|
|
myCont.JobId = myContInfo.JobId //职务"`
|
|
|
|
|
|
myCont.JobLeve = myContInfo.JobLeve //职务等级"`
|
|
|
|
|
|
myCont.Time = myContInfo.Time //写入时间"`
|
|
|
|
|
|
myCont.EiteTime = myContInfo.EiteTime // 编辑时间"`
|
|
|
|
|
|
myCont.Wechat = myContInfo.Wechat //微信UserId"`
|
|
|
|
|
|
myCont.WorkWechat = myContInfo.WorkWechat //企业微信UserId"`
|
|
|
|
|
|
myCont.State = myContInfo.State //状态(1:启用;2:禁用;3:删除)`
|
|
|
|
|
|
myCont.Key = myContInfo.Key //nkey"`
|
|
|
|
|
|
myCont.IsAdmin = myContInfo.IsAdmin //是否为管理员(1:不是;2:分公司;3:集团管理员;4:超级管`
|
|
|
|
|
|
myCont.Password = myContInfo.Password // 密码"`
|
|
|
|
|
|
myCont.Role = myContInfo.Role // 角色
|
|
|
|
|
|
myCont.Idcardno = myContInfo.Idcardno //t 身份证号"`
|
|
|
|
|
|
myCont.Passportno = myContInfo.Passportno // 护照号码"`
|
|
|
|
|
|
myCont.Globalroaming = myContInfo.Globalroaming // 国际区号"`
|
|
|
|
|
|
myCont.Mobilephone = myContInfo.Mobilephone //手机号码"`
|
|
|
|
|
|
myCont.Email = myContInfo.Email //电子邮件"`
|
|
|
|
|
|
myCont.Gender = myContInfo.Gender //性别(1:男性;2:女性;3:中性)"`
|
|
|
|
|
|
myCont.Birthday = myContInfo.Birthday //birthday"`
|
|
|
|
|
|
myCont.Myfolk = myContInfo.Myfolk //民族"`
|
|
|
|
|
|
myCont.Nativeplace = myContInfo.Nativeplace //籍贯"`
|
|
|
|
|
|
myCont.Idcardstartdate = myContInfo.Idcardstartdate // 身份证有效期开始"`
|
|
|
|
|
|
myCont.Idcardenddate = myContInfo.Idcardenddate //身份证有效期结束"`
|
|
|
|
|
|
myCont.Idcardaddress = myContInfo.Idcardaddress // 身份证地址"`
|
|
|
|
|
|
myCont.IdcardIssued = myContInfo.IdcardIssued // 身份证签发机关"`
|
|
|
|
|
|
myCont.Health = myContInfo.Health //健康状况(1:良好;2:一般;3:较弱,4:有生理缺陷;5:残废)"`
|
|
|
|
|
|
myCont.Maritalstatus = myContInfo.Maritalstatus //婚姻状况(1:未婚;2:已婚;3:丧偶;4:离异)"`
|
|
|
|
|
|
myCont.Internaltelephone = myContInfo.Internaltelephone //i内线电话"`
|
|
|
|
|
|
myCont.Currentresidence = myContInfo.Currentresidence //现居住地址"`
|
|
|
|
|
|
myCont.Constellation = myContInfo.Constellation //星座(1:白羊座;2:金牛座;3:双子座;4:巨蟹座;5:狮子座;6:处女座;7:天枰座;8:天蝎座;9:射手座;10:摩羯座;11:水瓶座;12:双鱼座)"`
|
|
|
|
|
|
myCont.Isdoubleworker = myContInfo.Isdoubleworker //是否双职工(1:是;2:否)"`
|
|
|
|
|
|
myCont.Isveterans = myContInfo.Isveterans //是否为退役军人(1:是;2:否)"`
|
|
|
|
|
|
myCont.Veteransnumber = myContInfo.Veteransnumber //退役证编号"`
|
|
|
|
|
|
myCont.Jobstartdate = myContInfo.Jobstartdate //参加工作日期"`
|
|
|
|
|
|
myCont.Entrydate = myContInfo.Entrydate //入职日期"`
|
|
|
|
|
|
myCont.Probationperiod = myContInfo.Probationperiod //试用期"`
|
|
|
|
|
|
myCont.Planformaldate = myContInfo.Planformaldate //预计转正日期"`
|
|
|
|
|
|
myCont.PoliticalOutlook = myContInfo.PoliticalOutlook //政治面貌(1:群众;2:无党派;3:台盟会员;4:九三社员;5:致公党员;6:农工党员;7:民进会员;8:民建会员;9:民盟盟员;10:民革会员,11:共青团员;12:预备党员;13:中共党员)"`
|
|
|
|
|
|
myCont.Level = powerInfo.Level |
|
|
|
|
|
myCont.PointIdList = powerInfo.PointIdList |
|
|
|
|
|
myCont.OrganizationList = powerInfo.OrganizationList |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|