From 0b9cf600ba4e3ece8a4cacdbda5bcedb49d9b2b0 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 30 Aug 2023 16:34:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=20=E7=9C=8B=E5=86=85=E5=AD=98?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Document/EmailSendService.cs | 2 +- .../SiteSurvey/TrialSiteSurveyService.cs | 2 +- IRaCIS.Core.Application/TestService.cs | 35 ++++++++++++------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs index e3569f5e9..47242c497 100644 --- a/IRaCIS.Core.Application/Service/Document/EmailSendService.cs +++ b/IRaCIS.Core.Application/Service/Document/EmailSendService.cs @@ -120,7 +120,7 @@ namespace IRaCIS.Core.Application.Service /// public async Task SendTrialImageQCTaskEmailAsync(Guid trialId) { - var trialInfo = _repository.Where(t => t.Id == trialId).Select(t => new { t.ResearchProgramNo, t.ExperimentName, t.TrialCode, t.TrialStatusStr }).FirstOrDefault(); + var trialInfo = _repository.Where(t => t.Id == trialId).Select(t => new { t.ResearchProgramNo, t.ExperimentName, t.TrialCode, t.TrialStatusStr }).FirstNotNullAsync(); //找到 该项目的IQC 用户Id var userList = await _repository.Where(t => t.TrialId == trialId).Where(t => t.User.UserTypeEnum == UserTypeEnum.IQC).Select(t => new { t.UserId, t.User.FullName }).ToListAsync(); diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index 20b6138a6..eeb90d390 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -260,7 +260,7 @@ namespace IRaCIS.Core.Application.Contracts var currentLatest = dbEntityList.OrderByDescending(t => t.CreateTime).FirstOrDefault(); - if (currentLatest.Email != userInfo.EmailOrPhone) + if (currentLatest!.Email != userInfo.EmailOrPhone) { //---该中心下已经有其他用户已填写的调研表,您不被允许继续填写 return ResponseOutput.NotOk(_localizer["TrialSiteSurvey_AlreadyFilledByOtherUsers"]); diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index fb175609a..aea881b0c 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -46,25 +46,34 @@ namespace IRaCIS.Application.Services } - - [AllowAnonymous] - public async Task InternationazitionInit() + public async Task GetMemoryStoreData() { - var rows = await MiniExcel.QueryAsync(@"C:\Users\Administrator\Desktop\Export\vue.xlsx"); + - foreach (var row in rows) - { - await _repository.InsertOrUpdateAsync(row); - - } - - await _repository.SaveChangesAsync(); - - return ResponseOutput.Ok(); + return ResponseOutput.Ok(new { StaticData.En_US_Dic , StaticData.Zh_CN_Dic }); } + + + //[AllowAnonymous] + //public async Task InternationazitionInit() + //{ + + + // var rows = await MiniExcel.QueryAsync(@"C:\Users\Administrator\Desktop\Export\vue.xlsx"); + + // foreach (var row in rows) + // { + // await _repository.InsertOrUpdateAsync(row); + + // } + + // await _repository.SaveChangesAsync(); + + // return ResponseOutput.Ok(); + //} [AllowAnonymous] [UnitOfWork] public async Task Get()