修改一版

Uat_Study
he 2022-05-27 15:10:47 +08:00
parent 18da53338d
commit ebe9b1216f
6 changed files with 64 additions and 22 deletions

View File

@ -111,8 +111,9 @@ namespace IRaCIS.Core.API.Controllers
{
opt.Data.IsTrialBasicLogicConfirmed = true;
var singid= await _inspectionService.RecordSing(opt.SignInfo);
var result = await _trialConfigService.ConfigTrialBasicInfo(opt.Data);
await _inspectionService.RecordSing(opt.SignInfo, result);
await _inspectionService.CompletedSign(singid, result);
return result;
@ -127,8 +128,9 @@ namespace IRaCIS.Core.API.Controllers
[UnitOfWork]
public async Task<IResponseOutput> TrialConfigSignatureConfirm(DataInspectionDto<SignConfirmDTO> opt)
{
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result = await _trialConfigService.TrialConfigSignatureConfirm(opt.Data);
await _inspectionService.RecordSing(opt.SignInfo, result);
await _inspectionService.CompletedSign(singid, result);
return result;
}
@ -146,8 +148,10 @@ namespace IRaCIS.Core.API.Controllers
public async Task<IResponseOutput> ConfigTrialProcessInfoConfirm(DataInspectionDto<TrialProcessConfig> opt)
{
opt.Data.IsTrialProcessConfirmed = true;
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result = await _trialConfigService.ConfigTrialProcessInfo(opt.Data);
await _inspectionService.RecordSing(opt.SignInfo,result);
await _inspectionService.CompletedSign(singid, result);
return result;
}
@ -165,8 +169,9 @@ namespace IRaCIS.Core.API.Controllers
public async Task<IResponseOutput> ConfigTrialUrgentInfoConfirm(DataInspectionDto<TrialUrgentConfig> opt)
{
opt.Data.IsTrialUrgentConfirmed = true;
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result= await _trialConfigService.ConfigTrialUrgentInfo(opt.Data);
await _inspectionService.RecordSing(opt.SignInfo, result);
await _inspectionService.CompletedSign(singid, result);
return result;
}
@ -180,8 +185,9 @@ namespace IRaCIS.Core.API.Controllers
[UnitOfWork]
public async Task<IResponseOutput> CRCRequestToQC(DataInspectionDto<CRCRequestToQCCommand> opt)
{
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result = await _qCOperationService.CRCRequestToQC(opt.Data);
await _inspectionService.RecordSing(opt.SignInfo, result);
await _inspectionService.CompletedSign(singid, result);
return result;
}
@ -193,8 +199,9 @@ namespace IRaCIS.Core.API.Controllers
[UnitOfWork]
public async Task<IResponseOutput> QCPassedOrFailed(DataInspectionDto<QCPassedOrFailedDto> opt)
{
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result= await _qCOperationService.QCPassedOrFailed(opt.Data.trialId, opt.Data.subjectVisitId, opt.Data.auditState);
await _inspectionService.RecordSing(opt.SignInfo, result);
await _inspectionService.CompletedSign(singid, result);
return result;
}
@ -205,8 +212,9 @@ namespace IRaCIS.Core.API.Controllers
[UnitOfWork]
public async Task<IResponseOutput> CheckBack(DataInspectionDto<IDDto> opt)
{
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result = await _qCOperationService.CheckBack(opt.Data.Id);
await _inspectionService.RecordSing(opt.SignInfo, result);
await _inspectionService.CompletedSign(singid, result);
return result;
}
@ -221,9 +229,10 @@ namespace IRaCIS.Core.API.Controllers
[UnitOfWork]
public async Task<IResponseOutput> SetReuploadFinished(DataInspectionDto<CRCReuploadFinishedCommand> opt)
{
var result = await _qCOperationService.SetReuploadFinished(opt.Data);
await _inspectionService.RecordSing(opt.SignInfo, result);
return result;
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result = await _qCOperationService.SetReuploadFinished(opt.Data);
await _inspectionService.CompletedSign(singid, result);
return result;
}
/// <summary>
@ -235,8 +244,9 @@ namespace IRaCIS.Core.API.Controllers
[UnitOfWork]
public async Task<IResponseOutput> UpdateTrialState(DataInspectionDto<UpdateTrialStateDto> opt)
{
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result = await _trialConfigService.UpdateTrialState(opt.Data.trialId, opt.Data.trialStatusStr, opt.Data.reason);
await _inspectionService.RecordSing(opt.SignInfo, result);
await _inspectionService.CompletedSign(singid, result);
return result;
}
@ -249,8 +259,9 @@ namespace IRaCIS.Core.API.Controllers
[UnitOfWork]
public async Task<IResponseOutput> UserConfirm(DataInspectionDto<UserConfirmCommand> opt)
{
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result = await _trialDocumentService.UserConfirm(opt.Data);
await _inspectionService.RecordSing(opt.SignInfo, result);
await _inspectionService.CompletedSign(singid, result);
return result;
}
}

