作者 tangxvhui

调整搜索条件

@@ -808,13 +808,14 @@ and not ( @@ -808,13 +808,14 @@ and not (
808 and 808 and
809 task.last_stage ->>'id'<>'0' 809 task.last_stage ->>'id'<>'0'
810 ) 810 )
  811 +and task.status = ?
811 ` 812 `
812 813
813 relatedUser := fmt.Sprintf("[%d]", relatedUserId) 814 relatedUser := fmt.Sprintf("[%d]", relatedUserId)
814 if len(leaderId) == 0 { 815 if len(leaderId) == 0 {
815 leaderId = []string{"-1"} 816 leaderId = []string{"-1"}
816 } 817 }
817 - condition := []interface{}{companyId, pg.In(leaderId), relatedUser} 818 + condition := []interface{}{companyId, pg.In(leaderId), relatedUser, domain.TaskRunning}
818 result := []TaskData6{} 819 result := []TaskData6{}
819 tx := d.transactionContext.PgTx 820 tx := d.transactionContext.PgTx
820 _, err := tx.Query(&result, sqlStr, condition...) 821 _, err := tx.Query(&result, sqlStr, condition...)