// where.AppendFormat(" AND b.{0}>='{1}' ", nameof(Employee_ViewModel.EntryTime), query.StartEntryTime);
...
...
@@ -389,10 +396,10 @@ FROM
) AS A LEFT JOIN rb_group AS g ON A.Group_Id=g.GId
LEFT JOIN rb_school AS s ON A.School_Id=s.SId
LEFT JOIN rb_department AS d ON A.Dept_Id=d.DeptId
LEFT JOIN (SELECT a.CreateBy,COUNT(*) as ObjectiveNCount,SUM(Score) as Score from rb_okr_objective as a LEFT JOIN rb_okr_objectiverelation as b on a.Id=b.ObjectiveId GROUP BY a.CreateBy) as
LEFT JOIN (SELECT a.CreateBy,COUNT(*) as ObjectiveNCount,SUM(Score) as Score from rb_okr_objective as a LEFT JOIN rb_okr_objectiverelation as b on a.Id=b.ObjectiveId where a.Status<>5 {4} GROUP BY a.CreateBy) as