修改邮件
parent
659dba85d1
commit
1bb0c52773
|
@ -367,3 +367,7 @@ FodyWeavers.xsd
|
||||||
/TrialData/2a864970-1832-4cf9-f3ab-08da0cd341a0/01a4d468-caa4-41a2-ab36-c42ba30130ac/3210c828-cf32-4a70-fa40-08da0cd72d16/9a3b5449-ac01-4df1-bf24-08da0cd72d2a/Dicom/d287dde0-b9d1-9b37-28bb-371b6a445cf1
|
/TrialData/2a864970-1832-4cf9-f3ab-08da0cd341a0/01a4d468-caa4-41a2-ab36-c42ba30130ac/3210c828-cf32-4a70-fa40-08da0cd72d16/9a3b5449-ac01-4df1-bf24-08da0cd72d2a/Dicom/d287dde0-b9d1-9b37-28bb-371b6a445cf1
|
||||||
TrialData
|
TrialData
|
||||||
/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
|
/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
|
||||||
|
|
||||||
|
|
||||||
|
IRaCISData
|
||||||
|
UploadFile
|
||||||
|
|
|
@ -67,24 +67,24 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AspNetCoreRateLimit" Version="4.0.2" />
|
<PackageReference Include="AspNetCoreRateLimit" Version="4.0.2" />
|
||||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
|
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
|
||||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
|
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
|
||||||
<PackageReference Include="EasyCaching.InMemory" Version="1.6.1" />
|
<PackageReference Include="EasyCaching.InMemory" Version="1.7.0" />
|
||||||
<PackageReference Include="EasyCaching.Interceptor.Castle" Version="1.6.1" />
|
<PackageReference Include="EasyCaching.Interceptor.Castle" Version="1.7.0" />
|
||||||
<PackageReference Include="EntityFrameworkCore.Triggered.Extensions" Version="3.1.0" />
|
<PackageReference Include="EntityFrameworkCore.Triggered.Extensions" Version="3.2.1" />
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.21.6" />
|
<PackageReference Include="Google.Protobuf" Version="3.21.8" />
|
||||||
<PackageReference Include="Grpc.Net.Client" Version="2.48.0" />
|
<PackageReference Include="Grpc.Net.Client" Version="2.49.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.48.1">
|
<PackageReference Include="Grpc.Tools" Version="2.50.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Hangfire.Tags.SqlServer" Version="1.8.1" />
|
<PackageReference Include="Hangfire.Tags.SqlServer" Version="1.8.1" />
|
||||||
<PackageReference Include="Invio.Extensions.Authentication.JwtBearer" Version="2.0.1" />
|
<PackageReference Include="Invio.Extensions.Authentication.JwtBearer" Version="2.0.1" />
|
||||||
<PackageReference Include="LogDashboard" Version="1.4.8" />
|
<PackageReference Include="LogDashboard" Version="1.4.8" />
|
||||||
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="10.0.1" />
|
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.10" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.1" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.9" />
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.10" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
|
<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
|
||||||
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="1.2.0" />
|
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="1.2.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Email" Version="2.4.0" />
|
<PackageReference Include="Serilog.Sinks.Email" Version="2.4.0" />
|
||||||
|
|
|
@ -62,10 +62,10 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper.Collection.EntityFrameworkCore" Version="8.0.0" />
|
<PackageReference Include="AutoMapper.Collection.EntityFrameworkCore" Version="9.0.0" />
|
||||||
<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
|
<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
|
||||||
<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
|
<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
|
||||||
<PackageReference Include="EasyCaching.Interceptor.AspectCore" Version="1.6.1" />
|
<PackageReference Include="EasyCaching.Interceptor.AspectCore" Version="1.7.0" />
|
||||||
<PackageReference Include="ExcelDataReader" Version="3.6.0" />
|
<PackageReference Include="ExcelDataReader" Version="3.6.0" />
|
||||||
<PackageReference Include="ExcelDataReader.DataSet" Version="3.6.0" />
|
<PackageReference Include="ExcelDataReader.DataSet" Version="3.6.0" />
|
||||||
<PackageReference Include="fo-dicom.Codecs" Version="5.1.0">
|
<PackageReference Include="fo-dicom.Codecs" Version="5.1.0">
|
||||||
|
@ -76,22 +76,22 @@
|
||||||
<PackageReference Include="Hangfire" Version="1.7.31">
|
<PackageReference Include="Hangfire" Version="1.7.31">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Magicodes.IE.Core" Version="2.6.4" />
|
<PackageReference Include="Magicodes.IE.Core" Version="2.6.9" />
|
||||||
<PackageReference Include="Magicodes.IE.Csv" Version="2.6.4">
|
<PackageReference Include="Magicodes.IE.Csv" Version="2.6.9">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Magicodes.IE.Excel" Version="2.6.4">
|
<PackageReference Include="Magicodes.IE.Excel" Version="2.6.9">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Magicodes.IE.Excel.AspNetCore" Version="2.6.4" />
|
<PackageReference Include="Magicodes.IE.Excel.AspNetCore" Version="2.6.9" />
|
||||||
<PackageReference Include="MailKit" Version="3.4.1" />
|
<PackageReference Include="MailKit" Version="3.4.2" />
|
||||||
<PackageReference Include="MediatR" Version="10.0.1" />
|
<PackageReference Include="MediatR" Version="11.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.10" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9">
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.10">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="MimeKit" Version="3.4.1" />
|
<PackageReference Include="MimeKit" Version="3.4.2" />
|
||||||
<PackageReference Include="MiniExcel" Version="1.28.0" />
|
<PackageReference Include="MiniExcel" Version="1.28.1" />
|
||||||
<PackageReference Include="MiniWord" Version="0.6.1" />
|
<PackageReference Include="MiniWord" Version="0.6.1" />
|
||||||
<PackageReference Include="My.Extensions.Localization.Json" Version="3.0.0">
|
<PackageReference Include="My.Extensions.Localization.Json" Version="3.0.0">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
<PackageReference Include="Quartz" Version="3.5.0" />
|
<PackageReference Include="Quartz" Version="3.5.0" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.5" />
|
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.5" />
|
||||||
<PackageReference Include="WinSCP" Version="5.21.3" />
|
<PackageReference Include="WinSCP" Version="5.21.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -402,18 +402,15 @@
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
|
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.TrialEmailNoticeConfigService.FillWordTemplateAndEmailConfig(System.Guid,System.Guid,System.Guid,IRaCIS.Core.Domain.Share.CommonDocumentBusinessScenario)">
|
<member name="M:IRaCIS.Core.Application.Service.TrialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
测试邮件 带附件 填充word --前端不需要用
|
测试邮件 带附件 填充word --前端不需要用
|
||||||
</summary>
|
</summary>
|
||||||
<param name="trialId"></param>
|
|
||||||
<param name="visitTaskId"></param>
|
<param name="visitTaskId"></param>
|
||||||
<param name="trialReadingCriterionId"></param>
|
|
||||||
<param name="businessScenarioEnum"></param>
|
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.TrialEmailNoticeConfigService.GetTrialUserSelectList(System.Guid)">
|
<member name="M:IRaCIS.Core.Application.Service.TrialEmailNoticeConfigService.GetTrialUserTypeSelectList(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
选择人员下拉
|
选择人员下拉
|
||||||
</summary>
|
</summary>
|
||||||
|
|
|
@ -62,9 +62,11 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task<List<TrialReadingCriterionDto>> GetTrialCriterionList(Guid trialId)
|
public async Task<List<TrialReadingCriterionDto>> GetTrialCriterionList(Guid trialId,bool isHaveSigned=true)
|
||||||
{
|
{
|
||||||
var list = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.TrialId == trialId && t.IsConfirm).OrderBy(t => t.ShowOrder)
|
var list = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.TrialId == trialId && t.IsConfirm)
|
||||||
|
.WhereIf(isHaveSigned=true,t=>t.ReadingInfoSignTime!=null)
|
||||||
|
.OrderBy(t => t.ShowOrder)
|
||||||
.Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, TrialReadingCriterionName = t.CriterionName, CriterionType = t.CriterionType, ReadingType = t.ReadingType })
|
.Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, TrialReadingCriterionName = t.CriterionName, CriterionType = t.CriterionType, ReadingType = t.ReadingType })
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@ using IRaCIS.Core.Domain.Models;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Application.Interfaces;
|
using IRaCIS.Core.Application.Interfaces;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
|
using IRaCIS.Core.Application.Helper;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -32,11 +34,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var commonDocumentQueryable = _commonDocumentRepository.AsQueryable(true)
|
var commonDocumentQueryable = _commonDocumentRepository.AsQueryable(true)
|
||||||
.WhereIf(queryCommonDocument.FileTypeEnum != null, t => t.FileTypeEnum == queryCommonDocument.FileTypeEnum)
|
.WhereIf(queryCommonDocument.FileTypeEnum != null, t => t.FileTypeEnum == queryCommonDocument.FileTypeEnum)
|
||||||
|
|
||||||
.WhereIf( queryCommonDocument.CriterionTypeEnum!=null ,t=>t.CriterionTypeEnum == queryCommonDocument.CriterionTypeEnum)
|
.WhereIf(queryCommonDocument.CriterionTypeEnum != null, t => t.CriterionTypeEnum == queryCommonDocument.CriterionTypeEnum)
|
||||||
.WhereIf(queryCommonDocument.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryCommonDocument.BusinessScenarioEnum)
|
.WhereIf(queryCommonDocument.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryCommonDocument.BusinessScenarioEnum)
|
||||||
.WhereIf( string.IsNullOrEmpty(queryCommonDocument.Code) , t => t.Code.Contains(queryCommonDocument.Code) )
|
.WhereIf(string.IsNullOrEmpty(queryCommonDocument.Code), t => t.Code.Contains(queryCommonDocument.Code))
|
||||||
.WhereIf(string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name))
|
.WhereIf(string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name))
|
||||||
.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider,new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
||||||
|
|
||||||
return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument.PageIndex, queryCommonDocument.PageSize, String.IsNullOrEmpty(queryCommonDocument.SortField) ? nameof(CommonDocument.Code) : queryCommonDocument.SortField, queryCommonDocument.Asc); ;
|
return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument.PageIndex, queryCommonDocument.PageSize, String.IsNullOrEmpty(queryCommonDocument.SortField) ? nameof(CommonDocument.Code) : queryCommonDocument.SortField, queryCommonDocument.Asc); ;
|
||||||
}
|
}
|
||||||
|
@ -50,6 +52,40 @@ namespace IRaCIS.Core.Application.Service
|
||||||
VerifyMsg = "文档的Code不能够重复。"
|
VerifyMsg = "文档的Code不能够重复。"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
if (addOrEditCommonDocument.CriterionTypeEnum != null && addOrEditCommonDocument.CriterionTypeEnum != Domain.Share.CriterionType.NoCriterion)
|
||||||
|
{
|
||||||
|
var testValue = new Dictionary<string, object>()
|
||||||
|
{
|
||||||
|
["SponsorName"] = "Test",
|
||||||
|
};
|
||||||
|
|
||||||
|
var templatePhyicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, addOrEditCommonDocument.Path);
|
||||||
|
|
||||||
|
|
||||||
|
if (File.Exists(templatePhyicalPath))
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
MemoryStream memoryStream = new MemoryStream();
|
||||||
|
|
||||||
|
MiniSoftware.MiniWord.SaveAsByTemplate(memoryStream, templatePhyicalPath, testValue);
|
||||||
|
|
||||||
|
memoryStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception )
|
||||||
|
{
|
||||||
|
|
||||||
|
return ResponseOutput.NotOk("读取模板内容失败, 请将文件另存为docx格式尝试!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var entity = await _commonDocumentRepository.InsertOrUpdateAsync(addOrEditCommonDocument, true, verifyExp1);
|
var entity = await _commonDocumentRepository.InsertOrUpdateAsync(addOrEditCommonDocument, true, verifyExp1);
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
|
@ -27,8 +27,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public List<EmailUserInfoDto> TrialEmailNoticeUserList { get; set; }
|
public List<EmailUserInfoDto> TrialEmailNoticeUserList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public new List<Guid> ToUserIdList => TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.To).Select(t => t.UserId).ToList();
|
public new List<UserTypeEnum> ToUserTypeList => TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.To).Select(t => t.UserType).ToList();
|
||||||
public new List<Guid> CopyUserIdList => TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.Copy).Select(t => t.UserId).ToList();
|
public new List<UserTypeEnum> CopyUserTypeList => TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.Copy).Select(t => t.UserType).ToList();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public class EmailUserInfoDto
|
public class EmailUserInfoDto
|
||||||
{
|
{
|
||||||
public Guid UserId { get; set; }
|
|
||||||
|
|
||||||
public Guid TrialEmailNoticeConfigId { get; set; }
|
public Guid TrialEmailNoticeConfigId { get; set; }
|
||||||
|
|
||||||
|
@ -44,11 +43,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public EmailUserType EmailUserType { get; set; }
|
public EmailUserType EmailUserType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string Email { get; set; }
|
|
||||||
|
|
||||||
public string UserName { get; set; }
|
public UserTypeEnum UserType { get; set; }
|
||||||
|
|
||||||
public string RealName { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,19 +82,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public string FromEmail { get; set; } = string.Empty;
|
public string FromEmail { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
public List<Guid> ToUserIdList { get; set; }
|
public List<UserTypeEnum> ToUserTypeList { get; set; }
|
||||||
public List<Guid> CopyUserIdList { get; set; }
|
public List<UserTypeEnum> CopyUserTypeList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//public List<string> ReceiveEmailList { get; set; }
|
|
||||||
//public List<string> CopyEmailList { get; set; }
|
|
||||||
|
|
||||||
//[JsonIgnore]
|
|
||||||
//public string ReceiveEmailsStr { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
//[JsonIgnore]
|
|
||||||
//public string CopyEmailsStr { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Interfaces
|
namespace IRaCIS.Core.Application.Interfaces
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -20,6 +22,7 @@ namespace IRaCIS.Core.Application.Interfaces
|
||||||
|
|
||||||
Task<IResponseOutput> DeleteTrialEmailNoticeConfig(Guid trialEmailNoticeConfigId);
|
Task<IResponseOutput> DeleteTrialEmailNoticeConfig(Guid trialEmailNoticeConfigId);
|
||||||
|
|
||||||
|
Task BaseBusinessScenarioSendEmailAsync( Guid visitTaskId);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
@ -71,95 +72,18 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 测试邮件 带附件 填充word --前端不需要用
|
/// 测试邮件 带附件 填充word --前端不需要用
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="trialId"></param>
|
|
||||||
/// <param name="visitTaskId"></param>
|
/// <param name="visitTaskId"></param>
|
||||||
/// <param name="trialReadingCriterionId"></param>
|
|
||||||
/// <param name="businessScenarioEnum"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
public async Task FillWordTemplateAndEmailConfig(Guid trialId, Guid visitTaskId, Guid trialReadingCriterionId, CommonDocumentBusinessScenario businessScenarioEnum)
|
public async Task BaseBusinessScenarioSendEmailAsync(Guid visitTaskId)
|
||||||
{
|
|
||||||
var criterionTypeEnum = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.TrialId == trialId && t.Id == trialReadingCriterionId).Select(t => t.CriterionType).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
|
|
||||||
var emailConfig = await _trialEmailNoticeConfigRepository.Where(t => t.TrialId == trialId && t.CriterionTypeEnum == criterionTypeEnum && t.BusinessScenarioEnum == businessScenarioEnum)
|
|
||||||
.Include(t => t.TrialEmailNoticeUserList).ThenInclude(t => t.User).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
if (emailConfig == null)
|
|
||||||
{
|
|
||||||
throw new BusinessValidationFailedException("找不到该项目标准场景下邮件的配置");
|
|
||||||
}
|
|
||||||
|
|
||||||
//填充邮件基本配置
|
|
||||||
|
|
||||||
var sendEmailConfig = new SMTPEmailConfig();
|
|
||||||
|
|
||||||
foreach (var item in emailConfig.TrialEmailNoticeUserList)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (item.User.EMail.Contains("@") && !string.IsNullOrEmpty(item.User.EMail))
|
CommonDocumentBusinessScenario? businessScenarioEnum = null;
|
||||||
{
|
|
||||||
switch (item.EmailUserType)
|
|
||||||
{
|
|
||||||
case EmailUserType.From:
|
|
||||||
sendEmailConfig.FromEmailAddress = new MimeKit.MailboxAddress(item.User.FullName, item.User.EMail);
|
|
||||||
|
|
||||||
break;
|
#region 任务关联的项目配置 标准信息及配置,subject 信息
|
||||||
case EmailUserType.To:
|
var taskInfo = await _visitTaskRepository.Where(t => t.Id == visitTaskId).Select(t => new
|
||||||
sendEmailConfig.ToMailAddressList.Add(new MimeKit.MailboxAddress(item.User.FullName, item.User.EMail));
|
|
||||||
|
|
||||||
break;
|
|
||||||
case EmailUserType.Copy:
|
|
||||||
sendEmailConfig.CopyToMailAddressList.Add(new MimeKit.MailboxAddress(item.User.FullName, item.User.EMail));
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//邮件附件
|
|
||||||
var path = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, emailConfig.FilePath);
|
|
||||||
|
|
||||||
if (!File.Exists(path))
|
|
||||||
{
|
|
||||||
throw new BusinessValidationFailedException("找不到该项目标准场景下邮件模板");
|
|
||||||
}
|
|
||||||
|
|
||||||
//邮件内容html
|
|
||||||
var isNeedSend = await FillWordTemplateAndSetEmailAsync(visitTaskId, sendEmailConfig, businessScenarioEnum, emailConfig.FilePath, path);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await SendEmailHelper.SendEmailAsync(sendEmailConfig);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private async Task<bool> FillWordTemplateAndSetEmailAsync(Guid visitTaskId, SMTPEmailConfig sendEmailConfig, CommonDocumentBusinessScenario businessScenarioEnum, string fileName,string templatePath)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
var isNeedSend = true;
|
|
||||||
var answer = "否";
|
|
||||||
|
|
||||||
|
|
||||||
var pathToFile = _hostEnvironment.WebRootPath
|
|
||||||
+ Path.DirectorySeparatorChar.ToString()
|
|
||||||
+ "EmailTemplate"
|
|
||||||
+ Path.DirectorySeparatorChar.ToString()
|
|
||||||
+ "SubjectEnrollConfirmOrPDProgress.html";
|
|
||||||
|
|
||||||
|
|
||||||
var documentNeedBasicInfo = await _visitTaskRepository.Where(t => t.Id == visitTaskId).Select(t => new
|
|
||||||
{
|
|
||||||
t.Trial.ResearchProgramNo,
|
t.Trial.ResearchProgramNo,
|
||||||
t.Subject.TrialSite.TrialSiteCode,
|
t.Subject.TrialSite.TrialSiteCode,
|
||||||
SubjectCode = t.Subject.Code,
|
SubjectCode = t.Subject.Code,
|
||||||
|
@ -167,11 +91,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
t.Trial.IsEnrollementQualificationConfirm,
|
t.Trial.IsEnrollementQualificationConfirm,
|
||||||
t.Trial.IsPDProgressView,
|
t.Trial.IsPDProgressView,
|
||||||
|
|
||||||
IsBaseline = t.SourceSubjectVisit.IsBaseLine,
|
|
||||||
VisitEarliestScanDate = t.SourceSubjectVisit.EarliestScanDate,
|
VisitEarliestScanDate = t.SourceSubjectVisit.EarliestScanDate,
|
||||||
VisitName = t.SourceSubjectVisit.VisitName,
|
VisitName = t.SourceSubjectVisit.VisitName,
|
||||||
t.SourceSubjectVisit.IsFinalVisit,
|
t.SourceSubjectVisit.IsFinalVisit,
|
||||||
t.SourceSubjectVisit.PDState,
|
t.SourceSubjectVisit.PDState,
|
||||||
|
t.SourceSubjectVisit.IsEnrollmentConfirm,
|
||||||
|
|
||||||
ModuleEarliestScanDate = t.ReadModule.SubjectVisit.EarliestScanDate,
|
ModuleEarliestScanDate = t.ReadModule.SubjectVisit.EarliestScanDate,
|
||||||
ModuleVisitName = t.ReadModule.SubjectVisit.VisitName,
|
ModuleVisitName = t.ReadModule.SubjectVisit.VisitName,
|
||||||
|
@ -182,38 +107,148 @@ namespace IRaCIS.Core.Application.Service
|
||||||
t.ReadingTaskState,
|
t.ReadingTaskState,
|
||||||
t.ReadingCategory,
|
t.ReadingCategory,
|
||||||
t.SignTime,
|
t.SignTime,
|
||||||
|
//仲裁规则
|
||||||
|
t.TrialReadingCriterion.ArbitrationRule,
|
||||||
|
//单双中
|
||||||
|
t.TrialReadingCriterion.ReadingType,
|
||||||
|
//有序与否
|
||||||
|
t.TrialReadingCriterion.IsReadingTaskViewInOrder,
|
||||||
|
|
||||||
|
MoudulePDState = t.ReadModule.SubjectVisit.PDState,
|
||||||
|
t.TrialId,
|
||||||
|
IsBaseline = t.SourceSubjectVisit.IsBaseLine,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
t.TrialReadingCriterion.CriterionType,
|
||||||
|
|
||||||
t.TrialReadingCriterionId,
|
t.TrialReadingCriterionId,
|
||||||
t.TrialReadingCriterion.ArbitrationRule,
|
|
||||||
t.TrialReadingCriterion.ReadingType,
|
|
||||||
t.TrialReadingCriterion.IsReadingTaskViewInOrder,
|
|
||||||
}).FirstNotNullAsync();
|
}).FirstNotNullAsync();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
if (documentNeedBasicInfo.ReadingCategory == ReadingCategory.Visit || documentNeedBasicInfo.ReadingCategory == ReadingCategory.Judge || documentNeedBasicInfo.ReadingCategory == ReadingCategory.Global)
|
|
||||||
|
#region 任务 -邮件场景区分
|
||||||
|
|
||||||
|
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||||
{
|
{
|
||||||
|
//入组确认场景
|
||||||
|
if (taskInfo.IsEnrollmentConfirm && taskInfo.IsEnrollementQualificationConfirm && taskInfo.IsBaseline)
|
||||||
|
{
|
||||||
|
businessScenarioEnum = CommonDocumentBusinessScenario.EnrollConfirmed;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//PD确认场景
|
||||||
|
else if (taskInfo.IsPDProgressView &&
|
||||||
|
(taskInfo.PDState == PDStateEnum.PDProgress && taskInfo.SourceSubjectVisitId != null) ||
|
||||||
|
(taskInfo.SouceReadModuleId != null && taskInfo.MoudulePDState == PDStateEnum.PDProgress))
|
||||||
|
{
|
||||||
|
businessScenarioEnum = CommonDocumentBusinessScenario.PDConfirmed;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//isNeedSend = false;
|
throw new BusinessValidationFailedException("进行邮件发送前,该任务必须已签名完成并已经触发完成相应的任务生成");
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//入组确认仅在基线
|
|
||||||
if (businessScenarioEnum == CommonDocumentBusinessScenario.EnrollConfirmed && documentNeedBasicInfo.IsEnrollementQualificationConfirm && documentNeedBasicInfo.IsBaseline)
|
|
||||||
|
var emailConfig = await _trialEmailNoticeConfigRepository.Where(t => t.TrialId == taskInfo.TrialId && t.CriterionTypeEnum == taskInfo.CriterionType && t.BusinessScenarioEnum == businessScenarioEnum)
|
||||||
|
.Include(t => t.TrialEmailNoticeUserList).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
|
if (emailConfig == null)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("找不到该项目标准场景下邮件的配置");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 发收件人配置
|
||||||
|
|
||||||
|
var sendEmailConfig = new SMTPEmailConfig();
|
||||||
|
|
||||||
|
var toUserList = _repository.Where<TrialUser>(t => t.TrialId == taskInfo.TrialId && emailConfig.TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.To).Select(c => c.UserType).Contains(t.User.UserTypeEnum)).Select(t => new { t.User.EMail, t.User.FullName });
|
||||||
|
|
||||||
|
var copyUserList = _repository.Where<TrialUser>(t => t.TrialId == taskInfo.TrialId && emailConfig.TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.Copy).Select(c => c.UserType).Contains(t.User.UserTypeEnum)).Select(t => new { t.User.EMail, t.User.FullName });
|
||||||
|
|
||||||
|
|
||||||
|
if (emailConfig.FromEmail.Contains("@") && !string.IsNullOrEmpty(emailConfig.FromEmail))
|
||||||
{
|
{
|
||||||
|
|
||||||
//如果其他阅片人已经做了,说明发送了入组确认报告,第二个人做完就不发送了
|
sendEmailConfig.FromEmailAddress = new MimeKit.MailboxAddress(emailConfig.FromName, emailConfig.FromEmail);
|
||||||
|
|
||||||
if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == documentNeedBasicInfo.SourceSubjectVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false &&
|
//测试
|
||||||
|
sendEmailConfig.ToMailAddressList.Add(new MimeKit.MailboxAddress("ddd", "872297557@qq.com"));
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("发件邮箱有误,请核实");
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in toUserList)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (item.EMail.Contains("@") && !string.IsNullOrEmpty(item.EMail))
|
||||||
|
{
|
||||||
|
|
||||||
|
sendEmailConfig.ToMailAddressList.Add(new MimeKit.MailboxAddress(item.FullName, item.EMail));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (var item in copyUserList)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (item.EMail.Contains("@") && !string.IsNullOrEmpty(item.EMail))
|
||||||
|
{
|
||||||
|
|
||||||
|
sendEmailConfig.CopyToMailAddressList.Add(new MimeKit.MailboxAddress(item.FullName, item.EMail));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//邮件附件
|
||||||
|
var path = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, emailConfig.FilePath);
|
||||||
|
|
||||||
|
if (!File.Exists(path))
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("找不到该项目标准场景下邮件模板");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var pathToFile = _hostEnvironment.WebRootPath
|
||||||
|
+ Path.DirectorySeparatorChar.ToString()
|
||||||
|
+ "EmailTemplate"
|
||||||
|
+ Path.DirectorySeparatorChar.ToString()
|
||||||
|
+ "SubjectEnrollConfirmOrPDProgress.html";
|
||||||
|
|
||||||
|
var answer = "否";
|
||||||
|
var isNeedSend = true;
|
||||||
|
|
||||||
|
if (businessScenarioEnum == CommonDocumentBusinessScenario.EnrollConfirmed)
|
||||||
|
{
|
||||||
|
//如果其他阅片人已经做了,说明发送了入组确认报告,第二个人做完就不发送了
|
||||||
|
if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false &&
|
||||||
t.Id != visitTaskId && t.ReadingTaskState == ReadingTaskState.HaveSigned))
|
t.Id != visitTaskId && t.ReadingTaskState == ReadingTaskState.HaveSigned))
|
||||||
{
|
{
|
||||||
//isNeedSend = false;
|
isNeedSend = false;
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
sendEmailConfig.TopicDescription = "入组确认";
|
sendEmailConfig.TopicDescription = "入组确认";
|
||||||
|
|
||||||
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
||||||
|
@ -233,16 +268,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
||||||
answer = "是";
|
answer = "是";
|
||||||
|
}
|
||||||
//修改Subject 状态 need to do
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (businessScenarioEnum == CommonDocumentBusinessScenario.PDConfirmed && documentNeedBasicInfo.IsPDProgressView)
|
else if (businessScenarioEnum == CommonDocumentBusinessScenario.PDConfirmed)
|
||||||
{
|
{
|
||||||
|
|
||||||
sendEmailConfig.TopicDescription = "疾病进展";
|
sendEmailConfig.TopicDescription = "疾病进展";
|
||||||
|
|
||||||
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
|
||||||
|
@ -257,16 +289,16 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
//有序
|
//有序
|
||||||
|
|
||||||
if (documentNeedBasicInfo.IsReadingTaskViewInOrder)
|
if (taskInfo.IsReadingTaskViewInOrder)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//单重
|
//单重
|
||||||
|
|
||||||
if (documentNeedBasicInfo.ReadingType == ReadingMethod.Single)
|
if (taskInfo.ReadingType == ReadingMethod.Single)
|
||||||
{
|
{
|
||||||
//仲裁在访视上 或者在阅片期
|
//仲裁在访视上 或者在阅片期
|
||||||
if (documentNeedBasicInfo.ArbitrationRule != ArbitrationRule.None)
|
if (taskInfo.ArbitrationRule != ArbitrationRule.None)
|
||||||
{
|
{
|
||||||
|
|
||||||
throw new BusinessValidationFailedException("单重有序阅片配置有误(不应该有仲裁对象配置),请核查!");
|
throw new BusinessValidationFailedException("单重有序阅片配置有误(不应该有仲裁对象配置),请核查!");
|
||||||
|
@ -275,10 +307,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
//要求PD 确认的访视 是截止访视 还是非截止访视(根据该访视有没有配置阅片期来判断)
|
//要求PD 确认的访视 是截止访视 还是非截止访视(根据该访视有没有配置阅片期来判断)
|
||||||
|
|
||||||
if (documentNeedBasicInfo.ReadingCategory == ReadingCategory.Visit)
|
if (taskInfo.ReadingCategory == ReadingCategory.Visit)
|
||||||
{
|
{
|
||||||
//存在阅片期 那么就是截止访视
|
//存在阅片期 那么就是截止访视
|
||||||
if (await _repository.Where<ReadModule>(t => t.TrialReadingCriterionId == documentNeedBasicInfo.TrialReadingCriterionId && t.SubjectVisitId == documentNeedBasicInfo.SourceSubjectVisitId && t.ReadingSetType == ReadingSetType.ImageReading).AnyAsync())
|
if (await _repository.Where<ReadModule>(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.SubjectVisitId == taskInfo.SourceSubjectVisitId && t.ReadingSetType == ReadingSetType.ImageReading).AnyAsync())
|
||||||
{
|
{
|
||||||
isNeedSend = false;
|
isNeedSend = false;
|
||||||
}
|
}
|
||||||
|
@ -287,7 +319,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, ReadingCategory.Visit);
|
answer = await TranslatePdStateAsync(visitTaskId, ReadingCategory.Visit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (documentNeedBasicInfo.ReadingCategory == ReadingCategory.Global)
|
else if (taskInfo.ReadingCategory == ReadingCategory.Global)
|
||||||
{
|
{
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, ReadingCategory.Global);
|
answer = await TranslatePdStateAsync(visitTaskId, ReadingCategory.Global);
|
||||||
}
|
}
|
||||||
|
@ -299,16 +331,16 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
}
|
}
|
||||||
//双重
|
//双重
|
||||||
else if (documentNeedBasicInfo.ReadingType == ReadingMethod.Double)
|
else if (taskInfo.ReadingType == ReadingMethod.Double)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//仲裁在访视上 就没有全局阅片 没有阅片期
|
//仲裁在访视上 就没有全局阅片 没有阅片期
|
||||||
if (documentNeedBasicInfo.ArbitrationRule == ArbitrationRule.Visit)
|
if (taskInfo.ArbitrationRule == ArbitrationRule.Visit)
|
||||||
{
|
{
|
||||||
//找到 访视,裁判 所有有效任务(不可能有全局的) 访视和裁判任务的SourceSubjectVisitId 一样
|
//找到 访视,裁判 所有有效任务(不可能有全局的) 访视和裁判任务的SourceSubjectVisitId 一样
|
||||||
var taskList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == documentNeedBasicInfo.SourceSubjectVisitId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
var taskList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||||
(t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Judge )).ToListAsync();
|
(t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Judge)).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
//这里要求 到这里已经如果有裁判 已经生成裁判了保存数据库
|
//这里要求 到这里已经如果有裁判 已经生成裁判了保存数据库
|
||||||
|
@ -316,7 +348,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
if (taskList.Count == 2 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit) == 2)
|
if (taskList.Count == 2 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit) == 2)
|
||||||
{
|
{
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, documentNeedBasicInfo.ReadingCategory);
|
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory);
|
||||||
}
|
}
|
||||||
//双人 产生裁判,并且裁判完成 发
|
//双人 产生裁判,并且裁判完成 发
|
||||||
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
||||||
|
@ -327,24 +359,23 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//isNeedSend = false;
|
isNeedSend = false;
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//在阅片期 仲裁在全局阅片,不会在访视上
|
//在阅片期 仲裁在全局阅片,不会在访视上
|
||||||
else if (documentNeedBasicInfo.ArbitrationRule == ArbitrationRule.Reading)
|
else if (taskInfo.ArbitrationRule == ArbitrationRule.Reading)
|
||||||
{
|
{
|
||||||
//是访视任务 不可能是裁判任务(访视上不会生成裁判),也不会是全局任务(全局任务 SourceSubjectVisitId=null )
|
//是访视任务 不可能是裁判任务(访视上不会生成裁判),也不会是全局任务(全局任务 SourceSubjectVisitId=null )
|
||||||
if (documentNeedBasicInfo.SourceSubjectVisitId != null)
|
if (taskInfo.SourceSubjectVisitId != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
#region MyRegion
|
#region MyRegion
|
||||||
|
|
||||||
////看该访视是否是截止访视
|
////看该访视是否是截止访视
|
||||||
//var moduleIdList = await _repository.Where<ReadModule>(t => t.TrialReadingCriterionId == documentNeedBasicInfo.TrialReadingCriterionId && t.SubjectVisitId == documentNeedBasicInfo.SourceSubjectVisitId && t.ReadingSetType == ReadingSetType.ImageReading)
|
//var moduleIdList = await _repository.Where<ReadModule>(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.SubjectVisitId == taskInfo.SourceSubjectVisitId && t.ReadingSetType == ReadingSetType.ImageReading)
|
||||||
// .Select(t => (Guid?) t.Id).ToListAsync();
|
// .Select(t => (Guid?) t.Id).ToListAsync();
|
||||||
|
|
||||||
////截止访视
|
////截止访视
|
||||||
|
@ -371,16 +402,16 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
}
|
}
|
||||||
//是全局任务 或者全局的裁判任务 (如果是全局任务,那么此时裁判任务已经生成,如果是全局裁判)
|
//是全局任务 或者全局的裁判任务 (如果是全局任务,那么此时裁判任务已经生成,如果是全局裁判)
|
||||||
else if (documentNeedBasicInfo.SouceReadModuleId != null)
|
else if (taskInfo.SouceReadModuleId != null)
|
||||||
{
|
{
|
||||||
var taskList = await _visitTaskRepository.Where(t => t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.SouceReadModuleId== documentNeedBasicInfo.SouceReadModuleId
|
var taskList = await _visitTaskRepository.Where(t => t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.SouceReadModuleId == taskInfo.SouceReadModuleId
|
||||||
&& (t.ReadingCategory == ReadingCategory.Global || t.ReadingCategory == ReadingCategory.Judge)).ToListAsync();
|
&& (t.ReadingCategory == ReadingCategory.Global || t.ReadingCategory == ReadingCategory.Judge)).ToListAsync();
|
||||||
|
|
||||||
//两个全局没有裁判
|
//两个全局没有裁判
|
||||||
if (taskList.Count == 2 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Global) == 2)
|
if (taskList.Count == 2 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Global) == 2)
|
||||||
{
|
{
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, documentNeedBasicInfo.ReadingCategory);
|
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory);
|
||||||
}
|
}
|
||||||
//双人全局产生裁判
|
//双人全局产生裁判
|
||||||
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Global).Count() == 2)
|
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Global).Count() == 2)
|
||||||
|
@ -391,9 +422,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//isNeedSend = false;
|
isNeedSend = false;
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,22 +450,22 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//单重
|
//单重
|
||||||
|
|
||||||
|
|
||||||
if (documentNeedBasicInfo.ReadingType == ReadingMethod.Single && documentNeedBasicInfo.ArbitrationRule == ArbitrationRule.None)
|
if (taskInfo.ReadingType == ReadingMethod.Single && taskInfo.ArbitrationRule == ArbitrationRule.None)
|
||||||
{
|
{
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, documentNeedBasicInfo.ReadingCategory);
|
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory);
|
||||||
}
|
}
|
||||||
//双重 截止访视只在阅片期的时候存在 要求PD确认的访视 肯定是非截止访视
|
//双重 截止访视只在阅片期的时候存在 要求PD确认的访视 肯定是非截止访视
|
||||||
else if (documentNeedBasicInfo.ReadingType == ReadingMethod.Double && documentNeedBasicInfo.ArbitrationRule == ArbitrationRule.Visit)
|
else if (taskInfo.ReadingType == ReadingMethod.Double && taskInfo.ArbitrationRule == ArbitrationRule.Visit)
|
||||||
{
|
{
|
||||||
//在两位阅片人读完访视后,如果有裁判者等裁判读完,如果无裁判则等第二个人的读完
|
//在两位阅片人读完访视后,如果有裁判者等裁判读完,如果无裁判则等第二个人的读完
|
||||||
|
|
||||||
var taskList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == documentNeedBasicInfo.SourceSubjectVisitId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && (t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Judge)).ToListAsync();
|
var taskList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && (t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Judge)).ToListAsync();
|
||||||
|
|
||||||
//这里要求 到这里已经如果有裁判 已经生成裁判了保存数据库
|
//这里要求 到这里已经如果有裁判 已经生成裁判了保存数据库
|
||||||
if (taskList.Count == 2 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit) == 2)
|
if (taskList.Count == 2 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit) == 2)
|
||||||
{
|
{
|
||||||
|
|
||||||
answer = await TranslatePdStateAsync(visitTaskId, documentNeedBasicInfo.ReadingCategory);
|
answer = await TranslatePdStateAsync(visitTaskId, taskInfo.ReadingCategory);
|
||||||
}
|
}
|
||||||
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
else if (taskList.Count == 3 && taskList.Count(t => t.ReadingTaskState == ReadingTaskState.HaveSigned) == 3 && taskList.Where(t => t.ReadingCategory == ReadingCategory.Judge).Count() == 1)
|
||||||
{
|
{
|
||||||
|
@ -445,8 +475,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//isNeedSend = false;
|
isNeedSend = false;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -459,46 +488,49 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isNeedSend=false;
|
||||||
|
}
|
||||||
|
|
||||||
if (isNeedSend)
|
if (isNeedSend)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var value = new Dictionary<string, object>()
|
var value = new Dictionary<string, object>()
|
||||||
{
|
{
|
||||||
["SponsorName"] = documentNeedBasicInfo.SponsorName,
|
["SponsorName"] = taskInfo.SponsorName,
|
||||||
["ResearchProgramNo"] = documentNeedBasicInfo.ResearchProgramNo,
|
["ResearchProgramNo"] = taskInfo.ResearchProgramNo,
|
||||||
["TrialSiteCode"] = documentNeedBasicInfo.TrialSiteCode,
|
["TrialSiteCode"] = taskInfo.TrialSiteCode,
|
||||||
["SubjectCode"] = documentNeedBasicInfo.SubjectCode,
|
["SubjectCode"] = taskInfo.SubjectCode,
|
||||||
["VisitName"] = documentNeedBasicInfo.VisitName,
|
["VisitName"] = taskInfo.VisitName,
|
||||||
["EarliestScanDate"] = documentNeedBasicInfo.SourceSubjectVisitId!=null? documentNeedBasicInfo.VisitEarliestScanDate: documentNeedBasicInfo.ModuleEarliestScanDate,
|
["EarliestScanDate"] = taskInfo.SourceSubjectVisitId != null ? taskInfo.VisitEarliestScanDate : taskInfo.ModuleEarliestScanDate,
|
||||||
["SignTime"] = documentNeedBasicInfo.SignTime,
|
["SignTime"] = taskInfo.SignTime,
|
||||||
["Result"] = answer
|
["Result"] = answer
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
MemoryStream memoryStream = new MemoryStream();
|
MemoryStream memoryStream = new MemoryStream();
|
||||||
|
|
||||||
|
MiniSoftware.MiniWord.SaveAsByTemplate(memoryStream, path, value);
|
||||||
|
|
||||||
MiniSoftware.MiniWord.SaveAsByTemplate(memoryStream, templatePath, value);
|
memoryStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
sendEmailConfig.EmailAttachMentConfigList.Add(new EmailAttachMentConfig()
|
sendEmailConfig.EmailAttachMentConfigList.Add(new EmailAttachMentConfig()
|
||||||
{
|
{
|
||||||
FileName = fileName,
|
FileName = emailConfig.FileName,
|
||||||
|
|
||||||
FileStream = memoryStream
|
FileStream = memoryStream
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
await SendEmailHelper.SendEmailAsync(sendEmailConfig);
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private async Task<string> TranslatePdStateAsync(Guid visitTaskId, ReadingCategory readingCategory)
|
private async Task<string> TranslatePdStateAsync(Guid visitTaskId, ReadingCategory readingCategory)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -551,12 +583,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="trialId"></param>
|
/// <param name="trialId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<List<TrialUserSelct>> GetTrialUserSelectList(Guid trialId)
|
public async Task<List<TrialUserType>> GetTrialUserTypeSelectList(Guid trialId)
|
||||||
{
|
{
|
||||||
|
|
||||||
var query = _trialUserRepository.Where(t => t.TrialId == trialId && t.IsDeleted == false, false, true).IgnoreQueryFilters()
|
var query = _trialUserRepository.Where(t => t.TrialId == trialId && t.IsDeleted == false, false, true).IgnoreQueryFilters().Select(t => t.User.UserTypeRole)
|
||||||
|
|
||||||
.ProjectTo<TrialUserSelct>(_mapper.ConfigurationProvider);
|
.ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
return await query.ToListAsync();
|
return await query.ToListAsync();
|
||||||
|
|
||||||
|
@ -588,15 +620,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var entity = _mapper.Map<TrialEmailNoticeConfig>(addOrEditTrialEmailNoticeConfig);
|
var entity = _mapper.Map<TrialEmailNoticeConfig>(addOrEditTrialEmailNoticeConfig);
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in addOrEditTrialEmailNoticeConfig.ToUserIdList)
|
foreach (var item in addOrEditTrialEmailNoticeConfig.ToUserTypeList)
|
||||||
{
|
{
|
||||||
entity.TrialEmailNoticeUserList.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.To, UserId = item });
|
entity.TrialEmailNoticeUserList.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.To, UserType = item });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var item in addOrEditTrialEmailNoticeConfig.CopyUserIdList)
|
foreach (var item in addOrEditTrialEmailNoticeConfig.CopyUserTypeList)
|
||||||
{
|
{
|
||||||
entity.TrialEmailNoticeUserList.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.Copy, UserId = item });
|
entity.TrialEmailNoticeUserList.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.Copy, UserType = item });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,15 +651,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
List<TrialEmailNoticeUser> trialEmailNoticeUsers = new List<TrialEmailNoticeUser>();
|
List<TrialEmailNoticeUser> trialEmailNoticeUsers = new List<TrialEmailNoticeUser>();
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in addOrEditTrialEmailNoticeConfig.ToUserIdList)
|
foreach (var item in addOrEditTrialEmailNoticeConfig.ToUserTypeList)
|
||||||
{
|
{
|
||||||
trialEmailNoticeUsers.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.To, UserId = item, TrialEmailNoticeConfigId = entity.Id });
|
trialEmailNoticeUsers.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.To, UserType = item, TrialEmailNoticeConfigId = entity.Id });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var item in addOrEditTrialEmailNoticeConfig.CopyUserIdList)
|
foreach (var item in addOrEditTrialEmailNoticeConfig.CopyUserTypeList)
|
||||||
{
|
{
|
||||||
trialEmailNoticeUsers.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.Copy, UserId = item, TrialEmailNoticeConfigId = entity.Id });
|
trialEmailNoticeUsers.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.Copy, UserType = item, TrialEmailNoticeConfigId = entity.Id });
|
||||||
|
|
||||||
}
|
}
|
||||||
await _repository.AddRangeAsync(trialEmailNoticeUsers);
|
await _repository.AddRangeAsync(trialEmailNoticeUsers);
|
||||||
|
|
|
@ -81,10 +81,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(d => d.UserName, c => c.MapFrom(t => t.User.UserName));
|
.ForMember(d => d.UserName, c => c.MapFrom(t => t.User.UserName));
|
||||||
|
|
||||||
|
|
||||||
CreateMap<TrialEmailNoticeUser, EmailUserInfoDto>()
|
CreateMap<TrialEmailNoticeUser, EmailUserInfoDto>();
|
||||||
.ForMember(d => d.Email, c => c.MapFrom(t => t.User.EMail))
|
|
||||||
.ForMember(d => d.RealName, c => c.MapFrom(t => t.User.FullName))
|
|
||||||
.ForMember(d => d.UserName, c => c.MapFrom(t => t.User.UserName));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
}
|
}
|
||||||
|
|
||||||
///<summary>ReadingMedicineSystemQuestionQuery 列表查询参数模型</summary>
|
///<summary>ReadingMedicineSystemQuestionQuery 列表查询参数模型</summary>
|
||||||
public class ReadingMedicineSystemQuestionQuery
|
public class ReadingMedicineSystemQuestionQuery:PageInput
|
||||||
{
|
{
|
||||||
public string Type { get; set; } = string.Empty;
|
public string Type { get; set; } = string.Empty;
|
||||||
public string ParentTriggerValue { get; set; } = string.Empty;
|
public string ParentTriggerValue { get; set; } = string.Empty;
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<ReadingMedicineSystemQuestionView>> GetReadingMedicineSystemQuestionList(ReadingMedicineSystemQuestionQuery inDto)
|
public async Task<PageOutput<ReadingMedicineSystemQuestionView>> GetReadingMedicineSystemQuestionList(ReadingMedicineSystemQuestionQuery inDto)
|
||||||
{
|
{
|
||||||
//避免前端遍历
|
//避免前端遍历
|
||||||
var criterionEnum = inDto.TrialReadingCriterionId != null ? _readingQuestionCriterionTrialRepository.Where(t => t.Id == inDto.TrialReadingCriterionId).Select(t => t.CriterionType).FirstOrDefault(): CriterionType.NoCriterion;
|
var criterionEnum = inDto.TrialReadingCriterionId != null ? _readingQuestionCriterionTrialRepository.Where(t => t.Id == inDto.TrialReadingCriterionId).Select(t => t.CriterionType).FirstOrDefault(): CriterionType.NoCriterion;
|
||||||
|
@ -57,7 +57,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.WhereIf(inDto.CriterionEnum != null, x => x.CriterionEnumStr.Contains($"|{inDto.CriterionEnum}|") )
|
.WhereIf(inDto.CriterionEnum != null, x => x.CriterionEnumStr.Contains($"|{inDto.CriterionEnum}|") )
|
||||||
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.CriterionEnumStr.Contains($"|{criterionEnum}|"))
|
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.CriterionEnumStr.Contains($"|{criterionEnum}|"))
|
||||||
.ProjectTo<ReadingMedicineSystemQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
.ProjectTo<ReadingMedicineSystemQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
||||||
return await query.ToListAsync();
|
|
||||||
|
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize,inDto.SortField,inDto.Asc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -9,6 +9,7 @@ using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Application.Service;
|
using IRaCIS.Core.Application.Service;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
|
using IRaCIS.Core.Application.Interfaces;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -45,6 +46,8 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<ReadingQuestionSystem> _readingQuestionSystem;
|
private readonly IRepository<ReadingQuestionSystem> _readingQuestionSystem;
|
||||||
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||||
|
|
||||||
|
private readonly ITrialEmailNoticeConfigService _trialEmailNoticeConfigService;
|
||||||
|
|
||||||
|
|
||||||
public ReadingImageTaskService(
|
public ReadingImageTaskService(
|
||||||
IMapper mapper,
|
IMapper mapper,
|
||||||
|
@ -72,7 +75,9 @@ namespace IRaCIS.Application.Services
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||||
IRepository<ReadingQuestionSystem> ReadingQuestionSystem,
|
IRepository<ReadingQuestionSystem> ReadingQuestionSystem,
|
||||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
||||||
|
|
||||||
|
ITrialEmailNoticeConfigService trialEmailNoticeConfigService
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
base._mapper = mapper;
|
base._mapper = mapper;
|
||||||
|
@ -101,6 +106,8 @@ namespace IRaCIS.Application.Services
|
||||||
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||||
this._readingQuestionSystem = ReadingQuestionSystem;
|
this._readingQuestionSystem = ReadingQuestionSystem;
|
||||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||||
|
|
||||||
|
_trialEmailNoticeConfigService = trialEmailNoticeConfigService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,10 +142,10 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(List<GetRelatedVisitTaskOutDto>, object)> GetRelatedVisitTask(GetRelatedVisitTaskInDto inDto)
|
public async Task<(List<GetRelatedVisitTaskOutDto>, object)> GetRelatedVisitTask(GetRelatedVisitTaskInDto inDto)
|
||||||
{
|
{
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x=>x.TrialReadingCriterion).FirstNotNullAsync();
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||||
var baselineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskInfo.SubjectId && x.IsBaseLine && !x.IsLostVisit).Select(x => x.Id).FirstNotNullAsync();
|
var baselineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskInfo.SubjectId && x.IsBaseLine && !x.IsLostVisit).Select(x => x.Id).FirstNotNullAsync();
|
||||||
var result = await _visitTaskRepository
|
var result = await _visitTaskRepository
|
||||||
.WhereIf(taskInfo.TaskState != TaskState.Effect,x=>x.Id== inDto.VisitTaskId)
|
.WhereIf(taskInfo.TaskState != TaskState.Effect, x => x.Id == inDto.VisitTaskId)
|
||||||
.Where(x =>
|
.Where(x =>
|
||||||
(x.TrialId == taskInfo.TrialId &&
|
(x.TrialId == taskInfo.TrialId &&
|
||||||
x.SubjectId == taskInfo.SubjectId &&
|
x.SubjectId == taskInfo.SubjectId &&
|
||||||
|
@ -338,7 +345,181 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<GetReadingReportEvaluationOutDto> GetReadingReportEvaluation(GetReadingReportEvaluationInDto indto)
|
public async Task<GetReadingReportEvaluationOutDto> GetReadingReportEvaluation(GetReadingReportEvaluationInDto indto)
|
||||||
{
|
{
|
||||||
return await _readingCalculateService.GetReadingReportEvaluation(indto);
|
|
||||||
|
|
||||||
|
GetReadingReportEvaluationOutDto result = new GetReadingReportEvaluationOutDto();
|
||||||
|
|
||||||
|
result.CalculateResult = await _readingCalculateService.GetReportVerify(new GetReportVerifyInDto()
|
||||||
|
{
|
||||||
|
VisitTaskId = indto.VisitTaskId
|
||||||
|
});
|
||||||
|
|
||||||
|
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
//if (visitTaskInfo.TaskState != TaskState.Effect)
|
||||||
|
//{
|
||||||
|
// throw new BusinessValidationFailedException($"当前任务已失效!");
|
||||||
|
//}
|
||||||
|
result.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
||||||
|
var taskInfoList = await _visitTaskRepository
|
||||||
|
// 失效的只查看自己
|
||||||
|
.WhereIf(visitTaskInfo.TaskState != TaskState.Effect, x => x.Id == indto.VisitTaskId)
|
||||||
|
.Where(x => (x.SubjectId == visitTaskInfo.SubjectId && x.TaskState == TaskState.Effect
|
||||||
|
&& x.IsAnalysisCreate == visitTaskInfo.IsAnalysisCreate
|
||||||
|
&& x.IsSelfAnalysis == visitTaskInfo.IsSelfAnalysis
|
||||||
|
&& x.ArmEnum == visitTaskInfo.ArmEnum
|
||||||
|
&& x.TrialReadingCriterionId == visitTaskInfo.TrialReadingCriterionId
|
||||||
|
&& x.ReadingCategory == ReadingCategory.Visit && !x.IsAnalysisCreate && x.ReadingTaskState == ReadingTaskState.HaveSigned) || x.Id == indto.VisitTaskId
|
||||||
|
).OrderBy(x => x.VisitTaskNum).Select(x => new VisitTaskInfo()
|
||||||
|
{
|
||||||
|
BlindName = x.SourceSubjectVisit.BlindName,
|
||||||
|
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
|
||||||
|
VisitTaskId = x.Id,
|
||||||
|
TaskName = x.TaskName,
|
||||||
|
VisitTaskNum = x.VisitTaskNum,
|
||||||
|
IsCurrentTask = x.Id == indto.VisitTaskId,
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
result.VisitTaskList = taskInfoList;
|
||||||
|
|
||||||
|
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||||
|
|
||||||
|
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||||
|
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
||||||
|
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||||
|
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
// 第一级
|
||||||
|
|
||||||
|
#region 构造问题
|
||||||
|
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||||
|
{
|
||||||
|
QuestionId = x.Id,
|
||||||
|
GroupName = x.GroupName,
|
||||||
|
IsShowInDicom = x.IsShowInDicom,
|
||||||
|
Type = x.Type,
|
||||||
|
QuestionType = x.QuestionType,
|
||||||
|
LesionType = x.LesionType,
|
||||||
|
QuestionGenre = x.QuestionGenre,
|
||||||
|
DictionaryCode = x.DictionaryCode,
|
||||||
|
TypeValue = x.TypeValue,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
ShowOrder = x.ShowOrder,
|
||||||
|
ValueType = x.ValueType,
|
||||||
|
Unit = x.Unit,
|
||||||
|
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
// 分组
|
||||||
|
foreach (var item in questions)
|
||||||
|
{
|
||||||
|
item.Childrens = questionList.Where(x => x.GroupName == item.GroupName && x.Type != ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||||
|
{
|
||||||
|
GroupName = x.GroupName,
|
||||||
|
QuestionId = x.Id,
|
||||||
|
IsShowInDicom = x.IsShowInDicom,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
LesionType = x.LesionType,
|
||||||
|
QuestionGenre = x.QuestionGenre,
|
||||||
|
DictionaryCode = x.DictionaryCode,
|
||||||
|
Type = x.Type,
|
||||||
|
QuestionType = x.QuestionType,
|
||||||
|
TypeValue = x.TypeValue,
|
||||||
|
ShowOrder = x.ShowOrder,
|
||||||
|
OrderMark = x.OrderMark,
|
||||||
|
ValueType = x.ValueType,
|
||||||
|
Unit = x.Unit,
|
||||||
|
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
// 问题
|
||||||
|
foreach (var question in item.Childrens)
|
||||||
|
{
|
||||||
|
|
||||||
|
foreach (var task in taskInfoList)
|
||||||
|
{
|
||||||
|
|
||||||
|
question.Answer.Add(new TaskQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||||
|
TaskName = task.TaskName,
|
||||||
|
VisitTaskId = task.VisitTaskId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构造表格行数据
|
||||||
|
|
||||||
|
|
||||||
|
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
question.Childrens = rowlist.Select(x => new ReadingReportDto()
|
||||||
|
{
|
||||||
|
QuestionName = question.OrderMark + x.RowIndex.GetLesionMark(),
|
||||||
|
SplitOrMergeLesionName = x.MergeName.IsNullOrEmpty() ? x.SplitName : x.MergeName,
|
||||||
|
SplitOrMergeType = x.SplitOrMergeType,
|
||||||
|
LesionType = question.LesionType,
|
||||||
|
IsCanEditPosition = x.IsCanEditPosition,
|
||||||
|
RowIndex = x.RowIndex,
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var row in question.Childrens)
|
||||||
|
{
|
||||||
|
// tableQuestion
|
||||||
|
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||||
|
{
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
QuestionId = x.ReadingQuestionId,
|
||||||
|
TableQuestionId = x.Id,
|
||||||
|
Type = x.Type,
|
||||||
|
LesionType = question.LesionType,
|
||||||
|
TableQuestionType = x.TableQuestionType,
|
||||||
|
DictionaryCode = x.DictionaryCode,
|
||||||
|
QuestionMark = x.QuestionMark,
|
||||||
|
TypeValue = x.TypeValue,
|
||||||
|
RowIndex = row.RowIndex,
|
||||||
|
ShowOrder = x.ShowOrder,
|
||||||
|
ValueType = x.ValueType,
|
||||||
|
Unit = x.Unit,
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var tableQuestion in row.Childrens)
|
||||||
|
{
|
||||||
|
foreach (var task in taskInfoList)
|
||||||
|
{
|
||||||
|
|
||||||
|
tableQuestion.Answer.Add(new TaskQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||||
|
TaskName = task.TaskName,
|
||||||
|
VisitTaskId = task.VisitTaskId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
result.TaskQuestions = questions;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -475,7 +656,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
readingTaskState = visitTaskInfo.ReadingTaskState,
|
readingTaskState = visitTaskInfo.ReadingTaskState,
|
||||||
FormType = formType,
|
FormType = formType,
|
||||||
TaskNum= visitTaskInfo.VisitTaskNum,
|
TaskNum = visitTaskInfo.VisitTaskNum,
|
||||||
|
|
||||||
}); ;
|
}); ;
|
||||||
}
|
}
|
||||||
|
@ -502,7 +683,7 @@ namespace IRaCIS.Application.Services
|
||||||
ShowOrder = x.ShowOrder,
|
ShowOrder = x.ShowOrder,
|
||||||
GroupName = string.Empty,
|
GroupName = string.Empty,
|
||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
DictionaryCode=x.DictionaryCode,
|
DictionaryCode = x.DictionaryCode,
|
||||||
Type = x.Type,
|
Type = x.Type,
|
||||||
TableQuestionType = x.TableQuestionType,
|
TableQuestionType = x.TableQuestionType,
|
||||||
DependParentId = x.DependParentId,
|
DependParentId = x.DependParentId,
|
||||||
|
@ -518,8 +699,8 @@ namespace IRaCIS.Application.Services
|
||||||
QuestionName = x.QuestionName,
|
QuestionName = x.QuestionName,
|
||||||
RelationQuestions = new List<GetTrialReadingQuestionOutDto>(),
|
RelationQuestions = new List<GetTrialReadingQuestionOutDto>(),
|
||||||
Remark = x.Remark,
|
Remark = x.Remark,
|
||||||
ValueType=x.ValueType,
|
ValueType = x.ValueType,
|
||||||
Unit=x.Unit,
|
Unit = x.Unit,
|
||||||
}).ToList();
|
}).ToList();
|
||||||
});
|
});
|
||||||
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
|
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
|
||||||
|
@ -536,8 +717,6 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var rowInfo = tableAnsweRowInfos.Where(y => y.RowIndex == x && y.QuestionId == item.Id).FirstOrDefault();
|
var rowInfo = tableAnsweRowInfos.Where(y => y.RowIndex == x && y.QuestionId == item.Id).FirstOrDefault();
|
||||||
|
|
||||||
answers.Add("BlindName", rowInfo.BlindName);
|
|
||||||
answers.Add("IsDicomReading", rowInfo.IsDicomReading.ToString());
|
|
||||||
answers.Add("MeasureData", rowInfo == null ? string.Empty : rowInfo.MeasureData);
|
answers.Add("MeasureData", rowInfo == null ? string.Empty : rowInfo.MeasureData);
|
||||||
answers.Add("RowIndex", x.ToString());
|
answers.Add("RowIndex", x.ToString());
|
||||||
answers.Add("RowId", rowInfo.Id.ToString());
|
answers.Add("RowId", rowInfo.Id.ToString());
|
||||||
|
@ -546,8 +725,8 @@ namespace IRaCIS.Application.Services
|
||||||
answers.Add("InstanceId", rowInfo == null ? string.Empty : rowInfo.InstanceId.ToString());
|
answers.Add("InstanceId", rowInfo == null ? string.Empty : rowInfo.InstanceId.ToString());
|
||||||
answers.Add("SeriesId", rowInfo == null ? string.Empty : rowInfo.SeriesId.ToString());
|
answers.Add("SeriesId", rowInfo == null ? string.Empty : rowInfo.SeriesId.ToString());
|
||||||
answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString());
|
answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString());
|
||||||
answers.Add("SplitOrMergeLesionName",rowInfo.SplitName.IsNullOrEmpty()? rowInfo.MergeName: rowInfo.SplitName);
|
answers.Add("SplitOrMergeLesionName", rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName);
|
||||||
answers.Add("SplitOrMergeType", rowInfo.SplitOrMergeType==null?string.Empty:((int)rowInfo.SplitOrMergeType).ToString());
|
answers.Add("SplitOrMergeType", rowInfo.SplitOrMergeType == null ? string.Empty : ((int)rowInfo.SplitOrMergeType).ToString());
|
||||||
|
|
||||||
|
|
||||||
item.TableQuestions.Answers.Add(answers);
|
item.TableQuestions.Answers.Add(answers);
|
||||||
|
@ -715,7 +894,7 @@ namespace IRaCIS.Application.Services
|
||||||
public async Task<IResponseOutput> DeleteReadingRowAnswer(DeleteReadingRowAnswerInDto inDto)
|
public async Task<IResponseOutput> DeleteReadingRowAnswer(DeleteReadingRowAnswerInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
var deleteRowInfo = await _readingTableAnswerRowInfoRepository.Where(x =>x.Id== inDto.RowId).FirstNotNullAsync();
|
var deleteRowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == inDto.RowIndex && x.QuestionId == inDto.QuestionId).FirstNotNullAsync();
|
||||||
if (deleteRowInfo == null)
|
if (deleteRowInfo == null)
|
||||||
{
|
{
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
|
@ -727,8 +906,8 @@ namespace IRaCIS.Application.Services
|
||||||
throw new BusinessValidationFailedException($"当前病灶分裂出其他病灶或者其他病灶合并到了当前病灶,删除失败");
|
throw new BusinessValidationFailedException($"当前病灶分裂出其他病灶或者其他病灶合并到了当前病灶,删除失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
await _readingTableQuestionAnswerRepository.DeleteFromQueryAsync(x => x.RowId== inDto.RowId);
|
await _readingTableQuestionAnswerRepository.DeleteFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == inDto.RowIndex && x.QuestionId == inDto.QuestionId);
|
||||||
await _readingTableAnswerRowInfoRepository.DeleteFromQueryAsync(x => x.Id==inDto.RowId);
|
await _readingTableAnswerRowInfoRepository.DeleteFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == inDto.RowIndex && x.QuestionId == inDto.QuestionId);
|
||||||
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
||||||
|
@ -855,8 +1034,6 @@ namespace IRaCIS.Application.Services
|
||||||
rowInfo.TrialId = inDto.TrialId;
|
rowInfo.TrialId = inDto.TrialId;
|
||||||
rowInfo.QuestionId = inDto.QuestionId;
|
rowInfo.QuestionId = inDto.QuestionId;
|
||||||
rowInfo.MeasureData = inDto.MeasureData;
|
rowInfo.MeasureData = inDto.MeasureData;
|
||||||
rowInfo.BlindName = inDto.BlindName;
|
|
||||||
rowInfo.IsDicomReading = inDto.IsDicomReading;
|
|
||||||
rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd;
|
rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd;
|
||||||
rowInfo.FristAddTaskNum = inDto.FristAddTaskNum;
|
rowInfo.FristAddTaskNum = inDto.FristAddTaskNum;
|
||||||
rowInfo.RowIndex = inDto.RowIndex;
|
rowInfo.RowIndex = inDto.RowIndex;
|
||||||
|
@ -993,16 +1170,16 @@ namespace IRaCIS.Application.Services
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
|
||||||
var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId
|
var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId
|
||||||
&&(x.IsJudgeQuestion||x.IsRequired== IsRequired.Required)
|
&& (x.IsJudgeQuestion || x.IsRequired == IsRequired.Required)
|
||||||
).ToListAsync();
|
).ToListAsync();
|
||||||
|
|
||||||
var answerQuestionIds = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => x.ReadingQuestionTrialId).ToListAsync();
|
var answerQuestionIds = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => x.ReadingQuestionTrialId).ToListAsync();
|
||||||
|
|
||||||
readingQuestionList = readingQuestionList.Where(x => !answerQuestionIds.Contains(x.Id)).ToList();
|
readingQuestionList = readingQuestionList.Where(x => !answerQuestionIds.Contains(x.Id)).ToList();
|
||||||
|
|
||||||
if(readingQuestionList.Count()>0)
|
if (readingQuestionList.Count() > 0)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException($" 必填问题{ string.Join(',', readingQuestionList.Select(x =>x.QuestionName))}的答案为空或未保存");
|
throw new BusinessValidationFailedException($" 必填问题{string.Join(',', readingQuestionList.Select(x => x.QuestionName))}的答案为空或未保存");
|
||||||
}
|
}
|
||||||
|
|
||||||
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
|
await _readingCalculateService.VerifyVisitTaskQuestions(inDto);
|
||||||
|
@ -1199,6 +1376,18 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
await _visitTaskRepository.SaveChangesAsync();
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
||||||
|
//基于业务场景发送邮件
|
||||||
|
|
||||||
|
//await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync( visitTaskId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,8 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
|
|
||||||
public enum EmailUserType
|
public enum EmailUserType
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//变为手动输入了,这里不需要了
|
||||||
From =1,
|
From =1,
|
||||||
|
|
||||||
To=2,
|
To=2,
|
||||||
|
|
|
@ -16,14 +16,12 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public class TrialEmailNoticeUser : Entity
|
public class TrialEmailNoticeUser : Entity
|
||||||
{
|
{
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public User User { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public TrialEmailNoticeConfig TrialEmailNoticeConfig { get; set; }
|
public TrialEmailNoticeConfig TrialEmailNoticeConfig { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Guid UserId { get; set; }
|
public UserTypeEnum UserType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Guid TrialEmailNoticeConfigId { get; set; }
|
public Guid TrialEmailNoticeConfigId { get; set; }
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="EntityFrameworkCore.Projectables" Version="2.3.0" />
|
<PackageReference Include="EntityFrameworkCore.Projectables" Version="2.3.0" />
|
||||||
<PackageReference Include="EntityFrameworkCore.Projectables.Abstractions" Version="2.3.0" />
|
<PackageReference Include="EntityFrameworkCore.Projectables.Abstractions" Version="2.3.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.10" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.9" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.10" />
|
||||||
<PackageReference Include="NewId" Version="3.0.3" />
|
<PackageReference Include="NewId" Version="3.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="EFCore.BulkExtensions" Version="6.5.6" />
|
<PackageReference Include="EFCore.BulkExtensions" Version="6.5.6" />
|
||||||
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="6.0.3.1" />
|
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="6.0.3.1" />
|
||||||
<PackageReference Include="EntityFrameworkCore.Triggered" Version="3.1.0" />
|
<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.Logging.Debug" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AutoMapper" Version="11.0.1" />
|
<PackageReference Include="AutoMapper" Version="12.0.0" />
|
||||||
<PackageReference Include="CSRedisCore" Version="3.8.669" />
|
<PackageReference Include="CSRedisCore" Version="3.8.669" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.10" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
||||||
<PackageReference Include="SharpZipLib" Version="1.4.0" />
|
<PackageReference Include="SharpZipLib" Version="1.4.0" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.20" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.20" />
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue