转单接口–转入来源进货送检单生成【进货单】TI->PC

概述

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

参数说明

1.请求方式

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

2.header参数

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

3.请求参数

请求JSON示例

{
  "REF_NO": "HYPPC2302020001",        //第三方单号,必填
  "PGM": "DRPPC",            //程序代号,必填
  "MF_PSS": [          //请求生成单据的表头参数信息
    {
      "PS_ID": "PC",        //生成单据别,必填
      "PS_NO": "",          //ERP为自动编号,则取ERP系统编码;为手工编码,则与REF_NO必须相同
      "TRAN_BIL_ID":"TI",      //来源单据别,必填
      "USR":"ADMIN"         //制单人,必填
    }
  ],
  "TF_PSS": [            //请求生成单据的表身参数信息,变更表身资料
    {
      "PS_ID": "PC",
      "PS_NO": "",
      "ITM": 1,           //表身项次,必填
      "TRAN_BIL_ID":"TI ",             //来源单据别,必填
      "TRAN_BIL_NO":"TI2302020001",      //来源单号,必填
      "TRAN_BIL_ITM":1,      //转单项次,可通过查询接口查来源单表身TRAN_BIL_ITM的值,必填
      "QTY":10          //数量,必填
    },
    {
      "PS_ID": "PC",
      "PS_NO": "",
      "ITM": 2,
      "TRAN_BIL_ID":"TI ",
      "TRAN_BIL_NO":"TI2302020002",
      "TRAN_BIL_ITM":1,
      "QTY":20
    }
  ]
}

返回结果示例

{
    "code": 0,         //为0表示执行成功,其他表示错误
    "message": "新增成功",
    "data": {
        "MF_PSS": [            //生成进货单表头内容
            {
                "PS_ID": "PC",
                "PS_NO": "PC2302070002",
                "PS_DD": "2023-02-07 00:00:00",
                "CUS_NO": "CU0301",
                "DEP": "D0100",
                "TAX_ID": "2",
                "BIL_ID": "TI",
                "SEND_MTH": "1",
                "ZHANG_ID": "1",
                "EXC_RTO": 1.0,
                "SAL_NO": "001",
                "ARP_NO": "AP2302070002",
                "ARP_DD": "2023-02-07 00:00:00",
                "PAY_MTH": "1",
                "PAY_DAYS": 1,
                "CHK_DAYS": 30,
                "INT_DAYS": 30,
                "PAY_REM": "结帐期:2023-03-01;票据到期日:2023-04-01",
                "USR": "ADMIN",
                "CHK_MAN": "ADMIN",
                "PRT_SW": "N",
                "CLS_DATE": "2023-02-07 18:26:30",
                "CK_CLS_ID": "F",
                "LZ_CLS_ID": "F",
                "BIL_TYPE": "",
                "OS_ID": "PO",
                "OS_NO": "PO2302020003-2",
                "SYS_DATE": "2023-02-07 18:26:30",
                "BIL_NO": "TI2302020001-2",
                "REM": "",
                "TOT_QTY": 30.0,
                "KP_ID": "F",
                "TRAN_BIL_ID": "TI"
            }
        ],
        "TF_PSS": [             //生成进货单表身内容
            {
                "PS_ID": "PC",
                "PS_NO": "PC2302070002",
                "ITM": 1,
                "PS_DD": "2023-02-07 00:00:00",
                "WH": "YH002",
                "PRD_NO": "001",
                "PRD_NAME": "哈姆卡通玩具",
                "PRD_MARK": "",
                "UNIT": "1",
                "TAX_RTO": 5.0,
                "REM": "",
                "QTY": 10.0,
                "UP": 100.0,
                "QTY1": 10.0,
                "UP_QTY1": 100.0,
                "AMTN_NET": 952.38,
                "AMT": 1000.0,
                "CST_STD": 200.0,
                "PRE_ITM": 1,
                "OS_NO": "PO2302020003",
                "OS_ID": "PO",
                "CSTN_SAL": 952.38,
                "TAX": 47.62,
                "OTH_ITM": 1,
                "EST_ITM": 1,
                "QTY_PS": 10.0,
                "PAK_UNIT": "2箱",
                "PAK_EXC": 5.0,
                "PAK_NW": 2.0,
                "PAK_WEIGHT_UNIT": "个",
                "PAK_GW": 4.0,
                "PAK_MEAST": 6.0,
                "PAK_MEAST_UNIT": "件",
                "RK_NO": "TI2302020001",
                "TI_ITM": 1,
                "QC_ITM": 1,
                "UP_MAIN": 100.0,
                "CST_SAL": 1000.0,
                "SUP_PRD_NO": "1070300082",
                "SUP_PRD_MARK": "",
                "UP_STD": 20.0,
                "TRAN_BIL_ITM": 1,
                "QTY_ORG_ALL": 10.0,
                "PRD_NO_NO": "001",
                "TRAN_BIL_ID": "TI ",
                "TRAN_BIL_NO": "TI2302020001"
            },
            {
                "PS_ID": "PC",
                "PS_NO": "PC2302070002",
                "ITM": 2,
                "PS_DD": "2023-02-07 00:00:00",
                "WH": "YH002",
                "PRD_NO": "002",
                "PRD_NAME": "原料123",
                "PRD_MARK": "",
                "UNIT": "1",
                "TAX_RTO": 5.0,
                "REM": "",
                "QTY": 20.0,
                "UP": 200.0,
                "AMTN_NET": 3809.52,
                "AMT": 4000.0,
                "CST_STD": 400.0,
                "PRE_ITM": 2,
                "OS_NO": "PO2302020004",
                "OS_ID": "PO",
                "CSTN_SAL": 3809.52,
                "TAX": 190.48,
                "OTH_ITM": 1,
                "EST_ITM": 1,
                "QTY_PS": 20.0,
                "RK_NO": "TI2302020002",
                "TI_ITM": 1,
                "QC_ITM": 1,
                "UP_MAIN": 200.0,
                "CST_SAL": 4000.0,
                "UP_STD": 20.0,
                "TRAN_BIL_ITM": 1,
                "QTY_ORG_ALL": 20.0,
                "PRD_NO_NO": "002",
                "TRAN_BIL_ID": "TI ",
                "TRAN_BIL_NO": "TI2302020002"
            }
        ],
        "BILL_STATE": {
            "READONLY": false,
            "READONLY_REM": []
        }
    }
}