Commit c319529e authored by liudong1993's avatar liudong1993

OKR

parent c6b4c45a
This diff is collapsed.
...@@ -372,6 +372,15 @@ namespace Edu.WebApi.Controllers.OKR ...@@ -372,6 +372,15 @@ namespace Edu.WebApi.Controllers.OKR
return ApiResult.Success("", list); return ApiResult.Success("", list);
} }
/// <summary>
/// 获取单个我的目标
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetOKRMyObjectiveInfo() {
}
/// <summary> /// <summary>
/// 新增修改目标 /// 新增修改目标
/// </summary> /// </summary>
...@@ -530,7 +539,7 @@ namespace Edu.WebApi.Controllers.OKR ...@@ -530,7 +539,7 @@ namespace Edu.WebApi.Controllers.OKR
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
JObject parms = JObject.Parse(RequestParm.Msg.ToString()); JObject parms = JObject.Parse(RequestParm.Msg.ToString());
int KeyResultId = parms.GetInt("KeyResultId", 0); 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"); string ProgressState = parms.GetStringValue("ProgressState");
if (KeyResultId <= 0) if (KeyResultId <= 0)
{ {
...@@ -567,9 +576,75 @@ namespace Edu.WebApi.Controllers.OKR ...@@ -567,9 +576,75 @@ namespace Edu.WebApi.Controllers.OKR
{ {
return ApiResult.ParamIsNull(); 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); 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 #endregion
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment