...
|
...
|
@@ -662,27 +662,27 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m |
|
|
return map[string]interface{}{}, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
// if len(assessList) == 0 || taskRecordId == 0 {
|
|
|
// result := map[string]interface{}{
|
|
|
// "have": false,
|
|
|
// "cycleId": strconv.Itoa(cycleId),
|
|
|
// "beginDay": today,
|
|
|
// "taskRecordId": strconv.Itoa(taskRecordId),
|
|
|
// "userId": strconv.Itoa(executorId),
|
|
|
// }
|
|
|
// return result, nil
|
|
|
// }
|
|
|
if len(assessList) == 0 || taskRecordId == 0 {
|
|
|
result := map[string]interface{}{
|
|
|
"have": false,
|
|
|
"cycleId": strconv.Itoa(cycleId),
|
|
|
"beginDay": today,
|
|
|
"taskRecordId": strconv.Itoa(taskRecordId),
|
|
|
"userId": strconv.Itoa(executorId),
|
|
|
}
|
|
|
return result, nil
|
|
|
}
|
|
|
|
|
|
// if assessList[0].Executor.UserId != param.UserId {
|
|
|
// result := map[string]interface{}{
|
|
|
// "have": false,
|
|
|
// "cycleId": strconv.Itoa(cycleId),
|
|
|
// "beginDay": today,
|
|
|
// "taskRecordId": strconv.Itoa(taskRecordId),
|
|
|
// "userId": strconv.Itoa(executorId),
|
|
|
// }
|
|
|
// return result, nil
|
|
|
// }
|
|
|
if assessList[0].Executor.UserId != param.UserId {
|
|
|
result := map[string]interface{}{
|
|
|
"have": false,
|
|
|
"cycleId": strconv.Itoa(cycleId),
|
|
|
"beginDay": today,
|
|
|
"taskRecordId": strconv.Itoa(taskRecordId),
|
|
|
"userId": strconv.Itoa(executorId),
|
|
|
}
|
|
|
return result, nil
|
|
|
}
|
|
|
result := map[string]interface{}{
|
|
|
"have": true,
|
|
|
"cycleId": strconv.Itoa(cycleId),
|
...
|
...
|
@@ -690,13 +690,13 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m |
|
|
"taskRecordId": strconv.Itoa(taskRecordId),
|
|
|
"userId": strconv.Itoa(executorId),
|
|
|
}
|
|
|
result = map[string]interface{}{
|
|
|
"have": true,
|
|
|
"cycleId": "1669227421016002560",
|
|
|
"beginDay": "2023-06-28",
|
|
|
"taskRecordId": "1673722975515316224",
|
|
|
"userId": "3422174102828544",
|
|
|
}
|
|
|
// result = map[string]interface{}{
|
|
|
// "have": true,
|
|
|
// "cycleId": "1669227421016002560",
|
|
|
// "beginDay": "2023-06-28",
|
|
|
// "taskRecordId": "1673722975515316224",
|
|
|
// "userId": "3422174102828544",
|
|
|
// }
|
|
|
return result, nil
|
|
|
}
|
|
|
|
...
|
...
|
@@ -1116,13 +1116,13 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma |
|
|
"taskRecordId": strconv.Itoa(taskRecordId),
|
|
|
"userId": strconv.Itoa(executorId),
|
|
|
}
|
|
|
result = map[string]interface{}{
|
|
|
"have": true,
|
|
|
"cycleId": "1669227421016002560",
|
|
|
"beginDay": "2023-06-28",
|
|
|
"taskRecordId": "1673722975515316224",
|
|
|
"userId": "3422174102828544",
|
|
|
}
|
|
|
// result = map[string]interface{}{
|
|
|
// "have": true,
|
|
|
// "cycleId": "1669227421016002560",
|
|
|
// "beginDay": "2023-06-28",
|
|
|
// "taskRecordId": "1673722975515316224",
|
|
|
// "userId": "3422174102828544",
|
|
|
// }
|
|
|
return result, nil
|
|
|
}
|
|
|
|
...
|
...
|
|