Commit e94b28f8 by lcx

获取核算单元时,添加条件 来源(门诊/住院)

parent bc0908d8
...@@ -158,7 +158,7 @@ private List<HistoryData> ReadExcelData(int hospitalid, string path) ...@@ -158,7 +158,7 @@ private List<HistoryData> ReadExcelData(int hospitalid, string path)
var unittype = EnumHelper.GetItems<UnitType>(); var unittype = EnumHelper.GetItems<UnitType>();
entities.ForEach(t => entities.ForEach(t =>
{ {
var accountingUnits = departmentDict.Where(w => w.Department == t.Department); var accountingUnits = departmentDict.Where(w => w.Department == t.Department && w.Source == t.SourceType);
if (accountingUnits != null && accountingUnits.Any()) if (accountingUnits != null && accountingUnits.Any())
{ {
var accountingUnit = accountingUnits.OrderBy(o => (unittype.FirstOrDefault(f => f.Name == o.UnitType)?.Value) ?? int.MaxValue).FirstOrDefault(f => !string.IsNullOrEmpty(f.AccountingUnit))?.AccountingUnit; var accountingUnit = accountingUnits.OrderBy(o => (unittype.FirstOrDefault(f => f.Name == o.UnitType)?.Value) ?? int.MaxValue).FirstOrDefault(f => !string.IsNullOrEmpty(f.AccountingUnit))?.AccountingUnit;
......
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