From 60e278513199612d5f87f66486e7b002152e7060 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Tue, 10 May 2022 11:15:35 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/InspectionController.cs | 18 ++++++++++++++++--
.../Document/DTO/SystemDocumentViewModel.cs | 9 ---------
.../Service/Document/TrialDocumentService.cs | 10 +---------
.../Service/Visit/SubjectService.cs | 10 ++++++++--
4 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs
index 1c81b230a..4e362bbec 100644
--- a/IRaCIS.Core.API/Controllers/InspectionController.cs
+++ b/IRaCIS.Core.API/Controllers/InspectionController.cs
@@ -256,9 +256,23 @@ namespace IRaCIS.Core.API.Controllers
return await _trialConfigService.UpdateTrialState(opt.Data.trialId, opt.Data.trialStatusStr, opt.Data.reason);
}
-
-
+ ///
+ /// 用户 签名某个文档
+ ///
+ ///
+ [HttpPost, Route("Inspection/TrialDocument/userConfirm")]
+ [UnitOfWork]
+ public async Task UserConfirm(DataInspectionDto opt)
+ {
+ await _inspectionService.RecordSing(opt.SignInfo);
+ return await _trialDocumentService.UserConfirm(opt.Data);
+ }
+
+
+
+
+
diff --git a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs
index 305ea5e7d..2aaec363a 100644
--- a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs
@@ -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
diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs
index 0ec098e5b..e66d464e8 100644
--- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs
+++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs
@@ -526,15 +526,7 @@ namespace IRaCIS.Core.Application.Services
public async Task UserConfirm(UserConfirmCommand userConfirmCommand)
{
- var user = await _repository.FirstOrDefaultAsync(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)
diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs
index 7c63bbc5f..d8db7c9a8 100644
--- a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs
+++ b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs
@@ -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();