签名确认

Uat_Study
he 2022-04-11 15:20:46 +08:00
parent 78c5af401a
commit be623e9b83
11 changed files with 92 additions and 24 deletions

View File

@ -80,7 +80,7 @@ namespace IRaCIS.Core.API.Controllers
/// <summary> /// <summary>
/// 新增或添加访视计划 /// 新增或添加访视计划
/// </summary> /// </summary>
/// <param name="visitPlan"></param> /// <param name="opt"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost, Route("Inspection/VisitPlan/AddOrUpdateVisitStage")] [HttpPost, Route("Inspection/VisitPlan/AddOrUpdateVisitStage")]
[UnitOfWork] [UnitOfWork]
@ -239,7 +239,18 @@ namespace IRaCIS.Core.API.Controllers
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
} }
/// <summary>
/// 签名确认
/// </summary>
/// <param name="signConfirmDTO">签名确认</param>
/// <returns></returns>
[HttpPost, Route("Inspection/configTrialBasicInfo/TrialConfigSignatureConfirm")]
[UnitOfWork]
public async Task<IResponseOutput> TrialConfigSignatureConfirm(DataInspectionDto<SignConfirmDTO> opt)
{
var fun = _trialConfigService.TrialConfigSignatureConfirm;
return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun);
}
#endregion #endregion

View File

@ -62,7 +62,7 @@
<summary> <summary>
新增或添加访视计划 新增或添加访视计划
</summary> </summary>
<param name="visitPlan"></param> <param name="opt"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.DeleteVisitStage(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Contracts.IDDto})"> <member name="M:IRaCIS.Core.API.Controllers.InspectionController.DeleteVisitStage(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Contracts.IDDto})">
@ -107,6 +107,13 @@
<param name="opt"></param> <param name="opt"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.TrialConfigSignatureConfirm(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Contracts.SignConfirmDTO})">
<summary>
签名确认
</summary>
<param name="signConfirmDTO">签名确认</param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.AddOrUpdateSubject(IRaCIS.Core.Application.Service.Inspection.DTO.InsSubjectCommand)"> <member name="M:IRaCIS.Core.API.Controllers.InspectionController.AddOrUpdateSubject(IRaCIS.Core.Application.Service.Inspection.DTO.InsSubjectCommand)">
<summary> <summary>
添加或更新受试者信息[New] 添加或更新受试者信息[New]

View File

@ -36,7 +36,7 @@
</member> </member>
<member name="T:IRaCIS.Core.Application.Service.CommonDocumentService"> <member name="T:IRaCIS.Core.Application.Service.CommonDocumentService">
<summary> <summary>
CommonDocumentService 系统模板文档配置表
</summary> </summary>
</member> </member>
<member name="T:IRaCIS.Core.Application.Service.FrontAuditConfigService"> <member name="T:IRaCIS.Core.Application.Service.FrontAuditConfigService">
@ -166,6 +166,11 @@
标识 标识
</summary> </summary>
</member> </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"> <member name="T:IRaCIS.Core.Application.Service.Inspection.DTO.InsBasicTrialConfig">
<summary> <summary>
配置 基础逻辑信息 配置 基础逻辑信息
@ -503,7 +508,7 @@
</member> </member>
<member name="T:IRaCIS.Core.Application.Contracts.EmailNoticeConfigService"> <member name="T:IRaCIS.Core.Application.Contracts.EmailNoticeConfigService">
<summary> <summary>
EmailNoticeConfigService 系统邮件配置表
</summary> </summary>
</member> </member>
<member name="T:IRaCIS.Core.Application.Contracts.ISystemBasicDataService"> <member name="T:IRaCIS.Core.Application.Contracts.ISystemBasicDataService">
@ -1117,12 +1122,19 @@
<summary> 指定资源Id渲染Dicom序列的Jpeg预览图像 </summary> <summary> 指定资源Id渲染Dicom序列的Jpeg预览图像 </summary>
<param name="seriesId"> Dicom序列的Id </param> <param name="seriesId"> Dicom序列的Id </param>
</member> </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> <summary>
Site用户列表导出 Site用户列表导出
</summary> </summary>
<param name="trialId"></param> <param name="param"></param>
<param name="isSiteUserNotAll">isAllSiteUser true site用户列表false Site调研汇总表</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="_commonDocumentRepository"></param>
<param name="_trialSiteSurveyRepository"></param> <param name="_trialSiteSurveyRepository"></param>
<param name="_trialSiteUserSurveyRepository"></param> <param name="_trialSiteUserSurveyRepository"></param>
@ -1685,6 +1697,19 @@
<param name="searchArray"></param> <param name="searchArray"></param>
<returns></returns> <returns></returns>
</member> </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[])"> <member name="M:IRaCIS.Application.Services.FileService.CreateOfficialResumeZip(System.Int32,System.Guid[])">
<summary> <summary>
打包医生官方简历 打包医生官方简历
@ -2260,11 +2285,11 @@
<member name="M:IRaCIS.Application.Services.StatisticsService.GetLatestWorkLoadList(System.Int32)"> <member name="M:IRaCIS.Application.Services.StatisticsService.GetLatestWorkLoadList(System.Int32)">
<summary> 最新工作量 (已确定的)[New] </summary> <summary> 最新工作量 (已确定的)[New] </summary>
</member> </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>
项目参与人员导出 项目参与人员导出
</summary> </summary>
<param name="trialId"></param> <param name="param"></param>
<param name="_commonDocumentRepository"></param> <param name="_commonDocumentRepository"></param>
<returns></returns> <returns></returns>
<exception cref="T:System.Exception"></exception> <exception cref="T:System.Exception"></exception>

