批量查询【销货折让单】接口

概述

该接口主要用于第三方平台或自主研发者,需要通过日期、单号、部门批量查询ERP系统的单据时,则可调用该单据的批量查询接口,将Sunlike ERP或Online ERP系统中的批量单据信息查询到第三方平台中。

参数说明

请求方式

请求方式 POST
接口地址 http://ERPAPI站点/DRPSA/BATCHDATA
格式 JSON
编码类型 UTF-8

header参数

Content-Type application/json
Authorization token 授权接口所获取的值

请求参数

字段名称 字段代号 类型 长度 必填 固定值 备注
程序代号 PGM     DRPSD  
单据别 PS_ID String 2 SD  
单据号码 PS_NO String 20     ERP的单据号码,可多张单号,加中括号[],单号之间用豆号隔开,如”PS_NO”:[“PR11110001″,”PR11110002”]
单据日期类型 DATE_TYPE String 1   0表示单据日期,1表示制单日期,2表示终审日期,3修改日期
开始日期 START_DATE datetime       从开始日期开始查询单据,当单号为空时,日期必填
结束日期 END_DATE datetime       查询以结束日期截止的单据,当单号为空时,日期必填
单据部门 DEP string 8     多个部门,用中括号[]包住多个部门,以豆号隔开,不含下属部门,如”DEP”:[“01″,”02”];单个部门,不用中括号,有含下属
排序 ORDER_BY         例如:
“ORDER BY”:{“PS_NO”:”DESC”,      “CUS_NO”:”ASC”}

请求JSON示例

{
  "PGM":"DRPSD",   //程序代号
  "PS_ID":"SD",    //单据别
  "PS_NO":"",   //按单号查询,可多张单号,用豆号隔开
  "DATE_TYPE":0,        //0表示单据日期,1表示制单日期,2表示终审日期,3修改日期
  "START_DATE":"2021-01-01",  //查询的开始日期
  "END_DATE":"2021-12-31",   //查询的结束日期
  "DEP":"00000000",      //有[]表示多选,不含下属部门;没有[]表示单选且含下属
  "ORDER_BY":{        //排序规则
      "PS_NO":"DESC",  //DESC表示降序排序
      "CUS_NO":"ASC"    //ASC表示升序排序
  }
}

返回结果示例

{
    "code": 0,           //为0表示执行成功
    "message": "查询成功",
    "data": {
        "UP_DD": "2021-04-06 17:19:04",
        "TOTAL_NUM": 3,
        "BILL_LIST": [         //查询返回内容明细
            {
                "MF_PSS": [
                    {
                        "PS_ID": "SD",
                        "PS_NO": "SD14070001",
                        "PS_DD": "2021-04-07 00:00:00",
                        "PAY_DD": "2021-05-01 00:00:00",
                        "CHK_DD": "2021-06-01 00:00:00",
                        "CUS_NO": "0001",
                        "CUS_NAME": "0001客户",
                        "DEP": "00000000",
                        "DEP_NAME": "First Department",
                        "TAX_ID": "2",
                        "SEND_MTH": "1",
                        "ZHANG_ID": "1",
                        "CUR_ID": "1",
                        "EXC_RTO": 6.00000000,
                        "SAL_NO": "10001",
                        "SAL_NAME": "10001员工",
                        "ARP_NO": "AR14070003",
                        "ARP_DD": "2021-04-07 00:00:00",
                        "PAY_MTH": "1",
                        "PAY_DAYS": 1,
                        "CHK_DAYS": 30,
                        "INT_DAYS": 30,
                        "PAY_REM": "结帐期:2021-05-01; 票据到期日:2021-06-01",
                        "USR": "ADMIN",
                        "CHK_MAN": "ADMIN",
                        "PRT_SW": "N",
                        "CLS_DATE": "2021-04-07 00:00:00",
                        "BIL_TYPE": "",
                        "OS_ID": "SA",
                        "CUS_OS_NO": "",
                        "AMTN_RCV": 0.00000000,
                        "SYS_DATE": "2021-04-06 17:19:04",
                        "REM": "123",
                        "BAT_NO": "01",
                        "OS_NO": "AAASA21040003",
                        "CLS_REM": "",
                        "KP_ID": "F",
                        "OFF_OS_NO": "",
                        "AMTN_TAX_IRP": 0.00000000,
                        "AMT_TAX_IRP": 0.00000000,
                        "BIL_FILE_COUNT": 0
                    }
                ],
                "TF_PSS": [
                    {
                        "PS_ID": "SD",
                        "PS_NO": "SD14070001",
                        "ITM": 1,
                        "PS_DD": "2021-04-07 00:00:00",
                        "WH": "A000",
                        "PRD_NO": "0001",
                        "PRD_NAME": "杯子-A",
                        "PRD_MARK": "特征",
                        "UPR": 100.00000000,
                        "IDX1": "0000000000",
                        "UNIT": "1",
                        "CUS_OS_NO": "",
                        "QTY": 2.00000000,
                        "QTY1": 1000.00000000,
                        "UP": 10.00000000,
                        "DIS_CNT": 20.00000000,
                        "AMT_DIS_CNT": 0.00000000,
                        "AMTN_NET": 22.86000000,
                        "AMT": 4.00000000,
                        "PRE_ITM": 1,
                        "OS_NO": "AAASA21040003",
                        "OS_ID": "SA",
                        "TAX": 1.14000000,
                        "OTH_ITM": 1,
                        "VALID_DD": "1899-12-30 00:00:00",
                        "BAT_NO_NO": "01",
                        "BAT_NO": "01",
                        "TAX_RTO": 5.00000000,
                        "REM": "321",
                        "FREE_ID": "",
                        "TRANSM": "0",
                        "LOGIST": "0",
                        "TPL_NO": "001",
                        "EST_DD": "2021-03-31 00:00:00",
                        "ACT_DSC": "",
                        "ACT_REM": "",
                        "TAXCODE": "",
                        "UP_DIS_CNT": 2.00,
                        "QTY_BAR": 0.00,
                        "PRD_NO_NO": "0001",
                        "BAT_NO_TMP": "01",
                        "CST_STD_UNIT": 0.00,
                        "AMT_OLD": 20.0000
                    }
                ],
                "BILL_STATE": {
                    "READONLY": false,
                    "READONLY_REM": []
                }
            }
        ]
    }
}