|
@@ -157,6 +157,7 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
|
@@ -157,6 +157,7 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
157
|
if err != nil {
|
157
|
if err != nil {
|
158
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取下级员工"+err.Error())
|
158
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取下级员工"+err.Error())
|
159
|
}
|
159
|
}
|
|
|
160
|
+ //我的直属下级人员
|
160
|
childUserId := []string{}
|
161
|
childUserId := []string{}
|
161
|
for _, val := range childUser {
|
162
|
for _, val := range childUser {
|
162
|
if val.Level == 2 {
|
163
|
if val.Level == 2 {
|
|
@@ -171,6 +172,7 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
|
@@ -171,6 +172,7 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
171
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "检查任务里程碑异常的消息"+err.Error())
|
172
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "检查任务里程碑异常的消息"+err.Error())
|
172
|
}
|
173
|
}
|
173
|
}
|
174
|
}
|
|
|
175
|
+ //我的下下级人员
|
174
|
childUserId2 := []string{}
|
176
|
childUserId2 := []string{}
|
175
|
for _, val := range childUser {
|
177
|
for _, val := range childUser {
|
176
|
if val.Level >= 3 {
|
178
|
if val.Level >= 3 {
|
|
@@ -270,11 +272,20 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
|
@@ -270,11 +272,20 @@ func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.G |
270
|
}
|
272
|
}
|
271
|
uidStr := strconv.Itoa(param.UserId)
|
273
|
uidStr := strconv.Itoa(param.UserId)
|
272
|
//我作为任务相关人
|
274
|
//我作为任务相关人
|
|
|
275
|
+loop:
|
273
|
for _, val := range taskStageList0 {
|
276
|
for _, val := range taskStageList0 {
|
274
|
-
|
277
|
+ // 排除 我就是负责人,
|
275
|
if val.LeaderId == uidStr {
|
278
|
if val.LeaderId == uidStr {
|
276
|
continue
|
279
|
continue
|
277
|
}
|
280
|
}
|
|
|
281
|
+
|
|
|
282
|
+ //排除 我是任务负责人的直属上级
|
|
|
283
|
+ for _, val2 := range childUserId {
|
|
|
284
|
+ if val.LeaderId == val2 {
|
|
|
285
|
+ continue loop
|
|
|
286
|
+ }
|
|
|
287
|
+ }
|
|
|
288
|
+
|
278
|
s := fmt.Sprintf("【您关注的【%s】里程碑未按时完成,请知晓。】", val.TaskAlias)
|
289
|
s := fmt.Sprintf("【您关注的【%s】里程碑未按时完成,请知晓。】", val.TaskAlias)
|
279
|
msgList = append(msgList, adapter.MessageListAdapter{
|
290
|
msgList = append(msgList, adapter.MessageListAdapter{
|
280
|
Content: s,
|
291
|
Content: s,
|
|
@@ -392,6 +403,7 @@ func (srv *MessagePersonalService) TodayMessageTaskRecordAnomaly(param *command. |
|
@@ -392,6 +403,7 @@ func (srv *MessagePersonalService) TodayMessageTaskRecordAnomaly(param *command. |
392
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "检查任务里程碑异常的消息"+err.Error())
|
403
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "检查任务里程碑异常的消息"+err.Error())
|
393
|
}
|
404
|
}
|
394
|
}
|
405
|
}
|
|
|
406
|
+ // 我作为任务相关方
|
395
|
|
407
|
|
396
|
msgList := []adapter.MessageListAdapter{}
|
408
|
msgList := []adapter.MessageListAdapter{}
|
397
|
for _, val := range taskStageList {
|
409
|
for _, val := range taskStageList {
|