签名确认
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user