与提交

Test.EIImageViewer
hang 2023-06-21 11:24:46 +08:00
parent cda334487d
commit adbf89d451
15 changed files with 70 additions and 48 deletions

View File

@ -76,50 +76,50 @@ namespace IRaCIS.Core.API
#region ÈÏÖ¤³ÌÐò
//if (!File.Exists($@"C:\ProgramData\.xingcang\config.json"))
//{
// Console.WriteLine("当前未注册");
// Log.Logger.Error("当前未注册");
// Console.ReadLine();
// return;
//}
//else
//{
// var json = File.ReadAllText($@"C:\ProgramData\.xingcang\config.json");
if (!File.Exists($@"C:\ProgramData\.xingcang\config.json"))
{
Console.WriteLine("当前未注册");
Log.Logger.Error("当前未注册");
Console.ReadLine();
return;
}
else
{
var json = File.ReadAllText($@"C:\ProgramData\.xingcang\config.json");
// JObject jsonObject = JObject.Parse(json);
JObject jsonObject = JObject.Parse(json);
// var key = jsonObject["key"].ToString();
var key = jsonObject["key"].ToString();
// var value = jsonObject["value"].ToString();
var value = jsonObject["value"].ToString();
// var physicalAddressList = NetworkInterface.GetAllNetworkInterfaces().Select(t => t.GetPhysicalAddress().ToString());
var physicalAddressList = NetworkInterface.GetAllNetworkInterfaces().Select(t => t.GetPhysicalAddress().ToString());
// // 判断文件里面的机器码是否是本机的
// if (!physicalAddressList.Contains(key))
// {
// Console.WriteLine("机器码和本机不对应");
// Log.Logger.Error("机器码和本机不对应");
// Console.ReadLine();
// 判断文件里面的机器码是否是本机的
if (!physicalAddressList.Contains(key))
{
Console.WriteLine("机器码和本机不对应");
Log.Logger.Error("机器码和本机不对应");
Console.ReadLine();
// return;
// }
return;
}
// var secrete = MD5Helper.Md5($"{key}_XINGCANG");
var secrete = MD5Helper.Md5($"{key}_XINGCANG");
// if (value != secrete)
// {
// Console.WriteLine("机器码和注册码不匹配");
// Log.Logger.Error("机器码和注册码不匹配");
// Console.ReadLine();
if (value != secrete)
{
Console.WriteLine("机器码和注册码不匹配");
Log.Logger.Error("机器码和注册码不匹配");
Console.ReadLine();
// return;
return;
// }
}
//}
}
#endregion

View File

