代码修改

master
he 2024-10-16 16:39:50 +08:00
parent 2ca67f4ee0
commit e33476d283
2 changed files with 36 additions and 3 deletions

View File

@ -6,7 +6,7 @@
"TrialService_ExistPN": "The same Project ID already exists",
"SubjectService_ExistSubjectCode": "A patient with the relevant patient ID already exists.",
"SubjectService_ExistImage": "An image study has been uploaded for this patiemt, and the deletion of this patient is not allowed.",
"SubjectService_ExistImage": "An image study has been uploaded for this patient, and the deletion of this patient is not allowed.",
"SubjectVisitServiece_ExistOtherInCurrent": "In the patient's study batch, there is an unplanned study batch after the previous study, please re-select the previous study.",
"SubjectVisitServiece_ExistName": "Same study batch name has already existed.",
@ -23,7 +23,8 @@
//StudyService
"Study_VisitAfterVisitOverError": "The scan date ofthis study ({0}) cannot be earlier than that of any previous study of the same patient.",
"Study_VisitBeforePrevError": "The scan time {0} of current study batch cannot be earlier than that {1} of the previous study batch. Please check whether the study data is correct.",
"Study_VisitBeforePrevError": "The scan date of this study ({0}) cannot be earlier than that of any previous study of the same patient.",
"Study_VisitAfterSubseqError": "The scan time {0} of current study batch cannot be later than the that {1} of the next study batch. Please check whether the study data is correct.",
"Study_UploadArchiving": "Someone is currently uploading and archiving the images of this study batch!",
"Study_VisitEndedNotAllowed": "The study of this patint is completed, and cannot upload images to this study batch!",

View File

@ -6,7 +6,10 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Options;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text.RegularExpressions;
@ -26,7 +29,36 @@ namespace IRaCIS.Application.Services
private readonly IRepository<VisitTask> _visitTaskRepositoryy;
public TestService(IRepository<Dictionary> dicRepository, IRepository<Trial> trialRepository/*, IDistributedCache cache*/
public void ToPdf(string officePath, string outPutPath)
{
//获取libreoffice命令的路径
string libreOfficePath = "C:\\Users\\Admin\\Desktop\\新建文件夹\\program\\soffice.exe";
ProcessStartInfo procStartInfo = new ProcessStartInfo(libreOfficePath, string.Format("--convert-to pdf --outdir {0} --nologo {1}", outPutPath, officePath));
procStartInfo.RedirectStandardOutput = true;
procStartInfo.UseShellExecute = false;
procStartInfo.CreateNoWindow = true;
procStartInfo.WorkingDirectory = Environment.CurrentDirectory;
//开启线程
Process process = new Process() { StartInfo = procStartInfo, };
process.Start();
process.WaitForExit();
if (process.ExitCode != 0)
{
throw new BusinessValidationFailedException(process.ExitCode.ToString());
}
}
public TestService(IRepository<Dictionary> dicRepository, IRepository<Trial> trialRepository/*, IDistributedCache cache*/
, IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig, IOptionsMonitor<ServiceVerifyConfigOption> basicConfig, IRepository<VisitTask> visitTaskRepository)
{