From efe34e873730eb90ce3232d47faf1f2a1fcd9072 Mon Sep 17 00:00:00 2001
From: wxd <123@qq.com>
Date: Tue, 4 Jun 2024 15:59:21 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=91=8A=EF=BC=8C=E6=8E=92=E5=BA=8F?=
=?UTF-8?q?=EF=BC=8C=E7=AE=80=E7=A7=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../OrganizationUnits/TreeChildViewDto.cs | 5 ++++
.../AsbitemDetails/AsbitemDetailAppService.cs | 27 +++++++++++--------
.../CustomerOrgs/CustomerOrgAppService.cs | 10 ++++---
.../PatientRegisterAppService.cs | 2 +-
.../PrintReports/PrintReportAppService.cs | 20 +++++++++++++-
.../RegisterCheckItemAppService.cs | 8 +++---
6 files changed, 51 insertions(+), 21 deletions(-)
diff --git a/src/Shentun.Peis.Application.Contracts/OrganizationUnits/TreeChildViewDto.cs b/src/Shentun.Peis.Application.Contracts/OrganizationUnits/TreeChildViewDto.cs
index 06b4481..0e49d71 100644
--- a/src/Shentun.Peis.Application.Contracts/OrganizationUnits/TreeChildViewDto.cs
+++ b/src/Shentun.Peis.Application.Contracts/OrganizationUnits/TreeChildViewDto.cs
@@ -17,6 +17,11 @@ namespace Shentun.Peis.OrganizationUnits
///
public string Code { get; set; }
+ ///
+ /// 短名称
+ ///
+ public string ShortName { get; set; }
+
///
/// 拼音简码
///
diff --git a/src/Shentun.Peis.Application/AsbitemDetails/AsbitemDetailAppService.cs b/src/Shentun.Peis.Application/AsbitemDetails/AsbitemDetailAppService.cs
index 00dd2e5..bbb26c1 100644
--- a/src/Shentun.Peis.Application/AsbitemDetails/AsbitemDetailAppService.cs
+++ b/src/Shentun.Peis.Application/AsbitemDetails/AsbitemDetailAppService.cs
@@ -29,12 +29,19 @@ namespace Shentun.Peis.AsbitemDetails
private readonly IRepository _repository;
private readonly IRepository _userRepository;
private readonly AsbitemDetailManager _manager;
-
- public AsbitemDetailAppService(IRepository repository, IRepository userRepository, AsbitemDetailManager manager)
+ private readonly CacheService _cacheService;
+
+ public AsbitemDetailAppService(
+ IRepository repository,
+ IRepository userRepository,
+ AsbitemDetailManager manager,
+ CacheService cacheService
+ )
{
this._repository = repository;
this._userRepository = userRepository;
this._manager = manager;
+ _cacheService = cacheService;
}
///
@@ -79,12 +86,12 @@ namespace Shentun.Peis.AsbitemDetails
{
await _repository.InsertManyAsync(asbitemDetails);
}
-
+
}
}
-
+
///
@@ -95,11 +102,9 @@ namespace Shentun.Peis.AsbitemDetails
public async Task> GetAsbitemDetailInItemAsync(AsbitemDetailInItemDto input)
{
- var entlist = _repository.GetDbSetAsync().Result.Include(c => c.Item)
- .Where(m => m.AsbitemId == input.AsbitemId).ToList();
-
-
- var userList = await _userRepository.GetListAsync();
+ var entlist = (await _repository.GetQueryableAsync()).Include(x => x.Item).ThenInclude(x => x.ItemType)
+ .Where(m => m.AsbitemId == input.AsbitemId)
+ .OrderBy(o => o.Item.ItemType.DisplayOrder).ThenBy(o => o.Item.DisplayOrder);
var entdto = entlist.Select(s => new ItemDto
{
@@ -128,8 +133,8 @@ namespace Shentun.Peis.AsbitemDetails
ReferenceRangeTypeFlag = s.Item.ReferenceRangeTypeFlag,
ResultTemplateTypeFlag = s.Item.ResultTemplateTypeFlag,
UnitId = s.Item.UnitId,
- CreatorName = EntityHelper.GetSurnameNoSql(userList, s.Item.CreatorId),
- LastModifierName = EntityHelper.GetSurnameNoSql(userList, s.Item.LastModifierId)
+ CreatorName = _cacheService.GetSurnameAsync(s.Item.CreatorId).Result,
+ LastModifierName = _cacheService.GetSurnameAsync(s.Item.LastModifierId).Result
}).ToList();
return entdto;
diff --git a/src/Shentun.Peis.Application/CustomerOrgs/CustomerOrgAppService.cs b/src/Shentun.Peis.Application/CustomerOrgs/CustomerOrgAppService.cs
index 4edd4af..f199a99 100644
--- a/src/Shentun.Peis.Application/CustomerOrgs/CustomerOrgAppService.cs
+++ b/src/Shentun.Peis.Application/CustomerOrgs/CustomerOrgAppService.cs
@@ -86,11 +86,11 @@ namespace Shentun.Peis.CustomerOrgs
///
///
[HttpPost("api/app/CustomerOrg/GetChildCustomerOrgsById")]
- public async Task> GetChildCustomerOrgsByIdAsync(CustomerOrgIdInputDto input)
+ public async Task> GetChildCustomerOrgsByIdAsync(CustomerOrgIdInputDto input)
{
- var list = await Repository.GetListAsync(o=>o.ParentId == input.CustomerOrgId);
+ var list = await Repository.GetListAsync(o => o.ParentId == input.CustomerOrgId);
var dtos = new List();
- foreach(var customerOrg in list)
+ foreach (var customerOrg in list)
{
var entityDto = ObjectMapper.Map(customerOrg);
entityDto.CreatorName = await _cacheService.GetSurnameAsync(entityDto.CreatorId);
@@ -295,7 +295,8 @@ namespace Shentun.Peis.CustomerOrgs
ParentId = p.ParentId,
Code = p.PathCode,
DisplayName = p.DisplayName,
- SimpleCode = p.SimpleCode
+ SimpleCode = p.SimpleCode,
+ ShortName = p.ShortName
};
return GetTree(items.ToList(), 0, "");
}
@@ -319,6 +320,7 @@ namespace Shentun.Peis.CustomerOrgs
Code = p.Code,
DisplayName = p.DisplayName,
SimpleCode = p.SimpleCode,
+ ShortName = p.ShortName,
TreeChildren = subs.ToList()
}
).ToList();
diff --git a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
index 8f0ace2..d13638f 100644
--- a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
+++ b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
@@ -884,7 +884,7 @@ namespace Shentun.Peis.PatientRegisters
}
///
- /// 新版人物登记
+ /// 新版人员登记
///
///
///
diff --git a/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs b/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
index 99c2125..2f75b53 100644
--- a/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
+++ b/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
@@ -479,7 +479,7 @@ namespace Shentun.Peis.PrintReports
public async Task GetMedicalReportAsync(PatientRegisterIdInputDto input)
{
- var patientRegister = (await _patientRegisterRepository.GetDbSetAsync())
+ var patientRegister = (await _patientRegisterRepository.GetQueryableAsync())
.Include(x => x.Patient)
.Where(m => m.Id == input.PatientRegisterId).FirstOrDefault();
if (patientRegister == null)
@@ -948,6 +948,24 @@ namespace Shentun.Peis.PrintReports
{
medicalReportDto.IsPersonal = 'Y';
}
+
+ if (patientRegister.MedicalPackageId != null)
+ {
+ var medicalPackageEnt = await _medicalPackageRepository.FirstOrDefaultAsync(f => f.Id == patientRegister.MedicalPackageId);
+ if (medicalPackageEnt != null)
+ {
+ medicalReportDto.MedicalPackageOrCustomerOrgGroupName = medicalPackageEnt.DisplayName;
+ }
+ }
+ else
+ {
+ var customerOrgGroupEnt = await _customerOrgGroupRepository.FirstOrDefaultAsync(f => f.Id == patientRegister.CustomerOrgGroupId);
+ if (customerOrgGroupEnt != null)
+ {
+ medicalReportDto.MedicalPackageOrCustomerOrgGroupName = customerOrgGroupEnt.DisplayName;
+ }
+ }
+
#endregion
return medicalReportDto;
}
diff --git a/src/Shentun.Peis.Application/RegisterCheckItems/RegisterCheckItemAppService.cs b/src/Shentun.Peis.Application/RegisterCheckItems/RegisterCheckItemAppService.cs
index f0cd390..c299e1c 100644
--- a/src/Shentun.Peis.Application/RegisterCheckItems/RegisterCheckItemAppService.cs
+++ b/src/Shentun.Peis.Application/RegisterCheckItems/RegisterCheckItemAppService.cs
@@ -69,7 +69,7 @@ namespace Shentun.Peis.RegisterCheckItems
.Include(x => x.Item.ItemType)
.Include(x => x.RegisterCheck)
.Where(m => m.RegisterCheckId == RegisterCheckId)
- .OrderBy(o=>o.Item.DisplayOrder).ToList();
+ .OrderBy(o => o.Item.ItemType.DisplayOrder).ThenBy(o => o.Item.DisplayOrder).ToList();
@@ -102,7 +102,7 @@ namespace Shentun.Peis.RegisterCheckItems
{
ent.Unit = unit.DisplayName;
}
-
+
update_list.Add(ent);
}
}
@@ -119,7 +119,7 @@ namespace Shentun.Peis.RegisterCheckItems
-
+
var entdto = entlist.Select(s => new RegisterCheckItemOrItemOrItemResultTemplateDto
{
@@ -130,7 +130,7 @@ namespace Shentun.Peis.RegisterCheckItems
ItemId = s.ItemId,
IsCalculationItem = s.Item.IsCalculationItem,
ItemName = s.Item.DisplayName,
- itemResultTemplates = s.Item.ItemResultTemplates.OrderBy(o=>o.DisplayOrder).
+ itemResultTemplates = s.Item.ItemResultTemplates.OrderBy(o => o.DisplayOrder).
Select(si => new ItemResultTemplates.ItemResultTemplateDropDto
{
DiagnosisId = si.DiagnosisId,