Merge branch 'Test.Study' of http://192.168.3.69:2000/XCKJ/irc-netcore-api into Test.Study
commit
60b2978deb
|
@ -134,7 +134,7 @@ namespace IRaCIS.Api.Controllers
|
||||||
return returnModel;
|
return returnModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Authorize]
|
||||||
[HttpGet("user/GenerateSTS")]
|
[HttpGet("user/GenerateSTS")]
|
||||||
public IResponseOutput GenerateSTS( [FromServices] IWebHostEnvironment webHostEnvironment)
|
public IResponseOutput GenerateSTS( [FromServices] IWebHostEnvironment webHostEnvironment)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1083,122 +1083,18 @@ namespace IRaCIS.Core.API.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region 废弃
|
/// <summary> 通用文件下载 </summary>
|
||||||
|
[AllowAnonymous]
|
||||||
|
[HttpGet("CommonDocument/DownloadCommonDoc")]
|
||||||
|
public async Task<IActionResult> DownloadCommonFile(string code, [FromServices] IRepository<CommonDocument> _commonDocumentRepository)
|
||||||
|
{
|
||||||
|
var (filePath, fileName) = await FileStoreHelper.GetCommonDocPhysicalFilePathAsync(_hostEnvironment, _commonDocumentRepository, code);
|
||||||
|
|
||||||
///// <summary> 缩略图 </summary>
|
new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(filePath), out var contentType);
|
||||||
//[AllowAnonymous]
|
|
||||||
//[HttpGet("Common/LocalFilePreview")]
|
|
||||||
//public async Task<FileContentResult> LocalFilePreview(string relativePath)
|
|
||||||
//{
|
|
||||||
|
|
||||||
// var _fileStorePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, relativePath);
|
|
||||||
|
|
||||||
// var storePreviewPath = _fileStorePath + ".preview.jpeg";
|
|
||||||
|
|
||||||
// if (!System.IO.File.Exists(storePreviewPath))
|
|
||||||
// {
|
|
||||||
// ImageHelper.ResizeSave(_fileStorePath, storePreviewPath);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return new FileContentResult(await System.IO.File.ReadAllBytesAsync(storePreviewPath), "image/jpeg");
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
///// <summary> 通用文件下载 </summary>
|
|
||||||
//[AllowAnonymous]
|
|
||||||
//[HttpGet("CommonDocument/DownloadCommonDoc")]
|
|
||||||
//public async Task<IActionResult> DownloadCommonFile(string code, [FromServices] IRepository<CommonDocument> _commonDocumentRepository)
|
|
||||||
//{
|
|
||||||
// var (filePath, fileName) = await FileStoreHelper.GetCommonDocPhysicalFilePathAsync(_hostEnvironment, _commonDocumentRepository, code);
|
|
||||||
|
|
||||||
// new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(filePath), out var contentType);
|
|
||||||
|
|
||||||
// return File(System.IO.File.OpenRead(filePath), contentType ?? "application/octet-stream", fileName);
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 下载项目临床数据文件
|
|
||||||
///// </summary>
|
|
||||||
///// <param name="clinicalDataTrialSetId"></param>
|
|
||||||
///// <param name="_clinicalDataTrialSetRepository"></param>
|
|
||||||
///// <returns></returns>
|
|
||||||
//[AllowAnonymous]
|
|
||||||
//[HttpGet("CommonDocument/DownloadTrialClinicalFile")]
|
|
||||||
//public async Task<IActionResult> DownloadTrialClinicalFile(Guid clinicalDataTrialSetId, [FromServices] IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository)
|
|
||||||
//{
|
|
||||||
// var (filePath, fileName) = await FileStoreHelper.GetTrialClinicalPathAsync(_hostEnvironment, _clinicalDataTrialSetRepository, clinicalDataTrialSetId);
|
|
||||||
|
|
||||||
// new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(filePath), out var contentType);
|
|
||||||
|
|
||||||
// return File(System.IO.File.OpenRead(filePath), contentType ?? "application/octet-stream", fileName);
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 下载系统临床数据文件
|
|
||||||
///// </summary>
|
|
||||||
///// <param name="clinicalDataSystemSetId"></param>
|
|
||||||
///// <param name="_clinicalDataSystemSetRepository"></param>
|
|
||||||
///// <returns></returns>
|
|
||||||
//[AllowAnonymous]
|
|
||||||
//[HttpGet("CommonDocument/DownloadSystemClinicalFile")]
|
|
||||||
//public async Task<IActionResult> DownloadSystemClinicalFile(Guid clinicalDataSystemSetId, [FromServices] IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository)
|
|
||||||
//{
|
|
||||||
// var (filePath, fileName) = await FileStoreHelper.GetSystemClinicalPathAsync(_hostEnvironment, _clinicalDataSystemSetRepository, clinicalDataSystemSetId);
|
|
||||||
|
|
||||||
// new FileExtensionContentTypeProvider().Mappings.TryGetValue(Path.GetExtension(filePath), out var contentType);
|
|
||||||
|
|
||||||
// return File(System.IO.File.OpenRead(filePath), contentType ?? "application/octet-stream", fileName);
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
/////上传项目签名文档
|
|
||||||
///// </summary>
|
|
||||||
///// <param name="trialId"></param>
|
|
||||||
///// <returns></returns>
|
|
||||||
//[HttpPost("TrialDocument/UploadTrialDoc/{trialId:guid}")]
|
|
||||||
//[DisableRequestSizeLimit]
|
|
||||||
//[DisableFormValueModelBinding]
|
|
||||||
//public async Task<IResponseOutput> UploadTrialDoc(Guid trialId)
|
|
||||||
//{
|
|
||||||
|
|
||||||
// return await SingleFileUploadAsync((fileName) => FileStoreHelper.GetTrialSignDocPath(_hostEnvironment, trialId, fileName));
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 上传系统签名文档
|
|
||||||
///// </summary>
|
|
||||||
///// <returns></returns>
|
|
||||||
//[HttpPost("TrialDocument/UploadSystemDoc")]
|
|
||||||
//[DisableRequestSizeLimit]
|
|
||||||
//[DisableFormValueModelBinding]
|
|
||||||
//public async Task<IResponseOutput> UploadSysTemDoc()
|
|
||||||
//{
|
|
||||||
|
|
||||||
// return await SingleFileUploadAsync((fileName) => FileStoreHelper.GetSystemSignDocPath(_hostEnvironment, fileName));
|
|
||||||
|
|
||||||
//}
|
|
||||||
///// <summary>
|
|
||||||
///// 上传系统通知文档
|
|
||||||
///// </summary>
|
|
||||||
///// <returns></returns>
|
|
||||||
//[HttpPost("SystemNotice/UploadSystemNoticeDoc")]
|
|
||||||
//[DisableRequestSizeLimit]
|
|
||||||
//[DisableFormValueModelBinding]
|
|
||||||
//public async Task<IResponseOutput> UploadSystemNoticeDoc()
|
|
||||||
//{
|
|
||||||
|
|
||||||
// return await SingleFileUploadAsync((fileName) => FileStoreHelper.GetSystemNoticePath(_hostEnvironment, fileName));
|
|
||||||
|
|
||||||
//}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
return File(System.IO.File.OpenRead(filePath), contentType ?? "application/octet-stream", fileName);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上传通用文档 比如一致性核查的 比如导出的excel 模板
|
/// 上传通用文档 比如一致性核查的 比如导出的excel 模板
|
||||||
|
|
Binary file not shown.
|
@ -12,6 +12,7 @@ using MiniExcelLibs;
|
||||||
using MiniExcelLibs.OpenXml;
|
using MiniExcelLibs.OpenXml;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using NPOI.HPSF;
|
||||||
using NPOI.HSSF.UserModel;
|
using NPOI.HSSF.UserModel;
|
||||||
using NPOI.XSSF.UserModel;
|
using NPOI.XSSF.UserModel;
|
||||||
using SkiaSharp;
|
using SkiaSharp;
|
||||||
|
@ -145,8 +146,12 @@ public static class ExcelExportHelper
|
||||||
workbook.RemoveSheetAt(1);
|
workbook.RemoveSheetAt(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FileStream fileOut = new FileStream("resultTemplate", FileMode.Create, FileAccess.ReadWrite);
|
||||||
|
workbook.Write(fileOut);
|
||||||
|
|
||||||
var memoryStream2 = new MemoryStream();
|
var memoryStream2 = new MemoryStream();
|
||||||
workbook.Write(memoryStream2);
|
workbook.Write(memoryStream2,true);
|
||||||
|
|
||||||
memoryStream2.Seek(0, SeekOrigin.Begin);
|
memoryStream2.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
@ -316,7 +321,7 @@ public static class ExcelExportHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
var memoryStream2 = new MemoryStream();
|
var memoryStream2 = new MemoryStream();
|
||||||
workbook.Write(memoryStream2);
|
workbook.Write(memoryStream2,true);
|
||||||
|
|
||||||
memoryStream2.Seek(0, SeekOrigin.Begin);
|
memoryStream2.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
|
|
@ -110,5 +110,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[HttpDelete("{commonDocumentId:guid}")]
|
||||||
|
public async Task<IResponseOutput> DeleteCommonDocument(Guid commonDocumentId)
|
||||||
|
{
|
||||||
|
var success = await _commonDocumentRepository.DeleteFromQueryAsync(t => t.Id == commonDocumentId, true,true);
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -490,7 +490,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
var memoryStream2 = new MemoryStream();
|
var memoryStream2 = new MemoryStream();
|
||||||
wb.Write(memoryStream2);
|
wb.Write(memoryStream2,true);
|
||||||
memoryStream2.Seek(0, SeekOrigin.Begin);
|
memoryStream2.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
return new FileStreamResult(memoryStream2, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
return new FileStreamResult(memoryStream2, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||||
|
|
|
@ -1031,7 +1031,7 @@ namespace IRaCIS.Core.Application
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.Code), o => o.TrialCode.Contains(inQuery.Code))
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.ResearchProgramNo), o => o.ResearchProgramNo.Contains(inQuery.ResearchProgramNo))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName))
|
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.ExperimentName), o => o.ExperimentName.Contains(inQuery.ExperimentName))
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin && _userInfo.UserTypeEnumInt != (int)UserTypeEnum.Admin, 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)
|
||||||
.Select(t => new TrialToBeDoneDto()
|
.Select(t => new TrialToBeDoneDto()
|
||||||
{
|
{
|
||||||
TrialId = t.Id,
|
TrialId = t.Id,
|
||||||
|
|
|
@ -95,7 +95,8 @@ namespace IRaCIS.Application.Services
|
||||||
.WhereIf(multiModalityIdSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Modality) == multiModalityIdSelectCount)
|
.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(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(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<TrialDetailDTO>(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id , isEn_Us= _userInfo.IsEn_Us });
|
.ProjectTo<TrialDetailDTO>(_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);
|
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<List<TrialSelectDTO>> GetTrialSelect()
|
public async Task<List<TrialSelectDTO>> GetTrialSelect()
|
||||||
{
|
{
|
||||||
return await _trialRepository.AsQueryable().IgnoreQueryFilters()
|
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<TrialSelectDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<TrialSelectDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
QA = 12,
|
QA = 12,
|
||||||
|
|
||||||
|
OP=13,
|
||||||
|
|
||||||
SPM=20,
|
SPM=20,
|
||||||
APM=21,
|
APM=21,
|
||||||
|
|
Loading…
Reference in New Issue