修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
5874223866
commit
913084cc8d
|
@ -768,7 +768,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
#region 新
|
#region 新
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
url= url.Replace(_options.CurrentValue.MinIO.ViewEndpoint, "");
|
|
||||||
if (!string.IsNullOrWhiteSpace(url))
|
if (!string.IsNullOrWhiteSpace(url))
|
||||||
{
|
{
|
||||||
string[] strArry = url.Split('/');
|
string[] strArry = url.Split('/');
|
||||||
|
@ -789,37 +789,38 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
|
|
||||||
#region 之前
|
#region 之前
|
||||||
try
|
// 之前需要有绝对路径
|
||||||
{
|
//try
|
||||||
HttpClient httpClient = new HttpClient();
|
//{
|
||||||
if (!string.IsNullOrWhiteSpace(url))
|
// HttpClient httpClient = new HttpClient();
|
||||||
{
|
// if (!string.IsNullOrWhiteSpace(url))
|
||||||
string[] strArry = url.Split('/');
|
// {
|
||||||
savePath = savePath + "/" + strArry[strArry.Length - 1];
|
// string[] strArry = url.Split('/');
|
||||||
}
|
// savePath = savePath + "/" + strArry[strArry.Length - 1];
|
||||||
|
// }
|
||||||
|
|
||||||
var t = httpClient.GetByteArrayAsync(url);
|
// var t = httpClient.GetByteArrayAsync(url);
|
||||||
t.Wait();
|
// t.Wait();
|
||||||
Stream responseStream = new MemoryStream(t.Result);
|
// Stream responseStream = new MemoryStream(t.Result);
|
||||||
Stream stream = new FileStream(savePath, FileMode.Create);
|
// Stream stream = new FileStream(savePath, FileMode.Create);
|
||||||
byte[] bArr = new byte[1024];
|
// byte[] bArr = new byte[1024];
|
||||||
int size = responseStream.Read(bArr, 0, bArr.Length);
|
// int size = responseStream.Read(bArr, 0, bArr.Length);
|
||||||
while (size > 0)
|
// while (size > 0)
|
||||||
{
|
// {
|
||||||
stream.Write(bArr, 0, size);
|
// stream.Write(bArr, 0, size);
|
||||||
size = responseStream.Read(bArr, 0, bArr.Length);
|
// size = responseStream.Read(bArr, 0, bArr.Length);
|
||||||
}
|
// }
|
||||||
|
|
||||||
stream.Close();
|
// stream.Close();
|
||||||
responseStream.Close();
|
// responseStream.Close();
|
||||||
|
|
||||||
return savePath;
|
// return savePath;
|
||||||
}
|
//}
|
||||||
catch (Exception)
|
//catch (Exception)
|
||||||
{
|
//{
|
||||||
|
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingCalculate_ImageNotExist"]);
|
// throw new BusinessValidationFailedException(_localizer["ReadingCalculate_ImageNotExist"]);
|
||||||
}
|
//}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
@ -900,9 +901,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
lesionImage.Add(new Dictionary<string, object>()
|
lesionImage.Add(new Dictionary<string, object>()
|
||||||
{
|
{
|
||||||
{ "ImageOneMark",getPicNum(true)+ picRowinfo[2*i].VisitTask.TaskName+" "+picRowinfo[2*i].RowMark},
|
{ "ImageOneMark",getPicNum(true)+ picRowinfo[2*i].VisitTask.TaskName+" "+picRowinfo[2*i].RowMark},
|
||||||
{ "ImageOneUrl" ,await GetWordPictureMaxWL(_options.CurrentValue.MinIO.ViewEndpoint+picRowinfo[2*i].PicturePath ,System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{DownLoadGuid}"),290,390) },
|
{ "ImageOneUrl" ,await GetWordPictureMaxWL(picRowinfo[2*i].PicturePath ,System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{DownLoadGuid}"),290,390) },
|
||||||
{ "ImageTwoMark",getPicNum(picCount>2*i+1) + (picCount<=2*i+1?string.Empty:picRowinfo[2*i+1].VisitTask.TaskName+" "+picRowinfo[2*i+1].RowMark) },
|
{ "ImageTwoMark",getPicNum(picCount>2*i+1) + (picCount<=2*i+1?string.Empty:picRowinfo[2*i+1].VisitTask.TaskName+" "+picRowinfo[2*i+1].RowMark) },
|
||||||
{ "ImageTwoUrl", picCount<=2*i+1?string.Empty:await GetWordPictureMaxWL(_options.CurrentValue.MinIO.ViewEndpoint+picRowinfo[2*i+1].PicturePath ,System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{DownLoadGuid}"),290, 390) },
|
{ "ImageTwoUrl", picCount<=2*i+1?string.Empty:await GetWordPictureMaxWL(picRowinfo[2*i+1].PicturePath ,System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{DownLoadGuid}"),290, 390) },
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue