Skip to content

仓库库存报表

字段可选

M:must 必填
O:optional 选填
C: conditional 某些条件下必选

库房日报

接口名
    /datacenter/stock/daily
Method
    GET
请求
    level   M   int 仓库分类级别,最大4,最小1
    date    M   datetime    查询日期
    ----- session -----
    station_id  M   string  站点ID
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  返回json数据

    [{
        "ware_category_1_name"  M   string  仓库名
        "ware_category_2_name"  O   string  库区名(在选择库区及更细分类才有)
        "ware_category_3_name"  O   string  库位名(在选择库位及更细分类才有)
        "ware_category_4_name"  O   string  通道名(在选择通道时才有)
        "remain_item_count" M   int 剩余件数
        "remain_ton_count"  M   float   剩余吨数
        "remain_pallet_count"   M   int 剩余板数
        "out_pallet_count"  M   int 出库板数
        "out_ton_count" M   float   出库吨数
        "out_item_count"    M   int 出库件数
        "in_ton_count"  M   float   入库吨数
        "in_pallet_count"   M   int 入库板数
        "in_item_count" M   int 入库件数
    }]

示例
    request
        http://test.guanmai.cn:8888/datacenter/stock/daily?level=4&date=2016-11-01
    response
        {
            "data": [{
                "in_ton_count": 0.0,
                "in_pallet_count": 0,
                "in_item_count": 0,
                "ware_category_2_name": "b1",
                "ware_category_3_name": "b11",
                "out_pallet_count": 0,
                "remain_ton_count": 1.476,
                "remain_pallet_count": 11,
                "ware_category_4_name": "b111",
                "out_ton_count": 0.0,
                "out_item_count": 0,
                "remain_item_count": 123,
                "ware_category_1_name": "mila-b"
            }],
            "code": 0,
            "msg": "ok"
        }

库房日报导出

接口名
    /datacenter/stock/daily/export
Method
    GET
请求
    date    M   datetime    查询日期
    ----- session -----
    station_id  M   string  站点ID
响应
    xlsx文件

示例
    request
        http://test.guanmai.cn:8888/datacenter/stock/daily/export?date=2016-11-01
    response

库房明细表

接口名
    /datacenter/stock/detail
Method
    GET
请求
    ----- session -----
    station_id  M   string  站点ID
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  返回json数据

    [{
        "batch_id"  M   string  批号
        "name"  M   string  商品名
        "customer_id"   M   string  商户ID
        "customer_name" M   string  客户名
        "stock_in_date" M   datetime    入库日期
        "remain_item_count" M   int 剩余件数
        "remain_ton_count"  M   float   剩余吨数
        "remain_pallet_count"   M   int 剩余板数
        "ware_category_1_name"  M   string  仓库名
        "ware_category_2_name"  M   string  库区名
        "ware_category_3_name"  M   string  库位名
        "ware_category_4_name"  M   string  通道名
        "ware_type" M   int 通道类型(1公库2私库)
    }]

示例
    request
        http://test.guanmai.cn:8888/datacenter/stock/detail
    response

库房明细表导出

接口名
    /datacenter/stock/detail/export
Method
    GET
请求
    ----- session -----
    station_id  M   string  站点ID
响应
    xlsx文件

示例
    request
        http://test.guanmai.cn:8888/datacenter/stock/detail/export
    response

入库列表

接口名
    /datacenter/stock_in
Method
    GET
请求
    start_date  M   datetime    查询开始日期
    end_date    M   datetime    查询截止日期
    offset  O   int 分页偏移量
    limit   O   int 分页每页限制数量
    query_data  O   string  查询内容,支持批号和客户ID
    ----- session -----
    station_id  M   string  站点ID
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  返回json数据

    [{
        "batch_id"  M   string  批号
        "receipt_id"    M   string  入库单号
        "name"  M   string  商品名
        "ware_category_1_name"  M   string  仓库名
        "ware_category_2_name"  M   string  库区名
        "ware_category_3_name"  M   string  库位名
        "ware_category_4_name"  M   string  通道名
        "operate_date"  M   datetime    入库日期
        "in_count"  M   int 入库数
        "creator_id"    M   int 创建人ID
        "creator_name"  M   string  创建人名
    }]

示例
    request
        http://test.guanmai.cn:8888/datacenter/stock_in
    response
        {
            "pagination": {
                "limit": 10,
                "count": 71,
                "offset": 0
            },
            "data": [{
                "name": "sdf",
                "creator_name": "superman",
                "receipt_id": "RK00009",
                "in_count": 20,
                "creator_id": 1,
                "operate_date": "2016-09-07",
                "batch_id": "213-1",
                "ware_category_1_name": "C1_1",
                "ware_category_3_name": "W1",
                "ware_category_4_name": "T1",
                "ware_category_2_name": "K2"
            }],
            "msg": "ok",
            "code": 0
        }

入库列表导出

接口名
    /datacenter/stock_in/export
Method
    GET
请求
    start_date  M   datetime    查询开始日期
    end_date    M   datetime    查询截止日期
    query_data  O   string  查询内容,支持批号和客户ID
    ----- session -----
    station_id  M   string  站点ID
响应
    xlsx文件

示例
    request
        http://test.guanmai.cn:8888/datacenter/stock_in/export
    response

出库列表

接口名
    /datacenter/stock_out
Method
    GET
请求
    start_date  M   datetime    查询开始日期
    end_date    M   datetime    查询截止日期
    offset  O   int 分页偏移量
    limit   O   int 分页每页限制数量
    query_data  O   string  查询内容,支持批号和客户ID
    ----- session -----
    station_id  M   string  站点ID
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  返回json数据

    [{
        "batch_id"  M   string  批号
        "receipt_id"    M   string  出库单号
        "name"  M   string  商品名
        "ware_category_1_name"  M   string  仓库名
        "ware_category_2_name"  M   string  库区名
        "ware_category_3_name"  M   string  库位名
        "ware_category_4_name"  M   string  通道名
        "operate_date"  M   datetime    出库日期
        "out_count"  M   int 出库件数
        "origin_count"  M   int 原库存件数
        "remain_count"  M   int 剩余库存件数
        "creator_id"    M   int 创建人ID
        "creator_name"  M   string  创建人名
    }]

示例
    request
        http://test.guanmai.cn:8888/datacenter/stock_out
    response
        {
            "pagination": {
                "limit": 10,
                "count": 112,
                "offset": 0
            },
            "data": [{
                "origin_count": 19,
                "name": "sdf",
                "ware_category_2_name": "K2",
                "batch_id": "213-1",
                "ware_category_1_name": "C1_1",
                "ware_category_3_name": "W1",
                "remain_count": 18,
                "ware_category_4_name": "T1",
                "receipt_id": "CK00002",
                "operate_date": "2016-09-08",
                "out_count": 1,
                "creator_id": 1,
                "creator_name": "superman"
            }],
            "msg": "ok",
            "code": 0
        }

出库列表导出

接口名
    /datacenter/stock_out/export
Method
    GET
请求
    start_date  M   datetime    查询开始日期
    end_date    M   datetime    查询截止日期
    query_data  O   string  查询内容,支持批号和客户ID
    ----- session -----
    station_id  M   string  站点ID
响应
    xlsx文件

示例
    request
        http://test.guanmai.cn:8888/datacenter/stock_out/export
    response