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
c319529e
Commit
c319529e
authored
Jan 04, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OKR
parent
c6b4c45a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
461 additions
and
8 deletions
+461
-8
OKRPeriodModule.cs
Edu.Module.OKR/OKRPeriodModule.cs
+385
-7
OKRPeriodController.cs
Edu.WebApi/Controllers/OKR/OKRPeriodController.cs
+76
-1
No files found.
Edu.Module.OKR/OKRPeriodModule.cs
View file @
c319529e
This diff is collapsed.
Click to expand it.
Edu.WebApi/Controllers/OKR/OKRPeriodController.cs
View file @
c319529e
...
...
@@ -372,6 +372,15 @@ namespace Edu.WebApi.Controllers.OKR
return
ApiResult
.
Success
(
""
,
list
);
}
/// <summary>
/// 获取单个我的目标
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOKRMyObjectiveInfo
()
{
}
/// <summary>
/// 新增修改目标
/// </summary>
...
...
@@ -530,7 +539,7 @@ namespace Edu.WebApi.Controllers.OKR
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
KeyResultId
=
parms
.
GetInt
(
"KeyResultId"
,
0
);
int
Type
=
parms
.
GetInt
(
"Type"
,
0
);
// 类型 1自定义状态 2删除 3切换为简单模式 4切换为高级模式
int
Type
=
parms
.
GetInt
(
"Type"
,
0
);
// 类型 1自定义状态 2删除
(作废)
3切换为简单模式 4切换为高级模式
string
ProgressState
=
parms
.
GetStringValue
(
"ProgressState"
);
if
(
KeyResultId
<=
0
)
{
...
...
@@ -567,9 +576,75 @@ namespace Edu.WebApi.Controllers.OKR
{
return
ApiResult
.
ParamIsNull
();
}
if
(
Progress
<
0
||
StartValue
<
0
||
EndValue
<
0
||
CurrentValue
<
0
)
{
return
ApiResult
.
ParamIsNull
(
"不能小于0"
);
}
return
okrPeriodModule
.
SgetOKRMyKeyResultProgress
(
KeyResultId
,
Type
,
Progress
,
StartValue
,
EndValue
,
CurrentValue
,
userInfo
);
}
/// <summary>
/// 修改目标关键结果权重
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SgetOKRMyKeyResultWeight
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
KeyResultId
=
parms
.
GetInt
(
"KeyResultId"
,
0
);
decimal
Weight
=
parms
.
GetDecimal
(
"Weight"
);
if
(
KeyResultId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递结果Id"
);
}
if
(
Weight
<
0
||
Weight
>
100
)
{
return
ApiResult
.
ParamIsNull
(
"权重值有误"
);
}
return
okrPeriodModule
.
SgetOKRMyKeyResultWeight
(
KeyResultId
,
Weight
,
userInfo
);
}
/// <summary>
/// 修改目标关键结果分数
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SgetOKRMyKeyResultScore
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
KeyResultId
=
parms
.
GetInt
(
"KeyResultId"
,
0
);
decimal
Score
=
parms
.
GetDecimal
(
"Score"
);
if
(
KeyResultId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递结果Id"
);
}
if
(
Score
<
0
||
Score
>
1
)
{
return
ApiResult
.
ParamIsNull
(
"分值有误"
);
}
return
okrPeriodModule
.
SgetOKRMyKeyResultScore
(
KeyResultId
,
Score
,
userInfo
);
}
/// <summary>
/// 删除关键结果状态
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SgetOKRMyKeyResultDel
()
{
var
userInfo
=
base
.
UserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
KeyResultId
=
parms
.
GetInt
(
"KeyResultId"
,
0
);
if
(
KeyResultId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
return
okrPeriodModule
.
SgetOKRMyKeyResultDel
(
KeyResultId
,
userInfo
);
}
//权限 添加对齐 审核 评论 左边人员列表 对齐视图 数据看板 (管理员版 对齐视图 数据看板)
#
endregion
}
}
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