View File

@ -331,7 +331,7 @@
批次Id
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.Inspection.InspectionService.RecordSing(IRaCIS.Core.Application.Contracts.SignDTO,IRaCIS.Core.Infrastructure.Extention.IResponseOutput)">
<member name="M:IRaCIS.Core.Application.Service.Inspection.InspectionService.RecordSing(IRaCIS.Core.Application.Contracts.SignDTO)">
<summary>
传入参数记录ID
</summary>
@ -339,6 +339,14 @@
<param name="response"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Inspection.InspectionService.CompletedSign(System.Guid,IRaCIS.Core.Infrastructure.Extention.IResponseOutput)">
<summary>
完成签名
</summary>
<param name="signId"></param>
<param name="response"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Inspection.InspectionService.VerifySignatureAsync(IRaCIS.Core.Application.Contracts.SignDTO)">
<summary> 验证用户签名信息 </summary> ///
</member>

View File

@ -167,18 +167,36 @@ namespace IRaCIS.Core.Application.Service.Inspection
/// <param name="SignInfo"></param>
/// <param name="response"></param>
/// <returns></returns>
public async Task RecordSing(SignDTO SignInfo, IResponseOutput response)
public async Task<Guid> RecordSing(SignDTO SignInfo)
{
if (SignInfo != null&&response.IsSuccess)
if (SignInfo != null)
{
var verifyResult = await VerifySignatureAsync(SignInfo);
var signId = await AddSignRecordAsync(SignInfo);
_userInfo.SignId = signId;
await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
return signId;
}
else
{
return default(Guid);
}
}
/// <summary>
/// 完成签名
/// </summary>
/// <param name="signId"></param>
/// <param name="response"></param>
/// <returns></returns>
public async Task CompletedSign(Guid signId, IResponseOutput response)
{
if (response.IsSuccess)
{
await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
}
}
/// <summary> 验证用户签名信息 </summary> ///

View File

@ -17,9 +17,12 @@ namespace IRaCIS.Core.Application.Service.Inspection.Interface
Task<Guid> AddSignRecordAsync(SignDTO signDTO);
Task RecordSing(SignDTO SignInfo, IResponseOutput response);
Task<Guid> RecordSing(SignDTO SignInfo);
Task CompletedSign(Guid signId, IResponseOutput response);
}
}

View File

@ -4,4 +4,4 @@ update DataInspection set BatchId=Id where BatchId is null
update QCChallenge set Code=ChallengeCode
update QCChallenge set ChallengeCode='D'+ RIGHT('00000'+CAST( Code AS nvarchar(50)),5);
update QCChallenge set ChallengeCode='Q'+ RIGHT('00000'+CAST( Code AS nvarchar(50)),5);

View File

@ -164,7 +164,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}, new
{
TrialDicList = string.Join(",", trials)
});
}, item.OriginalValues);
}
// 访视计划
@ -899,7 +899,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
type = type + (entity.ParentId == null ? "/parent" : string.Empty);
break;
case nameof(Trial):
var oldentity = originaldata as Trial;
entity = entityobj as Trial;
Guid id = entity.Id;
Trial oldentity =await _dbContext.Trial.Where(x=>x.Id==id).FirstOrDefaultAsync();
switch (_userInfo.RequestUrl.ToLower())
{
case "configtrialbasicinfo/configtrialbasicinfoconfirm":