转单接口–转入来源制令单生成【制成品送检单】MO->T6

概述

该接口主要用于第三方平台或自主研发者,通过调用【制成品送检】的转单接口,将第三方系统的生产制成品送检的货品信息推送到Sunlike ERP或Online ERP系统中,从而生成Sunlike ERP或Online ERP系统的【制成品送检单】。

参数说明

1.请求方式

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

2.header参数

Content-Type application/json
Authorization token 获取每次登录的值

3.请求参数

请求JSON示例

{
  "REF_NO": "HYPT62302020007",        //第三方单号,必填
  "PGM": "MRPBLA",            //程序代号,必填
  "MF_TI": [          //请求生成单据的表头参数信息
    {
      "TI_ID": "T6",        //生成单据别,必填
      "TI_NO": "",         //ERP为自动编号,则取ERP系统编码;为手工编码,则与REF_NO必须相同
       "TRAN_BIL_ID":"MO",       //来源单据别,必填
      "USR":"ADMIN"         //制单人,必填
    }
  ],
  "TF_TI": [            //请求生成单据的表身参数信息,变更表身资料
    {
      "TI_ID": "T6",
      "TI_NO": "",
      "ITM": 1,           //表身项次,必填
      "TRAN_BIL_ID":"MO",             //来源单据别,必填
      "TRAN_BIL_NO":"MO2302020007",      //来源单号,必填
      "QTY":10          //数量,必填
    },
    {
      "TI_ID": "T6",
      "TI_NO": "",
      "ITM": 2,
      "TRAN_BIL_ID":"MO",
      "TRAN_BIL_NO":"MO2302020008",
      "QTY":20
    }
  ]
}

返回结果示例

{
    "code": 0,               //为0表示执行成功,其他表示错误
    "message": "新增成功",
    "data": {
        "MF_TI": [                //生成制成品送检单表头内容
            {
                "TI_ID": "T6",
                "TI_NO": "T62302070001",
                "TI_DD": "2023-02-07 00:00:00",
                "BIL_ID": "MO",
                "BIL_NO": "",
                "SAL_NO": "",
                "CLOSE_ID": "F",
                "DEP": "965",
                "REM": "",
                "USR": "ADMIN",
                "CHK_MAN": "ADMIN",
                "PRT_SW": "N",
                "CLS_DATE": "2023-02-07 20:14:08",
                "OS_ID": "MO",
                "OS_NO": "MO2302020007-2",
                "CHKTY_ID": "T",
                "SYS_DATE": "2023-02-07 20:14:08",
                "TRAN_BIL_ID": "MO"
            }
        ],
        "TF_TI": [           //生成制成品送检单表身内容
            {
                "TI_ID": "T6",
                "TI_NO": "T62302070001",
                "ITM": 1,
                "PRD_NO": "WDP001",
                "PRD_NAME": "打印机",
                "PRD_MARK": "",
                "WH": "YH001",
                "UNIT": "1",
                "QTY": 10.0,
                "BIL_ID": "MO",
                "BIL_NO": "MO2302020007",
                "EST_ITM": 1,
                "QTY_RK": 10.0,
                "ID_NO": "WDP001->",
                "QTY1": 20.0,
                "CK_ITM": 1,
                "VALID_DD": "2023-03-08 00:00:00",
                "PRE_ITM": 1,
                "RK_DD": "2023-02-07 00:00:00",
                "CHKTY_ID": "T",
                "TRAN_BIL_ID": "MO",
                "TRAN_BIL_NO": "MO2302020007"
            },
            {
                "TI_ID": "T6",
                "TI_NO": "T62302070001",
                "ITM": 2,
                "PRD_NO": "WDP001",
                "PRD_NAME": "打印机",
                "PRD_MARK": "",
                "WH": "YH001",
                "UNIT": "1",
                "QTY": 20.0,
                "BIL_ID": "MO",
                "BIL_NO": "MO2302020008",
                "EST_ITM": 2,
                "QTY_RK": 20.0,
                "ID_NO": "WDP001->",
                "QTY1": 40.0,
                "CK_ITM": 2,
                "VALID_DD": "2023-03-08 00:00:00",
                "PRE_ITM": 2,
                "RK_DD": "2023-02-07 00:00:00",
                "CHKTY_ID": "T",
                "TRAN_BIL_ID": "MO",
                "TRAN_BIL_NO": "MO2302020008"
            }
        ],
        "BILL_STATE": {
            "READONLY": false,
            "READONLY_REM": []
        }
    }
}