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
c4d58b1e
Commit
c4d58b1e
authored
4 years ago
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的对齐视图
parent
5e75b49c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
600 additions
and
149 deletions
+600
-149
RB_OKR_Permission_ViewModel.cs
Edu.Model/ViewModel/OKR/RB_OKR_Permission_ViewModel.cs
+5
-0
OKRPeriodModule.cs
Edu.Module.OKR/OKRPeriodModule.cs
+504
-146
RB_OKR_ObjectiveRelationRepository.cs
Edu.Repository/OKR/RB_OKR_ObjectiveRelationRepository.cs
+11
-0
RB_OKR_ObjectiveRepository.cs
Edu.Repository/OKR/RB_OKR_ObjectiveRepository.cs
+53
-3
RB_OKR_PermissionRepository.cs
Edu.Repository/OKR/RB_OKR_PermissionRepository.cs
+4
-0
OKRPeriodController.cs
Edu.WebApi/Controllers/OKR/OKRPeriodController.cs
+23
-0
No files found.
Edu.Model/ViewModel/OKR/RB_OKR_Permission_ViewModel.cs
View file @
c4d58b1e
...
...
@@ -18,5 +18,10 @@ namespace Edu.Model.ViewModel.OKR
/// 来源名称
/// </summary>
public
string
SourceName
{
get
;
set
;
}
/// <summary>
/// 创建人ids
/// </summary>
public
string
CreateByIds
{
get
;
set
;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Edu.Module.OKR/OKRPeriodModule.cs
View file @
c4d58b1e
This diff is collapsed.
Click to expand it.
Edu.Repository/OKR/RB_OKR_ObjectiveRelationRepository.cs
View file @
c4d58b1e
...
...
@@ -45,5 +45,16 @@ namespace Edu.Repository.OKR
string
sql
=
$@" select ObjectiveId,COUNT(0) AS ParentId from RB_OKR_ObjectiveRelation WHERE ObjectiveId in(
{
ObjectiveIds
}
) GROUP BY ObjectiveId"
;
return
Get
<
RB_OKR_ObjectiveRelation
>(
sql
).
ToList
();
}
/// <summary>
/// 获取下对齐数量
/// </summary>
/// <param name="ObjectiveIds"></param>
/// <returns></returns>
public
List
<
RB_OKR_ObjectiveRelation
>
GetChildAlignNum
(
string
ObjectiveIds
)
{
string
sql
=
$@" select ParentId,COUNT(0) AS ObjectiveId from RB_OKR_ObjectiveRelation WHERE ParentId in(
{
ObjectiveIds
}
) GROUP BY ParentId"
;
return
Get
<
RB_OKR_ObjectiveRelation
>(
sql
).
ToList
();
}
}
}
This diff is collapsed.
Click to expand it.
Edu.Repository/OKR/RB_OKR_ObjectiveRepository.cs
View file @
c4d58b1e
...
...
@@ -127,18 +127,68 @@ namespace Edu.Repository.OKR
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ObjectiveIds
))
{
where
+=
$@" and r.
{
nameof
(
RB_OKR_ObjectiveRelation
.
ObjectiveId
)}
in(
{
demodel
.
ObjectiveIds
}
)"
;
string
sql
=
$@" select o.*,r.ObjectiveId,r.ParentId,e.EmName,e.EmPhoto from RB_OKR_Objective o
inner join rb_okr_objectiverelation r on o.Id = r.ParentId
left join rb_employee e on o.CreateBy = e.EmployeeId
where
{
where
}
order by o.Id desc"
;
return
Get
<
RB_OKR_Objective_ViewModel
>(
sql
).
ToList
();
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ParentIds
))
{
where
+=
$@" and r.
{
nameof
(
RB_OKR_ObjectiveRelation
.
ParentId
)}
in(
{
demodel
.
ParentIds
}
)"
;
}
string
sql
=
$@" select o.*,r.ObjectiveId,r.ParentId,e.EmName,e.EmPhoto from RB_OKR_Objective o
inner join rb_okr_objectiverelation r on o.Id = r.
Parent
Id
inner join rb_okr_objectiverelation r on o.Id = r.
Objective
Id
left join rb_employee e on o.CreateBy = e.EmployeeId
where
{
where
}
order by o.Id desc"
;
return
Get
<
RB_OKR_Objective_ViewModel
>(
sql
).
ToList
();
}
return
new
List
<
RB_OKR_Objective_ViewModel
>();
}
public
List
<
RB_OKR_Objective_ViewModel
>
GetListForEmName
(
RB_OKR_Objective_ViewModel
demodel
)
{
string
where
=
$@" 1=1 and o.Status <>5"
;
if
(
demodel
.
Group_Id
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_OKR_Objective_ViewModel
.
Group_Id
)}
=
{
demodel
.
Group_Id
}
"
;
}
if
(
demodel
.
Id
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_OKR_Objective_ViewModel
.
Id
)}
=
{
demodel
.
Id
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
ObjectiveIds
))
{
where
+=
$@" and o.
{
nameof
(
RB_OKR_Objective_ViewModel
.
Id
)}
in(
{
demodel
.
ObjectiveIds
}
)"
;
}
if
(
demodel
.
PeriodId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_OKR_Objective_ViewModel
.
PeriodId
)}
=
{
demodel
.
PeriodId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
Title
))
{
where
+=
$@" and o.
{
nameof
(
RB_OKR_Objective_ViewModel
.
Title
)}
like '%
{
demodel
.
Title
}
%'"
;
}
if
(
demodel
.
ProgressState
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_OKR_Objective_ViewModel
.
ProgressState
)}
=
{(
int
)
demodel
.
ProgressState
}
"
;
}
if
(
demodel
.
CreateBy
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_OKR_Objective_ViewModel
.
CreateBy
)}
=
{
demodel
.
CreateBy
}
"
;
}
if
(
demodel
.
Status
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_OKR_Objective_ViewModel
.
Status
)}
=
{
demodel
.
Status
}
"
;
}
string
sql
=
$@" select o.*,e.EmName,e.EmPhoto from RB_OKR_Objective o
left join rb_employee e on o.CreateBy = e.EmployeeId
where
{
where
}
order by o.Sort asc"
;
return
Get
<
RB_OKR_Objective_ViewModel
>(
sql
).
ToList
();
}
/// <summary>
/// 获取最大的Sort
...
...
This diff is collapsed.
Click to expand it.
Edu.Repository/OKR/RB_OKR_PermissionRepository.cs
View file @
c4d58b1e
...
...
@@ -94,6 +94,10 @@ namespace Edu.Repository.OKR
{
where
+=
$@" and
{
nameof
(
RB_OKR_Permission_ViewModel
.
CreateBy
)}
=
{
demodel
.
CreateBy
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
CreateByIds
))
{
where
+=
$@" and
{
nameof
(
RB_OKR_Permission_ViewModel
.
CreateBy
)}
in(
{
demodel
.
CreateByIds
}
)"
;
}
string
sql
=
$@" select * from RB_OKR_Permission where
{
where
}
order by Id desc"
;
return
Get
<
RB_OKR_Permission_ViewModel
>(
sql
).
ToList
();
...
...
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/OKR/OKRPeriodController.cs
View file @
c4d58b1e
...
...
@@ -1186,6 +1186,29 @@ namespace Edu.WebApi.Controllers.OKR
return
ApiResult
.
Success
(
""
,
obj
);
}
/// <summary>
/// 获取我的对齐视图 再下一级
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOKRMyAlignViewNext
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
PeriodId
=
parms
.
GetInt
(
"PeriodId"
,
0
);
int
ObjectiveId
=
parms
.
GetInt
(
"ObjectiveId"
,
0
);
//目标id
int
Type
=
parms
.
GetInt
(
"Type"
,
1
);
//类型 1向上 2向下
if
(
PeriodId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递周期id"
);
}
if
(
ObjectiveId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递关联目标id"
);
}
var
obj
=
okrPeriodModule
.
GetOKRMyAlignViewNext
(
PeriodId
,
ObjectiveId
,
Type
,
userInfo
);
return
ApiResult
.
Success
(
""
,
obj
);
}
#
endregion
#
region
后台管理
...
...
This diff is collapsed.
Click to expand it.
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