SELECT CreateBy FROM rb_okr_objective WHERE Group_Id={groupId} and Status <>5 and PeriodId={periodId}and CreateBy in({userIds}) GROUP BY CreateBy
SELECT CreateBy FROM rb_okr_objective WHERE Group_Id={groupId} and Status <>5 and PeriodId={periodId}{(!string.IsNullOrEmpty(userIds)?"and CreateBy in("+userIds+")":"")} GROUP BY CreateBy
)t ";
varobj=ExecuteScalar(sql);
returnobj==null?0:Convert.ToInt32(obj);
...
...
@@ -752,10 +752,10 @@ SELECT CreateBy FROM rb_okr_objective WHERE Group_Id={groupId} and Status <>5 an
SELECT CreateBy FROM rb_okr_objective WHERE Group_Id={groupId} and Status <>5 and Score =0 and PeriodId={periodId} and CreateBy in({userIds}) GROUP BY CreateBy
SELECT CreateBy FROM rb_okr_objective WHERE Group_Id={groupId} and Status <>5 {(type==1?"and Score =0":"and Score >0")} and PeriodId={periodId}{(!string.IsNullOrEmpty(userIds)?"and CreateBy in("+userIds+")":"")} GROUP BY CreateBy
)t ";
varobj=ExecuteScalar(sql);
returnobj==null?0:Convert.ToInt32(obj);
...
...
@@ -824,6 +824,45 @@ WHERE e.RB_Group_id={groupId} and e.EmployeeId in({userIds}) and o.Status <>5 an
INNER JOIN rb_okr_objectiverelation re on re.ObjectiveId = o.Id
WHERE o.Group_Id={group_Id} and o.Status <>5 and o.PeriodId={periodId}{(!string.IsNullOrEmpty(userIds)?"and o.CreateBy in("+userIds+")":"")} GROUP BY o.CreateBy
SELECT UserId FROM rb_okr_updateprogress WHERE Group_Id={group_Id} and PeriodId={periodId} and UpdateTime >= '{date}' {(!string.IsNullOrEmpty(userIds)?"and UserId in("+userIds+")":"")} GROUP BY UserId