Commit 569949cd authored by liudong1993's avatar liudong1993

okr 进度更新状态

parent bb81ee33
...@@ -122,5 +122,10 @@ namespace Edu.Model.Entity.OKR ...@@ -122,5 +122,10 @@ namespace Edu.Model.Entity.OKR
/// 是否默认全部可见权限 1是 2否 /// 是否默认全部可见权限 1是 2否
/// </summary> /// </summary>
public int IsDefaultPermission { get; set; } public int IsDefaultPermission { get; set; }
/// <summary>
/// 是否更新过进度状态 1是
/// </summary>
public int IsUpdated { get; set; }
} }
} }
This diff is collapsed.
...@@ -564,9 +564,10 @@ where o.Group_Id ={group_Id} and o.PeriodId ={periodId} AND o.Status =2 and o.Pr ...@@ -564,9 +564,10 @@ where o.Group_Id ={group_Id} and o.PeriodId ={periodId} AND o.Status =2 and o.Pr
string sql = $@" string sql = $@"
select * from( select * from(
select e.EmployeeId AS CreateBy,e.EmName,e.EmPhoto,e.DeptName,e.PostName, select e.EmployeeId AS CreateBy,e.EmName,e.EmPhoto,e.DeptName,e.PostName,
sum(case when o.ProgressState = 1 then 1 else 0 end) as ObjectiveNum1, sum(case when o.IsUpdated <> 1 then 1 else 0 end) as ObjectiveNum1,
sum(case when o.ProgressState = 2 then 1 else 0 end) as ObjectiveNum2, sum(case when o.IsUpdated = 1 and o.ProgressState = 1 then 1 else 0 end) as ObjectiveNum2,
sum(case when o.ProgressState = 3 then 1 else 0 end) as ObjectiveNum3 sum(case when o.IsUpdated = 1 and o.ProgressState = 2 then 1 else 0 end) as ObjectiveNum3,
sum(case when o.IsUpdated = 1 and o.ProgressState = 3 then 1 else 0 end) as ObjectiveNum4
from rb_employee e from rb_employee e
LEFT JOIN RB_OKR_Objective o on e.EmployeeId = o.CreateBy and o.Group_Id ={group_Id} and o.PeriodId ={periodId} AND o.Status =2 LEFT JOIN RB_OKR_Objective o on e.EmployeeId = o.CreateBy and o.Group_Id ={group_Id} and o.PeriodId ={periodId} AND o.Status =2
where e.RB_Group_id ={group_Id} and e.IsLeave =0 {(!string.IsNullOrEmpty(userIds) ? "and e.EmployeeId in (" + userIds + ")" : "")} group by e.EmployeeId where e.RB_Group_id ={group_Id} and e.IsLeave =0 {(!string.IsNullOrEmpty(userIds) ? "and e.EmployeeId in (" + userIds + ")" : "")} group by e.EmployeeId
...@@ -579,9 +580,10 @@ where e.RB_Group_id ={group_Id} and e.IsLeave =0 {(!string.IsNullOrEmpty(userIds ...@@ -579,9 +580,10 @@ where e.RB_Group_id ={group_Id} and e.IsLeave =0 {(!string.IsNullOrEmpty(userIds
{ {
string sql = $@" string sql = $@"
select e.RB_Department_Id, select e.RB_Department_Id,
sum(case when o.ProgressState = 1 then 1 else 0 end) as ObjectiveNum1, sum(case when o.IsUpdated <> 1 then 1 else 0 end) as ObjectiveNum1,
sum(case when o.ProgressState = 2 then 1 else 0 end) as ObjectiveNum2, sum(case when o.IsUpdated = 1 and o.ProgressState = 1 then 1 else 0 end) as ObjectiveNum2,
sum(case when o.ProgressState = 3 then 1 else 0 end) as ObjectiveNum3 sum(case when o.IsUpdated = 1 and o.ProgressState = 2 then 1 else 0 end) as ObjectiveNum3,
sum(case when o.IsUpdated = 1 and o.ProgressState = 3 then 1 else 0 end) as ObjectiveNum4
from rb_employee e from rb_employee e
LEFT JOIN RB_OKR_Objective o on e.EmployeeId = o.CreateBy and o.Group_Id ={group_Id} and o.PeriodId ={periodId} AND o.Status =2 LEFT JOIN RB_OKR_Objective o on e.EmployeeId = o.CreateBy and o.Group_Id ={group_Id} and o.PeriodId ={periodId} AND o.Status =2
where e.RB_Group_id ={group_Id} and e.IsLeave =0 and e.RB_Department_Id in ({deptIds}) group by e.RB_Department_Id where e.RB_Group_id ={group_Id} and e.IsLeave =0 and e.RB_Department_Id in ({deptIds}) group by e.RB_Department_Id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment