Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -119,6 +119,15 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public bool IsSigned { get; set; }
|
||||
|
||||
|
||||
public Guid? UserTypeId { get; set; }
|
||||
|
||||
public DocUserSignType? DocUserSignType { get; set; }
|
||||
|
||||
public DateTime? BeginCreateTime { get; set; }
|
||||
|
||||
public DateTime? EndCreateTime { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class GetNextUnSignDocumentInDto
|
||||
@@ -171,7 +180,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
}
|
||||
|
||||
|
||||
public class SystemDocQuery:PageInput
|
||||
public class SystemDocQuery : PageInput
|
||||
{
|
||||
public Guid? FileTypeId { get; set; }
|
||||
|
||||
@@ -204,6 +213,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
public DateTime? EndConfirmTime { get; set; }
|
||||
|
||||
|
||||
public DateTime? BeginCreateTime { get; set; }
|
||||
|
||||
public DateTime? EndCreateTime { get; set; }
|
||||
}
|
||||
|
||||
public class DocumentTrialUnionQuery : TrialUserDocUnionQuery
|
||||
@@ -233,6 +247,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
public DateTime? EndConfirmTime { get; set; }
|
||||
|
||||
public DateTime? BeginCreateTime { get; set; }
|
||||
|
||||
public DateTime? EndCreateTime { get; set; }
|
||||
}
|
||||
|
||||
///<summary> SystemDocumentAddOrEdit 列表查询参数模型</summary>
|
||||
|
||||
@@ -35,7 +35,11 @@ namespace IRaCIS.Core.Application.Services
|
||||
var systemDocumentQueryable = _systemDocumentRepository.AsQueryable(true)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted)
|
||||
.WhereIf(inQuery.DocUserSignType != null, t => t.DocUserSignType == inQuery.DocUserSignType)
|
||||
.WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime)
|
||||
.WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime)
|
||||
.WhereIf(inQuery.UserTypeId != null, t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId))
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted)
|
||||
.ProjectTo<SystemDocumentView>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us, userId = _userInfo.UserRoleId });
|
||||
|
||||
return await systemDocumentQueryable.ToPagedListAsync(inQuery);
|
||||
@@ -178,18 +182,18 @@ namespace IRaCIS.Core.Application.Services
|
||||
RealName = user.FullName,
|
||||
UserName = user.UserName,
|
||||
|
||||
DocTypeCode=sysDoc.FileType.Code
|
||||
DocTypeCode = sysDoc.FileType.Code
|
||||
|
||||
//UserTypeId = user.UserTypeId,
|
||||
//UserTypeShortName = user.UserTypeRole.UserTypeShortName
|
||||
};
|
||||
|
||||
var list = await query
|
||||
//过滤掉删除的,并且没有签名的
|
||||
var list = await query
|
||||
//过滤掉删除的,并且没有签名的
|
||||
.Where(t => !(t.IsDeleted == true && t.ConfirmTime == null))
|
||||
.WhereIf(inQuery.IsSigned == true, t => t.ConfirmTime != null)
|
||||
.WhereIf(inQuery.IsSigned == false, t => t.ConfirmTime == null)
|
||||
.ToPagedListAsync(inQuery,nameof(UnionDocumentWithConfirmInfoView.DocTypeCode));
|
||||
.ToPagedListAsync(inQuery, nameof(UnionDocumentWithConfirmInfoView.DocTypeCode));
|
||||
|
||||
|
||||
return list;
|
||||
|
||||
@@ -559,8 +559,10 @@ namespace IRaCIS.Core.Application.Services
|
||||
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
||||
.WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null)
|
||||
.WhereIf(inQuery.IsConfirmed == false, t => t.ConfirmTime == null)
|
||||
.WhereIf(inQuery.StartConfirmTime != null, t => t.ConfirmTime >= inQuery.StartConfirmTime.Value)
|
||||
.WhereIf(inQuery.EndConfirmTime != null, t => t.ConfirmTime <= inQuery.EndConfirmTime.Value)
|
||||
.WhereIf(inQuery.StartConfirmTime != null, t => t.ConfirmTime >= inQuery.StartConfirmTime.Value)
|
||||
.WhereIf(inQuery.EndConfirmTime != null, t => t.ConfirmTime <= inQuery.EndConfirmTime.Value)
|
||||
.WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime)
|
||||
.WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName))
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted);
|
||||
|
||||
@@ -751,6 +753,17 @@ namespace IRaCIS.Core.Application.Services
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取系统签署文档签署人下拉框
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> GetSysDocSignUserList()
|
||||
{
|
||||
var list = _systemDocConfirmedUserRepository.Where(t => t.ConfirmTime !=null).Select(t => new { t.ConfirmUserId, t.ConfirmUser.UserName, t.ConfirmUser.FullName }).Distinct().ToList();
|
||||
|
||||
return ResponseOutput.Ok(list);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput<PageOutput<UnionDocumentWithConfirmInfoView>>> GetSysDocumentConfirmList(SystemDocQuery inQuery)
|
||||
{
|
||||
@@ -796,6 +809,8 @@ namespace IRaCIS.Core.Application.Services
|
||||
.WhereIf(inQuery.IsConfirmed == false, t => t.ConfirmTime == null)
|
||||
.WhereIf(inQuery.StartConfirmTime != null, t => t.ConfirmTime >= inQuery.StartConfirmTime.Value)
|
||||
.WhereIf(inQuery.EndConfirmTime != null, t => t.ConfirmTime <= inQuery.EndConfirmTime.Value)
|
||||
.WhereIf(inQuery.BeginCreateTime != null, t => t.CreateTime >= inQuery.BeginCreateTime)
|
||||
.WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName))
|
||||
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted);
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ using Medallion.Threading;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Org.BouncyCastle.Asn1.Cmp;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Data;
|
||||
|
||||
@@ -255,7 +256,14 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
[HttpPut]
|
||||
public async Task<IResponseOutput> RequestImageBack(Guid subjectVisitId)
|
||||
{
|
||||
if (!_subjectVisitRepository.Any(t => t.Id == subjectVisitId && !t.VisitTaskList.Any() && t.SubmitState == SubmitStateEnum.Submitted))
|
||||
|
||||
if (_subjectVisitRepository.Any(t => t.Id == subjectVisitId && t.QCChallengeList.Any(t => t.IsClosed == false)))
|
||||
{
|
||||
//有未关闭的质疑,不允许在此申请影像回退
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_HaveNotClosedQCChanllenge"]);
|
||||
}
|
||||
|
||||
if (!_subjectVisitRepository.Any(t => t.Id == subjectVisitId && !t.VisitTaskList.Any(u => u.TaskState == TaskState.Effect) && t.SubmitState == SubmitStateEnum.Submitted))
|
||||
{
|
||||
//已提交未生成任务的才允许申请
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_ShouldBeforeCheckPassed"]);
|
||||
@@ -268,7 +276,21 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_HaveApplyedImageBack"]);
|
||||
}
|
||||
|
||||
var newRecord = new SubjectVisitImageBackRecord() { SubjectVisitId = subjectVisitId };
|
||||
if (_qcChallengeRepository.Any(t => t.SubjectVisitId == subjectVisitId && t.IsClosed == false && t.ReuploadEnum == QCChanllengeReuploadEnum.CRCRequestReupload))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]);
|
||||
}
|
||||
|
||||
|
||||
var sv = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId)).IfNullThrowException();
|
||||
|
||||
if (sv.RequestBackState == RequestBackStateEnum.CRC_RequestBack)
|
||||
{
|
||||
// 该访视已在其他途径申请影像回退中,不允许申请
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]);
|
||||
}
|
||||
|
||||
var newRecord = new SubjectVisitImageBackRecord() { SubjectVisitId = subjectVisitId, SubmitTime = sv.SubmitTime, EarliestScanDate = sv.EarliestScanDate, LatestScanDate = sv.LatestScanDate };
|
||||
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator)
|
||||
{
|
||||
@@ -311,7 +333,14 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
if (isAgree)
|
||||
{
|
||||
|
||||
if (sv.SubmitState == SubmitStateEnum.Submitted && _subjectVisitRepository.Any(t => t.Id == backRecord.SubjectVisitId && !t.VisitTaskList.Any()))
|
||||
if (_subjectVisitRepository.Any(t => t.Id == subjectVisitId && t.QCChallengeList.Any(t => t.IsClosed == false)))
|
||||
{
|
||||
//有未关闭的质疑,不允许同意影像回退
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_HaveNotClosedQCChanllenge"]);
|
||||
}
|
||||
|
||||
|
||||
if (sv.SubmitState == SubmitStateEnum.Submitted && _subjectVisitRepository.Any(t => t.Id == backRecord.SubjectVisitId && !t.VisitTaskList.Any(u => u.TaskState == TaskState.Effect)))
|
||||
{
|
||||
backRecord.ImageBackState = ImageBackStateEnum.PMAgreeBack;
|
||||
|
||||
@@ -535,6 +564,20 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
return ResponseOutput.NotOk(_localizer["QCOperation_Cannotback"]);
|
||||
}
|
||||
|
||||
|
||||
if (await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).AnyAsync(t => t.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None)))
|
||||
{
|
||||
// 该访视已在其他途径申请影像回退中,不允许申请
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]);
|
||||
}
|
||||
|
||||
if (sv.RequestBackState == RequestBackStateEnum.CRC_RequestBack)
|
||||
{
|
||||
// 该访视已在其他途径申请影像回退中,不允许申请
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]);
|
||||
}
|
||||
|
||||
|
||||
var QCChallengeId = await _qcChallengeRepository.Where(x => x.SubjectVisitId == subjectVisitId).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
|
||||
await _checkChallengeDialogRepository.AddAsync(new CheckChallengeDialog()
|
||||
@@ -2297,6 +2340,19 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
var qcChallenge = (await _qcChallengeRepository.FirstOrDefaultAsync(t => t.Id == qcChallengeId)).IfNullThrowException();
|
||||
|
||||
var sv = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == qcChallenge.SubjectVisitId)).IfNullThrowException();
|
||||
|
||||
if (await _subjectVisitRepository.Where(t => t.Id == sv.Id).AnyAsync(t => t.SubjectVisitImageBackRecordList.Any(t => t.ImageBackState == ImageBackStateEnum.None)))
|
||||
{
|
||||
// 该访视已在其他途径申请影像回退中,不允许申请
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]);
|
||||
}
|
||||
|
||||
if (sv.RequestBackState == RequestBackStateEnum.CRC_RequestBack)
|
||||
{
|
||||
// 该访视已在其他途径申请影像回退中,不允许申请
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_SomeOneHaveApplyedImageBack"]);
|
||||
}
|
||||
|
||||
if (qcChallenge.ReuploadEnum != QCChanllengeReuploadEnum.None && qcChallenge.ReuploadEnum != QCChanllengeReuploadEnum.CRCReuploaded)
|
||||
{
|
||||
|
||||
@@ -528,6 +528,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count > 0)
|
||||
|| t.PreviousSurgeryList.Any()))
|
||||
.ForMember(d => d.DicomStudyCount, u => u.MapFrom(t => t.StudyList.Count()))
|
||||
.ForMember(d => d.IsImageBackApplying, u => u.MapFrom(t => t.SubjectVisitImageBackRecordList.Any(c => c.ImageBackState == ImageBackStateEnum.None)))
|
||||
.ForMember(d => d.NoneDicomStudyCount, u => u.MapFrom(t => t.NoneDicomStudyList.Count(t => t.NoneDicomFileList.Any())));
|
||||
|
||||
//CRC 上传列表
|
||||
@@ -744,10 +745,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.VisitNum, u => u.MapFrom(t => t.SubjectVisit.VisitNum))
|
||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.SubjectVisit.TrialSite.TrialSiteCode))
|
||||
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
|
||||
.ForMember(d => d.SubmitTime, u => u.MapFrom(s => s.SubjectVisit.SubmitTime))
|
||||
.ForMember(d => d.IsUrgent, u => u.MapFrom(s => s.SubjectVisit.IsUrgent))
|
||||
.ForMember(d => d.EarliestScanDate, u => u.MapFrom(s => s.SubjectVisit.EarliestScanDate))
|
||||
.ForMember(d => d.LatestScanDate, u => u.MapFrom(s => s.SubjectVisit.LatestScanDate))
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUserRole.UserName))
|
||||
.ForMember(d => d.CreateUserFullName, u => u.MapFrom(s => s.CreateUserRole.FullName));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user