二次分配科室改名后也能加载上次绩效

parent ee75db05
...@@ -387,8 +387,6 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D ...@@ -387,8 +387,6 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
var allworkload = _agworkloadRepository.GetEntities(t => t.HospitalId == allot.HospitalId && t.Department == second.Department) ?? new List<ag_workload>(); var allworkload = _agworkloadRepository.GetEntities(t => t.HospitalId == allot.HospitalId && t.Department == second.Department) ?? new List<ag_workload>();
var workloads = allworkload.Where(w => UnitTypeUtil.Is(w.UnitType, second.UnitType)) ?? new List<ag_workload>(); var workloads = allworkload.Where(w => UnitTypeUtil.Is(w.UnitType, second.UnitType)) ?? new List<ag_workload>();
if (workloads != null && workloads.Any())
{
/* isSave 为True时,没必要查询数据 */ /* isSave 为True时,没必要查询数据 */
var secondWorkload = isSave && overrideMode != EmployeeSource.Workload var secondWorkload = isSave && overrideMode != EmployeeSource.Workload
? new List<view_second_workload_result>() ? new List<view_second_workload_result>()
...@@ -419,7 +417,6 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D ...@@ -419,7 +417,6 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
result.Add(dict); result.Add(dict);
} }
} }
}
return result; return result;
} }
......
...@@ -947,8 +947,12 @@ public ag_secondallot GetPreviousSecondAllot(int hospitalId, ag_secondallot seco ...@@ -947,8 +947,12 @@ public ag_secondallot GetPreviousSecondAllot(int hospitalId, ag_secondallot seco
if (index == 0) return null; if (index == 0) return null;
var prevAllot = allotList[index - 1]; var prevAllot = allotList[index - 1];
var temp = agsecondallotRepository.GetEntities(w => w.AllotId == prevAllot.ID && w.Department == secondAllot.Department); var temp = agsecondallotRepository.GetEntities(w => w.AllotId == prevAllot.ID && (w.Department == secondAllot.Department || w.Department == secondAllot.NewAccountingUnit));
var prevSecondAllot = temp.FirstOrDefault(w => UnitTypeUtil.IsEqualsUnitType(w.UnitType, secondAllot.UnitType));
var prevSecondAllot = temp.FirstOrDefault(w =>
(UnitTypeUtil.IsEqualsUnitType(w.UnitType, secondAllot.UnitType) && w.Department == secondAllot.Department)
|| (UnitTypeUtil.IsEqualsUnitType(w.UnitType, secondAllot.NewUnitType) && w.Department == secondAllot.NewAccountingUnit));
return prevSecondAllot; return prevSecondAllot;
} }
......
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