通过Web API方式查询总账账龄分析表方法说明
总账账龄分析表支持两种方式的API查询,一是按方案查询,即通过已保存的方案ID来查询,指定"SchemeId"的值即可,比较简单,这里不详细阐述。另一种是自定义条件查询,这里将重点说明。
前言说明:
FDATE,FVOUCHERGROUPID,FVOUCHERGROUPNO,FEXPLANATION,FBUSDATE,FBUSNO等凭证相关字段只有在"FShowVoucher": "true"时才有效。
下面示例中的FFLEXNAME,FAGINGRANGEFOR,FAGINGRANGE等是动态字段,需要根据查询条件动态确定。最终列名可以参考最后生成的临时表。其中:
FFLEXNAME的实际列名为:该维度在T_BD_FLEXITEMDETAILV表中的列名,如:客户(BD_Customer)的列名是FFLEX6,按组合查询时,有多个列名,如:FFLEX6,FFLEX7
FAGINGRANGEFOR,FAGINGRANGE的数量由"FAgingGroupEntity"中的区间数来决定,其中带“FOR”表示原币账龄。FAGINGRANGEFOR的实际列是:"F"加上"FAgingGroupEntity"中"FDays"的值,再加上"FOR",如F30FOR,F60FOR,F0FOR等。FAGINGRANGE值为本位币的账龄区间,如F30,F60,F0等。注,"FDays": 0放在区间的最后,表示后面所有天数。一般情况下,"FAgingGroupEntity"的最后一项都应该为:"FDays": 0。
FFlexRadioGroup表示按连续编码查询还是非连续编码查询,其中0表示连续,1表示非连续。
1,查询单个维度(客户),显示凭证
{
"FieldKeys": "FACCTNUMBER,FACCTNAME,FFLEXNAME,FDCNAME,FCURRENCYNAME,FDATE,FVOUCHERGROUPID,FVOUCHERGROUPNO,FEXPLANATION,FBUSDATE,FBUSNO,FRESERVEDFOR,FAGINGRANGEFOR,FRESERVED,FAGINGRANGE,FBUSNO",
"SchemeId": "",
"StartRow": 0,
"Limit": 2000,
"IsVerifyBaseDataField": "true",
"Model": {
"FCurrency": "1",
"FBalance": "",
"FShowForbidenAcct": "false",
"FShowNopostedVch": "false",
"FFlexGroup": "",
"FDeadLine": "2023-01-01",
"FFlex": "BD_Customer",
"FFlexNumberFrom": "",
"FShowFullName": "false",
"FUseFlexGroup": "false",
"FFlexNumberTo": "",
"FMultiAcctMerge": "false",
"FFlexGRPSerialized": "",
"FFlexRadioGroup": "0",
"FFlexNumber": "",
"FShowAgingGrpPercent": "false",
"FShowVoucher": "true",
"FShowFlexTotal": "false",
"FShowAcctTotal": "false",
"FACCTBOOKID": {
"FNUMBER": "214"
},
"FMatchType": "0",
"FNegativeMatch": "false",
"FAgingGroupEntity": [
{
"FSection": "30天以内",
"FDays": 30
},
{
"FSection": "30-60天",
"FDays": 60
},
{
"FSection": "60以上",
"FDays": 0
}
]
}
}
当"FFlexRadioGroup": "1",时,表示非连续查询,此时在"FFlexNumber"中指定维度的编码,如 "FFlexNumber":"A,B,C"。
2,按维度组合查询时:维度组合的定义由"FFlexGRPSerialized"的值决定,详细参考下在示例:按供应商和部门组合查询,其中供应商编码从A到B,部门编码从C到D
"FUseFlexGroup": "true",
"FFlexGRPSerialized": "<?xml version="1.0" encoding="utf-8"?>
<ArrayOfDetailGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DetailGroup>
<DetailType>BD_Supplier</DetailType>
<DetailTypeShow>BD_Supplier.BD_Supplier</DetailTypeShow>
<BeginNo>A</BeginNo>
<BeginNoUnInput>false</BeginNoUnInput>
<EndNo>B</EndNo>
<EndNoUnInput>false</EndNoUnInput>
<ValueDataType>0</ValueDataType>
</DetailGroup>
<DetailGroup>
<DetailType>BD_Department</DetailType>
<DetailTypeShow>BD_Department.BD_Department</DetailTypeShow>
<BeginNo>C</BeginNo>
<BeginNoUnInput>false</BeginNoUnInput>
<EndNo>D</EndNo>
<EndNoUnInput>false</EndNoUnInput>
<ValueDataType>0</ValueDataType>
</DetailGroup>
</ArrayOfDetailGroup>"
如果是编码非连续的查询,即"FFlexRadioGroup": "1",则在<AcctDems>中逐一列出所有编码:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfDetailGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DetailGroup>
<DetailType>BD_Supplier</DetailType>
<DetailTypeShow>BD_Supplier.BD_Supplier</DetailTypeShow>
<BeginNoUnInput>false</BeginNoUnInput>
<EndNoUnInput>false</EndNoUnInput>
<AcctDems>
<string>SUP000001</string>
<string>SUP000009</string>
</AcctDems>
<ValueDataType>0</ValueDataType>
</DetailGroup>
<DetailGroup>
<DetailType>BD_Department</DetailType>
<DetailTypeShow>BD_Department.BD_Department</DetailTypeShow>
<BeginNoUnInput>false</BeginNoUnInput>
<EndNoUnInput>false</EndNoUnInput>
<AcctDems>
<string>A</string>
<string>B</string>
</AcctDems>
<ValueDataType>0</ValueDataType>
</DetailGroup>
</ArrayOfDetailGroup>
通过Web API方式查询总账账龄分析表方法说明
本文2024-09-23 01:34:50发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-146817.html