|
@@ -2157,6 +2157,11 @@ OPTION (MAXRECURSION 0); -- 允许无限递归 ";
|
|
|
return parent;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 绩效项增改
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
[HttpPost]
|
|
|
public async Task<IActionResult> AssessmentSettingOperationAsync(PerAssessmentSettingOperationDto dto)
|
|
|
{
|
|
@@ -2214,6 +2219,11 @@ OPTION (MAXRECURSION 0); -- 允许无限递归 ";
|
|
|
return Ok(jw);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 绩效内容增改
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
[HttpPost]
|
|
|
public IActionResult AssessmentSettingOperationContentAsync(AssessmentSettingOperationContenDto dto)
|
|
|
{
|
|
@@ -2264,6 +2274,11 @@ OPTION (MAXRECURSION 0); -- 允许无限递归 ";
|
|
|
return Ok(jw);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 绩效项查询
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
[HttpPost]
|
|
|
public async Task<IActionResult> QueryAssessmentSettingListOffsetAsync(QueryAssessmentSettingListOffsetAsyncDto dto)
|
|
|
{
|
|
@@ -2299,6 +2314,53 @@ OPTION (MAXRECURSION 0); -- 允许无限递归 ";
|
|
|
return Ok(jw);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 绩效分数保存
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ public IActionResult SaveUserAssessmen(SaveUserAssessmenDto dto)
|
|
|
+ {
|
|
|
+ var jw = JsonView(false,"请传入正确的数据!");
|
|
|
+ if (dto.Data.Any()) {
|
|
|
+
|
|
|
+ var ids = dto.Data.Select(x => x.AssessmentContentSettingId).ToList();
|
|
|
+ var QueryContent_DB = _sqlSugar.Queryable<Per_AssessmentContentSetting>()
|
|
|
+ .InnerJoin<Per_AssessmentSetting>((a, b) => b.IsDel == 0 && a.AssessmentSettingId == b.Id)
|
|
|
+ .Where((a, b) => a.IsDel == 0 && ids.Contains(a.Id))
|
|
|
+ .Select((a, b) => new
|
|
|
+ {
|
|
|
+ ContentSettingId = a.Id,
|
|
|
+ SettingId = b.Id,
|
|
|
+ a.TargetValue,
|
|
|
+ b.AssessmentStandard,
|
|
|
+ MergeStr = $"【项名称:{b.Name}/目标值:{a.TargetValue}/评估标准:{b.AssessmentStandard}】"
|
|
|
+ })
|
|
|
+ .ToList()
|
|
|
+ .ToDictionary(x=> x.ContentSettingId);
|
|
|
+
|
|
|
+ //删除上级未确认数据
|
|
|
+ //添加新数据
|
|
|
+
|
|
|
+ var entityList = dto.Data.Select(x => new Per_AssessmentScore
|
|
|
+ {
|
|
|
+ Id = x.ScoreId,
|
|
|
+ AssessmentContentSettingId = x.AssessmentContentSettingId,
|
|
|
+ CreateTime = DateTime.Now,
|
|
|
+ CreateUserId = dto.CreateUserId,
|
|
|
+ Details = QueryContent_DB[x.AssessmentContentSettingId].MergeStr,
|
|
|
+ HigherUpAssessment = x.HigherUpAssessment,
|
|
|
+ HigherUpUserId = x.LeadersId,
|
|
|
+ HigherUpConfig = 0,
|
|
|
+ SelfAssessment = x.SelfAssessment,
|
|
|
+ IsDel = 0,
|
|
|
+ })
|
|
|
+ .ToList();
|
|
|
+ }
|
|
|
+ return Ok(jw);
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
#region 企微Api测试
|