签名确认

This commit is contained in:
he
2022-04-11 15:20:46 +08:00
parent 78c5af401a
commit be623e9b83
11 changed files with 92 additions and 24 deletions
@@ -36,7 +36,7 @@
</member>
<member name="T:IRaCIS.Core.Application.Service.CommonDocumentService">
<summary>
CommonDocumentService
系统模板文档配置表
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.FrontAuditConfigService">
@@ -166,6 +166,11 @@
标识
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionAddDTO.VisitStageId">
<summary>
访视计划ID
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.Inspection.DTO.InsBasicTrialConfig">
<summary>
配置 基础逻辑信息
@@ -503,7 +508,7 @@
</member>
<member name="T:IRaCIS.Core.Application.Contracts.EmailNoticeConfigService">
<summary>
EmailNoticeConfigService
系统邮件配置表
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Contracts.ISystemBasicDataService">
@@ -1117,12 +1122,19 @@
<summary> 指定资源Id,渲染Dicom序列的Jpeg预览图像 </summary>
<param name="seriesId"> Dicom序列的Id </param>
</member>
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.TrialSiteUserListExport(System.Guid,System.Boolean,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey})">
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.TrialSiteUserListExport(IRaCIS.Core.Application.Contracts.DTO.SiteCRCExportQueryDTO,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument})">
<summary>
Site用户列表导出
</summary>
<param name="trialId"></param>
<param name="isSiteUserNotAll">isAllSiteUser true site用户列表,false Site调研汇总表</param>
<param name="param"></param>
<param name="_commonDocumentRepository"></param>
<returns></returns>
<exception cref="T:System.Exception"></exception>
</member>
<member name="M:IRaCIS.Core.Application.Services.TrialMaintenanceService.TrialSiteUserSummaryListExport(System.Guid,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteSurvey},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserSurvey})">
<summary>
Site用户汇总表导出
</summary>
<param name="_commonDocumentRepository"></param>
<param name="_trialSiteSurveyRepository"></param>
<param name="_trialSiteUserSurveyRepository"></param>
@@ -1685,6 +1697,19 @@
<param name="searchArray"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.DictionaryService.GetBasicDataSelect(System.String)">
<summary>
根据父亲Code 获取单个下拉框数据
</summary>
<param name="searchKey"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.DictionaryService.GetBasicDataAllSelect">
<summary>
获取所有下拉框 枚举 bool 数据
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.FileService.CreateOfficialResumeZip(System.Int32,System.Guid[])">
<summary>
打包医生官方简历
@@ -2260,11 +2285,11 @@
<member name="M:IRaCIS.Application.Services.StatisticsService.GetLatestWorkLoadList(System.Int32)">
<summary> 最新工作量 (已确定的)[New] </summary>
</member>
<member name="M:IRaCIS.Application.Services.TrialMaintenanceService.TrialUserListExport(System.Guid,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument})">
<member name="M:IRaCIS.Application.Services.TrialMaintenanceService.TrialUserListExport(IRaCIS.Application.Contracts.TrialMaintenanceExportQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument})">
<summary>
项目参与人员导出
</summary>
<param name="trialId"></param>
<param name="param"></param>
<param name="_commonDocumentRepository"></param>
<returns></returns>
<exception cref="T:System.Exception"></exception>
@@ -91,8 +91,13 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
/// </summary>
public string Identification { get; set; } = string.Empty;
/// <summary>
/// 访视计划ID
/// </summary>
public Guid? VisitStageId { get; set; }
////需要单独处理
//public string IP { get; set; }
@@ -243,6 +248,8 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public string SignText { get; set; } = string.Empty;
//public string OptType { get; set; } = string.Empty;
}
@@ -81,6 +81,11 @@ namespace IRaCIS.Core.Application.Service.Inspection
join moduleTypec in _repository.GetQueryable<Dictionary>() on new { ModuleType = leftfrontAuditConfig.ModuleTypeId } equals new { ModuleType = moduleTypec.Id.ToString() } into moduleTypectemp
from leftmoduleTypec in moduleTypectemp.DefaultIfEmpty()
join OptTypec in _repository.GetQueryable<Dictionary>() on new { ModuleType = leftfrontAuditConfig.OptTypeId } equals new { ModuleType = OptTypec.Id.ToString() } into optTypetemp
from leftOptType in optTypetemp.DefaultIfEmpty()
select new GetDataInspectionOutDto()
{
CreateTime = data.CreateTime,
@@ -91,7 +96,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
SiteId = data.SiteId,
SubjectId = data.SubjectId,
SubjectVisitId = data.SubjectVisitId,
OptType = data.OptType,
//OptType = data.OptType,
IP = data.IP,
Reason = data.Reason,
IsSign = data.IsSign,
@@ -122,6 +127,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
ModuleTypeName= leftmoduleTypec.ValueCN,
SignText= lefttrialSign.SignText,
Identification= leftfrontAuditConfig.Identification,
OptType= leftOptType.ValueCN,
};
query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName)
@@ -181,15 +187,17 @@ namespace IRaCIS.Core.Application.Service.Inspection
}
// 用户 签名某个文档
if (bResult.IsSuccess == false)
{
return bResult;
}
// 判断是否需要前面
if (AuditInfo.IsSign)
{
var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
}
// 判断是否需要前面
await AddInspectionRecordAsync(AuditInfo, signId);
return bResult;
}
@@ -261,7 +269,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
await SetEnum(addDto);
var add = _mapper.Map<DataInspection>(addDto);
Guid? parentId = null;
parentId = (await _repository.GetQueryable<DataInspection>().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId&&x.ChildrenType==add.ChildrenType && x.ObjectType==add.ObjectType).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
parentId = (await _repository.GetQueryable<DataInspection>().Where( x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId&&x.ChildrenType==add.ChildrenType && x.ObjectType==add.ObjectType&&x.VisitStageId==add.VisitStageId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
add.ParentId = parentId;
add.CreateTime = DateTime.Now;
add.CreateUserId = _userInfo.Id;
@@ -302,7 +310,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
foreach (var add in datas)
{
add.ParentId = (await _repository.GetQueryable<DataInspection>().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.ChildrenType == add.ChildrenType && x.ObjectType == add.ObjectType).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
add.ParentId = (await _repository.GetQueryable<DataInspection>().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.ChildrenType == add.ChildrenType && x.ObjectType == add.ObjectType&&x.VisitStageId==add.VisitStageId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
add.CreateUserId = _userInfo.Id;
add.IP = _userInfo.IP;
await SetInspectionNameValue(add);
@@ -23,5 +23,7 @@ public class SignDTO
public Guid? SubjectVisitId { get; set; }
}
@@ -163,8 +163,8 @@ namespace IRaCIS.Core.Application.Contracts
[NotDefault]
public Guid TrialId { get; set; }
[NotDefault]
public Guid SignId { get; set; }
//[NotDefault]
//public Guid SignId { get; set; }
[NotDefault]
@@ -16,5 +16,8 @@ namespace IRaCIS.Application.Interfaces
Task<IResponseOutput> ConfigTrialUrgentInfo(TrialUrgentConfig trialConfig);
Task<IResponseOutput> TrialConfigSignatureConfirm(SignConfirmDTO signConfirmDTO);
}
}
@@ -138,9 +138,9 @@ namespace IRaCIS.Core.Application
await _trialRepository.UpdateFromQueryAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.Id, IsQCQuestionConfirmed = true });
}
var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == signConfirmDTO.SignId, u => new TrialSign() { IsCompleted = true });
return ResponseOutput.Result(signSuccess);
return ResponseOutput.Ok();
}
@@ -344,7 +344,7 @@ namespace IRaCIS.Application.Services
await _visitStageRepository.UpdateFromQueryAsync(u => u.TrialId == trialId, t => new VisitStage() { IsConfirmed = true });
var stat = new VisitPlanInfluenceStat() { TrialId = trialId };
List<DataInspection> datas = new List<DataInspection>();
foreach (var changedItem in changedList)
{
//找到该项目 访视已经执行,并且配置了有首次给药日期 并且更新后超窗的访视,要把超窗之前的值也要查询出来
@@ -457,7 +457,7 @@ namespace IRaCIS.Application.Services
}
List<DataInspection> datas = new List<DataInspection>();
var createtime = DateTime.Now.AddSeconds(1);
var list = await _subjectVisitRepository.Where(t => t.TrialId == trialId && t.VisitStageId == changedItem.Id).ToListAsync();
@@ -487,7 +487,7 @@ namespace IRaCIS.Application.Services
});
await _inspectionService.AddListInspectionRecordAsync(datas);
//变更某一访视计划Item 受试者访视相关字段
@@ -503,7 +503,7 @@ namespace IRaCIS.Application.Services
}
await _inspectionService.AddListInspectionRecordAsync(datas);
await _repository.AddAsync(stat);
await _repository.SaveChangesAsync();
return ResponseOutput.Ok();