修改文档排序
parent
71bedb5b5c
commit
fcdee39356
|
@ -7,6 +7,7 @@
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using IRaCIS.Core.Application.MassTransit.Consumer;
|
using IRaCIS.Core.Application.MassTransit.Consumer;
|
||||||
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using MassTransit.Mediator;
|
using MassTransit.Mediator;
|
||||||
|
@ -51,7 +52,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
|
|
||||||
var trialDocumentAttachmentQueryable = _trialDocumentAttachmentRepository
|
var trialDocumentAttachmentQueryable = _trialDocumentAttachmentRepository
|
||||||
.WhereIf(inQuery.TrialDocumentId!=null,x=>x.TrialDocumentId==inQuery.TrialDocumentId)
|
.WhereIf(inQuery.TrialDocumentId != null, x => x.TrialDocumentId == inQuery.TrialDocumentId)
|
||||||
.WhereIf(inQuery.Name != null, x => x.Name.Contains(inQuery.Name))
|
.WhereIf(inQuery.Name != null, x => x.Name.Contains(inQuery.Name))
|
||||||
.WhereIf(inQuery.FileFormat != null, x => x.FileFormat == inQuery.FileFormat)
|
.WhereIf(inQuery.FileFormat != null, x => x.FileFormat == inQuery.FileFormat)
|
||||||
.ProjectTo<TrialDocumentAttachmentView>(_mapper.ConfigurationProvider);
|
.ProjectTo<TrialDocumentAttachmentView>(_mapper.ConfigurationProvider);
|
||||||
|
@ -132,7 +133,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
// 从新作用域解析服务
|
// 从新作用域解析服务
|
||||||
var mediator = scope.ServiceProvider.GetRequiredService<IMediator>();
|
var mediator = scope.ServiceProvider.GetRequiredService<IMediator>();
|
||||||
await mediator.Publish(new TrialDocumentErverDayEvent { });
|
await mediator.Publish(new TrialDocumentErverDayEvent { });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return ResponseOutput.Result(true);
|
return ResponseOutput.Result(true);
|
||||||
|
@ -175,7 +176,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
ResearchProgramNo = trialDoc.Trial.ResearchProgramNo,
|
ResearchProgramNo = trialDoc.Trial.ResearchProgramNo,
|
||||||
ExperimentName = trialDoc.Trial.ExperimentName,
|
ExperimentName = trialDoc.Trial.ExperimentName,
|
||||||
CurrentStaffTrainDays = trialDoc.CurrentStaffTrainDays,
|
CurrentStaffTrainDays = trialDoc.CurrentStaffTrainDays,
|
||||||
NewStaffTrainDays= trialDoc.NewStaffTrainDays,
|
NewStaffTrainDays = trialDoc.NewStaffTrainDays,
|
||||||
Id = trialDoc.Id,
|
Id = trialDoc.Id,
|
||||||
IsSystemDoc = false,
|
IsSystemDoc = false,
|
||||||
CreateTime = trialDoc.CreateTime,
|
CreateTime = trialDoc.CreateTime,
|
||||||
|
@ -509,7 +510,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
.WhereIf(inQuery.IsSign == true, t => t.ConfirmTime != null)
|
.WhereIf(inQuery.IsSign == true, t => t.ConfirmTime != null)
|
||||||
.WhereIf(inQuery.IsSign == false, t => t.ConfirmTime == null);
|
.WhereIf(inQuery.IsSign == false, t => t.ConfirmTime == null);
|
||||||
|
|
||||||
|
var defalutSortArray = new string[] { nameof(UnionDocumentWithConfirmInfoView.IsDeleted), nameof(UnionDocumentWithConfirmInfoView.CreateTime) + " desc", nameof(UnionDocumentWithConfirmInfoView.ConfirmTime) };
|
||||||
|
|
||||||
var result = await unionQuery.ToPagedListAsync(inQuery);
|
var result = await unionQuery.ToPagedListAsync(inQuery);
|
||||||
|
|
||||||
|
@ -519,7 +520,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
var sysDataList = await _systemDocumentRepository.Where(x => sysids.Contains(x.Id)).Include(x => x.SystemDocumentAttachmentList).ToListAsync();
|
var sysDataList = await _systemDocumentRepository.Where(x => sysids.Contains(x.Id)).Include(x => x.SystemDocumentAttachmentList).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
result.CurrentPageData.ForEach(x =>
|
result.CurrentPageData.ForEach(x =>
|
||||||
{
|
{
|
||||||
if (sysDataList.Any(y => y.Id == x.Id))
|
if (sysDataList.Any(y => y.Id == x.Id))
|
||||||
|
@ -913,7 +914,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
var systemDocQuery =
|
var systemDocQuery =
|
||||||
from sysDoc in _systemDocumentRepository.AsQueryable(false)
|
from sysDoc in _systemDocumentRepository.AsQueryable(false)
|
||||||
.Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true)
|
.Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true)
|
||||||
from identityUser in _identityUserRepository.AsQueryable(false).Where(t =>t.Status== UserStateEnum.Enable && t.UserRoleList.Where(t => t.IsUserRoleDisabled == false).Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
from identityUser in _identityUserRepository.AsQueryable(false).Where(t => t.Status == UserStateEnum.Enable && t.UserRoleList.Where(t => t.IsUserRoleDisabled == false).Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
||||||
.Where(t => inQuery.UserId != null ? t.Id == inQuery.UserId : true)
|
.Where(t => inQuery.UserId != null ? t.Id == inQuery.UserId : true)
|
||||||
.Where(t => inQuery.UserTypeId != null ? t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserTypeId && t.IsUserRoleDisabled == false) : true)
|
.Where(t => inQuery.UserTypeId != null ? t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserTypeId && t.IsUserRoleDisabled == false) : true)
|
||||||
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = identityUser.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = identityUser.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
||||||
|
|
Loading…
Reference in New Issue