修改
continuous-integration/drone/push Build is running Details

Test_HIR_Net8
he 2025-09-28 13:44:48 +08:00
parent a7ed38f03b
commit 0201c2f50f
1 changed files with 50 additions and 17 deletions

View File

@ -1,4 +1,5 @@
using IRaCIS.Core.Application.Helper; using Amazon.Runtime.Internal.Transform;
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Application.Service.Reading.Dto; using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Domain.Share;
@ -9,6 +10,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.Identity.Client;
using MiniExcelLibs; using MiniExcelLibs;
using MiniSoftware; using MiniSoftware;
using SixLabors.ImageSharp; using SixLabors.ImageSharp;
@ -507,7 +509,17 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
public Dictionary<string, object> StringEmptyTurnedLine(Dictionary<string, object> myDictionary) public Dictionary<string, object> StringEmptyTurnedLine(Dictionary<string, object> myDictionary)
{ {
List<string> notTurnedKeyList = new List<string>() { "ImageOneUrl", "ImageOneMark", "ImageTwoUrl", "ImageTwoMark" };
Dictionary<string, string> notTurnedKeyList = new Dictionary<string, string>()
{
{"ImageOneUrl",_localizer["CriterionCalculateExport_None"] },
{"ImageOneMark",string.Empty },
{"ImageTwoUrl",string.Empty },
{"ImageTwoMark",string.Empty }
};
foreach (var item in myDictionary) foreach (var item in myDictionary)
{ {
@ -531,26 +543,35 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{ {
foreach (var item2 in column) foreach (var item2 in column)
{ {
if ((item2.Value.ToString() == string.Empty || item.Value == null)&& !notTurnedKeyList.Contains(item2.Key))
if (item2.Value.ToString() == string.Empty || item.Value == null)
{ {
bool isOrgan = false; if (notTurnedKeyList.ContainsKey(item2.Key))
try
{ {
if (item2.Key == "Organ" && (column["RowMark"] == string.Empty || column["RowMark"] == "-")) column[item2.Key] = notTurnedKeyList[item.Key];
}
else
{
bool isOrgan = false;
try
{ {
column[item2.Key] = string.Empty; if (item2.Key == "Organ" && (column["RowMark"] == string.Empty || column["RowMark"] == "-"))
isOrgan = true; {
column[item2.Key] = string.Empty;
isOrgan = true;
}
}
catch (Exception)
{
column[item2.Key] = "-";
}
if (!isOrgan)
{
column[item2.Key] = "-";
} }
} }
catch (Exception)
{
column[item2.Key] = "-";
}
if (!isOrgan)
{
column[item2.Key] = "-";
}
}; };
} }
@ -1063,6 +1084,18 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
} }
} }
if (lesionImage.Count == 0)
{
lesionImage.Add(new Dictionary<string, object>()
{
{ "ImageOneMark",string.Empty},
{ "ImageOneUrl" ,string.Empty},
{ "ImageTwoMark",string.Empty },
{ "ImageTwoUrl",string.Empty},
});
}
return lesionImage; return lesionImage;
} }