导入修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
e113bc9fe1
commit
052ac1ff8d
|
|
@ -252,17 +252,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// <summary>
|
||||
/// 第一次
|
||||
/// </summary>
|
||||
public int FirstData { get; set; }
|
||||
public decimal FirstData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第二次
|
||||
/// </summary>
|
||||
public int SecondData { get; set; }
|
||||
public decimal SecondData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第三次
|
||||
/// </summary>
|
||||
public int ThirdData { get; set; }
|
||||
public decimal ThirdData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润测量
|
||||
|
|
@ -273,29 +273,29 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// <summary>
|
||||
/// 巨噬细胞浸润角度测量
|
||||
/// </summary>
|
||||
public string MacrophageInfiltrationAngle { get; set; }
|
||||
public decimal? MacrophageInfiltrationAngle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 微通道测量
|
||||
/// </summary>
|
||||
public string MicrochannelMeasurement { get; set; }
|
||||
public decimal? MicrochannelMeasurement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 胆固醇结晶测量
|
||||
/// </summary>
|
||||
public string CholesterolCrystalMeasurement { get; set; }
|
||||
public decimal? CholesterolCrystalMeasurement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 官腔面积测量
|
||||
/// </summary>
|
||||
public string LumenAreaMeasurement { get; set; }
|
||||
public decimal? LumenAreaMeasurement { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public decimal Avg { get {
|
||||
|
||||
return ( FirstData*1m + SecondData * 1m + ThirdData * 1m) / 3;
|
||||
return ( FirstData + SecondData + ThirdData) / 3;
|
||||
} }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -314,7 +314,21 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]);
|
||||
}
|
||||
var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
|
||||
decimal getdecimalData(string value)
|
||||
{
|
||||
return decimal.Parse(decimal.Round(decimal.Parse(value ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString()));
|
||||
}
|
||||
|
||||
|
||||
decimal? getdecimalEmptyData(string value)
|
||||
{
|
||||
if (value == string.Empty)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return decimal.Parse(decimal.Round(decimal.Parse(value ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString()));
|
||||
}
|
||||
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
||||
var errorRow = new List<int> { };
|
||||
|
||||
|
|
@ -325,14 +339,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
measuredValueList.Add(new OCTFCTUploadData()
|
||||
{
|
||||
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
FirstData = int.Parse(dataTable.Rows[i]["B"].ToString()),
|
||||
SecondData = int.Parse(dataTable.Rows[i]["C"].ToString()),
|
||||
ThirdData = int.Parse(dataTable.Rows[i]["D"].ToString()),
|
||||
FirstData = getdecimalData(dataTable.Rows[i]["B"].ToString()),
|
||||
SecondData = getdecimalData(dataTable.Rows[i]["C"].ToString()),
|
||||
ThirdData = getdecimalData(dataTable.Rows[i]["D"].ToString()),
|
||||
MacrophageInfiltrationMeasurement = dataTable.Rows[i]["E"].ToString() ?? string.Empty,
|
||||
MacrophageInfiltrationAngle = dataTable.Rows[i]["F"].ToString() ?? string.Empty,
|
||||
MicrochannelMeasurement = dataTable.Rows[i]["G"].ToString() ?? string.Empty,
|
||||
CholesterolCrystalMeasurement = dataTable.Rows[i]["H"].ToString() ?? string.Empty,
|
||||
LumenAreaMeasurement = dataTable.Rows[i]["I"].ToString() ?? string.Empty,
|
||||
MacrophageInfiltrationAngle = getdecimalEmptyData(dataTable.Rows[i]["F"].ToString() ?? string.Empty),
|
||||
MicrochannelMeasurement = getdecimalEmptyData(dataTable.Rows[i]["G"].ToString() ?? string.Empty),
|
||||
CholesterolCrystalMeasurement = getdecimalEmptyData(dataTable.Rows[i]["H"].ToString() ?? string.Empty),
|
||||
LumenAreaMeasurement = getdecimalEmptyData(dataTable.Rows[i]["I"].ToString() ?? string.Empty),
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
|
|
@ -373,13 +387,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
row++;
|
||||
try
|
||||
{
|
||||
if (isPresent[item.MacrophageInfiltrationMeasurement] == "1"&& item.MacrophageInfiltrationAngle==string.Empty)
|
||||
if (isPresent[item.MacrophageInfiltrationMeasurement] == "1"&& item.MacrophageInfiltrationAngle==null)
|
||||
{
|
||||
errorRow.Add(row);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((isPresent[item.MacrophageInfiltrationMeasurement] == "0"|| isPresent[item.MacrophageInfiltrationMeasurement]==string.Empty) && item.MacrophageInfiltrationAngle != string.Empty)
|
||||
if ((isPresent[item.MacrophageInfiltrationMeasurement] == "0"|| isPresent[item.MacrophageInfiltrationMeasurement]==string.Empty) && item.MacrophageInfiltrationAngle != null)
|
||||
{
|
||||
errorRow.Add(row);
|
||||
continue;
|
||||
|
|
@ -444,7 +458,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
if (taskinfo.TrialReadingCriterion.DigitPlaces != -1)
|
||||
{
|
||||
var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
|
||||
avg = decimal.Round(decimal.Parse(avg ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
||||
|
||||
}
|
||||
|
|
@ -650,6 +663,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]);
|
||||
}
|
||||
|
||||
var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
|
||||
decimal getdecimalData(string value)
|
||||
{
|
||||
return decimal.Parse(decimal.Round(decimal.Parse(value ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString()));
|
||||
}
|
||||
;
|
||||
|
||||
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
||||
var errorRow = new List<int> { };
|
||||
|
||||
|
|
@ -660,7 +680,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
measuredValueList.Add(new OCTFCTUploadData()
|
||||
{
|
||||
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
FirstData = int.Parse(dataTable.Rows[i]["B"].ToString()),
|
||||
FirstData = getdecimalData(dataTable.Rows[i]["B"].ToString()),
|
||||
|
||||
});
|
||||
}
|
||||
|
|
@ -740,7 +760,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
if (taskinfo.TrialReadingCriterion.DigitPlaces != -1)
|
||||
{
|
||||
var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
|
||||
avg = decimal.Round(decimal.Parse(avg ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue