特殊核算组 自定义显示“科主任”“护士长”

parent ac99d873
...@@ -249,7 +249,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -249,7 +249,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
UnitType = UnitType.特殊核算组.ToString(), UnitType = UnitType.特殊核算组.ToString(),
AccountingUnit = group.AccountingUnit, AccountingUnit = group.AccountingUnit,
AccountType = AccountUnitType.科主任.ToString(), AccountType = AccountTypeUnit.Recognition(empolyee.JobTitle, AccountUnitType.科主任),
EmployeeName = empolyee.DoctorName, EmployeeName = empolyee.DoctorName,
FitPeople = empolyee.FitPeople, FitPeople = empolyee.FitPeople,
JobTitle = empolyee.JobTitle, JobTitle = empolyee.JobTitle,
......
...@@ -372,7 +372,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS ...@@ -372,7 +372,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
UnitType = empolyee.UnitType, UnitType = empolyee.UnitType,
AccountingUnit = empolyee.AccountingUnit, AccountingUnit = empolyee.AccountingUnit,
AccountType = basicRule.AccountUnitType.ToString(), AccountType = AccountTypeUnit.Recognition(empolyee.JobTitle, basicRule.AccountUnitType),
EmployeeName = empolyee.DoctorName, EmployeeName = empolyee.DoctorName,
FitPeople = empolyee.FitPeople, FitPeople = empolyee.FitPeople,
FitPeopleRatio = empolyee.FitPeopleRatio, FitPeopleRatio = empolyee.FitPeopleRatio,
......
...@@ -43,4 +43,23 @@ public static bool Is(string unit, params UnitType[] types) ...@@ -43,4 +43,23 @@ public static bool Is(string unit, params UnitType[] types)
return !string.IsNullOrEmpty(unit) && types.Any(w => IsEqualsUnitType(w.ToString(), unit)); return !string.IsNullOrEmpty(unit) && types.Any(w => IsEqualsUnitType(w.ToString(), unit));
} }
} }
public class AccountTypeUnit
{
private static string[] dic = new string[] { "科主任", "护士长" };
/// <summary>
/// 自动识别职称文本
/// </summary>
/// <param name="name"></param>
/// <param name="defaultValue"></param>
/// <returns></returns>
public static string Recognition(string name, AccountUnitType defaultValue)
{
if (dic.Any(w => !string.IsNullOrEmpty(name) && name.Contains(w)))
return dic.First(w => !string.IsNullOrEmpty(name) && name.Contains(w));
return defaultValue.ToString();
}
}
} }
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