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
f3d86fdd
Commit
f3d86fdd
authored
Mar 05, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
c473eca7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
112 additions
and
0 deletions
+112
-0
OKRPeriodModule.cs
Edu.Module.OKR/OKRPeriodModule.cs
+51
-0
RB_OKR_ObjectiveRepository.cs
Edu.Repository/OKR/RB_OKR_ObjectiveRepository.cs
+16
-0
OKRPeriodController.cs
Edu.WebApi/Controllers/OKR/OKRPeriodController.cs
+45
-0
No files found.
Edu.Module.OKR/OKRPeriodModule.cs
View file @
f3d86fdd
...
...
@@ -8200,6 +8200,57 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
#
endregion
#
region
春姐
统计
/// <summary>
/// 获取个人数据分布明细
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="periodId"></param>
/// <param name="type"></param>
/// <param name="startValue"></param>
/// <param name="endValue"></param>
/// <param name="orderBy"></param>
/// <param name="userInfo"></param>
/// <param name="IsAdmin"></param>
/// <returns></returns>
public
List
<
OKRPersonalDimension
>
GetOKRGRDateDistributionPage
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
int
periodId
,
int
type
,
int
startValue
,
int
endValue
,
int
orderBy
,
int
rangeType
,
string
departIds
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
=
false
)
{
count
=
0
;
var
userIdList
=
new
List
<
int
>();
if
(
IsAdmin
==
false
)
{
if
(
rangeType
==
1
)
{
//查询该用户下所有的下级用户
userIdList
=
GetMyAllDownlineUserIdList
(
userInfo
,
0
,
postId
,
leaveStatus
);
}
else
{
//首先查询用户的所有直属下级
userIdList
=
GetMyUnderlingUserIdList
(
userInfo
,
0
,
postId
,
leaveStatus
);
}
}
else
{
var
accountList
=
accountRepository
.
GetAccountListExtRepository
(
new
Model
.
ViewModel
.
User
.
RB_Account_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
Dept_Id
=
0
,
IsSelectLevelNor
=
1
});
userIdList
=
accountList
.
Select
(
x
=>
x
.
Id
).
ToList
();
}
string
userIds
=
string
.
Join
(
","
,
userIdList
.
Distinct
());
List
<
OKRPersonalDimension
>
RList
=
oKR_ObjectiveRepository
.
GetOKRGRDateDistributionPage
(
pageIndex
,
pageSize
,
out
count
,
periodId
,
startValue
,
endValue
,
orderBy
,
userIds
,
userInfo
.
Group_Id
);
return
RList
;
}
/// <summary>
/// 获取个人维度打分以及目标量
/// </summary>
...
...
Edu.Repository/OKR/RB_OKR_ObjectiveRepository.cs
View file @
f3d86fdd
...
...
@@ -825,5 +825,21 @@ WHERE e.RB_Group_id={groupId} and e.EmployeeId in({userIds}) and o.Status <>5 an
}
#
endregion
#
region
数据看板
public
List
<
OKRPersonalDimension
>
GetOKRGRDateDistributionPage
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
int
periodId
,
int
startValue
,
int
endValue
,
int
orderBy
,
string
userIds
,
int
group_Id
)
{
string
sql
=
$@"
select * from(
select e.EmployeeId AS CreateBy,e.EmName,e.EmPhoto,e.DeptName,e.PostName,SUM(CASE WHEN o.Id is null THEN 0 ELSE 1 END) as ObjectiveNum
from rb_employee e
LEFT JOIN RB_OKR_Objective o on e.EmployeeId = o.CreateBy 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
)t where t.ObjectiveNum >=
{
startValue
}
{(
endValue
>=
0
?
"and t.ObjectiveNum <="
+
endValue
:
""
)}
order by t.ObjectiveNum
{(
orderBy
==
1
?
" asc"
:
" desc"
)}
"
;
return
GetPage
<
OKRPersonalDimension
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
#
endregion
}
}
Edu.WebApi/Controllers/OKR/OKRPeriodController.cs
View file @
f3d86fdd
...
...
@@ -2152,6 +2152,51 @@ namespace Edu.WebApi.Controllers.OKR
}
#
endregion
#
region
数据看板
/// <summary>
/// 获取数据看板员工信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOKRGRDateDistributionPage
()
{
var
userInfo
=
base
.
UserInfo
;
var
pageModel
=
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
PeriodId
=
parms
.
GetInt
(
"PeriodId"
,
0
);
//周期id
int
IsAdmin
=
parms
.
GetInt
(
"IsAdmin"
,
2
);
//是否管理端查询 1是 2否
int
Type
=
parms
.
GetInt
(
"Type"
,
1
);
//1234 对应4项统计
int
StartValue
=
parms
.
GetInt
(
"StartValue"
,
0
);
//开始值
int
EndValue
=
parms
.
GetInt
(
"EndValue"
,
0
);
//结束值
int
OrderBy
=
parms
.
GetInt
(
"OrderBy"
,
2
);
// 1升序 2降序
int
RangeType
=
parms
.
GetInt
(
"RangeType"
,
1
);
//范围类型 非管理端查询 1所有下级 2直属下级
string
DepartIds
=
parms
.
GetStringValue
(
"DepartId"
);
//部门ID 管理端可用查询
int
PostId
=
parms
.
GetInt
(
"PostId"
,
0
);
//岗位ID
int
LeaveStatus
=
parms
.
GetInt
(
"LeaveStatus"
,
0
);
//在职状态
if
(
PeriodId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
if
(
IsAdmin
==
1
)
{
RangeType
=
0
;
}
var
list
=
okrPeriodModule
.
GetOKRGRDateDistributionPage
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
count
,
PeriodId
,
Type
,
StartValue
,
EndValue
,
OrderBy
,
RangeType
,
DepartIds
,
PostId
,
LeaveStatus
,
userInfo
,
IsAdmin
==
1
?
true
:
false
);
pageModel
.
Count
=
Convert
.
ToInt32
(
count
);
pageModel
.
PageData
=
list
.
Select
(
x
=>
new
{
});
return
ApiResult
.
Success
(
""
,
pageModel
);
}
#
endregion
#
region
个人端数据看板
/// <summary>
/// 获取个人维度
...
...
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