查询【BOM组合生产】接口

概述

该接口主要用于第三方平台或自主研发者,通过调用【BOM组合生产】的查询接口,将Sunlike ERP或Online ERP系统中的【BOM组合生产】信息查询到第三方平台。

参数说明

1.请求方式

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

2.header参数

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

3.请求参数

字段名称 字段代号 类型 长度 必填 固定值 备注
程序代号 PGM     MRPBC  
单据别 MB_ID string 2 MB  
组合代号 MB_NO string 20   ERP单据号码

请求JSON示例

{
  "PGM": "MRPBC",      //单据程序代号
  "MB_ID": "MB",       //单据别代号
  "MB_NO": "MB2205110001"     //ERP单据号码
}

返回结果示例

{
    "code": 0,                //为0表示执行成功,其他表示错误
    "message": "查询成功",                  //提示信息
    "data": {
        "MF_MB": [                           //查询单据表头信息
            {
                "MB_ID": "MB",
                "MB_NO": "MB2205110001",
                "MB_DD": "2022-05-11 00:00:00",
                "SO_NO": "SO2205110001",
                "USR_NO": "001",
                "WH_PRD": "YH001",
                "WH_MTL": "YH001",
                "MRP_NO": "WDP001",
                "PRD_MARK": "",
                "PRD_NAME": "打印机",
                "EXP_MTH": "1",
                "UNIT": "1",
                "QTY": 1.0,
                "QTY1": 2.0,
                "BAT_NO": "",
                "DEP": "965",
                "CST": 110.0,
                "CST_MAKE": 0.0,
                "CST_PRD": 0.0,
                "CST_MAN": 0.0,
                "CST_OUT": 0.0,
                "USED_TIME": 0.0,
                "VOH_ID": "",
                "REM": "",
                "CST_STD": 100.0,
                "FIX_CST1": "1",
                "CST_SMAKE": 0.0,
                "CST_SPRD": 0.0,
                "CST_SMAN": 0.0,
                "CST_SOUT": 0.0,
                "USED_STIME": 0.0,
                "USR": "ADMIN",
                "CHK_MAN": "ADMIN",
                "PRT_SW": "N",
                "CLS_DATE": "2022-06-06 14:17:53",
                "ID_NO": "WDP001->V0.5",
                "EST_ITM": 1,
                "BIL_TYPE": "",
                "SYS_DATE": "2022-06-06 14:17:53",
                "TIME_CNT": 0.0,
                "TIME_SCNT": 0.0,
                "PRT_USR": "",
                "UP_MAIN": 110.0,
                "SPC": "H&P",
                "CHUW": ""
            }
        ],
        "TF_MB": [                     //查询单据表身信息
            {
                "MB_ID": "MB",
                "MB_NO": "MB2205110001",
                "ITM": 1,
                "MB_DD": "2022-05-11 00:00:00",
                "PRD_NO": "WDP004",
                "PRD_NAME": "原色鼓芯",
                "PRD_MARK": "",
                "WH": "YH001",
                "UNIT": "1",
                "QTY": 1.0,
                "QTY_LOST": 0.0,
                "CST": 100.0,
                "REM": "",
                "CST_STD": 100.0,
                "PRD_NO_CHG": "WDP006",
                "ID_NO": "",
                "EST_ITM": 4,
                "PRE_ITM": 4,
                "USEIN_NO": "",
                "LOS_RTO": 0.0,
                "QTY_STD": 1.0,
                "DEP_RK": "",
                "FIX_CST1": "1",
                "CAS_NO": "",
                "UP_MAIN": 100.0,
                "CHUW": "",
                "UP_STD_QTY": 100.0,
                "QTY_UT": 1.0,
                "SPC": "H&W",
                "NAME_ENG": "",
                "UNIT1_NAME": "",
                "PRD_NO_NO": "WDP004"
            },
            {
                "MB_ID": "MB",
                "MB_NO": "MB2205110001",
                "ITM": 2,
                "MB_DD": "2022-05-11 00:00:00",
                "PRD_NO": "WDP008",
                "PRD_NAME": "包装箱",
                "PRD_MARK": "",
                "WH": "YH001",
                "UNIT": "1",
                "QTY": 1.0,
                "QTY_LOST": 0.0,
                "CST": 10.0,
                "REM": "",
                "CST_STD": 0.0,
                "PRD_NO_CHG": "WDP009",
                "ID_NO": "",
                "EST_ITM": 5,
                "PRE_ITM": 5,
                "USEIN_NO": "",
                "LOS_RTO": 0.0,
                "QTY_STD": 1.0,
                "DEP_RK": "",
                "FIX_CST1": "1",
                "CAS_NO": "",
                "UP_MAIN": 10.0,
                "CHUW": "",
                "UP_STD_QTY": 10.0,
                "QTY_UT": 1.0,
                "SPC": "",
                "NAME_ENG": "",
                "UNIT1_NAME": "",
                "PRD_NO_NO": "WDP008"
            }
        ],
        "BILL_STATE": {
            "READONLY": false,
            "READONLY_REM": []
        }
    }
}