作者 tangxvhui

调整任务 AssistFlagMax 的默认值

... ... @@ -398,7 +398,7 @@ func isAssessFlag(transactionContext application.TransactionContext, taskData *d
userParentId = useList[0].ParentId
}
anomalyDay := xtime.SubDayAbs(time.Now(), time.Unix(anomalyDataTmp.RecordBegin, 0))
if anomalyDay > 3 && userParentId > 0 {
if anomalyDay >= 3 && userParentId > 0 {
_, useList2, err := userRepo.Find(map[string]interface{}{"id": userParentId, "limit": 1})
if err != nil {
return fmt.Errorf("获取任务Leader:%s", err)
... ...
... ... @@ -85,14 +85,15 @@ func (srv TaskService) CreateTaskByProject(transactionContext application.Transa
Account: leaderData.Account,
Name: leaderData.Name,
},
Status: domain.TaskRunning,
Level: 0,
LevelName: "",
RelatedUser: []int{int(leaderData.Id)},
RunAt: nowTime.Unix(),
StopAt: 0,
SortBy: domain.TaskSortNull,
CreatedBy: 0,
Status: domain.TaskRunning,
Level: 0,
LevelName: "",
RelatedUser: []int{int(leaderData.Id)},
RunAt: nowTime.Unix(),
StopAt: 0,
SortBy: domain.TaskSortNull,
CreatedBy: 0, //标记为 通过每日评估生成的任务
AssistFlagMax: 1, //默认一天
}
if int(leaderData.ParentId) != 0 {
newTask.RelatedUser = append(newTask.RelatedUser, int(leaderData.ParentId))
... ...
... ... @@ -34,7 +34,7 @@ func (srv TaskService) listTaskAnomaly2(param *command.ListTaskAnomalyCommand) (
taskAnomalyDao := dao.NewTaskAnomalyDao(map[string]interface{}{
"transactionContext": transactionContext,
})
limit := 500
limit := 1000
offset := 0
if param.SubLevel < 2 {
param.SubLevel = 2
... ... @@ -203,7 +203,7 @@ func (srv TaskService) listTaskAnomaly3(param *command.ListTaskAnomalyCommand) (
taskAnomalyDao := dao.NewTaskAnomalyDao(map[string]interface{}{
"transactionContext": transactionContext,
})
limit := 500
limit := 1000
offset := 0
cnt, anomalyList, err := taskAnomalyDao.List3(param.UserId, param.CompanyId, param.TaskName, param.Category, param.DayTime, param.LeaderId, limit, offset)
if err != nil {
... ... @@ -422,7 +422,7 @@ func (srv TaskService) ListTaskAnomaly1(param *command.ListTaskAnomalyCommand) (
taskAnomalyDao := dao.NewTaskAnomalyDao(map[string]interface{}{
"transactionContext": transactionContext,
})
limit := 500
limit := 1000
offset := 0
cnt, anomalyList, err := taskAnomalyDao.List1(param.UserId, param.CompanyId, param.TaskName, param.Category, param.DayTime, limit, offset)
if err != nil {
... ...