Commit 98160dd5 by lcx

核算前奖励计算

parent 5ff7ab55
...@@ -965,6 +965,11 @@ ...@@ -965,6 +965,11 @@
科室单项奖励 科室单项奖励
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.ag_headsource.TotalPreAccountingReward">
<summary>
科室考核前奖励
</summary>
</member>
<member name="P:Performance.EntityModels.ag_headsource.SeniorityTitlesAccountedPerformance"> <member name="P:Performance.EntityModels.ag_headsource.SeniorityTitlesAccountedPerformance">
<summary> <summary>
年资职称绩效占比 年资职称绩效占比
......
...@@ -61,6 +61,11 @@ public class ag_headsource ...@@ -61,6 +61,11 @@ public class ag_headsource
/// </summary> /// </summary>
public Nullable<decimal> TotalDeptReward { get; set; } public Nullable<decimal> TotalDeptReward { get; set; }
/// <summary>
/// 科室考核前奖励
/// </summary>
public Nullable<decimal> TotalPreAccountingReward { get; set; }
///// <summary> ///// <summary>
///// 业绩分配绩效总额 ///// 业绩分配绩效总额
///// </summary> ///// </summary>
......
...@@ -183,9 +183,10 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute ...@@ -183,9 +183,10 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
new SecondColumnDictionary("工作量绩效合计",nameof(ag_bodysource.WorkPerformance),true,399 ), new SecondColumnDictionary("工作量绩效合计",nameof(ag_bodysource.WorkPerformance),true,399 ),
new SecondColumnDictionary("单项奖励合计",nameof(ag_bodysource.DeptReward),true,499 ), new SecondColumnDictionary("单项奖励合计",nameof(ag_bodysource.DeptReward),true,499 ),
new SecondColumnDictionary("考核前奖励合计",nameof(ag_bodysource.PreDeptReward),true,599 ),
new SecondColumnDictionary("可分配绩效",nameof(ag_bodysource.DistPerformance),true,500 ), new SecondColumnDictionary("可分配绩效",nameof(ag_bodysource.DistPerformance),true,600 ),
new SecondColumnDictionary("医院发放夜班绩效",nameof(ag_bodysource.NightWorkPerformance),true,502 ), new SecondColumnDictionary("医院发放夜班绩效",nameof(ag_bodysource.NightWorkPerformance),true,602 ),
//new SecondColumnDictionary("预留比例",nameof(ag_bodysource.ReservedRatio),false,601 ), //new SecondColumnDictionary("预留比例",nameof(ag_bodysource.ReservedRatio),false,601 ),
//new SecondColumnDictionary("预留金额",nameof(ag_bodysource.ReservedAmount),false,602 ), //new SecondColumnDictionary("预留金额",nameof(ag_bodysource.ReservedAmount),false,602 ),
...@@ -216,7 +217,7 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute ...@@ -216,7 +217,7 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
int workloadSort = 300; int workloadSort = 300;
var index = 0; var index = 0;
foreach (var item in loads.Where(w => !w.Title.StartsWithIgnoreCase("SingleAwards_"))) foreach (var item in loads.Where(w => !w.Title.StartsWithIgnoreCase("SingleAwards_") && !w.Title.StartsWithIgnoreCase("PreAccountingReward_")))
{ {
if (workloadGroups.Any(w => w.Items != null && w.Items.Any(im => im.EqualsIgnoreCase(item.Title)))) if (workloadGroups.Any(w => w.Items != null && w.Items.Any(im => im.EqualsIgnoreCase(item.Title))))
index = workloadGroups.FindIndex(w => w.Items != null && w.Items.Any(im => im.EqualsIgnoreCase(item.Title))); index = workloadGroups.FindIndex(w => w.Items != null && w.Items.Any(im => im.EqualsIgnoreCase(item.Title)));
...@@ -421,7 +422,8 @@ public void ClearInvalidValue(List<Dictionary<string, object>> datas) ...@@ -421,7 +422,8 @@ public void ClearInvalidValue(List<Dictionary<string, object>> datas)
foreach (var key in row.Keys.ToArray()) foreach (var key in row.Keys.ToArray())
{ {
if (key.StartsWithIgnoreCase("SingleAwards_") if (key.StartsWithIgnoreCase("SingleAwards_")
|| key.StartsWithIgnoreCase("Workload_")) || key.StartsWithIgnoreCase("Workload_")
|| key.StartsWithIgnoreCase("PreAccountingReward_"))
{ {
var value = row[key]?.ToString() ?? ""; var value = row[key]?.ToString() ?? "";
if (value == "0" || Regex.IsMatch(value, "^0.[0]+$")) if (value == "0" || Regex.IsMatch(value, "^0.[0]+$"))
...@@ -978,8 +980,11 @@ private void overviewCalculate(Dictionary<string, object> head, List<Dictionary< ...@@ -978,8 +980,11 @@ private void overviewCalculate(Dictionary<string, object> head, List<Dictionary<
//// 夜班工作量绩效总和 //// 夜班工作量绩效总和
//var nightShiftWorkPerforTotal = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.NightWorkPerformance))); //var nightShiftWorkPerforTotal = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.NightWorkPerformance)));
//head.AddOrUpdate(nameof(ag_headsource.NightShiftWorkPerforTotal), nightShiftWorkPerforTotal); //head.AddOrUpdate(nameof(ag_headsource.NightShiftWorkPerforTotal), nightShiftWorkPerforTotal);
// 可分配绩效(顶栏) = 科室总绩效 - 夜班绩效(顶栏) // 科室考核前奖励
var totalPerformance = GetDecimal2(head, nameof(ag_headsource.TotalDistPerformance)) - GetDecimal2(head, nameof(ag_headsource.NightShiftWorkPerforTotal)); var totalPreAccountingReward = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.PreDeptReward)));
head.AddOrUpdate(nameof(ag_headsource.TotalPreAccountingReward), totalPreAccountingReward);
// 可分配绩效(顶栏) = 科室总绩效 - 夜班绩效(顶栏) - 科室考核前奖励
var totalPerformance = GetDecimal2(head, nameof(ag_headsource.TotalDistPerformance)) - GetDecimal2(head, nameof(ag_headsource.NightShiftWorkPerforTotal)) - totalPreAccountingReward;
head.AddOrUpdate(nameof(ag_headsource.TotalPerformance), totalPerformance); head.AddOrUpdate(nameof(ag_headsource.TotalPerformance), totalPerformance);
//// 医院其他绩效总和 //// 医院其他绩效总和
//var otherPerformance = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.OtherPerformance))); //var otherPerformance = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.OtherPerformance)));
......
...@@ -584,7 +584,7 @@ public void SaveSecondAllotBodyData(int hospitalId, ag_secondallot second, dynam ...@@ -584,7 +584,7 @@ public void SaveSecondAllotBodyData(int hospitalId, ag_secondallot second, dynam
var workloads = agworkloadRepository.GetEntities(t => t.HospitalId == hospitalId && t.Department == second.Department && t.UnitType == second.UnitType)?.ToList(); var workloads = agworkloadRepository.GetEntities(t => t.HospitalId == hospitalId && t.Department == second.Department && t.UnitType == second.UnitType)?.ToList();
if (workloads == null || !workloads.Any()) return; if (workloads == null || !workloads.Any()) return;
string[] prefix = new string[] { "WorkloadScore_", "AssessmentScore_", "WorkPerformance_", $"{AgWorkloadType.SingleAwards}_", $"{AgWorkloadType.Workload}_" }; string[] prefix = new string[] { "WorkloadScore_", "AssessmentScore_", "WorkPerformance_", $"{AgWorkloadType.SingleAwards}_", $"{AgWorkloadType.Workload}_", $"{AgWorkloadType.PreAccountingReward}_" };
List<ag_workload_source> workloadSources = new List<ag_workload_source>(); List<ag_workload_source> workloadSources = new List<ag_workload_source>();
foreach (var rowitem in body) foreach (var rowitem in body)
{ {
...@@ -595,7 +595,7 @@ public void SaveSecondAllotBodyData(int hospitalId, ag_secondallot second, dynam ...@@ -595,7 +595,7 @@ public void SaveSecondAllotBodyData(int hospitalId, ag_secondallot second, dynam
if (!result) continue; if (!result) continue;
Dictionary<string, object> dict = JsonHelper.Deserialize<Dictionary<string, object>>(JsonHelper.Serialize(rowitem)); Dictionary<string, object> dict = JsonHelper.Deserialize<Dictionary<string, object>>(JsonHelper.Serialize(rowitem));
var keys = dict.Keys.Where(t => t.StartsWithIgnoreCase(prefix[0]) || t.StartsWithIgnoreCase(prefix[1]) || t.StartsWithIgnoreCase(prefix[2]) || t.StartsWithIgnoreCase(prefix[3]) || t.StartsWithIgnoreCase(prefix[4])); var keys = dict.Keys.Where(t => prefix.Any(w => t.StartsWithIgnoreCase(w)));
if (keys == null || !keys.Any()) continue; if (keys == null || !keys.Any()) continue;
foreach (var key in keys) foreach (var key in keys)
......
...@@ -1469,7 +1469,7 @@ public bool WorkloadDelete(int id) ...@@ -1469,7 +1469,7 @@ public bool WorkloadDelete(int id)
public List<ag_workload> GetSingleList(WorkloadRequest request) public List<ag_workload> GetSingleList(WorkloadRequest request)
{ {
return agworkloadRepository.GetEntities(t => t.HospitalId == request.HospitalId && t.Department == request.Department return agworkloadRepository.GetEntities(t => t.HospitalId == request.HospitalId && t.Department == request.Department
&& t.UnitType == request.UnitType && t.ItemId.StartsWith(AgWorkloadType.SingleAwards.ToString())); && t.UnitType == request.UnitType && t.ItemId.StartsWith(request.AgWorkloadType.ToString()));
} }
//public (string, string) GetDeptAndUnit(int userId) //public (string, string) GetDeptAndUnit(int userId)
......
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