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.
450 lines
15 KiB
450 lines
15 KiB
|
3 years ago
|
package personnelapi
|
||
|
|
|
||
|
|
import (
|
||
|
|
"hr_server/models"
|
||
|
|
"hr_server/overall"
|
||
|
|
"hr_server/overall/overallhandle"
|
||
|
|
"strconv"
|
||
|
|
"strings"
|
||
|
|
"time"
|
||
|
|
|
||
|
|
"github.com/gin-gonic/gin"
|
||
|
|
)
|
||
|
|
|
||
|
|
//人员列表
|
||
|
|
func (s *StaffApi) ArchivesList(c *gin.Context) {
|
||
|
|
var requestData peopleList
|
||
|
|
c.ShouldBindJSON(&requestData)
|
||
|
|
if requestData.Page < 0 {
|
||
|
|
requestData.Page = 1
|
||
|
|
}
|
||
|
|
if requestData.PageSize < 0 {
|
||
|
|
requestData.PageSize = 10
|
||
|
|
}
|
||
|
|
var staffList []models.ManCont
|
||
|
|
gormDb := overall.CONSTANT_DB_HR.Model(&models.ManCont{}).Where("state = 1")
|
||
|
|
|
||
|
|
if requestData.Number != "" {
|
||
|
|
gormDb = gormDb.Where("number LIKE ?", "%"+requestData.Number+"%")
|
||
|
|
}
|
||
|
|
if requestData.Name != "" {
|
||
|
|
gormDb = gormDb.Where("name LIKE ?", "%"+requestData.Name+"%")
|
||
|
|
}
|
||
|
|
if requestData.HireClass != 0 {
|
||
|
|
gormDb = gormDb.Where("hire_class = ?", requestData.HireClass)
|
||
|
|
}
|
||
|
|
if requestData.Company != 0 {
|
||
|
|
gormDb = gormDb.Where("company = ?", requestData.Company)
|
||
|
|
}
|
||
|
|
if requestData.Deparment != "" {
|
||
|
|
gormDb = gormDb.Where("FIND_IN_SET(?,`deparment`)", requestData.Deparment)
|
||
|
|
}
|
||
|
|
if requestData.AdminOrg != 0 {
|
||
|
|
gormDb = gormDb.Where("admin_org = ?", requestData.AdminOrg)
|
||
|
|
}
|
||
|
|
if requestData.Position != 0 {
|
||
|
|
gormDb = gormDb.Where("position = ?", requestData.Position)
|
||
|
|
}
|
||
|
|
if requestData.EmpType != 0 {
|
||
|
|
gormDb = gormDb.Where("emp_type = ?", requestData.EmpType)
|
||
|
|
} else {
|
||
|
|
gormDb = gormDb.Where("emp_type IN ?", overall.EmployeeStatusIng)
|
||
|
|
}
|
||
|
|
if requestData.Role != "" {
|
||
|
|
gormDb = gormDb.Where("FIND_IN_SET(?,`role`)", requestData.Role)
|
||
|
|
}
|
||
|
|
|
||
|
|
var total int64
|
||
|
|
totalErr := gormDb.Count(&total).Error
|
||
|
|
if totalErr != nil {
|
||
|
|
total = 0
|
||
|
|
}
|
||
|
|
errGorm := gormDb.Order("company ASC,maindeparment ASC,admin_org ASC,position ASC").Limit(requestData.PageSize).Offset(overallhandle.LimitPage(requestData.Page, requestData.PageSize)).Find(&staffList).Error
|
||
|
|
var positionAry []peopleManOutList
|
||
|
|
|
||
|
|
for _, v := range staffList {
|
||
|
|
var staffInfo peopleManOutList
|
||
|
|
staffInfo.ManCont = v
|
||
|
|
var getSpur models.Position
|
||
|
|
getWhe := overallhandle.MapOut()
|
||
|
|
getWhe["id"] = v.Position
|
||
|
|
getSpur.GetCont(getWhe, "name")
|
||
|
|
staffInfo.PositionName = getSpur.Name
|
||
|
|
staffInfo.KeyStr = strconv.FormatInt(v.Key, 10)
|
||
|
|
//公司
|
||
|
|
var getSpurDepart models.AdministrativeOrganization
|
||
|
|
getWheDepart := overallhandle.MapOut()
|
||
|
|
getWheDepart["id"] = v.Company
|
||
|
|
getSpurDepart.GetCont(getWheDepart, "name")
|
||
|
|
staffInfo.CompanyName = getSpurDepart.Name
|
||
|
|
//主部门
|
||
|
|
var getSpurDepartMain models.AdministrativeOrganization
|
||
|
|
getWheDepartMain := overallhandle.MapOut()
|
||
|
|
getWheDepartMain["id"] = v.MainDeparment
|
||
|
|
getSpurDepartMain.GetCont(getWheDepartMain, "name")
|
||
|
|
staffInfo.MainDeparmentName = getSpurDepartMain.Name
|
||
|
|
//获取部门
|
||
|
|
departmentAry := strings.Split(v.Deparment, ",")
|
||
|
|
if len(departmentAry) > 0 {
|
||
|
|
var departCont []getDepartmentInfo
|
||
|
|
departErr := overall.CONSTANT_DB_HR.Model(&models.AdministrativeOrganization{}).Select("id,number,name").Where("`id` IN ?", departmentAry).Order("`organization_type` ASC").Find(&departCont).Error
|
||
|
|
|
||
|
|
if departErr == nil {
|
||
|
|
var departNameAry []string
|
||
|
|
for _, d_v := range departCont {
|
||
|
|
departNameAry = append(departNameAry, d_v.Name)
|
||
|
|
}
|
||
|
|
if len(departNameAry) > 0 {
|
||
|
|
staffInfo.DeparmentName = strings.Join(departNameAry, " ")
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
positionAry = append(positionAry, staffInfo)
|
||
|
|
|
||
|
|
}
|
||
|
|
if errGorm != nil {
|
||
|
|
overallhandle.Result(105, errGorm, c)
|
||
|
|
} else {
|
||
|
|
overallhandle.ResultList(0, requestData.Page, requestData.PageSize, total, int64(len(positionAry)), positionAry, c)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
//获取单个人员档案
|
||
|
|
//人员列表
|
||
|
|
func (s *StaffApi) ArchivesCon(c *gin.Context) {
|
||
|
|
var requestData overallhandle.GetId
|
||
|
|
c.ShouldBindJSON(&requestData)
|
||
|
|
if requestData.IdStr == "" && requestData.Id == 0 {
|
||
|
|
overallhandle.Result(101, requestData, c)
|
||
|
|
return
|
||
|
|
}
|
||
|
|
if requestData.IdStr != "" {
|
||
|
|
idInt, idErr := strconv.ParseInt(requestData.IdStr, 10, 64)
|
||
|
|
if idErr == nil {
|
||
|
|
requestData.Id = idInt
|
||
|
|
}
|
||
|
|
}
|
||
|
|
var satffCont models.ManCont
|
||
|
|
staffErr := satffCont.GetCont(map[string]interface{}{"`id`": requestData.Id})
|
||
|
|
if staffErr != nil {
|
||
|
|
overallhandle.Result(105, staffErr, c)
|
||
|
|
return
|
||
|
|
}
|
||
|
|
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) //预计转正日期
|
||
|
|
//获取双职工信息
|
||
|
|
synPro.Add(1)
|
||
|
|
go func() {
|
||
|
|
staffCenter.DoubleWorkerList = getDoubleWorkerCont(satffCont.Key) //双职工
|
||
|
|
}()
|
||
|
|
//紧急联系人
|
||
|
|
synPro.Add(1)
|
||
|
|
go func() {
|
||
|
|
staffCenter.EmergencyContact = getEmercyCallMan(satffCont.Key) //紧急联系人
|
||
|
|
}()
|
||
|
|
//家庭成员
|
||
|
|
synPro.Add(1)
|
||
|
|
go func() {
|
||
|
|
staffCenter.MemberOfFamily = getMemberOfFamily(satffCont.Key) //家庭成员
|
||
|
|
}()
|
||
|
|
//教育经历
|
||
|
|
synPro.Add(1)
|
||
|
|
go func() {
|
||
|
|
staffCenter.EducationalExperience = getEducationalExperience(satffCont.Key) //教育经历
|
||
|
|
}()
|
||
|
|
//工作履历
|
||
|
|
synPro.Add(1)
|
||
|
|
go func() {
|
||
|
|
staffCenter.WorkHistoryList = getWorkHistoryList(satffCont.Key) //工作履历
|
||
|
|
}()
|
||
|
|
synPro.Wait()
|
||
|
|
overallhandle.Result(0, staffCenter, c)
|
||
|
|
return
|
||
|
|
}
|
||
|
|
|
||
|
|
//获取双职工信息
|
||
|
|
func getDoubleWorkerCont(key int64) (doubleworkerlist []DoubleWorkerCont) {
|
||
|
|
defer synPro.Done()
|
||
|
|
var dowWorkMan []models.DoubleWorker
|
||
|
|
err := overall.CONSTANT_DB_HR.Select("`id`", "`number`", "`name`", "`company`", "`department`", "`position`", "`tel`").Where("`state` = 1 AND `key` = ?", key).Find(&dowWorkMan).Error
|
||
|
|
if err == nil {
|
||
|
|
|
||
|
|
for _, v := range dowWorkMan {
|
||
|
|
var dwManCont DoubleWorkerCont
|
||
|
|
dwManCont.Id = strconv.FormatInt(v.Id, 10)
|
||
|
|
dwManCont.Number = v.Number //工号
|
||
|
|
dwManCont.Name = v.Name //姓名
|
||
|
|
dwManCont.Company = v.Company //公司
|
||
|
|
dwManCont.Department = v.Department //分厂(部室)
|
||
|
|
dwManCont.Position = v.Position //职位(岗位)
|
||
|
|
dwManCont.Mobilephone = v.Tel //联系电话
|
||
|
|
doubleworkerlist = append(doubleworkerlist, dwManCont)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return
|
||
|
|
}
|
||
|
|
|
||
|
|
//紧急联系人
|
||
|
|
func getEmercyCallMan(key int64) (callMan []emergencyContact) {
|
||
|
|
defer synPro.Done()
|
||
|
|
var dowWorkMan []models.EmergencyContact
|
||
|
|
err := overall.CONSTANT_DB_HR.Select("`id`", "`name`", "`relationship`", "`tel`").Where("`state` = 1 AND `key` = ?", key).Find(&dowWorkMan).Error
|
||
|
|
if err == nil {
|
||
|
|
|
||
|
|
for _, v := range dowWorkMan {
|
||
|
|
var dwManCont emergencyContact //
|
||
|
|
dwManCont.Id = strconv.FormatInt(v.Id, 10)
|
||
|
|
dwManCont.Name = v.Name //姓名
|
||
|
|
dwManCont.Relationship = v.Relationship //与紧急联系人
|
||
|
|
dwManCont.Mobilephone = v.Tel //联系电话
|
||
|
|
callMan = append(callMan, dwManCont)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return
|
||
|
|
}
|
||
|
|
|
||
|
|
//获取家庭成员
|
||
|
|
func getMemberOfFamily(key int64) (callMan []memberOfFamily) {
|
||
|
|
defer synPro.Done()
|
||
|
|
var dowWorkMan []models.FamilyMembers
|
||
|
|
err := overall.CONSTANT_DB_HR.Select("`id`", "`name`", "`relation`", "`company`", "`deparment`", "`postnme`", "`tel`,`political_outlook`").Where("`state` = 1 AND `key` = ?", key).Find(&dowWorkMan).Error
|
||
|
|
if err == nil {
|
||
|
|
for _, v := range dowWorkMan {
|
||
|
|
var dwManCont memberOfFamily //工号
|
||
|
|
dwManCont.Name = v.Name //姓名
|
||
|
|
dwManCont.Relationship = v.Relationship //与紧急联系人
|
||
|
|
dwManCont.Mobilephone = v.Tel //联系电话
|
||
|
|
dwManCont.Company = v.Company //公司
|
||
|
|
dwManCont.Department = v.Deparment //分厂(部室)
|
||
|
|
dwManCont.Position = v.Postnme //职位(岗位)
|
||
|
|
dwManCont.PoliticalOutlook = v.PoliticalOutlook //政治面貌
|
||
|
|
dwManCont.IdStr = strconv.FormatInt(v.Id, 10)
|
||
|
|
callMan = append(callMan, dwManCont)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
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) //学位
|
||
|
|
dwManCont.AcademicDegreeId = v.AcademicDegree
|
||
|
|
dwManCont.Level = getXueWeiClass(v.Level)
|
||
|
|
dwManCont.LevelId = v.Level //学历类型
|
||
|
|
dwManCont.Id = strconv.FormatInt(v.Id, 10)
|
||
|
|
callMan = append(callMan, dwManCont)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return
|
||
|
|
}
|
||
|
|
|
||
|
|
//学位
|
||
|
|
func getXueWei(id int) string {
|
||
|
|
switch id {
|
||
|
|
case 1:
|
||
|
|
return "无"
|
||
|
|
case 2:
|
||
|
|
return "学士"
|
||
|
|
case 3:
|
||
|
|
return "硕士"
|
||
|
|
case 4:
|
||
|
|
return "博士"
|
||
|
|
default:
|
||
|
|
return "无"
|
||
|
|
}
|
||
|
|
return "无"
|
||
|
|
}
|
||
|
|
|
||
|
|
//学历类型
|
||
|
|
func getXueWeiClass(id int) string {
|
||
|
|
switch id {
|
||
|
|
case 2:
|
||
|
|
return "第一学历"
|
||
|
|
case 3:
|
||
|
|
return "最高学历"
|
||
|
|
default:
|
||
|
|
return "普通"
|
||
|
|
}
|
||
|
|
return "普通"
|
||
|
|
}
|
||
|
|
|
||
|
|
//工作履历
|
||
|
|
func getWorkHistoryList(key int64) (workHisList []workHistoryAry) {
|
||
|
|
defer synPro.Done()
|
||
|
|
var workHisContList []models.WorkHistory
|
||
|
|
workHisContListErr := overall.CONSTANT_DB_HR.Where("`state` = 1 AND `key` = ?", key).Find(&workHisContList).Error
|
||
|
|
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 //备注
|
||
|
|
workHisList = append(workHisList, workCont)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return
|
||
|
|
}
|
||
|
|
|
||
|
|
//添加双职工
|
||
|
|
func (s *StaffApi) AddDoubleWorkerApi(c *gin.Context) {
|
||
|
|
var requestData DoubleWorkerCont
|
||
|
|
c.ShouldBindJSON(&requestData)
|
||
|
|
// if err != nil {
|
||
|
|
// overallhandle.Result(100, err, c)
|
||
|
|
// return
|
||
|
|
// }
|
||
|
|
if requestData.Id == "" {
|
||
|
|
overallhandle.Result(101, requestData.Id, c, "参数错误")
|
||
|
|
return
|
||
|
|
}
|
||
|
|
if requestData.Name == "" {
|
||
|
|
overallhandle.Result(101, requestData.Name, c, "请输入姓名")
|
||
|
|
return
|
||
|
|
}
|
||
|
|
if requestData.Mobilephone == "" {
|
||
|
|
overallhandle.Result(101, requestData.Mobilephone, c, "请输入联系方式")
|
||
|
|
return
|
||
|
|
}
|
||
|
|
var manCont models.PersonArchives
|
||
|
|
manCont.GetCont(map[string]interface{}{"`key`": requestData.Id}, "`number`")
|
||
|
|
var doubleWorkInfo models.DoubleWorker
|
||
|
|
doubleWorkInfo.Number = manCont.Number
|
||
|
|
doubleWorkInfo.Name = requestData.Name
|
||
|
|
doubleWorkInfo.Company = requestData.Company
|
||
|
|
doubleWorkInfo.Department = requestData.Department
|
||
|
|
doubleWorkInfo.Position = requestData.Position
|
||
|
|
doubleWorkInfo.Tel = requestData.Mobilephone
|
||
|
|
doubleWorkInfo.Time = time.Now().Unix()
|
||
|
|
doubleWorkInfo.State = 1
|
||
|
|
keyInt, _ := strconv.ParseInt(requestData.Id, 10, 64)
|
||
|
|
doubleWorkInfo.Key = keyInt
|
||
|
|
addErr := overall.CONSTANT_DB_HR.Create(&doubleWorkInfo).Error
|
||
|
|
if addErr != nil {
|
||
|
|
overallhandle.Result(104, addErr, c)
|
||
|
|
return
|
||
|
|
}
|
||
|
|
overallhandle.Result(0, addErr, c)
|
||
|
|
}
|
||
|
|
|
||
|
|
//编辑双职工
|
||
|
|
func (s *StaffApi) EidtDoubleWorkerApi(c *gin.Context) {
|
||
|
|
var requestData DoubleWorkerCont
|
||
|
|
c.ShouldBindJSON(&requestData)
|
||
|
|
// if err != nil {
|
||
|
|
// overallhandle.Result(100, err, c)
|
||
|
|
// return
|
||
|
|
// }
|
||
|
|
if requestData.Id == "" {
|
||
|
|
overallhandle.Result(101, requestData.Id, c)
|
||
|
|
return
|
||
|
|
}
|
||
|
|
var doubleWorkCont models.DoubleWorker
|
||
|
|
wErr := doubleWorkCont.GetCont(map[string]interface{}{"`id`": requestData.Id})
|
||
|
|
if wErr != nil {
|
||
|
|
overallhandle.Result(107, requestData.Id, c)
|
||
|
|
return
|
||
|
|
}
|
||
|
|
saveData := overallhandle.MapOut()
|
||
|
|
if requestData.Name != "" && requestData.Name != doubleWorkCont.Name {
|
||
|
|
saveData["name"] = requestData.Name
|
||
|
|
}
|
||
|
|
if requestData.Company != "" && requestData.Company != doubleWorkCont.Company {
|
||
|
|
saveData["company"] = requestData.Company
|
||
|
|
}
|
||
|
|
if requestData.Department != "" && requestData.Department != doubleWorkCont.Department {
|
||
|
|
saveData["department"] = requestData.Department
|
||
|
|
}
|
||
|
|
if requestData.Position != "" && requestData.Position != doubleWorkCont.Position {
|
||
|
|
saveData["position"] = requestData.Position
|
||
|
|
}
|
||
|
|
|
||
|
|
if requestData.Mobilephone != "" && requestData.Mobilephone != doubleWorkCont.Tel {
|
||
|
|
saveData["tel"] = requestData.Mobilephone
|
||
|
|
}
|
||
|
|
if len(saveData) > 0 {
|
||
|
|
saveData["time"] = time.Now().Unix()
|
||
|
|
var eidtCont models.DoubleWorker
|
||
|
|
eidtErr := eidtCont.EiteCont(map[string]interface{}{"`id`": requestData.Id}, saveData)
|
||
|
|
if eidtErr == nil {
|
||
|
|
overallhandle.Result(0, saveData, c)
|
||
|
|
} else {
|
||
|
|
overallhandle.Result(106, eidtErr, c)
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
overallhandle.Result(0, saveData, c)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
//编辑双职工状态
|
||
|
|
func (s *StaffApi) EidtDoubleWorkerState(c *gin.Context) {
|
||
|
|
var requestData eidtWorkState
|
||
|
|
c.ShouldBindJSON(&requestData)
|
||
|
|
if requestData.Id == "" {
|
||
|
|
overallhandle.Result(101, requestData.Id, c)
|
||
|
|
return
|
||
|
|
}
|
||
|
|
var doubleWorkCont models.DoubleWorker
|
||
|
|
wErr := doubleWorkCont.GetCont(map[string]interface{}{"`id`": requestData.Id})
|
||
|
|
if wErr != nil {
|
||
|
|
overallhandle.Result(107, requestData.Id, c)
|
||
|
|
return
|
||
|
|
}
|
||
|
|
if requestData.State == 0 {
|
||
|
|
requestData.State = 1
|
||
|
|
}
|
||
|
|
if requestData.IsDel <= 1 {
|
||
|
|
saveData := overallhandle.MapOut()
|
||
|
|
saveData["time"] = time.Now().Unix()
|
||
|
|
saveData["state"] = requestData.State
|
||
|
|
var eidtCont models.DoubleWorker
|
||
|
|
eidtErr := eidtCont.EiteCont(map[string]interface{}{"`id`": requestData.Id}, saveData)
|
||
|
|
if eidtErr == nil {
|
||
|
|
overallhandle.Result(0, saveData, c)
|
||
|
|
} else {
|
||
|
|
overallhandle.Result(106, eidtErr, c)
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
if requestData.State == 3 {
|
||
|
|
delErr := overall.CONSTANT_DB_HR.Where(map[string]interface{}{"`id`": requestData.Id}).Delete(&models.DoubleWorker{}).Error
|
||
|
|
if delErr == nil {
|
||
|
|
overallhandle.Result(0, delErr, c)
|
||
|
|
} else {
|
||
|
|
overallhandle.Result(108, delErr, c)
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
saveData := overallhandle.MapOut()
|
||
|
|
saveData["time"] = time.Now().Unix()
|
||
|
|
saveData["state"] = requestData.State
|
||
|
|
var eidtCont models.DoubleWorker
|
||
|
|
eidtErr := eidtCont.EiteCont(map[string]interface{}{"`id`": requestData.Id}, saveData)
|
||
|
|
if eidtErr == nil {
|
||
|
|
overallhandle.Result(0, saveData, c)
|
||
|
|
} else {
|
||
|
|
overallhandle.Result(106, eidtErr, c)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|