LastName FirstName 修改为FullName 精简代码
This commit is contained in:
@@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Http;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using SharpCompress.Archives;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||
@@ -100,8 +99,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
[HttpDelete("{noneDicomStudyId:guid}/{trialId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteNoneDicomStudy(Guid noneDicomStudyId)
|
||||
{
|
||||
if (_noneDicomStudyRepository.Where(t => t.Id == noneDicomStudyId)
|
||||
.Any(t => t.NoneDicomFileList.Count() > 0))
|
||||
if (_noneDicomStudyRepository.Where(t => t.Id == noneDicomStudyId).SelectMany(t => t.NoneDicomFileList).Count() > 0)
|
||||
{
|
||||
return ResponseOutput.NotOk("先移除文件,才允许删除非Dicom");
|
||||
}
|
||||
@@ -127,12 +125,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
var success = await _noneDicomStudyFileRepository.BatchDeleteAsync(t => t.Id == noneDicomStudyFileId);
|
||||
|
||||
//如果既没有 dicom数据 也没有非dicom 文件 那么提交状态变更回去
|
||||
if (await _repository.CountAsync<DicomStudy>(t => t.SubjectVisitId == subjectVisitId) == 0 && await _repository.CountAsync<NoneDicomStudyFile>(t => t.NoneDicomStudy.SubjectVisitId == subjectVisitId) == 0)
|
||||
{
|
||||
await _repository.BatchUpdateAsync<SubjectVisit>(t => t.Id == subjectVisitId && t.SubmitState == SubmitStateEnum.ToSubmit, u => new SubjectVisit() { VisitExecuted = 0, SubmitState = SubmitStateEnum.None });
|
||||
}
|
||||
|
||||
|
||||
var subvisit = await _repository.GetQueryable<SubjectVisit>().FirstOrDefaultAsync(x => x.Id == subjectVisitId);
|
||||
|
||||
@@ -218,7 +210,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
/// <param name="formCollection"></param>
|
||||
/// <param name="subjectVisitId"></param>
|
||||
/// <param name="noneDicomStudyId"></param>
|
||||
/// <param name="_hostEnvironment"></param>
|
||||
/// <returns></returns>
|
||||
//[DisableRequestSizeLimit]
|
||||
[RequestSizeLimit(1_073_741_824)]
|
||||
@@ -287,7 +278,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
UploadStartTime = startTime,
|
||||
UploadFinishedTime = DateTime.Now,
|
||||
IP = _userInfo.IP,
|
||||
//TotalMillisecondsInterval = (DateTime.Now - startTime).TotalMilliseconds,
|
||||
TrialId = sv.TrialId,
|
||||
SiteId = sv.SiteId,
|
||||
SubjectId = sv.SubjectId,
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Infrastructure.ExpressionExtend;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace IRaCIS.Core.Application.Image.QA
|
||||
@@ -772,7 +770,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
return await _repository.Where<TrialUser>(t => t.TrialId == trialId && t.User.UserTypeEnum == UserTypeEnum.IQC).Select(t => new QCChanllengeCreatorDto()
|
||||
{
|
||||
CreatorRealName = t.User.LastName + " / " + t.User.FirstName,
|
||||
CreatorRealName = t.User.FullName,
|
||||
Creator = t.User.UserName,
|
||||
CreateUserId = t.UserId
|
||||
}).ToListAsync();
|
||||
@@ -789,7 +787,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
return await _repository.Where<TrialUser>(t => t.TrialId == trialId && (t.User.UserTypeEnum == UserTypeEnum.IQC || t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)).Select(t => new ParticipantDTO()
|
||||
{
|
||||
HandleUserRealName = t.User.LastName + " / " + t.User.FirstName,
|
||||
HandleUserRealName = t.User.FullName,
|
||||
HandleUser = t.User.UserName,
|
||||
HandleUserId = t.UserId
|
||||
}).ToListAsync();
|
||||
|
||||
Reference in New Issue
Block a user