|
@@ -910,10 +910,14 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction |
|
@@ -910,10 +910,14 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction |
910
|
"transactionContext": transactionContext,
|
910
|
"transactionContext": transactionContext,
|
911
|
})
|
911
|
})
|
912
|
for _, val := range param {
|
912
|
for _, val := range param {
|
913
|
- taskData, err := taskRepo.FindOne(map[string]interface{}{"id": val.TaskId})
|
913
|
+ _, taskDataList, err := taskRepo.Find(map[string]interface{}{"id": val.TaskId})
|
914
|
if err != nil {
|
914
|
if err != nil {
|
915
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务数据"+err.Error())
|
915
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务数据"+err.Error())
|
916
|
}
|
916
|
}
|
|
|
917
|
+ if len(taskDataList) == 0 {
|
|
|
918
|
+ continue
|
|
|
919
|
+ }
|
|
|
920
|
+ taskData := taskDataList[0]
|
917
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{"taskId": []int{val.TaskId}})
|
921
|
_, stageList, err := taskStageRepo.Find(map[string]interface{}{"taskId": []int{val.TaskId}})
|
918
|
if err != nil {
|
922
|
if err != nil {
|
919
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务里程碑数据"+err.Error())
|
923
|
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "找不到任务里程碑数据"+err.Error())
|
|
@@ -975,8 +979,13 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map |
|
@@ -975,8 +979,13 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map |
975
|
}
|
979
|
}
|
976
|
|
980
|
|
977
|
resultList := []adapter.TaskRecordAdapter{}
|
981
|
resultList := []adapter.TaskRecordAdapter{}
|
|
|
982
|
+ nowDay := time.Now().Format("2006-01-02")
|
978
|
for _, val := range taskRecordList {
|
983
|
for _, val := range taskRecordList {
|
979
|
-
|
984
|
+ // 跳过今天
|
|
|
985
|
+ createdAtDay := val.CreatedAt.Local().Format("2006-01-02")
|
|
|
986
|
+ if createdAtDay == nowDay {
|
|
|
987
|
+ continue
|
|
|
988
|
+ }
|
980
|
item := adapter.TaskRecordAdapter{
|
989
|
item := adapter.TaskRecordAdapter{
|
981
|
Id: val.Id,
|
990
|
Id: val.Id,
|
982
|
StaffAssessId: val.StaffAssessId,
|
991
|
StaffAssessId: val.StaffAssessId,
|
|
@@ -995,7 +1004,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map |
|
@@ -995,7 +1004,7 @@ func (srv TaskService) ListTaskRecord(param *command.ListTaskRecordCommand) (map |
995
|
PlanCompletedAt: "",
|
1004
|
PlanCompletedAt: "",
|
996
|
RealCompletedAt: "",
|
1005
|
RealCompletedAt: "",
|
997
|
},
|
1006
|
},
|
998
|
- CreatedAt: val.CreatedAt.Local().Format("2006-01-02"),
|
1007
|
+ CreatedAt: createdAtDay,
|
999
|
}
|
1008
|
}
|
1000
|
t1 := time.Unix(val.TaskStageCheck.PlanCompletedAt, 0).Local().Format("2006-01-02")
|
1009
|
t1 := time.Unix(val.TaskStageCheck.PlanCompletedAt, 0).Local().Format("2006-01-02")
|
1001
|
item.TaskStageCheck.PlanCompletedAt = t1
|
1010
|
item.TaskStageCheck.PlanCompletedAt = t1
|
|
@@ -1190,6 +1199,7 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
|
@@ -1190,6 +1199,7 @@ func (srv TaskService) ListTask3(param *command.SearchTaskCommand) (map[string]i |
1190
|
if err != nil {
|
1199
|
if err != nil {
|
1191
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "统计任务里程碑总数"+err.Error())
|
1200
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "统计任务里程碑总数"+err.Error())
|
1192
|
}
|
1201
|
}
|
|
|
1202
|
+ //反馈异常数
|
1193
|
taskAnomalyCnt, err := taskDao.CountTaskAnomalyNotHrbp(condition)
|
1203
|
taskAnomalyCnt, err := taskDao.CountTaskAnomalyNotHrbp(condition)
|
1194
|
if err != nil {
|
1204
|
if err != nil {
|
1195
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "统计任务里程碑总数"+err.Error())
|
1205
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "统计任务里程碑总数"+err.Error())
|