Commit f2ed9143 by ruyun.zhang@suvalue.com

Merge remote-tracking branch 'origin/v20201230yubei' into v20201230yubei

parents bbfbd568 34eb0f7e
...@@ -257,7 +257,7 @@ public ApiResponse AllComputeAvg([FromBody] ComputerRequest request) ...@@ -257,7 +257,7 @@ public ApiResponse AllComputeAvg([FromBody] ComputerRequest request)
// ? 0 : Math.Round(gc.Sum(s => s.RealGiveFee) / gc.Select(p => new { p.JobNumber, p.EmployeeName }).Distinct().Count() ?? 0) // ? 0 : Math.Round(gc.Sum(s => s.RealGiveFee) / gc.Select(p => new { p.JobNumber, p.EmployeeName }).Distinct().Count() ?? 0)
// })); // }));
return new ApiResponse(ResponseType.OK, "ok", avgs.Select(w => new {w.ID, w.PositionName, w.TotelNumber, w.TotelValue, w.AvgValue })); return new ApiResponse(ResponseType.OK, "ok", avgs.Select(w => new { w.ID, w.PositionName, w.TotelNumber, w.TotelValue, w.AvgValue }));
} }
/// <summary> /// <summary>
...@@ -397,7 +397,7 @@ public ApiResponse<res_baiscnorm> EditHospitalAvg([FromBody] ComputerAvgRequest ...@@ -397,7 +397,7 @@ public ApiResponse<res_baiscnorm> EditHospitalAvg([FromBody] ComputerAvgRequest
/// <summary> /// <summary>
/// 其他医院绩效统计 /// 其他医院绩效统计
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="allotId"></param>
/// <returns></returns> /// <returns></returns>
[Route("OtherPerStats/{allotId}")] [Route("OtherPerStats/{allotId}")]
[HttpPost] [HttpPost]
...@@ -405,8 +405,8 @@ public ApiResponse OtherPerStats(int allotId) ...@@ -405,8 +405,8 @@ public ApiResponse OtherPerStats(int allotId)
{ {
var employee = _employeeService.GetAprList(allotId, _claim.GetUserId()); var employee = _employeeService.GetAprList(allotId, _claim.GetUserId());
var relust= _computeService.GetOtherPerStats(employee); var relust = _computeService.GetOtherPerStats(employee);
return new ApiResponse(ResponseType.OK,relust); return new ApiResponse(ResponseType.OK, relust);
} }
#endregion #endregion
......
...@@ -392,7 +392,7 @@ public List<per_apr_amount> GetAprList(int allotId, int userId) ...@@ -392,7 +392,7 @@ public List<per_apr_amount> GetAprList(int allotId, int userId)
if (userrole == null) throw new PerformanceException("用户未绑定角色"); if (userrole == null) throw new PerformanceException("用户未绑定角色");
var list = new List<per_apr_amount>(); var list = new List<per_apr_amount>();
if (new int[] { 1, 2, 5 }.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办查看所有科室的数据 if (new int[] { 1, 2, 5, 6 }.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办、院领导查看所有科室的数据
list = perapramountRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0); list = perapramountRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0);
else else
list = perapramountRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0 && t.CreateUser == userId); list = perapramountRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0 && t.CreateUser == userId);
...@@ -650,7 +650,7 @@ public List<TitleValue> GetPerforTypeDict(int allotId) ...@@ -650,7 +650,7 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
return new List<Dictionary<string, string>>(); return new List<Dictionary<string, string>>();
var imData = perforImdataRepository.GetEntities(t => t.AllotID == allotId && t.SheetID == sheet.ID); var imData = perforImdataRepository.GetEntities(t => t.AllotID == allotId && t.SheetID == sheet.ID);
var headers = imData.OrderByDescending(c=>c.IsTotal).Select(t => t.TypeName).Distinct(); var headers = imData.OrderByDescending(c => c.IsTotal).Select(t => t.TypeName).Distinct();
var dataNum = imData.Select(t => t.RowNumber)?.OrderBy(c => c.Value).Distinct().ToList(); var dataNum = imData.Select(t => t.RowNumber)?.OrderBy(c => c.Value).Distinct().ToList();
if (!dataNum.Any()) if (!dataNum.Any())
return new List<Dictionary<string, string>>(); return new List<Dictionary<string, string>>();
......
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