|
|
@@ -49,10 +49,9 @@ namespace OASystem.API.OAMethodLib.JuHeAPI
|
|
|
var exchangeReq = await _httpClient.PostAsync(url,
|
|
|
new FormUrlEncodedContent(new List<KeyValuePair<string, string>>()
|
|
|
{
|
|
|
- new KeyValuePair<string, string>("key",_appKey),//你申请的key
|
|
|
- new KeyValuePair<string, string>("type","0"), //两种格式(0或者1,默认为0)
|
|
|
- new KeyValuePair<string, string>("bank","3") //(0:工商银行,1:招商银行,2:建设银行,3:中国银行,
|
|
|
- //4:交通银行,5:农业银行,默认为:0)
|
|
|
+ new KeyValuePair<string, string>("key",_appKey),// key
|
|
|
+ new KeyValuePair<string, string>("type","0"), // 两种格式(0或者1,默认为0)
|
|
|
+ new KeyValuePair<string, string>("bank","3") // (0:工商银行,1:招商银行,2:建设银行,3:中国银行,4:交通银行,5:农业银行,默认为:0)
|
|
|
}));
|
|
|
if (exchangeReq.IsSuccessStatusCode)
|
|
|
{
|
|
|
@@ -115,7 +114,6 @@ namespace OASystem.API.OAMethodLib.JuHeAPI
|
|
|
result.Reason = ex.Message;
|
|
|
}
|
|
|
#endregion
|
|
|
-
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -124,13 +122,13 @@ namespace OASystem.API.OAMethodLib.JuHeAPI
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 处理金额带“-”的币种汇率信息
|
|
|
/// </summary>
|
|
|
/// <param name="input"></param>
|
|
|
/// <returns></returns>
|
|
|
- private string HandleMinusValue(string? input)
|
|
|
+ private static string HandleMinusValue(string? input)
|
|
|
{
|
|
|
return string.IsNullOrEmpty(input) || input.Contains("-") ? "1.00" : input;
|
|
|
}
|