Commit 201526a8 by ruyun.zhang@suvalue.com

Merge remote-tracking branch 'origin/v2020morge-graphql' into v2020morge-graphql

parents fa67c909 9f7e193b
......@@ -209,14 +209,12 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
var dict = personService.GetDepartments(hospitalId)?.ToList();
if (dict == null || !dict.Any())
return results.Select(t => new ExtractTransDto
return results.GroupBy(t => new { t.Department, t.Category, t.Source }).Select(t => new ExtractTransDto
{
SheetName = t.Source,
DoctorName = t.DoctorName,
PersonnelNumber = t.PersonnelNumber,
Department = t.Department,
Category = t.Category,
Value = t.Fee ?? 0
SheetName = t.Key.Source,
Department = t.Key.Department,
Category = t.Key.Category,
Value = t.Sum(group => group.Fee) == 0 ? null : t.Sum(group => group.Fee),
}).ToList();
dict.ForEach(t =>
......@@ -244,7 +242,7 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
InpatTechnicAccounting = t.inner.FirstOrDefault(f => f.Department == dept)?.InpatTechnicAccounting?.AccountingUnit,
};
});
logger.LogInformation("************抽取结果1***************: " + JsonHelper.Serialize(data.Where(t => t.Department == "一病区(外科一)" && t.Category == "CT费")));
var groupdata = data.GroupBy(t => new { t.Department, t.Category, t.SheetName }).Select(t => new ExtractTransDto
{
SheetName = t.Key.SheetName,
......@@ -258,6 +256,7 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
InpatNurseAccounting = t.First().InpatNurseAccounting,
InpatTechnicAccounting = t.First().InpatTechnicAccounting,
});
logger.LogInformation("************抽取结果2***************: " + JsonHelper.Serialize(groupdata.Where(t => t.Department == "一病区(外科一)" && t.Category == "CT费")));
return groupdata.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