专家

parent 53a31ac0
...@@ -21,6 +21,8 @@ public enum UnitType ...@@ -21,6 +21,8 @@ public enum UnitType
护理组 = 2, 护理组 = 2,
[Description("医技组")] [Description("医技组")]
医技组 = 3, 医技组 = 3,
[Description("专家组")]
专家组 = 4,
} }
public enum SheetType public enum SheetType
......
...@@ -243,8 +243,9 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid) ...@@ -243,8 +243,9 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
{ {
var pairs = new[] var pairs = new[]
{ {
new { Name = "医生组临床科室单元核算表", Data = doctorWorkloadData, SheetType = SheetType.ComputeDoctorAccount, UnitTypes = new List<UnitType> { UnitType.医生组, UnitType.医技组 } }, new { Name = "医生组临床科室单元核算表", Data = doctorWorkloadData, SheetType = SheetType.ComputeDoctorAccount, UnitTypes = new List<UnitType> { UnitType.医生组, UnitType.医技组, UnitType.专家组 } },
new { Name = "护理组临床科室单元核算表", Data = nurseWorkloadData, SheetType = SheetType.ComputeNurseAccount, UnitTypes = new List<UnitType> { UnitType.护理组 } }, new { Name = "护理组临床科室单元核算表", Data = nurseWorkloadData, SheetType = SheetType.ComputeNurseAccount, UnitTypes = new List<UnitType> { UnitType.护理组 } },
new { Name = "专家核算表", Data = doctorWorkloadData, SheetType = SheetType.ComputeDoctorAccount, UnitTypes = new List<UnitType> { UnitType.专家组 } },
}; };
List<PerSheet> result = new List<PerSheet>(); List<PerSheet> result = new List<PerSheet>();
foreach (var info in pairs) foreach (var info in pairs)
...@@ -253,13 +254,19 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid) ...@@ -253,13 +254,19 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
foreach (var unitType in info.UnitTypes) foreach (var unitType in info.UnitTypes)
{ {
var atDataList = dataList.Where(t => t.UnitType == unitType.ToString()); var atDataList = dataList.Where(t => t.UnitType == unitType.ToString());
if (atDataList == null || !atDataList.Any())
continue;
foreach (var dept in dataList.Where(t => t.UnitType == unitType.ToString())) foreach (var dept in dataList.Where(t => t.UnitType == unitType.ToString()))
{ {
if (string.IsNullOrEmpty(dept.AccountingUnit)) if (string.IsNullOrEmpty(dept.AccountingUnit))
continue; continue;
var econDoctor = economicData.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department); var econDoctor = economicData.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
var workDoctor = info.Data.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department); var workDoctor = info.Data.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
if (UnitType.专家组 == unitType)
{
econDoctor = economicData.FirstOrDefault(t => t.AccountingUnit == dept.Department);
workDoctor = info.Data.FirstOrDefault(t => t.AccountingUnit == dept.Department);
}
//保底绩效 //保底绩效
var minimum = baiscnormList.FirstOrDefault(t => t.PositionName == dept.MinimumReference); var minimum = baiscnormList.FirstOrDefault(t => t.PositionName == dept.MinimumReference);
if (!string.IsNullOrEmpty(dept.MinimumReference) && minimum != null) if (!string.IsNullOrEmpty(dept.MinimumReference) && minimum != null)
...@@ -299,9 +306,11 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid) ...@@ -299,9 +306,11 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
} }
} }
} }
sheet.PerData.AddRange(atDataList); sheet.PerData.AddRange(atDataList);
} }
if ("专家核算表" == info.Name && (sheet.PerData == null || sheet.PerData.Any()))
continue;
result.Add(sheet); result.Add(sheet);
} }
return result; return result;
......
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