作者 tangxvhui

bug 修复

@@ -237,6 +237,8 @@ func AddDepartmentData(data []ModuleDeparmentData) error { @@ -237,6 +237,8 @@ func AddDepartmentData(data []ModuleDeparmentData) error {
237 Name: v.Name, 237 Name: v.Name,
238 Manages: "[]", 238 Manages: "[]",
239 BusinessDepartmentId: v.Id, 239 BusinessDepartmentId: v.Id,
  240 + DeleteAt: time.Unix(0, 0),
  241 + CreateAt: time.Now(),
240 } 242 }
241 if v.ParentId > 0 { 243 if v.ParentId > 0 {
242 parentDepart := &models.Department{} 244 parentDepart := &models.Department{}
@@ -192,6 +192,7 @@ func AddEmployeeData(data []ModuleEmployee) error { @@ -192,6 +192,7 @@ func AddEmployeeData(data []ModuleEmployee) error {
192 Accid: ucenterReturn.Data.Accid, 192 Accid: ucenterReturn.Data.Accid,
193 Icon: ucenterReturn.Data.Avatar, 193 Icon: ucenterReturn.Data.Avatar,
194 CsAccount: ucenterReturn.Data.CustomerAccount, 194 CsAccount: ucenterReturn.Data.CustomerAccount,
  195 + DeleteAt: time.Unix(0, 0),
195 } 196 }
196 _, err = models.AddUser(userdata) 197 _, err = models.AddUser(userdata)
197 if err != nil { 198 if err != nil {
@@ -227,6 +228,7 @@ func AddEmployeeData(data []ModuleEmployee) error { @@ -227,6 +228,7 @@ func AddEmployeeData(data []ModuleEmployee) error {
227 AdminType: v.AdminType, 228 AdminType: v.AdminType,
228 ChargeStatus: v.ChargeStatus, 229 ChargeStatus: v.ChargeStatus,
229 ExtraText: v.ExtraText, 230 ExtraText: v.ExtraText,
  231 + DeleteAt: time.Unix(0, 0),
230 } 232 }
231 uc.EntryTime, _ = time.ParseInLocation("2006-01-02", v.EntryTime, time.Local) 233 uc.EntryTime, _ = time.ParseInLocation("2006-01-02", v.EntryTime, time.Local)
232 usercompanydata = append(usercompanydata, uc) 234 usercompanydata = append(usercompanydata, uc)
@@ -236,6 +238,7 @@ func AddEmployeeData(data []ModuleEmployee) error { @@ -236,6 +238,7 @@ func AddEmployeeData(data []ModuleEmployee) error {
236 UserCompanyId: v.UserDepartments[i].UserId, 238 UserCompanyId: v.UserDepartments[i].UserId,
237 DepartmentId: v.UserDepartments[i].DepartmentId, 239 DepartmentId: v.UserDepartments[i].DepartmentId,
238 CreateTime: nowTime, 240 CreateTime: nowTime,
  241 + EnableStatus: 1,
239 } 242 }
240 userdepartmentData = append(userdepartmentData, d) 243 userdepartmentData = append(userdepartmentData, d)
241 } 244 }
@@ -245,6 +248,7 @@ func AddEmployeeData(data []ModuleEmployee) error { @@ -245,6 +248,7 @@ func AddEmployeeData(data []ModuleEmployee) error {
245 UserCompanyId: v.UserPositions[i].UserId, 248 UserCompanyId: v.UserPositions[i].UserId,
246 PositionId: v.UserPositions[i].PositionId, 249 PositionId: v.UserPositions[i].PositionId,
247 CreateAt: nowTime, 250 CreateAt: nowTime,
  251 + EnableStatus: 1,
248 } 252 }
249 userpositionData = append(userpositionData, p) 253 userpositionData = append(userpositionData, p)
250 } 254 }
@@ -188,6 +188,8 @@ func AddPosition(data ModulePositionData) error { @@ -188,6 +188,8 @@ func AddPosition(data ModulePositionData) error {
188 Name: data.Name, 188 Name: data.Name,
189 CompanyId: companyinfo.Id, 189 CompanyId: companyinfo.Id,
190 BusinessPositionId: data.Id, 190 BusinessPositionId: data.Id,
  191 + DeleteAt: time.Unix(0, 0),
  192 + CreateAt: time.Now(),
191 } 193 }
192 var ( 194 var (
193 parentPosition *models.Position 195 parentPosition *models.Position