Test.EIImageViewer
parent
cae80eeeba
commit
0655d5bdb0
Binary file not shown.
|
@ -205,7 +205,7 @@
|
||||||
"ReadingImage_Idnotcorrespond": "Failed to add lesion mark. the instanceId and SeriesId of the image did not match.",
|
"ReadingImage_Idnotcorrespond": "Failed to add lesion mark. the instanceId and SeriesId of the image did not match.",
|
||||||
"ReadingImage_Twice": "Incorrect system calls, duplicate submitted questions and answers.",
|
"ReadingImage_Twice": "Incorrect system calls, duplicate submitted questions and answers.",
|
||||||
"ReadingImage_MaxQuestion": "According to Charter, the number of current lesion does not exceed {0}.",
|
"ReadingImage_MaxQuestion": "According to Charter, the number of current lesion does not exceed {0}.",
|
||||||
"ReadingImage_Maxlesion": "According to Charter, the number of target lesion of same organ does not exceed . Please confirm.",
|
"ReadingImage_Maxlesion": "According to Charter, the number of target lesion of same organ does not exceed {0} . Please confirm.",
|
||||||
"ReadingImage_Maximum": "The number of repeats of \"{0}\" is limited to {1} and it has been repeated {2} times at present.",
|
"ReadingImage_Maximum": "The number of repeats of \"{0}\" is limited to {1} and it has been repeated {2} times at present.",
|
||||||
"ReadingImage_RequiredQuestion": "\"{0}\" is a required field, and the current input is empty or not saved.",
|
"ReadingImage_RequiredQuestion": "\"{0}\" is a required field, and the current input is empty or not saved.",
|
||||||
"ReadingImage_ClinicalRead": "The clinical data has not been read, please confirm!",
|
"ReadingImage_ClinicalRead": "The clinical data has not been read, please confirm!",
|
||||||
|
@ -231,7 +231,11 @@
|
||||||
"MedicalReview_NotClosed": "The current operation cannot be performed, and the current medical inquiry conversation has not been closed.",
|
"MedicalReview_NotClosed": "The current operation cannot be performed, and the current medical inquiry conversation has not been closed.",
|
||||||
"MedicalReview_Finish": "The current medical review task has been completed",
|
"MedicalReview_Finish": "The current medical review task has been completed",
|
||||||
//UserService
|
//UserService
|
||||||
"User_CheckNameOrPw": "Please check the username or password."
|
"User_CheckNameOrPw": "Please check the username or password.",
|
||||||
|
//Repository
|
||||||
|
"Repository_UpdateError": "Update object not exist in db,Please check if the parameter Id is passed incorrectly.",
|
||||||
|
"Repository_DeleteError": "Delete object not exist in db,Please check if the parameter Id is passed incorrectly"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -232,11 +232,15 @@
|
||||||
"MedicalReview_NotClosed": "无法执行当前操作,当前医学质询对话未关闭。",
|
"MedicalReview_NotClosed": "无法执行当前操作,当前医学质询对话未关闭。",
|
||||||
"MedicalReview_Finish": "当前医学审核已做完。",
|
"MedicalReview_Finish": "当前医学审核已做完。",
|
||||||
//UserService
|
//UserService
|
||||||
"User_CheckNameOrPw": "请检查用户名或者密码。"
|
"User_CheckNameOrPw": "请检查用户名或者密码。",
|
||||||
|
//Repository
|
||||||
|
"Repository_UpdateError": "修改的数据在数据库不存在。",
|
||||||
|
"Repository_DeleteError": "删除的数据在数据库不存在。"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1284,12 +1284,27 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var tableQuestions = await _readingTableQuestionTrialRepository.Where(x => tableQuestionIds.Contains(x.Id) && x.MaxRowCount != null && x.MaxRowCount != 0).ToListAsync();
|
var tableQuestions = await _readingTableQuestionTrialRepository.Where(x => tableQuestionIds.Contains(x.Id) && x.MaxRowCount != null && x.MaxRowCount != 0).ToListAsync();
|
||||||
|
|
||||||
|
List<QuestionMark?> questionMarks = new List<QuestionMark?>()
|
||||||
|
{
|
||||||
|
QuestionMark.Part,
|
||||||
|
QuestionMark.Organ,
|
||||||
|
|
||||||
|
};
|
||||||
foreach (var item in tableQuestions)
|
foreach (var item in tableQuestions)
|
||||||
{
|
{
|
||||||
var answer = inDto.AnswerList.Where(x => x.TableQuestionId == item.Id).Select(x => x.Answer).FirstOrDefault();
|
var answer = inDto.AnswerList.Where(x => x.TableQuestionId == item.Id).Select(x => x.Answer).FirstOrDefault();
|
||||||
if (!answer.IsNullOrEmpty())
|
if (!answer.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
var rowCount = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.TableQuestionId == item.Id && ((x.RowIndex % 1) == 0) && x.Answer == answer && x.RowIndex != inDto.RowIndex).CountAsync();
|
var rowCount = 0;
|
||||||
|
if (questionMarks.Contains(item.QuestionMark))
|
||||||
|
{
|
||||||
|
rowCount = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId && ((x.RowIndex % 1) == 0) && x.OrganInfoId == inDto.OrganInfoId && x.OrganInfoId != null && x.RowIndex != inDto.RowIndex).CountAsync();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rowCount = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.TableQuestionId == item.Id && ((x.RowIndex % 1) == 0) && x.Answer == answer && x.RowIndex != inDto.RowIndex).CountAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (rowCount > item.MaxRowCount.Value - 1)
|
if (rowCount > item.MaxRowCount.Value - 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
<PackageReference Include="EntityFrameworkCore.Triggered" Version="3.2.1" />
|
<PackageReference Include="EntityFrameworkCore.Triggered" Version="3.2.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ using System.Linq.Expressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using EFCore.BulkExtensions;
|
using EFCore.BulkExtensions;
|
||||||
|
using Microsoft.Extensions.Localization;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Infra.EFCore
|
namespace IRaCIS.Core.Infra.EFCore
|
||||||
{
|
{
|
||||||
|
@ -85,8 +86,11 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
public IUserInfo _userInfo { get; set; }
|
public IUserInfo _userInfo { get; set; }
|
||||||
|
|
||||||
public Repository(IRaCISDBContext dbContext, IMapper mapper, IUserInfo userInfo)
|
public IStringLocalizer _localizer { get; set; }
|
||||||
|
|
||||||
|
public Repository(IRaCISDBContext dbContext, IMapper mapper, IUserInfo userInfo, IStringLocalizer localizer)
|
||||||
{
|
{
|
||||||
|
_localizer = localizer;
|
||||||
_dbContext = dbContext;
|
_dbContext = dbContext;
|
||||||
_mapper = mapper;
|
_mapper = mapper;
|
||||||
_userInfo = userInfo;
|
_userInfo = userInfo;
|
||||||
|
@ -173,8 +177,8 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
if (dbEntity == null)
|
if (dbEntity == null)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(
|
|
||||||
" Update object not exist in db,Please check if the parameter Id is passed incorrectly");
|
throw new BusinessValidationFailedException(_localizer["Repository_UpdateError"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var dbBeforEntity = dbEntity.Clone();
|
var dbBeforEntity = dbEntity.Clone();
|
||||||
|
|
|
@ -14,6 +14,8 @@ using EFCore.BulkExtensions;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
|
using Microsoft.Extensions.Localization;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Infra.EFCore
|
namespace IRaCIS.Core.Infra.EFCore
|
||||||
{
|
{
|
||||||
public interface IRepository<TEntity> : ICommandRepository<TEntity>, IQueryRepository<TEntity> where TEntity : Entity
|
public interface IRepository<TEntity> : ICommandRepository<TEntity>, IQueryRepository<TEntity> where TEntity : Entity
|
||||||
|
@ -30,12 +32,15 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
public IMapper _mapper { get; set; }
|
public IMapper _mapper { get; set; }
|
||||||
public IRaCISDBContext _dbContext { get; set; }
|
public IRaCISDBContext _dbContext { get; set; }
|
||||||
|
|
||||||
|
public IStringLocalizer _localizer { get; set; }
|
||||||
|
|
||||||
public DbSet<TEntity> _dbSet => _dbContext.Set<TEntity>();
|
public DbSet<TEntity> _dbSet => _dbContext.Set<TEntity>();
|
||||||
|
|
||||||
public IUserInfo _userInfo { get; set; }
|
public IUserInfo _userInfo { get; set; }
|
||||||
|
|
||||||
public Repository(IRaCISDBContext dbContext, IMapper mapper, IUserInfo userInfo)
|
public Repository(IRaCISDBContext dbContext, IMapper mapper, IUserInfo userInfo, IStringLocalizer localizer)
|
||||||
{
|
{
|
||||||
|
_localizer = localizer;
|
||||||
_dbContext = dbContext;
|
_dbContext = dbContext;
|
||||||
_mapper = mapper;
|
_mapper = mapper;
|
||||||
_userInfo = userInfo;
|
_userInfo = userInfo;
|
||||||
|
@ -103,8 +108,8 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
if (dbEntity == null)
|
if (dbEntity == null)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(
|
|
||||||
" Update object not exist in db,Please check if the parameter Id is passed incorrectly");
|
throw new BusinessValidationFailedException(_localizer["Repository_UpdateError"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var dbBeforEntity = dbEntity.Clone();
|
var dbBeforEntity = dbEntity.Clone();
|
||||||
|
@ -208,8 +213,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
if (searchEntity == null)
|
if (searchEntity == null)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(
|
throw new BusinessValidationFailedException(_localizer["Repository_UpdateError"]);
|
||||||
" Update object not exist in db,Please check if the parameter Id is passed incorrectly");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_dbContext.EntityModifyPartialFiled(searchEntity, updateFactory);
|
_dbContext.EntityModifyPartialFiled(searchEntity, updateFactory);
|
||||||
|
@ -261,8 +265,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
if (waitDelete == null)
|
if (waitDelete == null)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(
|
throw new BusinessValidationFailedException(_localizer["Repository_DeleteError"]);
|
||||||
" Delete object not exist in db,Please check if the parameter Id is passed incorrectly");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await DeleteAsync(waitDelete, autoSave);
|
await DeleteAsync(waitDelete, autoSave);
|
||||||
|
|
Loading…
Reference in New Issue