Commit fbc9248f by lcx

Merge branch 'feature/new_report' into feature/new_report_field

# Conflicts:
#	performance/Performance.Services/AllotCompute/ResultComputeService.cs
#	performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
parents 22d17ee5 4c3c052a
...@@ -143,5 +143,15 @@ public class ComputeResult ...@@ -143,5 +143,15 @@ public class ComputeResult
///// 工作量绩效 ///// 工作量绩效
///// </summary> ///// </summary>
//public decimal? Workload { get; set; } //public decimal? Workload { get; set; }
/// <summary>
/// 科主任/护士长人数
/// </summary>
public Nullable<decimal> ManagerNumber { get; set; }
/// <summary>
/// 核算单元人员数量
/// </summary>
public Nullable<decimal> MedicalNumber { get; set; }
} }
} }
...@@ -150,5 +150,15 @@ public class ResComputeResponse ...@@ -150,5 +150,15 @@ public class ResComputeResponse
/// ///
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// 科主任/护士长人数
/// </summary>
public Nullable<decimal> ManagerNumber { get; set; }
/// <summary>
/// 核算单元人员数量
/// </summary>
public Nullable<decimal> MedicalNumber { get; set; }
} }
} }
...@@ -170,5 +170,15 @@ public class res_compute ...@@ -170,5 +170,15 @@ public class res_compute
/// ///
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// 科主任/护士长人数
/// </summary>
public Nullable<decimal> ManagerNumber { get; set; }
/// <summary>
/// 核算单元人员数量
/// </summary>
public Nullable<decimal> MedicalNumber { get; set; }
} }
} }
...@@ -219,7 +219,6 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -219,7 +219,6 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
PerforTotal = sumValue, PerforTotal = sumValue,
Avg = group.Number == 0 ? 0 : (sumValue / group.Number), Avg = group.Number == 0 ? 0 : (sumValue / group.Number),
Adjust = empolyee.Adjust, Adjust = empolyee.Adjust,
Grant = empolyee.Management Grant = empolyee.Management
}; };
......
...@@ -301,18 +301,34 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -301,18 +301,34 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
var empolyee = empolyees.ElementAt(i); var empolyee = empolyees.ElementAt(i);
var resAccount = dataList.FirstOrDefault(t => ((UnitType)t.UnitType).ToString() == empolyee.UnitType && t.AccountingUnit == empolyee.AccountingUnit); var resAccount = dataList.FirstOrDefault(t => ((UnitType)t.UnitType).ToString() == empolyee.UnitType && t.AccountingUnit == empolyee.AccountingUnit);
if (resAccount == null) if (resAccount == null && empolyees.Count() > 1)
{ {
// 如果没有找到科室,则找相同用户的其他核算单元类型 // 如果没有找到科室,则找相同用户的其他核算单元类型
for (int j = 0; j < empolyees.Count(); j++) //for (int j = 0; j < empolyees.Count(); j++)
//{
// if (i == j) continue;
// var empolyee2 = empolyees.ElementAt(j);
// resAccount = dataList.FirstOrDefault(t => ((UnitType)t.UnitType).ToString() == empolyee2.UnitType && t.AccountingUnit == empolyee2.AccountingUnit);
// if (resAccount != null) continue;
//}
//if (resAccount == null) continue;
var unitTypes = new[]
{
new { UnitType = new List<int>{ (int)UnitType.医生组, (int)UnitType.医技组 }, JobTitle = "主任" },
new { UnitType = new List<int>{ (int)UnitType.护理组 }, JobTitle = "护士长" },
};
foreach (var type in unitTypes)
{ {
if (i == j) continue; if (empolyee.JobTitle.IndexOf(type.JobTitle) == -1) continue;
var empolyee2 = empolyees.ElementAt(j); foreach (var item in type.UnitType)
resAccount = dataList.FirstOrDefault(t => ((UnitType)t.UnitType).ToString() == empolyee2.UnitType && t.AccountingUnit == empolyee2.AccountingUnit); {
resAccount = dataList.FirstOrDefault(t => t.UnitType == item && t.AccountingUnit == empolyee.AccountingUnit);
if (resAccount != null) continue; if (resAccount != null) continue;
} }
if (resAccount == null) continue;
} }
}
if (resAccount == null) continue;
var basicRule = basicRuleList.FirstOrDefault(t => t.UnitType == (UnitType)resAccount.UnitType); var basicRule = basicRuleList.FirstOrDefault(t => t.UnitType == (UnitType)resAccount.UnitType);
if (basicRule == null) continue; if (basicRule == null) continue;
...@@ -345,7 +361,10 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -345,7 +361,10 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
Scale = resAccount.PerforTotal * (empolyee.Scale ?? 1), Scale = resAccount.PerforTotal * (empolyee.Scale ?? 1),
Adjust = empolyee.Adjust, Adjust = empolyee.Adjust,
Remark = empolyees.Count() > 1 ? "特殊科室主任,共用核算单元" : "", Remark = empolyees.Count() > 1 ? "特殊科室主任,共用核算单元" : "",
Grant = empolyee.Management Grant = empolyee.Management,
ManagerNumber = resAccount.ManagerNumber,
MedicalNumber = resAccount.Number
}; };
//应发管理绩效 //应发管理绩效
compute.ShouldGiveFee = (compute.Efficiency + compute.Scale) * (empolyee.Management ?? 0); compute.ShouldGiveFee = (compute.Efficiency + compute.Scale) * (empolyee.Management ?? 0);
......
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