增加邮件查询条件
parent
fed21316df
commit
31fdedb033
|
@ -65,6 +65,12 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public SysEmailLevel? SystemLevel { get; set; }
|
||||
public int? BusinessModuleEnum { get; set; }
|
||||
|
||||
public int? EmailUrgentEnum { get; set; }
|
||||
|
||||
public UserTypeEnum? ToUserType { get; set; }
|
||||
|
||||
public UserTypeEnum? CopyUserType { get; set; }
|
||||
|
||||
}
|
||||
|
||||
///<summary> EmailNoticeConfigAddOrEdit 列表查询参数模型</summary>
|
||||
|
@ -146,7 +152,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
[DictionaryTranslate("YesOrNo")]
|
||||
public bool IsDistinguishCriteria { get; set; }
|
||||
|
||||
|
||||
|
||||
[DictionaryTranslate("CriterionType")]
|
||||
public CriterionType? CriterionTypeEnum { get; set; }
|
||||
|
@ -154,7 +160,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
[DictionaryTranslate("BusinessModule")]
|
||||
public int BusinessModuleEnum { get; set; }
|
||||
|
||||
[DictionaryTranslate("BusinessLevel")]
|
||||
[DictionaryTranslate("BusinessLevel")]
|
||||
public int BusinessLevelEnum { get; set; }
|
||||
|
||||
[DictionaryTranslate("EmailUrgent")]
|
||||
|
|
|
@ -29,6 +29,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
|
||||
.WhereIf(inQuery.ToUserType != null, t => t.EmailNoticeUserTypeList.Any(t=>t.UserType==inQuery.ToUserType && t.EmailUserType==EmailUserType.To) )
|
||||
.WhereIf(inQuery.CopyUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
|
||||
.ProjectTo<EmailNoticeConfigView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
|
||||
|
|
|
@ -108,6 +108,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public string SortField { get; set; } = string.Empty;
|
||||
|
||||
public bool Asc { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
public int? EmailUrgentEnum { get; set; }
|
||||
|
||||
public UserTypeEnum? ToUserType { get; set; }
|
||||
|
||||
public UserTypeEnum? CopyUserType { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1244,12 +1244,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var emailNoticeConfigQueryable = _emailNoticeConfigRepository
|
||||
.WhereIf(inQuery.SystemLevel == null, t => t.SystemLevel == SysEmailLevel.not_sys )
|
||||
//.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
|
||||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
|
||||
.WhereIf(inQuery.BusinessModuleEnum != null, t => t.BusinessModuleEnum == inQuery.BusinessModuleEnum)
|
||||
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
|
||||
.WhereIf(inQuery.ToUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.ToUserType && t.EmailUserType == EmailUserType.To))
|
||||
.WhereIf(inQuery.CopyUserType != null, t => t.EmailNoticeUserTypeList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
|
||||
.ProjectTo<TrialSelectEmailNoticeConfigView>(_mapper.ConfigurationProvider, new { trialId = inQuery.TrialId });
|
||||
|
||||
return await emailNoticeConfigQueryable.ToPagedListAsync(inQuery);
|
||||
|
@ -1325,9 +1327,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var trialEmailNoticeConfigQueryable = _trialEmailNoticeConfigRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(inQuery.IsDistinguishCriteria == false, t => t.TrialReadingCriterionId == null)
|
||||
.WhereIf(inQuery.IsDistinguishCriteria == true, t => t.CriterionTypeEnum != null)
|
||||
.WhereIf(inQuery.IsDistinguishCriteria == true, t => t.CriterionTypeEnum != null)
|
||||
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||
.WhereIf(inQuery.EmailUrgentEnum != null, t => t.EmailUrgentEnum == inQuery.EmailUrgentEnum)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.WhereIf(inQuery.ToUserType != null, t => t.TrialEmailNoticeUserList.Any(t => t.UserType == inQuery.ToUserType && t.EmailUserType == EmailUserType.To))
|
||||
.WhereIf(inQuery.CopyUserType != null, t => t.TrialEmailNoticeUserList.Any(t => t.UserType == inQuery.CopyUserType && t.EmailUserType == EmailUserType.Copy))
|
||||
.ProjectTo<TrialEmailNoticeConfigView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var sortField = string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TrialEmailNoticeConfigView.Code) : inQuery.SortField;
|
||||
|
|
Loading…
Reference in New Issue