搭建基础接口,新增采购入库单、采购订单接口
This commit is contained in:
@@ -209,12 +209,26 @@ namespace Gatedge.K3Cloud.Utils
|
||||
var jsonData = viewBill.ToString();
|
||||
var resultString = _cloudApi.View(formId, jsonData);
|
||||
var result = JsonSerializer.Deserialize<KingdeeResult>(resultString);
|
||||
if (result?.Result?.ResponseStatus?.IsSuccess != true)
|
||||
// SB云星空 v7和v8的响应信息格式不同,导致无法使用统一的处理方式
|
||||
if (viewBill.Version >= 8)
|
||||
{
|
||||
var responseStatus = result?.Result?.ResponseStatus;
|
||||
Exception error = new K3CloudException("查看单据出错", responseStatus);
|
||||
throw error;
|
||||
if (result?.Result?.ResponseStatus?.IsSuccess != true)
|
||||
{
|
||||
var responseStatus = result?.Result?.ResponseStatus;
|
||||
Exception error = new K3CloudException("查看单据出错", responseStatus);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result?.Result?.ResponseStatus != null)
|
||||
{
|
||||
var responseStatus = result?.Result?.ResponseStatus;
|
||||
Exception error = new K3CloudException("查看单据出错", responseStatus);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
var data = result?.Result?.Result;
|
||||
return data;
|
||||
}
|
||||
@@ -231,11 +245,23 @@ namespace Gatedge.K3Cloud.Utils
|
||||
var jsonData = viewBill.ToString();
|
||||
var resultString = _cloudApi.View(formId, jsonData);
|
||||
var result = JsonSerializer.Deserialize<KingdeeResult>(resultString);
|
||||
if (result?.Result?.ResponseStatus?.IsSuccess != true)
|
||||
if (viewBill.Version >= 8)
|
||||
{
|
||||
var responseStatus = result?.Result?.ResponseStatus;
|
||||
Exception error = new K3CloudException("查看单据出错", responseStatus);
|
||||
throw error;
|
||||
if (result?.Result?.ResponseStatus?.IsSuccess != true)
|
||||
{
|
||||
var responseStatus = result?.Result?.ResponseStatus;
|
||||
Exception error = new K3CloudException("查看单据出错", responseStatus);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result?.Result?.ResponseStatus != null)
|
||||
{
|
||||
var responseStatus = result?.Result?.ResponseStatus;
|
||||
Exception error = new K3CloudException("查看单据出错", responseStatus);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
var data = result?.Result?.Result;
|
||||
var dataString = JsonSerializer.Serialize(data);
|
||||
|
||||
Reference in New Issue
Block a user