From 1bd70131cea514d1f834b82fa5cc9a5535fe0cb6 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 2 Jun 2022 15:54:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1bug=20=20=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E8=B7=9F=E8=B8=AA=20=E6=9A=82=E6=97=B6=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/UploadDownLoadController.cs | 10 ++++------ .../Service/SiteSurvey/TrialSiteSurveyService.cs | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs index 4de64a847..c6415aea9 100644 --- a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs +++ b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs @@ -701,7 +701,6 @@ namespace IRaCIS.Core.API.Controllers #region 医生文件上传下载 /// 医生文件上传下载 - [Route("file")] [ApiExplorerSettings(GroupName = "Common")] [ApiController] public class FileController : UploadBaseController @@ -731,7 +730,7 @@ namespace IRaCIS.Core.API.Controllers /// 附件类型 /// 医生Id /// 返回文件信息 - [HttpPost, Route("UploadFile/{attachmentType}/{doctorId}")] + [HttpPost, Route("file/UploadFile/{attachmentType}/{doctorId}")] [DisableFormValueModelBinding] [DisableRequestSizeLimit] public async Task UploadOrdinaryFile(string attachmentType, Guid doctorId) @@ -764,7 +763,7 @@ namespace IRaCIS.Core.API.Controllers /// /// - [HttpPost, Route("downloadDoctorAttachments")] + [HttpPost, Route("file/downloadDoctorAttachments")] public async Task> DownloadAttachment(Guid[] doctorIds) { @@ -784,7 +783,7 @@ namespace IRaCIS.Core.API.Controllers /// /// /// - [HttpPost, Route("downloadOfficialCV/{language}")] + [HttpPost, Route("file/downloadOfficialCV/{language}")] public async Task> DownloadOfficialResume(int language, Guid[] doctorIds) { @@ -802,7 +801,7 @@ namespace IRaCIS.Core.API.Controllers /// 医生Id /// 要下载的附件Id /// - [HttpPost, Route("downloadByAttachmentId/{doctorId}")] + [HttpPost, Route("file/downloadByAttachmentId/{doctorId}")] public async Task> DownloadAttachmentById(Guid doctorId, Guid[] attachmentIds) { var path = await _fileService.CreateZipPackageByAttachment(doctorId, attachmentIds); @@ -821,7 +820,6 @@ namespace IRaCIS.Core.API.Controllers [AllowAnonymous] public async Task> DownloadResume( int language, Guid trialId, Guid[] doctorIdArray) { - var userId = Guid.Parse(User.FindFirst("id").Value); var zipPath = await _fileService.CreateOfficialResumeZip(language, doctorIdArray); return ResponseOutput.Ok(zipPath); diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index ea62095dc..96d42864e 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -688,7 +688,7 @@ namespace IRaCIS.Core.Application.Contracts //已生成的不管 管的只需要是 生成失败的并且需要生成账号的 - var needGenerateList = _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsGenerateAccount && t.IsGenerateSuccess == false).ProjectTo(_mapper.ConfigurationProvider).ToList(); + var needGenerateList = _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId && t.IsGenerateAccount && t.IsJoin == false).ProjectTo(_mapper.ConfigurationProvider).ToList(); //await SendInviteEmail(new InviteEmailCommand() { TrialId = trialId, RouteUrl = siteSurvyeSubmit.RouteUrl, UserList = needGenerateList }); @@ -742,7 +742,7 @@ namespace IRaCIS.Core.Application.Contracts } - await _trialSiteUserSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == item.Id, u => new TrialSiteUserSurvey() { IsGenerateSuccess = true, SystemUserId = sysUserInfo.Id }); + await _trialSiteUserSurveyRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new TrialSiteUserSurvey() { IsGenerateSuccess = true, SystemUserId = sysUserInfo.Id }); @@ -756,7 +756,7 @@ namespace IRaCIS.Core.Application.Contracts public async Task SendSiteSurveyUserJoinEmail(TrialSiteUserSurveyJoinCommand joinCommand) { - var trialSiteSurvey = (await _trialSiteSurveyRepository.Where(t => t.Id == joinCommand.TrialSiteSurveyId).FirstOrDefaultAsync()).IfNullThrowException(); + var trialSiteSurvey = await _trialSiteSurveyRepository.FirstAsync(t => t.Id == joinCommand.TrialSiteSurveyId); foreach (var userInfo in joinCommand.UserList)