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();
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
try
|
||||
|
@ -292,7 +293,10 @@ try
|
|||
//Log.Logger.Warning($"ContentRootPath——GetParent:{Directory.GetParent(env.ContentRootPath).Parent.FullName}");
|
||||
//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();
|
||||
|
||||
|
|
|
@ -66,16 +66,17 @@ namespace IRaCIS.Core.Application.Services
|
|||
return await trialDocumentQueryable.ToPagedListAsync(queryTrialDocument.PageIndex, queryTrialDocument.PageSize, queryTrialDocument.SortField, queryTrialDocument.Asc);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<UnionDocumentWithConfirmInfoView>> GetTrialSignDocumentList(TrialDocQuery querySystemDocument)
|
||||
{
|
||||
var trialDocQueryable = from trialDoc in _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == querySystemDocument.TrialId)
|
||||
.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)))
|
||||
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) )
|
||||
|
||||
join trialUser in _repository.Where<TrialUser>(t => t.TrialId == querySystemDocument.TrialId && t.UserId == _userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId
|
||||
join confirm in _repository.Where<TrialDocConfirmedUser>(t => t.TrialDocument.TrialId == querySystemDocument.TrialId) on
|
||||
join trialUser in _repository.Where<TrialUser>(t=>t.UserId==_userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId
|
||||
join confirm in _repository.Where<TrialDocConfirmedUser>() on
|
||||
new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc
|
||||
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
{
|
||||
|
|
|
@ -7,13 +7,14 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using IRaCIS.Core.Application.Contracts.Dicom;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
{
|
||||
|
||||
public class CStoreSCPService : DicomService, IDicomServiceProvider, IDicomCStoreProvider, IDicomCEchoProvider
|
||||
{
|
||||
public readonly IDicomArchiveService _dicomArchiveService;
|
||||
private IServiceProvider _serviceProvider { get; set; }
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
var tt = base.UserState;
|
||||
//_dicomArchiveService = dicomArchiveService;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Task OnReceiveAssociationRequestAsync(DicomAssociation association)
|
||||
{
|
||||
_serviceProvider =(IServiceProvider) this.UserState;
|
||||
|
||||
if (association.CalledAE != "STORESCP")
|
||||
{
|
||||
return SendAssociationRejectAsync(
|
||||
|
@ -96,6 +102,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
public async Task<DicomCStoreResponse> OnCStoreRequestAsync(DicomCStoreRequest request)
|
||||
{
|
||||
var tt= _serviceProvider.GetService<IDicomArchiveService>();
|
||||
|
||||
var studyUid = request.Dataset.GetSingleValue<string>(DicomTag.StudyInstanceUID).Trim();
|
||||
var instUid = request.SOPInstanceUID.UID;
|
||||
|
||||
|
|
|
@ -1212,9 +1212,10 @@ namespace IRaCIS.Core.Application
|
|||
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
||||
.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))
|
||||
.Where(c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)
|
||||
&& t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)).Count() > 0).CountAsync();
|
||||
var signedTrialCount = await _trialDocumentRepository.AsQueryable(true)
|
||||
.Where(t=>t.Trial.TrialUserList.Any(t=>t.UserId==_userInfo.Id))
|
||||
.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
|
||||
.Where(t => t.IsDeleted == false && t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null))
|
||||
|
@ -1266,7 +1267,7 @@ namespace IRaCIS.Core.Application
|
|||
.Where(t => t.EndDate == null || t.EndDate != null && t.EndDate > DateTime.Now)
|
||||
.CountAsync(),
|
||||
|
||||
#region PM
|
||||
#region PM
|
||||
|
||||
PM_SiteSurveryCount = isPM ? siteSurveyCount : 0,
|
||||
|
||||
|
|
Loading…
Reference in New Issue