...
|
...
|
@@ -1281,8 +1281,8 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
|
if tk.Id != val3.TaskId {
|
|
|
continue
|
|
|
}
|
|
|
if val3.Marks == nil {
|
|
|
val3.Marks = map[string]string{}
|
|
|
if len(val3.Marks) == 0 {
|
|
|
val3.Marks = map[string]string{"a": "去更新", "b": "去反馈", "c": "找上级", "d": "去辅导"}
|
|
|
}
|
|
|
noticeWho := []string{}
|
|
|
for _, val2 := range val3.NoticeWho {
|
...
|
...
|
@@ -1420,6 +1420,19 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
// 获取我的上级人员
|
|
|
userRepo := factory.CreateUserRepository(map[string]interface{}{"transactionContext": transactionContext})
|
|
|
_, me, err := userRepo.Find(map[string]interface{}{"id": param.UserId})
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取用户的信息"+err.Error())
|
|
|
}
|
|
|
if len(me) == 0 {
|
|
|
return nil, nil
|
|
|
}
|
|
|
var meParent []*domain.User
|
|
|
if me[0].ParentId > 0 {
|
|
|
_, meParent, _ = userRepo.Find(map[string]interface{}{"id": me[0].ParentId})
|
|
|
}
|
|
|
var limit = 20
|
|
|
var offset = 0
|
|
|
if param.PageSize > 0 {
|
...
|
...
|
@@ -1645,7 +1658,7 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
|
}
|
|
|
}
|
|
|
if len(val3.Marks) == 0 {
|
|
|
val3.Marks = map[string]string{}
|
|
|
val3.Marks = map[string]string{"a": "去更新", "b": "去反馈", "c": "找上级", "d": "去辅导"}
|
|
|
}
|
|
|
userId := strconv.Itoa(param.UserId)
|
|
|
isChildUser := false
|
...
|
...
|
@@ -1662,8 +1675,10 @@ func (srv TaskService) listTask3ForHrbp(param *command.SearchTaskCommand) (map[s |
|
|
if userId == val.LeaderId {
|
|
|
// 去更新
|
|
|
tk.Marks["a"] = val3.Marks["a"]
|
|
|
if len(meParent) > 0 {
|
|
|
// 找上级
|
|
|
tk.Marks["c"] = val3.Marks["c"]
|
|
|
}
|
|
|
} else if isChildUser {
|
|
|
// 去辅导
|
|
|
tk.Marks["d"] = val3.Marks["d"]
|
...
|
...
|
|