Commit 8dd3403e by lcx

二次绩效管理绩效内容调整

parent 4c41cfe9
...@@ -33,6 +33,7 @@ public class SecondAllotController : ControllerBase ...@@ -33,6 +33,7 @@ public class SecondAllotController : ControllerBase
} }
#region 二次绩效列表、录入数据展示,保存数据 #region 二次绩效列表、录入数据展示,保存数据
/// <summary> /// <summary>
/// 二次绩效列表(没有需要初始化) /// 二次绩效列表(没有需要初始化)
/// </summary> /// </summary>
...@@ -134,7 +135,8 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo ...@@ -134,7 +135,8 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
// var result = secondAllotService.GetSecondDetail(secondid); // var result = secondAllotService.GetSecondDetail(secondid);
// return new ApiResponse(ResponseType.OK, result); // return new ApiResponse(ResponseType.OK, result);
//} //}
#endregion
#endregion 二次绩效列表、录入数据展示,保存数据
/// <summary> /// <summary>
/// 二次绩效录入页面自动补全 /// 二次绩效录入页面自动补全
...@@ -161,10 +163,11 @@ public ApiResponse OtherAutoComplete([FromBody] SecondEmpRequest request) ...@@ -161,10 +163,11 @@ public ApiResponse OtherAutoComplete([FromBody] SecondEmpRequest request)
} }
#region 模板使用 #region 模板使用
/// <summary> /// <summary>
/// 选择二次绩效模板 /// 选择二次绩效模板
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("api/temp/list")] [Route("api/temp/list")]
public ApiResponse<List<SecondTempResponse>> Temp([FromBody] AllotDeptRequest request) public ApiResponse<List<SecondTempResponse>> Temp([FromBody] AllotDeptRequest request)
...@@ -197,9 +200,11 @@ public ApiResponse RefreshTemp([CustomizeValidator(RuleSet = "Refresh"), FromBod ...@@ -197,9 +200,11 @@ public ApiResponse RefreshTemp([CustomizeValidator(RuleSet = "Refresh"), FromBod
secondAllotService.RefreshTemp(request); secondAllotService.RefreshTemp(request);
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
} }
#endregion
#endregion 模板使用
#region 二次绩效工作量配置 #region 二次绩效工作量配置
/// <summary> /// <summary>
/// 二次绩效工作量列表 /// 二次绩效工作量列表
/// </summary> /// </summary>
...@@ -300,9 +305,11 @@ public ApiResponse SingleDelete([CustomizeValidator(RuleSet = "Delete"), FromBod ...@@ -300,9 +305,11 @@ public ApiResponse SingleDelete([CustomizeValidator(RuleSet = "Delete"), FromBod
var result = secondAllotService.DeleteWorkType(request); var result = secondAllotService.DeleteWorkType(request);
return result ? new ApiResponse(ResponseType.OK, "删除成功") : new ApiResponse(ResponseType.Fail, "删除失败"); return result ? new ApiResponse(ResponseType.OK, "删除成功") : new ApiResponse(ResponseType.Fail, "删除失败");
} }
#endregion
#endregion 二次绩效工作量配置
#region 二次绩效审核 #region 二次绩效审核
/// <summary> /// <summary>
/// 提交审核 /// 提交审核
/// </summary> /// </summary>
...@@ -352,7 +359,6 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request) ...@@ -352,7 +359,6 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败"); return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败");
} }
/// <summary> /// <summary>
/// 护理部二次绩效审核列表 /// 护理部二次绩效审核列表
/// </summary> /// </summary>
...@@ -377,9 +383,11 @@ public ApiResponse NursingDeptAuditResult([FromBody] SecondAuditRequest request) ...@@ -377,9 +383,11 @@ public ApiResponse NursingDeptAuditResult([FromBody] SecondAuditRequest request)
var result = secondAllotService.NursingDeptAudit(userid, request); var result = secondAllotService.NursingDeptAudit(userid, request);
return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败"); return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败");
} }
#endregion
#endregion 二次绩效审核
#region 二次绩效其他绩效 #region 二次绩效其他绩效
/// <summary> /// <summary>
/// 二次绩效其他绩效详情 /// 二次绩效其他绩效详情
/// </summary> /// </summary>
...@@ -408,7 +416,8 @@ public ApiResponse OtherSave([FromBody] AgOtherRequest request) ...@@ -408,7 +416,8 @@ public ApiResponse OtherSave([FromBody] AgOtherRequest request)
var result = secondAllotService.OtherSave(request.SecondId, request.Othersources); var result = secondAllotService.OtherSave(request.SecondId, request.Othersources);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
} }
#endregion
#endregion 二次绩效其他绩效
/// <summary> /// <summary>
/// 二次绩效结果打印 /// 二次绩效结果打印
...@@ -428,11 +437,11 @@ public ApiResponse SecondPrint(int secondid) ...@@ -428,11 +437,11 @@ public ApiResponse SecondPrint(int secondid)
/// <returns></returns> /// <returns></returns>
[Route("api/second/deptcompute/{allotId}")] [Route("api/second/deptcompute/{allotId}")]
[HttpPost] [HttpPost]
public ApiResponse<List<SecondPerforResponse>> DeptComputeDetail(int allotId) public ApiResponse DeptComputeDetail(int allotId)
{ {
var userId = claimService.GetUserId(); var userId = claimService.GetUserId();
var data = secondAllotService.DeptComputeDetail(userId, allotId); var data = secondAllotService.DeptComputeDetail(userId, allotId, out int isShowManage);
return new ApiResponse<List<SecondPerforResponse>>(ResponseType.OK, data); return new ApiResponse(ResponseType.OK, new { isShowManage, data });
} }
} }
} }
\ No newline at end of file
...@@ -4,22 +4,22 @@ ...@@ -4,22 +4,22 @@
namespace Performance.DtoModels namespace Performance.DtoModels
{ {
public class SecondPerforResponse public class SecondPerforResponse : ComputeResponse
{ {
/// <summary> ///// <summary>
/// 人员姓名 ///// 人员姓名
/// </summary> ///// </summary>
public string EmployeeName { get; set; } //public string EmployeeName { get; set; }
/// <summary> ///// <summary>
/// 职务 ///// 职务
/// </summary> ///// </summary>
public string JobTitle { get; set; } //public string JobTitle { get; set; }
/// <summary> ///// <summary>
/// 人员工号 ///// 人员工号
/// </summary> ///// </summary>
public string JobNumber { get; set; } //public string JobNumber { get; set; }
/// <summary> /// <summary>
/// 效率绩效 /// 效率绩效
...@@ -41,19 +41,19 @@ public class SecondPerforResponse ...@@ -41,19 +41,19 @@ public class SecondPerforResponse
/// </summary> /// </summary>
public Nullable<decimal> Grant { get; set; } public Nullable<decimal> Grant { get; set; }
/// <summary> ///// <summary>
/// 应发管理绩效 ///// 应发管理绩效
/// </summary> ///// </summary>
public Nullable<decimal> ShouldGiveFee { get; set; } //public Nullable<decimal> ShouldGiveFee { get; set; }
/// <summary> ///// <summary>
/// 绩效合计 ///// 绩效合计
/// </summary> ///// </summary>
public Nullable<decimal> PerforSumFee { get; set; } //public Nullable<decimal> PerforSumFee { get; set; }
/// <summary> ///// <summary>
/// 考核对分率 ///// 考核对分率
/// </summary> ///// </summary>
public Nullable<decimal> ScoreAverageRate { get; set; } //public Nullable<decimal> ScoreAverageRate { get; set; }
} }
} }
\ No newline at end of file
...@@ -1724,14 +1724,14 @@ public List<SecPrintResponse> Print(int secondId) ...@@ -1724,14 +1724,14 @@ public List<SecPrintResponse> Print(int secondId)
#endregion 打印 #endregion 打印
public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId) public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId, out int isShowManage)
{ {
var user = perforUserRepository.GetEntity(t => t.ID == userId); var user = perforUserRepository.GetEntity(t => t.ID == userId);
if (user == null) if (user == null)
throw new NotImplementedException("人员ID无效"); throw new NotImplementedException("人员ID无效");
var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId); var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId);
var isShowManage = computeService.IsShowManage(allotId); isShowManage = computeService.IsShowManage(allotId);
var userrole = userroleRepository.GetEntity(t => t.UserID == userId); var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID); var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID);
...@@ -1749,7 +1749,7 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId) ...@@ -1749,7 +1749,7 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId)
var data = GetAllotPerformance(allotId, computes, isShowManage); var data = GetAllotPerformance(allotId, computes, isShowManage);
// 补充医院其他绩效 // 补充医院其他绩效
var result = computeService.AddAprAmount(allotId, data); var result = AddAprAmount(allotId, data);
// 预留比例 // 预留比例
if (result != null) if (result != null)
...@@ -1770,7 +1770,7 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId) ...@@ -1770,7 +1770,7 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId)
} }
} }
return Mapper.Map<List<SecondPerforResponse>>(computes); return result;
} }
/// <summary> /// <summary>
...@@ -1778,9 +1778,9 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId) ...@@ -1778,9 +1778,9 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId)
/// </summary> /// </summary>
/// <param name="allotId"></param> /// <param name="allotId"></param>
/// <returns></returns> /// <returns></returns>
private List<ComputeResponse> GetAllotPerformance(int allotId, List<res_compute> computes, int isShowManage) private List<SecondPerforResponse> GetAllotPerformance(int allotId, List<res_compute> computes, int isShowManage)
{ {
if (computes == null || !computes.Any()) return new List<ComputeResponse>(); if (computes == null || !computes.Any()) return new List<SecondPerforResponse>();
var types1 = new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() }; var types1 = new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() };
var types2 = new List<string> { AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() }; var types2 = new List<string> { AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() };
...@@ -1789,8 +1789,24 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, List<res_compute> ...@@ -1789,8 +1789,24 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, List<res_compute>
return computes.Select(t => return computes.Select(t =>
{ {
var comp = new ComputeResponse("一次绩效", t.AccountingUnit, t.EmployeeName, t.JobNumber, t.JobTitle); var comp = new SecondPerforResponse()
comp.UnitType = t.AccountType; {
AccountingUnit = t.AccountingUnit,
EmployeeName = t.EmployeeName,
JobNumber = t.JobNumber,
JobTitle = t.JobTitle,
UnitType = t.AccountType,
Scale = t.Scale,
Efficiency = t.Efficiency,
Grant = t.Grant,
Punishment = t.Punishment,
ShouldGiveFee = t.ShouldGiveFee,
PerforSumFee = t.PerforSumFee,
GiveFee = t.GiveFee * t.Adjust,
AdjustLaterOtherFee = t.AdjustLaterOtherFee ?? 0,
OthePerfor = t.OtherPerfor,
RealGiveFee = t.RealGiveFee
};
if (types1.Contains(t.AccountType)) if (types1.Contains(t.AccountType))
comp.PerforManagementFee = ((t.Efficiency + t.Scale) * t.Grant + t.OtherManagePerfor) * t.Attendance * t.ScoreAverageRate; comp.PerforManagementFee = ((t.Efficiency + t.Scale) * t.Grant + t.OtherManagePerfor) * t.Attendance * t.ScoreAverageRate;
...@@ -1807,15 +1823,30 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, List<res_compute> ...@@ -1807,15 +1823,30 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, List<res_compute>
else else
comp.PerforSumFee = Math.Round((t.Avg * (basics ?? 1)) + t.ShouldGiveFee + t.AssessBeforeOtherFee ?? 0); comp.PerforSumFee = Math.Round((t.Avg * (basics ?? 1)) + t.ShouldGiveFee + t.AssessBeforeOtherFee ?? 0);
comp.Punishment = t.Punishment;
comp.ShouldGiveFee = t.ShouldGiveFee;
comp.PerforSumFee = t.PerforSumFee;
comp.GiveFee = t.GiveFee * t.Adjust;
comp.AdjustLaterOtherFee = t.AdjustLaterOtherFee ?? 0;
comp.OthePerfor = t.OtherPerfor;
comp.RealGiveFee = t.RealGiveFee;
return comp; return comp;
}).ToList(); }).ToList();
} }
public List<SecondPerforResponse> AddAprAmount(int allotId, List<SecondPerforResponse> computes)
{
if (computes == null || !computes.Any())
return computes;
var list = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == 3);
if (list == null || !list.Any())
return computes;
foreach (var item in computes.GroupBy(w => new { w.AccountingUnit, w.JobNumber }))
{
// 补充过一次就不在补充了
var emp = computes.Where(w => w.AccountingUnit == item.Key.AccountingUnit && w.JobNumber == item.Key.JobNumber)
.OrderByDescending(w => w.Source).FirstOrDefault();
var apramount = list.Where(t => t.AccountingUnit == emp.AccountingUnit
&& !string.IsNullOrEmpty(t.PersonnelNumber) && emp.JobNumber?.Trim() == t.PersonnelNumber?.Trim());
emp.OthePerfor = apramount?.Sum(w => w.Amount) ?? 0;
}
return computes;
}
} }
} }
\ No newline at end of file
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