diff --git a/IRaCIS.Core.API/resultTemplate b/IRaCIS.Core.API/resultTemplate new file mode 100644 index 000000000..556bbb59a Binary files /dev/null and b/IRaCIS.Core.API/resultTemplate differ diff --git a/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs b/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs index a7ea86977..c47458e3e 100644 --- a/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs +++ b/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs @@ -12,6 +12,7 @@ using MiniExcelLibs; using MiniExcelLibs.OpenXml; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using NPOI.HPSF; using NPOI.HSSF.UserModel; using NPOI.XSSF.UserModel; using SkiaSharp; @@ -145,8 +146,12 @@ public static class ExcelExportHelper workbook.RemoveSheetAt(1); } + + FileStream fileOut = new FileStream("resultTemplate", FileMode.Create, FileAccess.ReadWrite); + workbook.Write(fileOut); + var memoryStream2 = new MemoryStream(); - workbook.Write(memoryStream2); + workbook.Write(memoryStream2,true); memoryStream2.Seek(0, SeekOrigin.Begin); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index b92b011ad..62849f626 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -95,7 +95,8 @@ namespace IRaCIS.Application.Services .WhereIf(multiModalityIdSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Modality) == multiModalityIdSelectCount) .WhereIf(multiCriteriaSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Criterion) == multiCriteriaSelectCount) .WhereIf(multiReviewTypeSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.ReviewType) == multiReviewTypeSelectCount) - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin + && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id && t.IsDeleted == false) && t.IsDeleted == false) .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id , isEn_Us= _userInfo.IsEn_Us }); return await query.ToPagedListAsync(searchParam.PageIndex, searchParam.PageSize, string.IsNullOrWhiteSpace(searchParam.SortField) ? "CreateTime" : searchParam.SortField, searchParam.Asc); @@ -107,7 +108,8 @@ namespace IRaCIS.Application.Services public async Task> GetTrialSelect() { return await _trialRepository.AsQueryable().IgnoreQueryFilters() - .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.IsDeleted == false) + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt !=(int)UserTypeEnum.Admin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.OP + , t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.IsDeleted == false) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); } diff --git a/IRaCIS.Core.Domain.Share/User/UserType.cs b/IRaCIS.Core.Domain.Share/User/UserType.cs index a5f449f12..5d2221939 100644 --- a/IRaCIS.Core.Domain.Share/User/UserType.cs +++ b/IRaCIS.Core.Domain.Share/User/UserType.cs @@ -42,7 +42,7 @@ QA = 12, - + OP=13, SPM=20, APM=21,