View File

@ -91,8 +91,13 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
/// </summary> /// </summary>
public string Identification { get; set; } = string.Empty; public string Identification { get; set; } = string.Empty;
/// <summary>
/// 访视计划ID
/// </summary>
public Guid? VisitStageId { get; set; }
////需要单独处理 ////需要单独处理
//public string IP { 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 SignText { get; set; } = string.Empty;
//public string OptType { get; set; } = string.Empty;
} }

View File

@ -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 join moduleTypec in _repository.GetQueryable<Dictionary>() on new { ModuleType = leftfrontAuditConfig.ModuleTypeId } equals new { ModuleType = moduleTypec.Id.ToString() } into moduleTypectemp
from leftmoduleTypec in moduleTypectemp.DefaultIfEmpty() 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() select new GetDataInspectionOutDto()
{ {
CreateTime = data.CreateTime, CreateTime = data.CreateTime,
@ -91,7 +96,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
SiteId = data.SiteId, SiteId = data.SiteId,
SubjectId = data.SubjectId, SubjectId = data.SubjectId,
SubjectVisitId = data.SubjectVisitId, SubjectVisitId = data.SubjectVisitId,
OptType = data.OptType, //OptType = data.OptType,
IP = data.IP, IP = data.IP,
Reason = data.Reason, Reason = data.Reason,
IsSign = data.IsSign, IsSign = data.IsSign,
@ -122,6 +127,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
ModuleTypeName= leftmoduleTypec.ValueCN, ModuleTypeName= leftmoduleTypec.ValueCN,
SignText= lefttrialSign.SignText, SignText= lefttrialSign.SignText,
Identification= leftfrontAuditConfig.Identification, Identification= leftfrontAuditConfig.Identification,
OptType= leftOptType.ValueCN,
}; };
query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName) 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) if (bResult.IsSuccess == false)
{ {
return bResult; return bResult;
} }
// 判断是否需要前面 if (AuditInfo.IsSign)
{
var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
}
// 判断是否需要前面
await AddInspectionRecordAsync(AuditInfo, signId); await AddInspectionRecordAsync(AuditInfo, signId);
return bResult; return bResult;
} }
@ -261,7 +269,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
await SetEnum(addDto); await SetEnum(addDto);
var add = _mapper.Map<DataInspection>(addDto); var add = _mapper.Map<DataInspection>(addDto);
Guid? parentId = null; 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.ParentId = parentId;
add.CreateTime = DateTime.Now; add.CreateTime = DateTime.Now;
add.CreateUserId = _userInfo.Id; add.CreateUserId = _userInfo.Id;
@ -302,7 +310,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
foreach (var add in datas) 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.CreateUserId = _userInfo.Id;
add.IP = _userInfo.IP; add.IP = _userInfo.IP;
await SetInspectionNameValue(add); await SetInspectionNameValue(add);

View File

@ -23,5 +23,7 @@ public class SignDTO
public Guid? SubjectVisitId { get; set; } public Guid? SubjectVisitId { get; set; }
} }

View File

@ -163,8 +163,8 @@ namespace IRaCIS.Core.Application.Contracts
[NotDefault] [NotDefault]
public Guid TrialId { get; set; } public Guid TrialId { get; set; }
[NotDefault] //[NotDefault]
public Guid SignId { get; set; } //public Guid SignId { get; set; }
[NotDefault] [NotDefault]

View File

@ -16,5 +16,8 @@ namespace IRaCIS.Application.Interfaces
Task<IResponseOutput> ConfigTrialUrgentInfo(TrialUrgentConfig trialConfig); Task<IResponseOutput> ConfigTrialUrgentInfo(TrialUrgentConfig trialConfig);
Task<IResponseOutput> TrialConfigSignatureConfirm(SignConfirmDTO signConfirmDTO);
} }
} }

View File

@ -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 }); 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();
} }

View File

@ -344,7 +344,7 @@ namespace IRaCIS.Application.Services
await _visitStageRepository.UpdateFromQueryAsync(u => u.TrialId == trialId, t => new VisitStage() { IsConfirmed = true }); await _visitStageRepository.UpdateFromQueryAsync(u => u.TrialId == trialId, t => new VisitStage() { IsConfirmed = true });
var stat = new VisitPlanInfluenceStat() { TrialId = trialId }; var stat = new VisitPlanInfluenceStat() { TrialId = trialId };
List<DataInspection> datas = new List<DataInspection>();
foreach (var changedItem in changedList) 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 createtime = DateTime.Now.AddSeconds(1);
var list = await _subjectVisitRepository.Where(t => t.TrialId == trialId && t.VisitStageId == changedItem.Id).ToListAsync(); 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 受试者访视相关字段 //变更某一访视计划Item 受试者访视相关字段
@ -503,7 +503,7 @@ namespace IRaCIS.Application.Services
} }
await _inspectionService.AddListInspectionRecordAsync(datas);
await _repository.AddAsync(stat); await _repository.AddAsync(stat);
await _repository.SaveChangesAsync(); await _repository.SaveChangesAsync();
return ResponseOutput.Ok(); return ResponseOutput.Ok();

View File

@ -149,6 +149,11 @@ namespace IRaCIS.Core.Domain.Models
/// </summary> /// </summary>
public string Identification { get; set; } public string Identification { get; set; }
/// <summary>
/// 访视计划ID
/// </summary>
public Guid? VisitStageId { get; set; }
} }