新增日志调度Id
This commit is contained in:
parent
855706e9ca
commit
9eb9b63524
@ -93,17 +93,17 @@ namespace MyCode.Project.OutSideService.Implementation
|
||||
/// <returns></returns>
|
||||
public K3CloudResponseStatus Save(string formId, BillSave billSave)
|
||||
{
|
||||
var id = Guid.NewGuid();
|
||||
staClient = GetK3CloudClient();
|
||||
var datastr = JsonHelper.ToJson(billSave, false, false, true);
|
||||
LogHelper.Info(datastr);
|
||||
LogHelper.Info("调度Id:" + id + ",金蝶云接口请求:" + datastr);
|
||||
var resultString = staClient.Save(formId, datastr);
|
||||
LogHelper.Info("调度Id:" + id + "金蝶云接口响应:" + resultString);
|
||||
var result = JsonHelper.ToObject<K3ApiResult>(resultString);
|
||||
if (!result.Result.ResponseStatus.IsSuccess)
|
||||
{
|
||||
LogHelper.Error("金蝶云接口调用失败,请检查");
|
||||
LogHelper.Error(resultString);
|
||||
string Message = string.Join(",", result.Result.ResponseStatus.Errors.Select(t => t.Message).ToList());
|
||||
throw new Exception("云星空接口调用失败,请联系管理员,错误信息:" + Message);
|
||||
string Message = string.Join("\r\n", result.Result.ResponseStatus.Errors.Select(t => t.Message).ToList());
|
||||
throw new Exception("调度Id:" + id + "云星空接口调用失败,错误信息:" + Message);
|
||||
}
|
||||
var data = result.Result.ResponseStatus;
|
||||
return data;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user