...
|
...
|
@@ -162,9 +162,9 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
|
|
}
|
|
|
}
|
|
|
// 作为上级,我的下级员工的异常里程碑
|
|
|
var taskStageList2 []dao.TaskStageData
|
|
|
var taskList2 []dao.TaskData3
|
|
|
if len(childUserId) == 0 {
|
|
|
taskStageList2, err = taskDao.TaskStageAnomalyByLeader(childUserId)
|
|
|
taskList2, err = taskDao.TaskStageAnomalyByLeader(childUserId)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "检查任务里程碑异常的消息"+err.Error())
|
|
|
}
|
...
|
...
|
@@ -176,9 +176,9 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
|
|
}
|
|
|
}
|
|
|
// 作为上级, 我的下下级员工的异常里程碑
|
|
|
var taskStageList3 []dao.TaskStageData
|
|
|
var taskList3 []dao.TaskData3
|
|
|
if len(childUserId) == 0 {
|
|
|
taskStageList3, err = taskDao.TaskStageAnomalyByLeader(childUserId2)
|
|
|
taskList3, err = taskDao.TaskStageAnomalyByLeader(childUserId2)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "检查任务里程碑异常的消息"+err.Error())
|
|
|
}
|
...
|
...
|
@@ -186,13 +186,14 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
|
|
|
|
|
msgList := []adapter.MessageListAdapter{}
|
|
|
for _, val := range taskStageList {
|
|
|
s := fmt.Sprintf("【您负责的项目【%s】里程碑未按时完成,请重点关注,积极寻找上级辅导。】", val.Name)
|
|
|
s := fmt.Sprintf("【您负责的项目【%s】里程碑未按时完成,请重点关注,积极寻找上级辅导。】", val.TaskAlias)
|
|
|
msgList = append(msgList, adapter.MessageListAdapter{
|
|
|
Content: s,
|
|
|
})
|
|
|
payload := map[string]string{
|
|
|
"id": strconv.Itoa(val.Id),
|
|
|
"taskName": val.Name,
|
|
|
"task_id": strconv.Itoa(val.TaskId),
|
|
|
"task_alias": val.TaskAlias,
|
|
|
"task_name": val.TaskName,
|
|
|
}
|
|
|
payloadStr, _ := json.Marshal(payload)
|
|
|
newMessage := domain.MessagePersonal{
|
...
|
...
|
@@ -211,14 +212,15 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
for _, val := range taskStageList2 {
|
|
|
s := fmt.Sprintf("【您下级%s负责的项目【%s】里程碑未按时完成,请前往辅导。】", val.LeaderName, val.Name)
|
|
|
for _, val := range taskList2 {
|
|
|
s := fmt.Sprintf("【您下级%s负责的项目【%s】里程碑未按时完成,请前往辅导。】", val.LeaderName, val.TaskAlias)
|
|
|
msgList = append(msgList, adapter.MessageListAdapter{
|
|
|
Content: s,
|
|
|
})
|
|
|
payload := map[string]string{
|
|
|
"id": strconv.Itoa(val.Id),
|
|
|
"taskName": val.Name,
|
|
|
"task_id": strconv.Itoa(val.TaskId),
|
|
|
"task_alias": val.TaskAlias,
|
|
|
"task_name": val.TaskName,
|
|
|
}
|
|
|
payloadStr, _ := json.Marshal(payload)
|
|
|
newMessage := domain.MessagePersonal{
|
...
|
...
|
@@ -237,14 +239,15 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
}
|
|
|
for _, val := range taskStageList3 {
|
|
|
s := fmt.Sprintf("【您下级%s关注的项目【%s】里程碑未按时完成,请前往辅导。】", val.LeaderName, val.Name)
|
|
|
for _, val := range taskList3 {
|
|
|
s := fmt.Sprintf("【您下级%s关注的项目【%s】里程碑未按时完成,请前往辅导。】", val.LeaderName, val.TaskAlias)
|
|
|
msgList = append(msgList, adapter.MessageListAdapter{
|
|
|
Content: s,
|
|
|
})
|
|
|
payload := map[string]string{
|
|
|
"id": strconv.Itoa(val.Id),
|
|
|
"taskName": val.Name,
|
|
|
"task_id": strconv.Itoa(val.TaskId),
|
|
|
"task_alias": val.TaskAlias,
|
|
|
"task_name": val.TaskName,
|
|
|
}
|
|
|
payloadStr, _ := json.Marshal(payload)
|
|
|
newMessage := domain.MessagePersonal{
|
...
|
...
|
@@ -265,13 +268,14 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
|
|
}
|
|
|
//我作为任务相关人
|
|
|
for _, val := range taskStageList0 {
|
|
|
s := fmt.Sprintf("【您下级%s关注的项目【%s】里程碑未按时完成,请前往辅导。】", val.LeaderName, val.Name)
|
|
|
s := fmt.Sprintf("【您下级%s关注的项目【%s】里程碑未按时完成,请前往辅导。】", val.LeaderName, val.TaskName)
|
|
|
msgList = append(msgList, adapter.MessageListAdapter{
|
|
|
Content: s,
|
|
|
})
|
|
|
payload := map[string]string{
|
|
|
"id": strconv.Itoa(val.Id),
|
|
|
"taskName": val.Name,
|
|
|
"task_id": strconv.Itoa(val.TaskId),
|
|
|
"task_alias": val.TaskAlias,
|
|
|
"task_name": val.TaskName,
|
|
|
}
|
|
|
payloadStr, _ := json.Marshal(payload)
|
|
|
newMessage := domain.MessagePersonal{
|
...
|
...
|
|