作者 tangxvhui

bug 修复

... ... @@ -237,6 +237,8 @@ func AddDepartmentData(data []ModuleDeparmentData) error {
Name: v.Name,
Manages: "[]",
BusinessDepartmentId: v.Id,
DeleteAt: time.Unix(0, 0),
CreateAt: time.Now(),
}
if v.ParentId > 0 {
parentDepart := &models.Department{}
... ...
... ... @@ -192,6 +192,7 @@ func AddEmployeeData(data []ModuleEmployee) error {
Accid: ucenterReturn.Data.Accid,
Icon: ucenterReturn.Data.Avatar,
CsAccount: ucenterReturn.Data.CustomerAccount,
DeleteAt: time.Unix(0, 0),
}
_, err = models.AddUser(userdata)
if err != nil {
... ... @@ -227,6 +228,7 @@ func AddEmployeeData(data []ModuleEmployee) error {
AdminType: v.AdminType,
ChargeStatus: v.ChargeStatus,
ExtraText: v.ExtraText,
DeleteAt: time.Unix(0, 0),
}
uc.EntryTime, _ = time.ParseInLocation("2006-01-02", v.EntryTime, time.Local)
usercompanydata = append(usercompanydata, uc)
... ... @@ -236,6 +238,7 @@ func AddEmployeeData(data []ModuleEmployee) error {
UserCompanyId: v.UserDepartments[i].UserId,
DepartmentId: v.UserDepartments[i].DepartmentId,
CreateTime: nowTime,
EnableStatus: 1,
}
userdepartmentData = append(userdepartmentData, d)
}
... ... @@ -245,6 +248,7 @@ func AddEmployeeData(data []ModuleEmployee) error {
UserCompanyId: v.UserPositions[i].UserId,
PositionId: v.UserPositions[i].PositionId,
CreateAt: nowTime,
EnableStatus: 1,
}
userpositionData = append(userpositionData, p)
}
... ...
... ... @@ -188,6 +188,8 @@ func AddPosition(data ModulePositionData) error {
Name: data.Name,
CompanyId: companyinfo.Id,
BusinessPositionId: data.Id,
DeleteAt: time.Unix(0, 0),
CreateAt: time.Now(),
}
var (
parentPosition *models.Position
... ...