From fa5ca11a184736ca7c555111f41b3bdf7518445c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 22 Sep 2022 11:05:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Common/DictionaryService.cs | 8 ++++---- .../Service/Document/TrialDocumentService.cs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs index 9ce5152f0..908bc33a4 100644 --- a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs +++ b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs @@ -119,10 +119,10 @@ namespace IRaCIS.Application.Services //} - //if (addOrEditBasic.Id != null ) - //{ - // await _dicRepository.BatchUpdateNoTrackingAsync(t => t.ParentId == addOrEditBasic.Id, c => new Dictionary() { DataTypeEnum = addOrEditBasic.DataTypeEnum }); - //} + if (addOrEditBasic.Id != null && addOrEditBasic.ParentId!=null) + { + await _dicRepository.UpdatePartialFromQueryAsync(t => t.ParentId == addOrEditBasic.Id, c => new Dictionary() { DataTypeEnum = addOrEditBasic.DataTypeEnum }); + } var entity = await _dicRepository.InsertOrUpdateAsync(addOrEditBasic, true, verifyExp1); diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index ac04609bb..87c76b3b0 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -502,7 +502,7 @@ namespace IRaCIS.Core.Application.Services success = await _repository.SaveChangesAsync(); - return ResponseOutput.Result(success); + return ResponseOutput.Ok(success); } [HttpPut("{documentId:guid}")] @@ -543,7 +543,7 @@ namespace IRaCIS.Core.Application.Services if (userConfirmCommand.isSystemDoc) { - if (await _repository.AnyAsync(t => t.SystemDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.Id)) + if (await _repository.AnyAsync(t => t.SystemDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)) { return ResponseOutput.NotOk("该文件已经签名"); } @@ -558,7 +558,7 @@ namespace IRaCIS.Core.Application.Services } else { - if (await _repository.AnyAsync(t => t.TrialDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.Id)) + if (await _repository.AnyAsync(t => t.TrialDocumentId == userConfirmCommand.DocumentId && t.ConfirmUserId == _userInfo.Id && t.ConfirmTime !=null)) { return ResponseOutput.NotOk("该文件已经签名"); }