代码调整顺序

parent 49c49eea
...@@ -92,7 +92,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc ...@@ -92,7 +92,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
var allot = _perallotRepository.GetEntity(t => t.ID == second.AllotId); var allot = _perallotRepository.GetEntity(t => t.ID == second.AllotId);
if (allot == null) throw new PerformanceException("绩效记录不存在!"); if (allot == null) throw new PerformanceException("绩效记录不存在!");
// 填报模板带出 行政工勤 绩效 // 填报模板带出 行政工勤 绩效
var computes = _rescomputeRepository.GetEntities(w => w.AllotID == allot.ID && (w.AccountType == "行政后勤" || w.AccountType == "行政工勤")); var computes = _rescomputeRepository.GetEntities(w => w.AllotID == allot.ID && UnitTypeUtil.Office.Contains(w.AccountType));
var loads = GetWorkLoads(allot.HospitalId, second.UnitType, second.Department); var loads = GetWorkLoads(allot.HospitalId, second.UnitType, second.Department);
var employees = _peremployeeRepository.GetEntities(w => w.AllotId == second.AllotId); var employees = _peremployeeRepository.GetEntities(w => w.AllotId == second.AllotId);
......
...@@ -8,6 +8,8 @@ namespace Performance.Services ...@@ -8,6 +8,8 @@ namespace Performance.Services
{ {
public class UnitTypeUtil public class UnitTypeUtil
{ {
public static string[] Office = new string[] { "行政后勤", "行政工勤" };
/// <summary> /// <summary>
/// 是否是行政后勤/工勤 /// 是否是行政后勤/工勤
/// </summary> /// </summary>
...@@ -17,6 +19,7 @@ public static bool IsOffice(int? unit) ...@@ -17,6 +19,7 @@ public static bool IsOffice(int? unit)
{ {
return unit == (int)UnitType.行政后勤; return unit == (int)UnitType.行政后勤;
} }
/// <summary> /// <summary>
/// 是否是行政后勤/工勤 /// 是否是行政后勤/工勤
/// </summary> /// </summary>
...@@ -24,7 +27,7 @@ public static bool IsOffice(int? unit) ...@@ -24,7 +27,7 @@ public static bool IsOffice(int? unit)
/// <returns></returns> /// <returns></returns>
public static bool IsOffice(string unit) public static bool IsOffice(string unit)
{ {
return !string.IsNullOrEmpty(unit) && (unit == "行政后勤" || unit == "行政工勤"); return !string.IsNullOrEmpty(unit) && Office.Contains(unit);
} }
/// <summary> /// <summary>
......
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