金蝶云星空使用webapi查询单据附件的主键
业务需求:
查询采购价目表的附件
详细操作
一、查询单据附件
查看账套单据附件
查询采购价目表的单据内码和单据体内码
SELECT a.FNUMBER,a.FID,b.FENTRYID,b.FSEQ FROM t_PUR_PriceList a LEFT JOIN t_PUR_PriceListEntry b ON a.FID=b.FID WHERE a.FNUMBER='CGJM000021'
查询单据头附件明细
SELECT FFILEID,FATTACHMENTNAME,* FROM T_BAS_ATTACHMENT WHERE FBillType=N'PUR_PriceCategory' AND FEntryKey=N' ' AND FInterID=N'104283'
webapi查询
json
{ "FormId": "BOS_Attachment", "FieldKeys": "FFILEID,FAttachmentName", "FilterString": "FBillType=N'PUR_PriceCategory' AND FEntryKey=N' ' AND FInterID=N'104283'", "OrderString": "", "TopRowCount": 0, "StartRow": 0, "Limit": 2000, "SubSystemId": "" }
返回结果
二、查询单据明细附件
查看账套单据明细附件
查询采购价目表的单据内码和单据体内码
SELECT a.FNUMBER,a.FID,b.FENTRYID,b.FSEQ FROM t_PUR_PriceList a LEFT JOIN t_PUR_PriceListEntry b ON a.FID=b.FID WHERE a.FNUMBER='CGJM000021'
查询单据体附件明细
SELECT FFILEID,FATTACHMENTNAME,* FROM T_BAS_ATTACHMENT
WHERE FBillType=N'PUR_PriceCategory' AND FEntryKey=N'FPriceListEntry' AND FEntryInterID=N'100039'
webapi查询
json
{ "FormId": "BOS_Attachment", "FieldKeys": "FFILEID,FAttachmentName", "FilterString": "FBillType=N'PUR_PriceCategory' AND FEntryKey=N'FPriceListEntry' AND FEntryInterID=N'100039'", "OrderString": "", "TopRowCount": 0, "StartRow": 0, "Limit": 2000, "SubSystemId": "" }
返回结果