|
|
@@ -77,6 +77,13 @@ namespace OASystem.API.OAMethodLib.JuHeAPI
|
|
|
if (!string.IsNullOrEmpty(rateDataStr))
|
|
|
{
|
|
|
ExchangeRateModel exchangeRate = JsonConvert.DeserializeObject<ExchangeRateModel>(rateDataStr);
|
|
|
+
|
|
|
+ exchangeRate.FBuyPri = HandleMinusValue(exchangeRate.FBuyPri);
|
|
|
+ exchangeRate.FSellPri = HandleMinusValue(exchangeRate.FSellPri);
|
|
|
+ exchangeRate.MBuyPri = HandleMinusValue(exchangeRate.MBuyPri);
|
|
|
+ exchangeRate.MSellPri = HandleMinusValue(exchangeRate.MSellPri);
|
|
|
+ exchangeRate.BankConversionPri = HandleMinusValue(exchangeRate.BankConversionPri);
|
|
|
+
|
|
|
rateList.Add(exchangeRate);
|
|
|
}
|
|
|
}
|
|
|
@@ -97,7 +104,6 @@ namespace OASystem.API.OAMethodLib.JuHeAPI
|
|
|
result.Reason = string.Format("聚合APIError[Error_Code:{0} Resultcode:{1} Msg:{2}]",
|
|
|
result.Error_code, result.Resultcode, result.Result);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -119,6 +125,16 @@ namespace OASystem.API.OAMethodLib.JuHeAPI
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 处理金额带“-”的币种汇率信息
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="input"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ private string HandleMinusValue(string? input)
|
|
|
+ {
|
|
|
+ return string.IsNullOrEmpty(input) || input.Contains("-") ? "1.00" : input;
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 获取汇率 Single
|
|
|
/// </summary>
|
|
|
@@ -439,7 +455,6 @@ namespace OASystem.API.OAMethodLib.JuHeAPI
|
|
|
|
|
|
return new JuHeAPIResult(-1, "世界时间接口请求失败!");
|
|
|
}
|
|
|
-
|
|
|
#endregion
|
|
|
}
|
|
|
}
|