作者 tangxvhui

修复一下bug

@@ -39,10 +39,10 @@ func (t *TaskItem) GenStatusDescript() { @@ -39,10 +39,10 @@ func (t *TaskItem) GenStatusDescript() {
39 if domain.TaskState(t.Status) == domain.TaskStop { 39 if domain.TaskState(t.Status) == domain.TaskStop {
40 statusNamed = "已停止" 40 statusNamed = "已停止"
41 } 41 }
42 - if t.CurrentStage.Id == 0 && t.LastStage.PlanCompletedAt < t.LastStage.RealCompletedAt { 42 + if t.LastStage.Id > 0 && t.CurrentStage.Id == 0 && t.LastStage.PlanCompletedAt < t.LastStage.RealCompletedAt {
43 statusNamed = "逾期完成" 43 statusNamed = "逾期完成"
44 } 44 }
45 - if t.CurrentStage.Id == 0 && t.LastStage.PlanCompletedAt >= t.LastStage.RealCompletedAt { 45 + if t.LastStage.Id > 0 && t.CurrentStage.Id == 0 && t.LastStage.PlanCompletedAt >= t.LastStage.RealCompletedAt {
46 statusNamed = "如期完成" 46 statusNamed = "如期完成"
47 } 47 }
48 48
@@ -245,6 +245,7 @@ func (c *TaskController) CancelIgnore() { @@ -245,6 +245,7 @@ func (c *TaskController) CancelIgnore() {
245 } 245 }
246 userReq := middlewares.GetUser(c.Ctx) 246 userReq := middlewares.GetUser(c.Ctx)
247 paramReq.CompanyId = int(userReq.CompanyId) 247 paramReq.CompanyId = int(userReq.CompanyId)
  248 + paramReq.UserId = int(userReq.UserId)
248 _, err = srv.CancleTaskIgnore(paramReq) 249 _, err = srv.CancleTaskIgnore(paramReq)
249 c.Response(nil, err) 250 c.Response(nil, err)
250 251