修改一版
parent
ea625726ad
commit
60e2785131
|
@ -256,9 +256,23 @@ namespace IRaCIS.Core.API.Controllers
|
|||
return await _trialConfigService.UpdateTrialState(opt.Data.trialId, opt.Data.trialStatusStr, opt.Data.reason);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户 签名某个文档
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/TrialDocument/userConfirm")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> UserConfirm(DataInspectionDto<UserConfirmCommand> opt)
|
||||
{
|
||||
await _inspectionService.RecordSing(opt.SignInfo);
|
||||
return await _trialDocumentService.UserConfirm(opt.Data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -123,15 +123,6 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
|
||||
public bool isSystemDoc { get; set; }
|
||||
|
||||
|
||||
public string UserName { get; set; } = String.Empty;
|
||||
|
||||
public string PassWord { get; set; } = String.Empty;
|
||||
|
||||
public string SignText { get; set; } = String.Empty;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class DocumentTrialUnionQuery : TrialUserDocUnionQuery
|
||||
|
|
|
@ -526,15 +526,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
public async Task<IResponseOutput> UserConfirm(UserConfirmCommand userConfirmCommand)
|
||||
{
|
||||
|
||||
var user = await _repository.FirstOrDefaultAsync<User>(u => u.UserName == userConfirmCommand.UserName && u.Password == userConfirmCommand.PassWord);
|
||||
if (user == null)
|
||||
{
|
||||
return ResponseOutput.NotOk("password error");
|
||||
}
|
||||
else if (user.Status == UserStateEnum.Disable)
|
||||
{
|
||||
return ResponseOutput.NotOk("The user has been disabled!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (userConfirmCommand.isSystemDoc)
|
||||
|
|
|
@ -107,8 +107,14 @@ namespace IRaCIS.Application.Services
|
|||
return ResponseOutput.NotOk("This subject has executed a visit with uploading study images,and couldn't be deleted.");
|
||||
}
|
||||
|
||||
await _subjectRepository.SoftDeleteFromQueryAsync(u => u.Id == id);
|
||||
await _subjectVisitRepository.SoftDeleteFromQueryAsync(u => u.SubjectId == id);
|
||||
await _subjectRepository.UpdatePartialFromQueryAsync(id, x => new Subject
|
||||
{
|
||||
IsDeleted = true,
|
||||
});
|
||||
await _subjectVisitRepository.UpdatePartialFromQueryAsync(u => u.SubjectId == id, x => new SubjectVisit()
|
||||
{
|
||||
IsDeleted = true,
|
||||
});
|
||||
|
||||
var isSuccess = await _subjectRepository.SaveChangesAsync();
|
||||
|
||||
|
|
Loading…
Reference in New Issue