查询【托工单】接口

概述

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

参数说明

1.请求方式

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

2.header参数

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

3.请求参数

字段名称 字段代号 类型 长度 必填 固定值 备注
程序代号 PGM     MRPBE  
托外单号 TW_NO string 20   ERP的单据号码

请求JSON示例

{
  "PGM": "MRPBE",       //单据程序代号
  "TW_NO": "TW0C280002"     //ERP的单据号码
}

返回结果示例

{
    "code": 0,
    "message": "查询成功",
    "data": {
        "MF_TW": [
            {
                "TW_NO": "TW0C280002",
                "TW_DD": "2020-12-28 00:00:00",
                "SEND_MTH": "1",
                "EST_DD": "2020-12-28 00:00:00",
                "CUS_NO": "1001",
                "SAL_NO": "10001",
                "DEP": "0101",
                "CUR_ID": "",
                "EXC_RTO": 1.0,
                "CLOSE_ID": "F",
                "TAX_ID": "1",
                "AMTN_NET": 0.0,
                "TAX": 0.0,
                "AMT": 0.0,
                "MRP_NO": "A2001",
                "PRD_MARK": "",
                "WH": "A000",
                "UNIT": "1",
                "QTY": 5.0,
                "UP": 0.0,
                "USR": "ADMIN",
                "CHK_MAN": "ADMIN",
                "PRT_SW": "N",
                "CLS_DATE": "2020-12-28 00:00:00",
                "ID_NO": "A2001->",
                "CST": 0.0,
                "MM_CURML": "F",
                "RTO_TAX": 5.0,
                "UP1": 0.0,
                "SYS_DATE": "2020-12-29 11:36:27",
                "PRT_USR": "",
                "QL_ID": "F",
                "Q2_ID": "F",
                "Q3_ID": "F",
                "ML_BY_MM": "F",
                "CONTROL": "F",
                "PAY_DD": "2021-01-01 00:00:00",
                "CHK_DD": "2021-02-01 00:00:00",
                "PAY_MTH": "1",
                "PAY_DAYS": 1,
                "CHK_DAYS": 30,
                "INT_DAYS": 30,
                "PAY_REM": "结帐期:2021-01-01;票据到期日:2021-02-01",
                "CF_ID": "T",
                "ZT_ID": "F",
                "STA_DD": "2020-12-28 00:00:00",
                "MRP_NAME": "A2001制成品"
            }
        ],
        "TF_TW": [
            {
                "TW_NO": "TW0C280002",
                "ITM": 1,
                "PRD_NO": "A4001",
                "PRD_NAME": "A4001原料",
                "PRD_MARK": "",
                "WH": "A000",
                "UNIT": "1",
                "QTY": 10.0,
                "USEIN_NO": "",
                "REM": "",
                "PRD_NO_CHG": "",
                "QTY1": 0.0,
                "ID_NO": "",
                "CST": 0.0,
                "TS_ITM": 4,
                "EST_ITM": 4,
                "PRE_ITM": 4,
                "LOS_RTO": 0.0,
                "QTY_STD": 2.0,
                "QTY_RSV": 10.0,
                "QTY_LOST": 0.0,
                "CHG_RTO": "",
                "CST_STD": 0.0
            },
            {
                "TW_NO": "TW0C280002",
                "ITM": 2,
                "PRD_NO": "A4002",
                "PRD_NAME": "A4002原料",
                "PRD_MARK": "",
                "WH": "A000",
                "UNIT": "1",
                "QTY": 10.0,
                "USEIN_NO": "",
                "REM": "",
                "PRD_NO_CHG": "",
                "QTY1": 0.0,
                "ID_NO": "",
                "CST": 0.0,
                "TS_ITM": 5,
                "EST_ITM": 5,
                "PRE_ITM": 5,
                "LOS_RTO": 0.0,
                "QTY_STD": 2.0,
                "QTY_RSV": 10.0,
                "QTY_LOST": 0.0,
                "CHG_RTO": "",
                "CST_STD": 0.0
            },
            {
                "TW_NO": "TW0C280002",
                "ITM": 3,
                "PRD_NO": "A5001",
                "PRD_NAME": "A5001物料",
                "PRD_MARK": "",
                "WH": "A000",
                "UNIT": "1",
                "QTY": 5.0,
                "USEIN_NO": "",
                "REM": "",
                "PRD_NO_CHG": "",
                "QTY1": 0.0,
                "ID_NO": "",
                "CST": 0.0,
                "TS_ITM": 6,
                "EST_ITM": 6,
                "PRE_ITM": 6,
                "LOS_RTO": 0.0,
                "QTY_STD": 1.0,
                "QTY_RSV": 5.0,
                "QTY_LOST": 0.0,
                "CHG_RTO": "",
                "CST_STD": 0.0
            }
        ]
    }
}