作者 tangxvhui

更新

... ... @@ -304,6 +304,25 @@ func anomalyIsAssistFlag(transactionContext application.TransactionContext, task
"transactionContext": transactionContext,
})
//检查任务负责人是否有上级
_, userList, _ := userRepo.Find(map[string]interface{}{
"id": taskData.Leader.Id,
"limit": 1,
})
if len(userList) == 0 {
return nil
}
if userList[0].ParentId > 0 {
_, leaderList, _ := userRepo.Find(map[string]interface{}{
"id": userList[0].ParentId,
"limit": 1,
})
if len(leaderList) == 0 {
return nil
}
}
_, oldAnomaly, err := taskAnomalyRepo.Find(map[string]interface{}{
"isLast": 1,
"category": domain.AnomalyCategoryType3,
... ...
... ... @@ -64,8 +64,16 @@ func (t *TaskAnomaly) MarkD() {
}
func (t *TaskAnomaly) SetNoticeWho(u *User) {
uid := strconv.Itoa(int(u.Id))
for _, v := range t.NoticeWho {
if v["id"] == uid {
return
}
}
t.NoticeWho = append(t.NoticeWho, map[string]string{
"id": strconv.Itoa(int(u.Id)), "name": u.Name,
"id": uid, "name": u.Name,
})
}
... ...