批量查询【受订变更作业】接口
概述
该接口主要用于第三方平台或自主研发者,需要通过日期、单号、部门批量查询ERP系统的单据时,则可调用该单据的批量查询接口,将Sunlike ERP或Online ERP系统中的批量单据信息查询到第三方平台中。
参数说明
请求方式
请求方式 | POST | |||||
接口地址 | http://ERPAPI站点/DRPBGSDD/BATCHDATA | |||||
格式 | JSON | |||||
编码类型 | UTF-8 |
header参数
Content-Type | application/json | |||||
Authorization | token | 授权接口所获取的值 |
请求参数
字段名称 | 字段代号 | 类型 | 长度 | 必填 | 固定值 | 备注 |
程序代号 | PGM | 是 |
BGSDD
|
|||
单据别 | BG_ID | String | 2 | 是 |
IS
|
|
单据号码 | BG_NO | String | 20 | ERP的单据号码,可多张单号,加中括号[],单号之间用逗号隔开,如”BG_NO”:”[IS2111050001],[IS2111050002]” | ||
单据日期类型 | DATE_TYPE | String | 1 | 是 | 0表示单据日期,1表示制单日期,2表示终审日期,3修改日期 | |
开始日期 | START_DATE | datetime | 从开始日期开始查询单据,当单号为空时,日期必填 | |||
结束日期 | END_DATE | datetime | 查询以结束日期截止的单据,当单号为空时,日期必填 | |||
单据部门 | DEP | string | 8 | 多个部门,加中括号[],以逗号隔开,不含下属部门,如”DEP”:”[01],[02]”;单个部门,不用中括号,有含下属 | ||
排序 | ORDER_BY | 例如: “ORDER BY”:{“BG_NO”:”DESC”, “DEP”:”ASC”} |
请求JSON示例
{ "PGM": "BGSDD", //程序代号 "BG_ID": "IS", //单据别,但若单据无单据别,该参数可不用 "BG_NO": "", //按单号查询,可多张单号,加中括号[],单号之间用豆号隔开 "DATE_TYPE":0, //0表示单据日期,1表示制单日期,2表示终审日期,3修改日期 "START_DATE":"2022-05-01", //查询的开始日期 "END_DATE":"2022-05-31", //查询的结束日期 "DEP":"00000000", //有[]表示多选,不含下属部门;没有[]表示单选且含下属 "ORDER_BY":{ //排序规则 "BG_NO":"DESC", //DESC表示降序排序 "DEP":"ASC" //ASC表示升序排序 } }
返回结果示例
{ "code": 0, //0值表示执行成功,其他值则表示失败 "message": "查询成功", "data": { "UP_DD": "2022-05-05 11:40:20", "TOTAL_NUM": 1, "BILL_LIST": [ //请求批量查询返回的单据明细信息 { "MF_BG": [ { "BG_ID": "IS", "BG_NO": "IS2205050002", "BG_DD": "2022-05-05 00:00:00", "SAL_NO": "001", "DEP": "D0100", "REM": "修改表头和表身资料", "USR": "ADMIN", "CHK_MAN": "ADMIN", "CLS_DATE": "2022-05-06 00:00:00", "SYS_DATE": "2022-05-05 11:40:20", "BG_TYPE": "3" } ], "TF_BG": [ { "BG_ID": "IS", "BG_NO": "IS2205050002", "ITM": 1, "BG_DD": "2022-05-05 00:00:00", "BG_FLAG": "1", "BIL_ITM": 1, "BG_REM": "修改单价150", "PRD_MARK": "", "UP": 150.00000000, "CUR_ID": "", "AMT": 150.00000000, "AMTN": 142.86000000, "TAX": 7.14000000, "REM": "", "CLS_MP_ID": "", "SUP_PRD_MARK": "", "OS_NO": "SO2205050002", "EXC_RTO": 1.00000000, "TAX_ID": "2", "QTY_1": 1.00000000, "TAX_RTO_1": 5.00000000, "PRD_NO_1": "001", "PRD_MARK_1": "", "BAT_NO_1": "", "UNIT_1": "1", "WH_1": "YH002" }, { "BG_ID": "IS", "BG_NO": "IS2205050002", "ITM": 2, "BG_DD": "2022-05-05 00:00:00", "BG_FLAG": "1", "BIL_ITM": 2, "BG_REM": "修改单价250", "PRD_MARK": "", "UP": 250.00000000, "CUR_ID": "", "AMT": 250.00000000, "AMTN": 238.10000000, "TAX": 11.90000000, "REM": "", "CLS_MP_ID": "", "SUP_PRD_MARK": "", "OS_NO": "SO2205050002", "EXC_RTO": 1.00000000, "TAX_ID": "2", "QTY_1": 1.00000000, "TAX_RTO_1": 5.00000000, "PRD_NO_1": "002", "PRD_MARK_1": "", "BAT_NO_1": "", "UNIT_1": "1", "WH_1": "YH002" } ], "TF_BG1": [ { "BG_FLAG": "1", "BG_ID": "IS", "BG_NO": "IS2205050002", "BG_DD": "2022-05-05 00:00:00", "OS_NO": "SO2205050002", "ITM": 1, "BG_REM": "修改业务员002", "SAL_NO": "002", "REM": "", "PRE_ITM": 14 } ], "TF_BGHIS": [ { "BG_ID": "IS", "BG_NO": "IS2205050002", "ITM": 1, "OS_NO": "SO2205050002", "BIL_ITM": 1, "PRD_NO": "001", "PRD_MARK": "", "WH": "YH002", "UNIT": "1", "QTY": 1.00000000, "UP": 100.00000000, "AMT": 100.00000000, "AMTN": 95.24000000, "TAX": 4.76000000, "QTY1": 1.00000000, "UP_QTY1": 100.00000000, "EST_DD": "2022-05-05 00:00:00", "PAK_UNIT": "1箱", "PAK_EXC": 5.00000000, "PAK_NW": 0.20000000, "PAK_WEIGHT_UNIT": "个", "PAK_GW": 0.40000000, "PAK_MEAST": 0.60000000, "PAK_MEAST_UNIT": "件", "VALID_DD": "2022-05-16 00:00:00", "CST_STD": 105.00000000, "EST_ITM": 1, "BAT_NO": "", "TAX_RTO": 5.00000000, "CHK_TAX": "F", "SUP_PRD_NO": "1070300082", "PRD_NAME": "哈姆卡通玩具", "SUP_PRD_NM": "1070300082名称", "SUP_PRD_MARK": "" }, { "BG_ID": "IS", "BG_NO": "IS2205050002", "ITM": 2, "OS_NO": "SO2205050002", "BIL_ITM": 2, "PRD_NO": "002", "PRD_MARK": "", "WH": "YH002", "UNIT": "1", "QTY": 1.00000000, "UP": 200.00000000, "AMT": 200.00000000, "AMTN": 190.47000000, "TAX": 9.53000000, "EST_DD": "2022-05-05 00:00:00", "CST_STD": 20.00000000, "EST_ITM": 2, "BAT_NO": "", "TAX_RTO": 5.00000000, "CHK_TAX": "F", "SUP_PRD_NO": "", "PRD_NAME": "原料123", "SUP_PRD_NM": "", "SUP_PRD_MARK": "" } ], "TF_BG1HIS": [ { "BG_ID": "IS", "BG_NO": "IS2205050002", "ITM": 1, "OS_NO": "SO2205050002", "OS_DD": "2022-05-05 00:00:00", "PO_DEP": "D0300", "SAL_NO": "YM0201", "BIL_TYPE": "", "SEND_MTH": "1", "SEND_WH": "01", "PAY_MTH": "1", "PAY_DAYS": 1, "CHK_DAYS": 61, "PAY_REM": "结帐期:2022-06-01;票据到期日:2022-08-01", "PAY_DD": "2022-06-01 00:00:00", "CHK_DD": "2022-08-01 00:00:00", "INT_DAYS": 60, "CUS_NO": "CU0301", "CUR_ID": "", "EXC_RTO": 1.00000000, "TAX_ID": "2", "EST_DD": "2022-05-05 00:00:00", "FX_WH": "CU0301" } ], "BILL_STATE": { "READONLY": false, "READONLY_REM": [] } } ] } }