Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
569949cd
Commit
569949cd
authored
Mar 04, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
okr 进度更新状态
parent
bb81ee33
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
47 deletions
+60
-47
RB_OKR_Objective.cs
Edu.Model/Entity/OKR/RB_OKR_Objective.cs
+5
-0
OKRPeriodModule.cs
Edu.Module.OKR/OKRPeriodModule.cs
+47
-41
RB_OKR_ObjectiveRepository.cs
Edu.Repository/OKR/RB_OKR_ObjectiveRepository.cs
+8
-6
No files found.
Edu.Model/Entity/OKR/RB_OKR_Objective.cs
View file @
569949cd
...
...
@@ -122,5 +122,10 @@ namespace Edu.Model.Entity.OKR
/// 是否默认全部可见权限 1是 2否
/// </summary>
public
int
IsDefaultPermission
{
get
;
set
;
}
/// <summary>
/// 是否更新过进度状态 1是
/// </summary>
public
int
IsUpdated
{
get
;
set
;
}
}
}
Edu.Module.OKR/OKRPeriodModule.cs
View file @
569949cd
This diff is collapsed.
Click to expand it.
Edu.Repository/OKR/RB_OKR_ObjectiveRepository.cs
View file @
569949cd
...
...
@@ -564,9 +564,10 @@ where o.Group_Id ={group_Id} and o.PeriodId ={periodId} AND o.Status =2 and o.Pr
string
sql
=
$@"
select * from(
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.ProgressState = 2 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 then 1 else 0 end) as ObjectiveNum1,
sum(case when o.IsUpdated = 1 and o.ProgressState = 1 then 1 else 0 end) as ObjectiveNum2,
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
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
...
...
@@ -579,9 +580,10 @@ where e.RB_Group_id ={group_Id} and e.IsLeave =0 {(!string.IsNullOrEmpty(userIds
{
string
sql
=
$@"
select e.RB_Department_Id,
sum(case when o.ProgressState = 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.ProgressState = 3 then 1 else 0 end) as ObjectiveNum3
sum(case when o.IsUpdated <> 1 then 1 else 0 end) as ObjectiveNum1,
sum(case when o.IsUpdated = 1 and o.ProgressState = 1 then 1 else 0 end) as ObjectiveNum2,
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
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment