Uat_Study
parent
005bbf8419
commit
0bf0299c31
|
@ -1772,11 +1772,12 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
|
||||
|
||||
[HttpGet("{trialId:guid}/{subjectVisitId:guid}")]
|
||||
public async Task<IResponseOutput> ForwardSVDicomImage(Guid subjectVisitId, [FromServices] DicomFileStoreHelper _dicomFileStoreHelper)
|
||||
[HttpPost("{trialId:guid}")]
|
||||
public async Task<IResponseOutput> ForwardSVDicomImage(Guid[] subjectVisitIdList, [FromServices] DicomFileStoreHelper _dicomFileStoreHelper)
|
||||
{
|
||||
|
||||
|
||||
foreach (var subjectVisitId in subjectVisitIdList)
|
||||
{
|
||||
var info = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).ProjectTo<DicomTrialSiteSubjectInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
var targetPath = "/IMPORT-IMAGES/" + info.TrialCode + "_" + info.SubjectCode + "_" + info.VisitName;
|
||||
|
@ -1840,16 +1841,14 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
catch (Exception e)
|
||||
{
|
||||
|
||||
|
||||
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
||||
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
await _subjectVisitRepository.UpdateFromQueryAsync(t => t.Id == subjectVisitId,
|
||||
u => new SubjectVisit() { ForwardState = ForwardStateEnum.Forwarded });
|
||||
}
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
|
||||
//现在需要签署的总数(项目待签署 +系统待签署)
|
||||
public int? WaitSignDocCount => TotalNeedSignTrialDocCount + TotalNeedSignSystemDocCount;
|
||||
public int? TotalNeedSignDocCount => TotalNeedSignTrialDocCount + TotalNeedSignSystemDocCount;
|
||||
}
|
||||
|
||||
public class TrialSiteSurveyStatQuery : PageInput
|
||||
|
|
|
@ -129,6 +129,10 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public string UserRealName => LastName + " / " + FirstName;
|
||||
|
||||
public string IsGenerateAccountStr => IsGenerateAccount ? "是" : "否";
|
||||
|
||||
public string StateStr => State.GetDescription();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -99,7 +99,15 @@ namespace IRaCIS.Core.Application
|
|||
[HttpPost]
|
||||
public async Task<PageOutput<DocSignStat>> GetTrialDocStatList(TrialSiteSurveyStatQuery query)
|
||||
{
|
||||
var trialDocStat = await _trialRepository.ProjectTo<DocSignStat>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, userTypeId = _userInfo.UserTypeId })
|
||||
if (_userInfo.IsAdmin)
|
||||
{
|
||||
return new PageOutput<DocSignStat>(query.PageIndex, query.PageSize, 0, new List<DocSignStat>());
|
||||
}
|
||||
else
|
||||
{
|
||||
var trialDocStat = await _trialRepository
|
||||
.WhereIf(!_userInfo.IsAdmin, c => c.TrialDocumentList.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id)).Count() > 0)
|
||||
.ProjectTo<DocSignStat>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, userTypeId = _userInfo.UserTypeId })
|
||||
.ToPagedListAsync(query.PageIndex, query.PageSize - 1, query.SortField, query.Asc);
|
||||
|
||||
|
||||
|
@ -122,6 +130,9 @@ namespace IRaCIS.Core.Application
|
|||
|
||||
trialDocStat.CurrentPageData = list;
|
||||
return trialDocStat;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -104,6 +104,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var exportInfo = data;
|
||||
|
||||
//处理翻译
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.TrialSiteUserSummary_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment);
|
||||
|
||||
|
|
|
@ -30,8 +30,35 @@ namespace IRaCIS.Core.Infrastructure.Extention
|
|||
}
|
||||
return dict;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 扩展方法,获得枚举的Description
|
||||
/// </summary>
|
||||
/// <param name="value">枚举值</param>
|
||||
/// <param name="nameInstead">当枚举值没有定义DescriptionAttribute,是否使用枚举名代替,默认是使用</param>
|
||||
/// <returns>枚举的Description</returns>
|
||||
public static string GetDescription(this Enum value, Boolean nameInstead = true)
|
||||
{
|
||||
Type type = value.GetType();
|
||||
string name = Enum.GetName(type, value);
|
||||
if (name == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
FieldInfo field = type.GetField(name);
|
||||
DescriptionAttribute attribute = System.Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) as DescriptionAttribute;
|
||||
|
||||
if (attribute == null && nameInstead == true)
|
||||
{
|
||||
return name;
|
||||
}
|
||||
return attribute?.Description;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue