作者 tangxvhui

暂存

package adapter
type MessageListAdapter struct {
Content string `json:"content"`
}
... ...
... ... @@ -102,3 +102,16 @@ func (srv *MessagePersonalService) TodayMessageSummaryEvaluationSelf(param *comm
}
return resp, nil
}
// 获取关于任务里程碑异常的消息
// 每日一次
func (srv *MessagePersonalService) TodayMessageTaskStageAnomaly(param *command.GetUserMessageCommand) (map[string]interface{}, error) {
return nil, nil
}
// 获取关于任务反馈碑异常的消息
// 每日一次
func (srv *MessagePersonalService) TodayMessageTaskRecordAnomaly(param *command.GetUserMessageCommand) (map[string]interface{}, error) {
return nil, nil
}
... ...
... ... @@ -236,6 +236,7 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string]
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "请填写里程碑完成时间")
}
t = dayEndTime(t)
if i > 0 {
if lastPlanCompletedAt.After(t) {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "里程碑["+val2.Name+"]完成时间填写错误")
... ... @@ -261,7 +262,7 @@ func (srv TaskService) UpdateTask(param *command.UpdateTaskCommand) (map[string]
oldStage.DeletedAt = nil
oldStage.SortBy = i + 1
oldStage.Name = val2.Name
oldStage.PlanCompletedAt = t.Unix()
oldStage.PlanCompleted(t)
//TODO 修改里程碑计划完成时间,特殊处理
}
stageList = append(stageList, newStageList...)
... ... @@ -827,3 +828,5 @@ func (srv TaskService) ReplyTaskStage(transactionContext application.Transaction
}
return nil
}
// func (srv TaskService)
... ...
... ... @@ -52,3 +52,13 @@ func (t TaskStage) StatusDescription() string {
}
return str
}
func (t *TaskStage) PlanCompleted(now time.Time) {
t.PlanCompletedAt = t.dayEndTime(now).Unix()
}
func (t TaskStage) dayEndTime(now time.Time) time.Time {
yyyy, m, d := now.Local().Date()
endTime := time.Date(yyyy, m, d, 23, 59, 59, 0, time.Local)
return endTime
}
... ...