作者 tangxvhui

修正 ,不再立即记录反馈异常情况

package service
//TODO
//检查每日提交的任务里程碑反馈
... ...
... ... @@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"strconv"
"strings"
"time"
"github.com/linmadan/egglib-go/core/application"
... ... @@ -448,7 +447,8 @@ func (srv TaskService) GetTaskInfo(param *command.GetTaskCommand) (*adapter.Task
var relatedUserList []*domain.User
if len(relatedUserId) > 0 {
_, relatedUserList, err = userRepo.Find(map[string]interface{}{
"ids": relatedUserId,
"ids": relatedUserId,
"companyId": param.CompanyId,
})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取相关人员"+err.Error())
... ... @@ -1006,19 +1006,17 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction
if len(stageList) == 0 {
continue
}
// 避免当天多次编辑提交,数量递增
if isFirstSubmit && val.AnomalyState == domain.AnomalyState0 {
taskData.Anomaly += 1
}
trimSpace := strings.TrimLeft(val.AssistContent, "\n") // 去掉前换行符
trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
// 上级填写内容有值,选项是已辅导,变为正常
if !(len(trimSpace) == 0 || trimSpace == "无") && val.AssistLevel >= domain.AssistLevel2 {
taskData.Anomaly = 0
}
// if isFirstSubmit && val.AnomalyState == domain.AnomalyState0 {
// taskData.Anomaly += 1
// }
// trimSpace := strings.TrimLeft(val.AssistContent, "\n") // 去掉前换行符
// trimSpace = strings.TrimRight(trimSpace, "\n") // 去掉后换行符
// trimSpace = strings.TrimSpace(trimSpace) // 去掉前后空格符
// // 上级填写内容有值,选项是已辅导,变为正常
// if !(len(trimSpace) == 0 || trimSpace == "无") && val.AssistLevel >= domain.AssistLevel2 {
// taskData.Anomaly = 0
// }
for _, val2 := range stageList {
if val2.Id != val.TaskStageCheck.Id {
continue
... ...