Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
commit
2fe0851786
|
@ -257,6 +257,7 @@ var hangfireJobService = app.Services.GetRequiredService<IIRaCISHangfireJob>();
|
||||||
await hangfireJobService.InitHangfireJobTaskAsync();
|
await hangfireJobService.InitHangfireJobTaskAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -292,7 +293,10 @@ try
|
||||||
//Log.Logger.Warning($"ContentRootPath——GetParent:{Directory.GetParent(env.ContentRootPath).Parent.FullName}");
|
//Log.Logger.Warning($"ContentRootPath——GetParent:{Directory.GetParent(env.ContentRootPath).Parent.FullName}");
|
||||||
//Log.Logger.Warning($"ContentRootPath——xx:{Path.GetDirectoryName(Path.GetDirectoryName(env.ContentRootPath))}");
|
//Log.Logger.Warning($"ContentRootPath——xx:{Path.GetDirectoryName(Path.GetDirectoryName(env.ContentRootPath))}");
|
||||||
|
|
||||||
//DicomServerFactory.Create<CStoreSCPService>(11112);
|
|
||||||
|
|
||||||
|
|
||||||
|
var server = DicomServerFactory.Create<CStoreSCPService>(11112,userState: app.Services);
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|
||||||
|
|
|
@ -66,16 +66,17 @@ namespace IRaCIS.Core.Application.Services
|
||||||
return await trialDocumentQueryable.ToPagedListAsync(queryTrialDocument.PageIndex, queryTrialDocument.PageSize, queryTrialDocument.SortField, queryTrialDocument.Asc);
|
return await trialDocumentQueryable.ToPagedListAsync(queryTrialDocument.PageIndex, queryTrialDocument.PageSize, queryTrialDocument.SortField, queryTrialDocument.Asc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
public async Task<PageOutput<UnionDocumentWithConfirmInfoView>> GetTrialSignDocumentList(TrialDocQuery querySystemDocument)
|
public async Task<PageOutput<UnionDocumentWithConfirmInfoView>> GetTrialSignDocumentList(TrialDocQuery querySystemDocument)
|
||||||
{
|
{
|
||||||
var trialDocQueryable = from trialDoc in _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == querySystemDocument.TrialId)
|
var trialDocQueryable = from trialDoc in _trialDocumentRepository.AsQueryable(true)
|
||||||
|
.WhereIf(querySystemDocument.TrialId!=null,t=>t.TrialId==querySystemDocument.TrialId)
|
||||||
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) )
|
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) )
|
||||||
.Where(t => t.IsDeleted == false || (t.IsDeleted == true && t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id)))
|
|
||||||
|
|
||||||
join trialUser in _repository.Where<TrialUser>(t => t.TrialId == querySystemDocument.TrialId && t.UserId == _userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId
|
join trialUser in _repository.Where<TrialUser>(t=>t.UserId==_userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId
|
||||||
join confirm in _repository.Where<TrialDocConfirmedUser>(t => t.TrialDocument.TrialId == querySystemDocument.TrialId) on
|
join confirm in _repository.Where<TrialDocConfirmedUser>() on
|
||||||
new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc
|
new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc
|
||||||
|
|
||||||
from confirm in cc.DefaultIfEmpty()
|
from confirm in cc.DefaultIfEmpty()
|
||||||
select new UnionDocumentWithConfirmInfoView()
|
select new UnionDocumentWithConfirmInfoView()
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,13 +7,14 @@ using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using IRaCIS.Core.Application.Contracts.Dicom;
|
using IRaCIS.Core.Application.Contracts.Dicom;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
{
|
{
|
||||||
|
|
||||||
public class CStoreSCPService : DicomService, IDicomServiceProvider, IDicomCStoreProvider, IDicomCEchoProvider
|
public class CStoreSCPService : DicomService, IDicomServiceProvider, IDicomCStoreProvider, IDicomCEchoProvider
|
||||||
{
|
{
|
||||||
public readonly IDicomArchiveService _dicomArchiveService;
|
private IServiceProvider _serviceProvider { get; set; }
|
||||||
|
|
||||||
|
|
||||||
private static readonly DicomTransferSyntax[] _acceptedTransferSyntaxes = new DicomTransferSyntax[]
|
private static readonly DicomTransferSyntax[] _acceptedTransferSyntaxes = new DicomTransferSyntax[]
|
||||||
|
@ -43,15 +44,20 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
public CStoreSCPService(INetworkStream stream, Encoding fallbackEncoding, ILogger log, DicomServiceDependencies dependencies/*, IDicomArchiveService dicomArchiveService*/)
|
public CStoreSCPService(INetworkStream stream, Encoding fallbackEncoding, ILogger log, DicomServiceDependencies dependencies)
|
||||||
: base(stream, fallbackEncoding, log, dependencies)
|
: base(stream, fallbackEncoding, log, dependencies)
|
||||||
{
|
{
|
||||||
|
var tt = base.UserState;
|
||||||
//_dicomArchiveService = dicomArchiveService;
|
//_dicomArchiveService = dicomArchiveService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Task OnReceiveAssociationRequestAsync(DicomAssociation association)
|
public Task OnReceiveAssociationRequestAsync(DicomAssociation association)
|
||||||
{
|
{
|
||||||
|
_serviceProvider =(IServiceProvider) this.UserState;
|
||||||
|
|
||||||
if (association.CalledAE != "STORESCP")
|
if (association.CalledAE != "STORESCP")
|
||||||
{
|
{
|
||||||
return SendAssociationRejectAsync(
|
return SendAssociationRejectAsync(
|
||||||
|
@ -96,6 +102,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
|
|
||||||
public async Task<DicomCStoreResponse> OnCStoreRequestAsync(DicomCStoreRequest request)
|
public async Task<DicomCStoreResponse> OnCStoreRequestAsync(DicomCStoreRequest request)
|
||||||
{
|
{
|
||||||
|
var tt= _serviceProvider.GetService<IDicomArchiveService>();
|
||||||
|
|
||||||
var studyUid = request.Dataset.GetSingleValue<string>(DicomTag.StudyInstanceUID).Trim();
|
var studyUid = request.Dataset.GetSingleValue<string>(DicomTag.StudyInstanceUID).Trim();
|
||||||
var instUid = request.SOPInstanceUID.UID;
|
var instUid = request.SOPInstanceUID.UID;
|
||||||
|
|
||||||
|
|
|
@ -1212,9 +1212,10 @@ namespace IRaCIS.Core.Application
|
||||||
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
||||||
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
|
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
|
||||||
|
|
||||||
var signedTrialCount = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped).Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
var signedTrialCount = await _trialDocumentRepository.AsQueryable(true)
|
||||||
.Where(c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)
|
.Where(t=>t.Trial.TrialUserList.Any(t=>t.UserId==_userInfo.Id))
|
||||||
&& t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)).Count() > 0).CountAsync();
|
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||||
|
.Where(t => t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime!=null)).CountAsync();
|
||||||
|
|
||||||
var signedSysDocCont = await _systemDocumentRepository
|
var signedSysDocCont = await _systemDocumentRepository
|
||||||
.Where(t => t.IsDeleted == false && t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null))
|
.Where(t => t.IsDeleted == false && t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null))
|
||||||
|
|
Loading…
Reference in New Issue