修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
ef31afa1d8
commit
a2afe4f6e4
|
@ -154,7 +154,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
|||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<TrialDocument> _trialDocumentRepository,
|
||||
IRepository<IdentityUser> _identityUserRepository,
|
||||
|
||||
IRepository<TrialIdentityUser> _trialIdentityUserRepository,
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<TrialUserRole> _trialUserRoleRepository,
|
||||
IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||
|
@ -180,8 +180,10 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
|||
// 只查询新增角色的用户
|
||||
systemDocQuery =
|
||||
from trialDoc in _trialDocumentRepository.AsQueryable(false).Where(x => context.Message.Ids.Contains(x.Id))
|
||||
join trialIdentityUser in _trialIdentityUserRepository.AsQueryable() on trialDoc.TrialId equals trialIdentityUser.TrialId
|
||||
from identityUser in _identityUserRepository.AsQueryable(false)
|
||||
.Where(t => t.Status == UserStateEnum.Enable &&
|
||||
t.Id == trialIdentityUser.IdentityUserId &&
|
||||
t.UserRoleList.Where(t => t.IsUserRoleDisabled == false)
|
||||
.Any(t => context.Message.NewUserTypeIds.Contains(t.UserTypeId) &&
|
||||
trialDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
||||
|
@ -208,13 +210,15 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring
|
|||
// 查询所有相关角色的用户
|
||||
systemDocQuery =
|
||||
from trialDoc in _trialDocumentRepository.AsQueryable(false).Where(x => context.Message.Ids.Contains(x.Id))
|
||||
join trialIdentityUser in _trialIdentityUserRepository.AsQueryable() on trialDoc.TrialId equals trialIdentityUser.TrialId
|
||||
from identityUser in _identityUserRepository.AsQueryable(false)
|
||||
.Where(t => t.Status == UserStateEnum.Enable &&
|
||||
t.Id== trialIdentityUser.IdentityUserId&&
|
||||
t.UserRoleList.Where(t => t.IsUserRoleDisabled == false)
|
||||
.Any(t => trialDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId)))
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
{
|
||||
IsSystemDoc = true,
|
||||
IsSystemDoc = false,
|
||||
Id = trialDoc.Id,
|
||||
CreateTime = trialDoc.CreateTime,
|
||||
IsDeleted = trialDoc.IsDeleted,
|
||||
|
|
|
@ -11,6 +11,7 @@ using IRaCIS.Core.Infrastructure.Extention;
|
|||
using System.Threading.Tasks;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using IRaCIS.Core.Application.Service.DTO;
|
||||
using IRaCIS.Core.Application.MassTransit.Command;
|
||||
namespace IRaCIS.Core.Application.Service;
|
||||
|
||||
/// <summary>
|
||||
|
@ -41,6 +42,21 @@ public class TrialHistoryRecordFileService(IRepository<TrialHistoryRecordFile> _
|
|||
return pageList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量新增稽查记录文件
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> BatchAddTrialHistoryRecordFile(List<TrialHistoryRecordFileAddOrEdit> inDto)
|
||||
{
|
||||
List<TrialHistoryRecordFile> entities = _mapper.Map<List<TrialHistoryRecordFile>>(inDto);
|
||||
await _trialHistoryRecordFileRepository.AddRangeAsync(entities);
|
||||
|
||||
await _trialHistoryRecordFileRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增或修改稽查记录文件
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue