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

IRC_NewDev
he 2024-09-26 17:22:04 +08:00
parent 0d4d984135
commit f2d9c6fe38
2 changed files with 23 additions and 1 deletions

View File

@ -974,6 +974,16 @@ namespace IRaCIS.Core.Application.Service
});
break;
case JudgeTypeEnum.DifferenceAbsoluteValue:
var answer1 = taskAnswer1.IsNullOrEmptyReturnNull();
var answer2 = taskAnswer2.IsNullOrEmptyReturnNull();
// 已经判断不相等了 所以只可能有一个为Null
if (answer1 == null || answer2 == null)
{
noteEqual = true;
}
var deffaultValue = taskAnswer1.IsNullOrEmptyReturn0() - taskAnswer2.IsNullOrEmptyReturn0();
if (deffaultValue < 0)
{
@ -1000,6 +1010,17 @@ namespace IRaCIS.Core.Application.Service
break;
case JudgeTypeEnum.PercentageDifference:
var answer1P = taskAnswer1.IsNullOrEmptyReturnNull();
var answer2P = taskAnswer2.IsNullOrEmptyReturnNull();
// 已经判断不相等了 所以只可能有一个为Null
if (answer1P == null || answer2P == null)
{
noteEqual = true;
}
var value1 = taskAnswer1.IsNullOrEmptyReturn0();
var value2 = taskAnswer2.IsNullOrEmptyReturn0();
if (value1 == 0 || value2 == 0)

View File

@ -225,7 +225,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
catch (Exception)
{
return 0;
return null;
}
}
@ -253,6 +253,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
/// <summary>
/// 获取DisplayName
/// </summary>