...
|
...
|
@@ -1598,6 +1598,7 @@ func (srv StaffAssessServeice) GetAssessInfo(param *query.AssessInfoQuery) (*ada |
|
|
if targetUserDesc != nil {
|
|
|
result.CompanyName = targetUserDesc.CompanyName
|
|
|
result.SupperUser = targetUserDesc.SupperUserName
|
|
|
result.CompanyLogo = targetUserDesc.CompanyLogo
|
|
|
result.DutyTime = targetUserDesc.DutyTime
|
|
|
}
|
|
|
return &result, nil
|
...
|
...
|
@@ -1628,40 +1629,11 @@ func (srv *StaffAssessServeice) getStaffDescrip(transactionContext application.T |
|
|
log.Logger.Error("获取公司信息," + err.Error())
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取公司信息,"+err.Error())
|
|
|
}
|
|
|
// departmentRepo := factory.CreateDepartmentRepository(map[string]interface{}{
|
|
|
// "transactionContext": transactionContext,
|
|
|
// })
|
|
|
// //查找员工的部门
|
|
|
// var departmentList []*domain.Department
|
|
|
// if len(userData.DepartmentId) > 0 {
|
|
|
|
|
|
// }
|
|
|
|
|
|
// var supperUserList []*domain.User
|
|
|
// if len(userData.DepartmentId) > 0 {
|
|
|
// _, departmentList, err := departmentRepo.Find(map[string]interface{}{
|
|
|
// "ids": userData.DepartmentId,
|
|
|
// })
|
|
|
// if err != nil {
|
|
|
// return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取部门信息,"+err.Error())
|
|
|
// }
|
|
|
// var chargeUserIds []int64
|
|
|
// for _, v := range departmentList {
|
|
|
// chargeUserIds = append(chargeUserIds, v.ChargeUserIds...)
|
|
|
// }
|
|
|
// if len(chargeUserIds) > 0 {
|
|
|
// _, supperUserList, err = userRepo.Find(map[string]interface{}{
|
|
|
// "ids": chargeUserIds,
|
|
|
// })
|
|
|
// if err != nil {
|
|
|
// return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取员工上级信息,"+err.Error())
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
supperUserList, _ := srv.getStaffSuper(transactionContext, *userData)
|
|
|
userInfo := adapter.StaffInfo{
|
|
|
UserName: userData.Name,
|
|
|
CompanyName: companyData.Name,
|
|
|
CompanyLogo: companyData.Logo,
|
|
|
SupperUserName: "",
|
|
|
DutyTime: userData.EntryTime,
|
|
|
}
|
...
|
...
|
@@ -1822,7 +1794,7 @@ func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoComma |
|
|
// return tool_funs.SimpleWrapGridMap(int64(cnt), assessList), nil
|
|
|
// }
|
|
|
|
|
|
// 获取员工的上级是谁 ,TODO
|
|
|
// 获取员工的上级是谁
|
|
|
func (srv StaffAssessServeice) getStaffSuper(transactionContext application.TransactionContext, targetUser domain.User) ([]*domain.User, error) {
|
|
|
departmentRepo := factory.CreateDepartmentRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
...
|
...
|
|