Commit 0c4a9b71 by 李承祥

二次绩效带出本科室,同一科室类型历史数据

parent cc02a9a2
...@@ -181,8 +181,10 @@ public SecondResponse GetSecondDetail(UseTempRequest request) ...@@ -181,8 +181,10 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
var bringhead = headItems.Where(t => t.IsBring == 1).ToList(); var bringhead = headItems.Where(t => t.IsBring == 1).ToList();
if (bringhead != null && bringhead.Count > 0) if (bringhead != null && bringhead.Count > 0)
{ {
var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == request.HospitalId); var allotIds = perforPerallotRepository.GetEntities(t => t.HospitalId == request.HospitalId).Select(a => a.ID);
var secondIdList = perforAgsecondallotRepository.GetEntities(t => allotList.Select(a => a.ID).Contains(t.AllotId.Value)).OrderBy(t => t.Year).ThenBy(t => t.Month).Select(t => t.Id).ToList(); var secondIdList = perforAgsecondallotRepository.GetEntities(t => allotIds.Contains(t.AllotId.Value)
&& t.Department == request.Department && t.UnitType == request.UnitType)
.OrderBy(t => t.Year).ThenBy(t => t.Month).Select(t => t.Id).ToList();
var index = secondIdList.IndexOf(request.SecondId); var index = secondIdList.IndexOf(request.SecondId);
if (index != 0) if (index != 0)
fixatList = perforAgfixatitemRepository.GetEntities(t => t.SecondId == secondIdList.ElementAt(index - 1) && t.RowNumber.HasValue); fixatList = perforAgfixatitemRepository.GetEntities(t => t.SecondId == secondIdList.ElementAt(index - 1) && t.RowNumber.HasValue);
......
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