批量查询【制成品制程规划】接口

概述

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

参数说明

1.请求方式

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

2.header参数

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

3.请求参数

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

请求JSON示例

{
  "PGM":"MRPZC",   //单据别
  "BOM_NO":"",   //按单号查询,可多张单号,用豆号隔开
  "DATE_TYPE":1,        //0表示单据日期,1表示制单日期,2表示终审日期,3修改日期
  "START_DATE":"2020-11-1",  //查询的开始日期
  "END_DATE":"2021-12-31",   //查询的结束日期
  "DEP":"00000000",      //有[]表示多选,不含下属部门;没有[]表示单选且含下属
  "ORDER_BY":
  {"BOM_NO":"DESC"
  }
}

返回结果示例

{
    "code": 0,
    "message": "查询成功",
    "data": {
        "UP_DD": "2021-04-29 16:27:46",
        "TOTAL_NUM": 1,
        "BILL_LIST": [
            {
                "MF_ZC": [
                    {
                        "BOM_NO": "1003->AAA",
                        "PRD_NO": "1003",
                        "PRD_MARK": "",
                        "UNIT": "1",
                        "QTY": 1.00000000,
                        "USR": "ADMIN",
                        "CHK_MAN": "ADMIN",
                        "PRT_SW": "N",
                        "QTY_BAT": 0.00000000,
                        "CLS_DATE": "2021-04-29 00:00:00",
                        "PF_NO": "AAA",
                        "NAME": "1003货品",
                        "MOB_ID": "",
                        "PRT_USR": "",
                        "DEP": "00000000",
                        "MODIFY_DD": "2021-04-29 16:27:46",
                        "MODIFY_MAN": "ADMIN",
                        "SYS_DATE": "2021-04-28 19:10:21"
                    }
                ],
                "TF_ZC": [
                    {
                        "BOM_NO": "1003->AAA",
                        "ITM": 1,
                        "ZC_NO": "01",
                        "DEP": "00000000",
                        "TIME_UNIT": "1",
                        "ZC_NAME": "工序01",
                        "ZC_ITM": 1,
                        "CHK_ID": "",
                        "MV_ID": "Y",
                        "ZC_NO_DN": "02",
                        "ZC_NO_UP": "",
                        "ZC_NUM": 1.00000000,
                        "OVER_RTO": 0.00000000,
                        "QTY_RTO": 1.00000000,
                        "FT_EVA": 0.00000000,
                        "TIME_EVA": 0.00000000,
                        "TIME_ADD": 0.00000000,
                        "EXP_RTO": 0.00000000,
                        "PRE_ITM": 1,
                        "QTY_BAS_MAN": 1.00000000,
                        "QTY_SLS_": 0.00000000,
                        "QTY_BAS_MAK": 1.00000000,
                        "QTY_BAS_PRD": 1.00000000,
                        "QTY_BAS_OUT": 1.00000000
                    },
                    {
                        "BOM_NO": "1003->AAA",
                        "ITM": 2,
                        "ZC_NO": "02",
                        "DEP": "00000000",
                        "TIME_UNIT": "1",
                        "ZC_NAME": "工序02",
                        "ZC_ITM": 2,
                        "CHK_ID": "",
                        "MV_ID": "",
                        "ZC_NO_UP": "01",
                        "ZC_NUM": 1.00000000,
                        "OVER_RTO": 0.00000000,
                        "QTY_RTO": 1.00000000,
                        "FT_EVA": 0.00000000,
                        "TIME_EVA": 0.00000000,
                        "TIME_ADD": 0.00000000,
                        "EXP_RTO": 0.00000000,
                        "PRE_ITM": 2,
                        "QTY_BAS_MAN": 1.00000000,
                        "QTY_SLS_": 0.00000000,
                        "QTY_BAS_MAK": 1.00000000,
                        "QTY_BAS_PRD": 1.00000000,
                        "QTY_BAS_OUT": 1.00000000
                    }
                ],
                "BILL_STATE": {
                    "READONLY": false,
                    "READONLY_REM": []
                }
            }
        ]
    }
}