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
982ccbfa
Commit
982ccbfa
authored
Jan 06, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
9fee22c0
5e75b49c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
146 additions
and
20 deletions
+146
-20
RB_Department_ViewModel.cs
Edu.Model/ViewModel/User/RB_Department_ViewModel.cs
+5
-0
OKRPeriodModule.cs
Edu.Module.OKR/OKRPeriodModule.cs
+114
-20
RB_DepartmentRepository.cs
Edu.Repository/User/RB_DepartmentRepository.cs
+27
-0
No files found.
Edu.Model/ViewModel/User/RB_Department_ViewModel.cs
View file @
982ccbfa
...
@@ -45,6 +45,11 @@ namespace Edu.Model.ViewModel.User
...
@@ -45,6 +45,11 @@ namespace Edu.Model.ViewModel.User
/// </summary>
/// </summary>
public
string
QDeptIds
{
get
;
set
;
}
public
string
QDeptIds
{
get
;
set
;
}
/// <summary>
/// 上级ids
/// </summary>
public
string
QParentIds
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 上级部门名称
/// 上级部门名称
/// </summary>
/// </summary>
...
...
Edu.Module.OKR/OKRPeriodModule.cs
View file @
982ccbfa
This diff is collapsed.
Click to expand it.
Edu.Repository/User/RB_DepartmentRepository.cs
View file @
982ccbfa
...
@@ -110,6 +110,10 @@ WHERE 1=1
...
@@ -110,6 +110,10 @@ WHERE 1=1
{
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
ParentId
)}
=
{
query
.
ParentId
}
"
);
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
ParentId
)}
=
{
query
.
ParentId
}
"
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QParentIds
))
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
ParentId
)}
in(
{
query
.
QParentIds
}
) "
);
}
if
(
query
.
DeptId
>
0
)
if
(
query
.
DeptId
>
0
)
{
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
DeptId
)}
=
{
query
.
DeptId
}
"
);
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
DeptId
)}
=
{
query
.
DeptId
}
"
);
...
@@ -127,6 +131,29 @@ WHERE 1=1
...
@@ -127,6 +131,29 @@ WHERE 1=1
{
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
DeptId
)}
IN(
{
query
.
QDeptIds
}
) "
);
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Department_ViewModel
.
DeptId
)}
IN(
{
query
.
QDeptIds
}
) "
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
ManagerIds
))
{
var
ManagerList
=
query
.
ManagerIds
.
Split
(
','
);
builder
.
Append
(
$" AND "
);
for
(
var
i
=
1
;
i
<=
ManagerList
.
Count
();
i
++)
{
if
(
i
==
ManagerList
.
Count
()
&&
i
==
1
)
{
builder
.
Append
(
$" FIND_IN_SET('
{
ManagerList
[
i
-
1
]}
', A.
{
nameof
(
RB_Department_ViewModel
.
ManagerIds
)}
)"
);
}
else
if
(
i
==
1
)
{
builder
.
Append
(
$" (FIND_IN_SET('
{
ManagerList
[
i
-
1
]}
', A.
{
nameof
(
RB_Department_ViewModel
.
ManagerIds
)}
) OR "
);
}
else
if
(
i
==
ManagerList
.
Count
())
{
builder
.
Append
(
$" FIND_IN_SET('
{
ManagerList
[
i
-
1
]}
', A.
{
nameof
(
RB_Department_ViewModel
.
ManagerIds
)}
))"
);
}
else
{
builder
.
Append
(
$" FIND_IN_SET('
{
ManagerList
[
i
-
1
]}
', A.
{
nameof
(
RB_Department_ViewModel
.
ManagerIds
)}
) OR "
);
}
}
}
return
Get
<
RB_Department_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
return
Get
<
RB_Department_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
else
else
...
...
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