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
2ff0cd67
Commit
2ff0cd67
authored
Mar 05, 2021
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
f3d86fdd
3369f378
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
23 deletions
+35
-23
RB_Account_ViewModel.cs
Edu.Model/ViewModel/User/RB_Account_ViewModel.cs
+5
-0
OKRPeriodModule.cs
Edu.Module.OKR/OKRPeriodModule.cs
+21
-18
RB_AccountRepository.cs
Edu.Repository/User/RB_AccountRepository.cs
+4
-0
OKRPeriodController.cs
Edu.WebApi/Controllers/OKR/OKRPeriodController.cs
+5
-5
No files found.
Edu.Model/ViewModel/User/RB_Account_ViewModel.cs
View file @
2ff0cd67
...
...
@@ -48,6 +48,11 @@ namespace Edu.Model.ViewModel.User
/// </summary>
public
int
Dept_Id
{
get
;
set
;
}
/// <summary>
/// 部门ids
/// </summary>
public
string
DeptIds
{
get
;
set
;
}
/// <summary>
/// 岗位编号
/// </summary>
...
...
Edu.Module.OKR/OKRPeriodModule.cs
View file @
2ff0cd67
...
...
@@ -7303,7 +7303,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
/// <param name="periodId"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
object
GetOKRGRDateDistribution
(
int
periodId
,
int
rangeType
,
int
departId
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
=
false
)
public
object
GetOKRGRDateDistribution
(
int
periodId
,
int
rangeType
,
string
departId
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
=
false
)
{
var
userIdList
=
new
List
<
int
>();
if
(
IsAdmin
==
false
)
...
...
@@ -7311,17 +7311,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
if
(
rangeType
==
1
)
{
//查询该用户下所有的下级用户
userIdList
=
GetMyAllDownlineUserIdList
(
userInfo
,
departId
,
postId
,
leaveStatus
);
userIdList
=
GetMyAllDownlineUserIdList
(
userInfo
,
0
,
postId
,
leaveStatus
);
}
else
{
//首先查询用户的所有直属下级
userIdList
=
GetMyUnderlingUserIdList
(
userInfo
,
departId
,
postId
,
leaveStatus
);
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
=
departId
,
Post_Id
=
postId
,
LeaveStatus
=
leaveStatus
,
IsSelectLevelNor
=
1
});
var
accountList
=
accountRepository
.
GetAccountListExtRepository
(
new
Model
.
ViewModel
.
User
.
RB_Account_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
Dept
Ids
=
departId
,
Post_Id
=
postId
,
LeaveStatus
=
leaveStatus
,
IsSelectLevelNor
=
1
});
userIdList
=
accountList
.
Select
(
x
=>
x
.
Id
).
ToList
();
}
...
...
@@ -7553,7 +7553,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
/// <param name="userInfo"></param>
/// <param name="IsAdmin"></param>
/// <returns></returns>
public
object
GetOKRGRDateDistributionDetail_V2
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
int
periodId
,
int
type
,
int
orderBy
,
int
orderByNum
,
int
rangeType
,
int
departId
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
=
false
)
public
object
GetOKRGRDateDistributionDetail_V2
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
int
periodId
,
int
type
,
int
orderBy
,
int
orderByNum
,
int
rangeType
,
string
departId
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
=
false
)
{
count
=
0
;
var
userIdList
=
new
List
<
int
>();
...
...
@@ -7562,17 +7562,17 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
if
(
rangeType
==
1
)
{
//查询该用户下所有的下级用户
userIdList
=
GetMyAllDownlineUserIdList
(
userInfo
,
departId
,
postId
,
leaveStatus
);
userIdList
=
GetMyAllDownlineUserIdList
(
userInfo
,
0
,
postId
,
leaveStatus
);
}
else
{
//首先查询用户的所有直属下级
userIdList
=
GetMyUnderlingUserIdList
(
userInfo
,
departId
,
postId
,
leaveStatus
);
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
=
departId
,
Post_Id
=
postId
,
LeaveStatus
=
leaveStatus
,
IsSelectLevelNor
=
1
});
var
accountList
=
accountRepository
.
GetAccountListExtRepository
(
new
Model
.
ViewModel
.
User
.
RB_Account_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
Dept
Ids
=
departId
,
Post_Id
=
postId
,
LeaveStatus
=
leaveStatus
,
IsSelectLevelNor
=
1
});
userIdList
=
accountList
.
Select
(
x
=>
x
.
Id
).
ToList
();
}
string
userIds
=
string
.
Join
(
","
,
userIdList
.
Distinct
());
...
...
@@ -7642,7 +7642,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
/// <param name="userInfo"></param>
/// <param name="v"></param>
/// <returns></returns>
public
object
GetOKRGRDateDistributionForDepartment
(
int
periodId
,
int
type
,
int
orderBy
,
int
orderByNum
,
int
departId
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
)
public
object
GetOKRGRDateDistributionForDepartment
(
int
periodId
,
int
type
,
int
orderBy
,
int
orderByNum
,
string
departId
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
)
{
List
<
object
>
Rlist
=
new
List
<
object
>();
if
(
IsAdmin
==
false
)
...
...
@@ -7795,9 +7795,9 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
}
else
{
if
(
departId
>
0
)
if
(
!
string
.
IsNullOrEmpty
(
departId
)
)
{
var
dlist
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
DeptId
=
departId
});
var
dlist
=
departmentRepository
.
GetDepartmentListRepository
(
new
RB_Department_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
QDeptIds
=
departId
});
string
DeptIdStr
=
departId
.
ToString
();
string
ManagerIds
=
string
.
Join
(
","
,
dlist
.
Where
(
x
=>
!
string
.
IsNullOrEmpty
(
x
.
ManagerIds
)).
Select
(
x
=>
x
.
ManagerIds
));
List
<
Employee_ViewModel
>
ManagerList
=
new
List
<
Employee_ViewModel
>();
...
...
@@ -8001,7 +8001,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
/// <param name="userInfo"></param>
/// <param name="v"></param>
/// <returns></returns>
public
object
GetOKRMatterList
(
int
periodId
,
int
departId
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
)
public
object
GetOKRMatterList
(
int
periodId
,
string
departId
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
)
{
List
<
object
>
RList
=
new
List
<
object
>();
var
pmodel
=
oKR_PeriodRepository
.
GetEntity
(
periodId
);
...
...
@@ -8019,7 +8019,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
var
list
=
oKR_MatterRepository
.
GetList
(
new
Model
.
Entity
.
OKR
.
RB_OKR_Matter
()
{
Group_Id
=
userInfo
.
Group_Id
,
PeriodId
=
periodId
,
UserId
=
userInfo
.
Id
});
if
(
IsAdmin
==
false
)
{
var
userIdList
=
GetMyUnderlingUserIdList
(
userInfo
,
departId
,
postId
,
leaveStatus
);
var
userIdList
=
GetMyUnderlingUserIdList
(
userInfo
,
0
,
postId
,
leaveStatus
);
if
(
userIdList
.
Any
())
{
userIdList
=
userIdList
.
Distinct
().
ToList
();
...
...
@@ -8166,7 +8166,7 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
/// <param name="userInfo"></param>
/// <param name="v"></param>
/// <returns></returns>
public
object
GetOKRProbabilityInfo
(
int
periodId
,
int
rangeType
,
int
departId
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
)
public
object
GetOKRProbabilityInfo
(
int
periodId
,
int
rangeType
,
string
departId
,
int
postId
,
int
leaveStatus
,
UserInfo
userInfo
,
bool
IsAdmin
)
{
var
userIdList
=
new
List
<
int
>();
if
(
IsAdmin
==
false
)
...
...
@@ -8174,21 +8174,24 @@ and {ruleModel.Time} >='{dmodel.RuleSTime.Value.ToString("yyyy-MM-dd")}' and {ru
if
(
rangeType
==
1
)
{
//查询该用户下所有的下级用户
userIdList
=
GetMyAllDownlineUserIdList
(
userInfo
,
departId
,
postId
,
leaveStatus
);
userIdList
=
GetMyAllDownlineUserIdList
(
userInfo
,
0
,
postId
,
leaveStatus
);
}
else
{
//首先查询用户的所有直属下级
userIdList
=
GetMyUnderlingUserIdList
(
userInfo
,
departId
,
postId
,
leaveStatus
);
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
=
departId
,
Post_Id
=
postId
,
LeaveStatus
=
leaveStatus
,
IsSelectLevelNor
=
1
});
var
accountList
=
accountRepository
.
GetAccountListExtRepository
(
new
Model
.
ViewModel
.
User
.
RB_Account_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
Dept
Ids
=
departId
,
Post_Id
=
postId
,
LeaveStatus
=
leaveStatus
,
IsSelectLevelNor
=
1
});
userIdList
=
accountList
.
Select
(
x
=>
x
.
Id
).
ToList
();
}
userIdList
=
userIdList
.
Distinct
().
ToList
();
int
TotalNum
=
userIdList
.
Count
();
string
userIds
=
string
.
Join
(
","
,
userIdList
);
//填写率查询
//int WriteNum = oKR_ObjectiveRepository.GetOKRProbabilityForWrite(userInfo.Group_Id, periodId, userIds);
//对齐率查询
//打分率查询
...
...
Edu.Repository/User/RB_AccountRepository.cs
View file @
2ff0cd67
...
...
@@ -147,6 +147,10 @@ WHERE 1=1
{
where2
.
AppendFormat
(
" AND B.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
Dept_Id
),
query
.
Dept_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
DeptIds
))
{
where2
.
AppendFormat
(
" AND B.{0} in({1}) "
,
nameof
(
RB_Account_ViewModel
.
Dept_Id
),
query
.
DeptIds
);
}
if
(
query
.
LeaveStatus
>
0
)
{
where
.
AppendFormat
(
" AND B.{0}={1} "
,
nameof
(
Employee_ViewModel
.
LeaveStatus
),
query
.
LeaveStatus
);
...
...
Edu.WebApi/Controllers/OKR/OKRPeriodController.cs
View file @
2ff0cd67
...
...
@@ -1931,7 +1931,7 @@ namespace Edu.WebApi.Controllers.OKR
int
PeriodId
=
parms
.
GetInt
(
"PeriodId"
,
0
);
//周期id
int
IsAdmin
=
parms
.
GetInt
(
"IsAdmin"
,
2
);
//是否管理端查询 1是 2否
int
RangeType
=
parms
.
GetInt
(
"RangeType"
,
1
);
//范围类型 非管理端查询 1所有下级 2直属下级
int
DepartId
=
parms
.
GetInt
(
"DepartId"
,
0
);
//部门ID 管理端可用查询
string
DepartId
=
parms
.
GetStringValue
(
"DepartId"
);
//部门ID 管理端可用查询
int
PostId
=
parms
.
GetInt
(
"PostId"
,
0
);
//岗位ID
int
LeaveStatus
=
parms
.
GetInt
(
"LeaveStatus"
,
0
);
//在职状态
if
(
PeriodId
<=
0
)
...
...
@@ -2004,7 +2004,7 @@ namespace Edu.WebApi.Controllers.OKR
int
OrderBy
=
parms
.
GetInt
(
"OrderBy"
,
2
);
// 1升序 2降序
int
OrderByNum
=
parms
.
GetInt
(
"OrderByNum"
,
1
);
// 以第几个排序
int
RangeType
=
parms
.
GetInt
(
"RangeType"
,
1
);
//范围类型 非管理端查询 1所有下级 2直属下级
int
DepartId
=
parms
.
GetInt
(
"DepartId"
,
0
);
//部门ID 管理端可用查询
string
DepartId
=
parms
.
GetStringValue
(
"DepartId"
);
//部门ID 管理端可用查询
int
PostId
=
parms
.
GetInt
(
"PostId"
,
0
);
//岗位ID
int
LeaveStatus
=
parms
.
GetInt
(
"LeaveStatus"
,
0
);
//在职状态
if
(
PeriodId
<=
0
)
...
...
@@ -2036,7 +2036,7 @@ namespace Edu.WebApi.Controllers.OKR
int
Type
=
parms
.
GetInt
(
"Type"
,
1
);
//1234 对应4项统计
int
OrderBy
=
parms
.
GetInt
(
"OrderBy"
,
2
);
// 1升序 2降序
int
OrderByNum
=
parms
.
GetInt
(
"OrderByNum"
,
1
);
// 以第几个排序
int
DepartId
=
parms
.
GetInt
(
"DepartId"
,
0
);
//部门ID 管理端可用查询
string
DepartId
=
parms
.
GetStringValue
(
"DepartId"
);
//部门ID 管理端可用查询
int
PostId
=
parms
.
GetInt
(
"PostId"
,
0
);
//岗位ID
int
LeaveStatus
=
parms
.
GetInt
(
"LeaveStatus"
,
0
);
//在职状态
if
(
PeriodId
<=
0
)
...
...
@@ -2057,7 +2057,7 @@ namespace Edu.WebApi.Controllers.OKR
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
PeriodId
=
parms
.
GetInt
(
"PeriodId"
,
0
);
//周期id
int
IsAdmin
=
parms
.
GetInt
(
"IsAdmin"
,
2
);
//是否管理端查询 1是 2否
int
DepartId
=
parms
.
GetInt
(
"DepartId"
,
0
);
//部门ID 管理端可用查询
string
DepartId
=
parms
.
GetStringValue
(
"DepartId"
);
//部门ID 管理端可用查询
int
PostId
=
parms
.
GetInt
(
"PostId"
,
0
);
//岗位ID
int
LeaveStatus
=
parms
.
GetInt
(
"LeaveStatus"
,
0
);
//在职状态
if
(
PeriodId
<=
0
)
...
...
@@ -2136,7 +2136,7 @@ namespace Edu.WebApi.Controllers.OKR
int
PeriodId
=
parms
.
GetInt
(
"PeriodId"
,
0
);
//周期id
int
IsAdmin
=
parms
.
GetInt
(
"IsAdmin"
,
2
);
//是否管理端查询 1是 2否
int
RangeType
=
parms
.
GetInt
(
"RangeType"
,
1
);
//范围类型 非管理端查询 1所有下级 2直属下级
int
DepartId
=
parms
.
GetInt
(
"DepartId"
,
0
);
//部门ID 管理端可用查询
string
DepartId
=
parms
.
GetStringValue
(
"DepartId"
);
//部门ID 管理端可用查询
int
PostId
=
parms
.
GetInt
(
"PostId"
,
0
);
//岗位ID
int
LeaveStatus
=
parms
.
GetInt
(
"LeaveStatus"
,
0
);
//在职状态
if
(
PeriodId
<=
0
)
...
...
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