@ -7,8 +7,9 @@
}
},
"ConnectionStrings": {
"RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_Certificate;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true",
"Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true"
//"RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_Certificate;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true",
//"Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true"
"RemoteNew": "Server=192.168.1.11\\WCH; Database=IRaCIS; User ID=sa; Password=123456;TrustServerCertificate=true"
},
"BasicSystemConfig": {

View File

@ -5,6 +5,8 @@ using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Processing;
using System.Security.Cryptography;
using System.Text;
using Dicom.Imaging;
using DicomImage = FellowOakDicom.Imaging.DicomImage;
namespace IRaCIS.Core.Application.Helper;
@ -33,7 +35,7 @@ public static class ImageHelper
{
string jpegPath = filePath + ".preview.jpg";
if (!File.Exists(jpegPath))
if (!File.Exists(jpegPath)|| new FileInfo(jpegPath).Length==0)
{
using (Stream stream = new FileStream(jpegPath, FileMode.Create))
{

View File

@ -123,7 +123,6 @@
<PackageReference Include="NPOI" Version="2.6.0" />
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.0" />
<PackageReference Include="Quartz" Version="3.5.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.5" />
</ItemGroup>

View File

@ -30,6 +30,8 @@ namespace IRaCIS.Core.Application.ViewModel
public string TagDescription { get; set; } = string.Empty;
public string TagDescriptionCN { get; set; } = string.Empty;
public string ValueRepresentation { get; set; } = string.Empty;

View File

@ -3,6 +3,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using IRaCIS.Core.Application.Helper;
using Org.BouncyCastle.Utilities;
namespace IRaCIS.Core.Application.Services
{
@ -148,6 +149,8 @@ namespace IRaCIS.Core.Application.Services
//var (physicalPath, relativePath) = FileStoreHelper.GetDicomInstanceFilePath(_hostEnvironment, dicomStudy.TrialId, dicomStudy.SiteId, dicomStudy.SubjectId, dicomStudy.SubjectVisitId, dicomStudy.Id, dicomInstance.Id);
if (File.Exists(physicalPath))
{
using (var sw = ImageHelper.RenderPreviewJpeg(physicalPath))
{
var bytes = new byte[sw.Length];
@ -156,6 +159,12 @@ namespace IRaCIS.Core.Application.Services
return new FileContentResult(bytes, "image/jpeg");
}
}
else
{
return new FileContentResult(new byte[0], "image/jpeg");
}
}
}

View File

@ -34,6 +34,8 @@ namespace IRaCIS.Core.Application.Service
var systemAnonymizationQueryable = systemAnonymizationRepository
.WhereIf(!string.IsNullOrEmpty(querySystemAnonymization.Group), t => t.Group.Contains(querySystemAnonymization.Group))
.WhereIf(!string.IsNullOrEmpty(querySystemAnonymization.Element), t => t.Element.Contains(querySystemAnonymization.Element))
.WhereIf(!string.IsNullOrEmpty(querySystemAnonymization.TagDescription), t => t.TagDescription.Contains(querySystemAnonymization.TagDescription))
.WhereIf(!string.IsNullOrEmpty(querySystemAnonymization.TagDescriptionCN), t => t.TagDescriptionCN.Contains(querySystemAnonymization.TagDescriptionCN))
.WhereIf(querySystemAnonymization.IsAdd != null, t => t.IsAdd == querySystemAnonymization.IsAdd)
.WhereIf(!string.IsNullOrEmpty(querySystemAnonymization.ValueRepresentation), t => t.ValueRepresentation.Contains(querySystemAnonymization.ValueRepresentation))
.ProjectTo<SystemAnonymizationView>(_mapper.ConfigurationProvider);

View File

@ -39,6 +39,13 @@ namespace IRaCIS.Application.Services
_trialRepository = trialRepository;
//_cache = cache;
}
[AllowAnonymous]
public async Task<IResponseOutput> TestTimeOut()
{
await Task.Delay(15000);
return ResponseOutput.Ok();
}
[UnitOfWork]
public async Task<string> Get()

View File

@ -20,7 +20,6 @@
<None Remove="Resource\EIImageViewerService.rar" />
<None Remove="Resource\EIImageViewerWeb.rar" />
<None Remove="Resource\UnInstall.exe" />
<None Remove="Resource\医学影像处理软件用户手册.pdf" />
<None Remove="ServiceConfig.Json" />
<None Remove="Resource\Data\data.sql" />
<None Remove="Resource\Data\dbo.sql" />
@ -47,9 +46,6 @@
<Content Include="Resource\UnInstall.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Resource\医学影像处理软件用户手册.pdf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>

View File

@ -164,7 +164,7 @@ namespace Start
isServiceTestOk = true;
}
private async void testNetcoreRuntime()
private void testNetcoreRuntime()
{
string runtimeListCommand = "dotnet --list-runtimes";
@ -295,7 +295,7 @@ namespace Start
private async void confimDeployBtn_Click(object sender, EventArgs e)
private void confimDeployBtn_Click(object sender, EventArgs e)
{
portBtn_Click(null, null);
@ -788,6 +788,8 @@ namespace Start
await ProcessStandardInputAsync(process, $@" SQLCMD -v dbName = ""{dbNameTBox.Text}"" -i ""{AppContext.BaseDirectory}Resource\Data\dbo.sql"" ");
await Task.Delay(3000);
await ProcessStandardInputAsync(process, $@" SQLCMD -v dbName = ""{dbNameTBox.Text}"" -i ""{AppContext.BaseDirectory}Resource\Data\data.sql"" ");
@ -823,7 +825,7 @@ namespace Start
}
}
catch (SqlException)
catch (SqlException ex)
{
WinformLog($"连接字符串错误", Color.Red);
@ -883,6 +885,8 @@ namespace Start
try
{
WinformLog($"现在准备打开浏览器...", Color.Green);
await Task.Delay(2000);
// Use ProcessStartInfo class
var start = new ProcessStartInfo($"http://127.0.0.1:{vuePort}")
{
@ -925,7 +929,7 @@ namespace Start
}
private async void selectPathBtn_Click(object sender, EventArgs e)
private void selectPathBtn_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
if (dialog.ShowDialog() == DialogResult.OK)

Binary file not shown.

Binary file not shown.

Binary file not shown.