|
|
|
@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging; |
|
|
|
using NPOI.POIFS.Storage; |
|
|
|
using NPOI.Util; |
|
|
|
using NUglify.Helpers; |
|
|
|
using Shentun.Peis.CustomerOrgs; |
|
|
|
using Shentun.Peis.Enums; |
|
|
|
using Shentun.Peis.Models; |
|
|
|
using Shentun.Peis.PatientRegisters; |
|
|
|
@ -59,6 +60,7 @@ namespace Shentun.Peis.PacsBusiness |
|
|
|
private readonly IRepository<DicomFileDetail, Guid> _dicomFileDetailRepository; |
|
|
|
private readonly ILogger<PacsBusinessAppService> _logger; |
|
|
|
private readonly IRepository<ItemType, Guid> _itemTypeRepository; |
|
|
|
private readonly CustomerOrgManager _customerOrgManager; |
|
|
|
public PacsBusinessAppService( |
|
|
|
IConfiguration configuration, |
|
|
|
IRepository<RegisterCheck, Guid> registerCheckRepository, |
|
|
|
@ -78,7 +80,8 @@ namespace Shentun.Peis.PacsBusiness |
|
|
|
IRepository<UserItemType> userItemTypeRepository, |
|
|
|
IRepository<DicomFileDetail, Guid> dicomFileDetailRepository, |
|
|
|
ILogger<PacsBusinessAppService> logger, |
|
|
|
IRepository<ItemType, Guid> itemTypeRepository) |
|
|
|
IRepository<ItemType, Guid> itemTypeRepository, |
|
|
|
CustomerOrgManager customerOrgManager) |
|
|
|
{ |
|
|
|
_configuration = configuration; |
|
|
|
_registerCheckRepository = registerCheckRepository; |
|
|
|
@ -99,6 +102,7 @@ namespace Shentun.Peis.PacsBusiness |
|
|
|
_dicomFileDetailRepository = dicomFileDetailRepository; |
|
|
|
_logger = logger; |
|
|
|
_itemTypeRepository = itemTypeRepository; |
|
|
|
_customerOrgManager = customerOrgManager; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -348,6 +352,7 @@ namespace Shentun.Peis.PacsBusiness |
|
|
|
orderby registerCheck.PacsCheckDate descending |
|
|
|
select new |
|
|
|
{ |
|
|
|
customerOrgId = patientRegister.CustomerOrgId, |
|
|
|
patientName = patientRegister.PatientName, |
|
|
|
checkRequestNo = registerCheck.CheckRequestNo, |
|
|
|
asbitemName = asbitem.DisplayName, |
|
|
|
@ -391,6 +396,20 @@ namespace Shentun.Peis.PacsBusiness |
|
|
|
query = query.Where(m => m.checkTypeFlag == input.CheckTypeFlag); |
|
|
|
} |
|
|
|
|
|
|
|
if (input.CustomerOrgIds.Any()) |
|
|
|
{ |
|
|
|
|
|
|
|
List<Guid?> customerOrgIds = new List<Guid?>(); |
|
|
|
|
|
|
|
foreach (var customerOrgId in input.CustomerOrgIds) |
|
|
|
{ |
|
|
|
var customerOrgIdsTemp = await _customerOrgManager.GetCustomerOrgChildrenId(customerOrgId); |
|
|
|
customerOrgIds.AddRange(customerOrgIdsTemp); |
|
|
|
} |
|
|
|
|
|
|
|
query = query.Where(m => customerOrgIds.Contains(m.customerOrgId)); |
|
|
|
} |
|
|
|
|
|
|
|
#region 增加项目类别权限
|
|
|
|
|
|
|
|
string AdminId = _configuration.GetValue<string>("AdminId"); |
|
|
|
|