二次分配切换模板带出数据

parent 78cb958e
......@@ -897,6 +897,7 @@ public bool UseTemp(UseTempRequest request)
: configs.FirstOrDefault(t => t.TypeName == head.FiledName)?.Value.ToString()
});
}
}
}
}
......@@ -1348,6 +1349,13 @@ public List<HeadItem> GetHeadItems(int tempId, int hospitalId, string department
var tempItem = perforAgtempitemRepository.GetEntities(t => t.TempId == tempId);
var headItems = Mapper.Map<List<HeadItem>>(tempItem) ?? new List<HeadItem>();
var temp = perforAgtempRepository.GetEntity(w => w.Id == tempId);
// 其他来源不考虑工作量
if (temp?.Id == 6)
return headItems;
//获取工作量列头
var workItem = perforAgworkloadRepository.GetEntities(t => t.HospitalId == hospitalId && t.Department == department && t.UnitType == unitType);
if (workItem != null && workItem.Count > 0)
......
......@@ -368,22 +368,22 @@ public List<TitleValue> Department(int hospitalId)
if (list == null || !list.Any()) return new List<TitleValue>();
var result = list.Select(t => t.AccountingUnit).Distinct().OrderBy(t => t).ToList();
// 补充行政科室
var states = new int[] { (int)AllotStates.Archive, (int)AllotStates.GenerateAccomplish };
var allots = _perallotRepository.GetEntities(w => w.HospitalId == hospitalId && states.Contains(w.States));
if (allots != null && allots.Any())
{
var allot = allots.OrderByDescending(w => w.Year).ThenByDescending(w => w.Month).FirstOrDefault();
if (allot != null)
{
var types = new int[] { (int)UnitType.行政中层, (int)UnitType.行政后勤 };
var accounts = _resaccountRepository.GetEntities(w => w.AllotID == allot.ID && w.UnitType.HasValue && types.Contains(w.UnitType.Value));
if (accounts != null && accounts.Any())
{
result.AddRange(accounts.Select(w => w.AccountingUnit));
}
}
}
//// 补充行政科室
//var states = new int[] { (int)AllotStates.Archive, (int)AllotStates.GenerateAccomplish };
//var allots = _perallotRepository.GetEntities(w => w.HospitalId == hospitalId && states.Contains(w.States));
//if (allots != null && allots.Any())
//{
// var allot = allots.OrderByDescending(w => w.Year).ThenByDescending(w => w.Month).FirstOrDefault();
// if (allot != null)
// {
// var types = new int[] { (int)UnitType.行政中层, (int)UnitType.行政后勤 };
// var accounts = _resaccountRepository.GetEntities(w => w.AllotID == allot.ID && w.UnitType.HasValue && types.Contains(w.UnitType.Value));
// if (accounts != null && accounts.Any())
// {
// result.AddRange(accounts.Select(w => w.AccountingUnit));
// }
// }
//}
return result?.Select(t => new TitleValue { Title = t, Value = t }).ToList();
}
......
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