Skip to content

财务分析报表

字段可选

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

结算收款汇总

接口名
    /datacenter/finance/bill
Method
    GET
请求
    start_date  M   datetime    查询开始日期
    end_date    M   datetime    查询截止日期
    ----- session -----
    station_id  M   string  站点ID
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  返回json数据

    [{
        "real_pay"  M   float   本期实收
        "customer_id"   M   string  客户ID
        "customer_name" M   string  客户名
        "total_arrears" M   float   欠款总额
        "before_arrears"    M   float   往期欠款
        "should_pay"    M   float   本期结款
    }]

示例
    request
        http://test.guanmai.cn:8888/datacenter/finance/bill?start_date=2016-10-02&end_date=2016-10-02
    response
        {
            "data": [{
                "real_pay": 300,
                "customer_id": "K00080",
                "customer_name": "客户21",
                "total_arrears": 42.5,
                "before_arrears": 0.0,
                "should_pay": 4550
            }],
            "code": 0,
            "msg": "ok"
        }

结算收款汇总导出

接口名
    /datacenter/finance/bill/export
Method
    GET
请求
    start_date  M   datetime    查询开始日期
    end_date    M   datetime    查询截止日期
    ----- session -----
    station_id  M   string  站点ID
响应
    xlsx文件

示例
    request
        http://test.guanmai.cn:8888/datacenter/finance/bill/export?start_date=2016-10-02&end_date=2016-10-02
    response

营业收入表

接口名
    /datacenter/finance/income
Method
    GET
请求
    start_date  M   datetime    查询开始日期
    end_date    M   datetime    查询截止日期
    ----- session -----
    station_id  M   string  站点ID
响应
    code    M   int     返回码,0表示成功,其他表示错误
    msg     M   string  错误信息
    data    M   string  返回json数据

    [{
        "type"  M   string  费用属性
        "should_pay"    M   float   金额
        "name"  M   string  名称
        "id"    M   int 费用编号
    }]

示例
    request
        http://test.guanmai.cn:8888/datacenter/finance/income?start_date=2016-10-02&end_date=2016-10-02
    response
        {
            "data": [{
                "type": "冷藏费用",
                "should_pay": 441.5,
                "name": "冷藏费",
                "id": 1
            }],
            "code": 0,
            "msg": "ok"
        }

营业收入表导出

接口名
    /datacenter/finance/income/export
Method
    GET
请求
    start_date  M   datetime    查询开始日期
    end_date    M   datetime    查询截止日期
    ----- session -----
    station_id  M   string  站点ID
响应
    xlsx文件

示例
    request
        http://test.guanmai.cn:8888/datacenter/finance/income/export?start_date=2016-10-02&end_date=2016-10-02
    response

库房费用表

接口名
    /datacenter/finance/ware_fee
Method
    GET
请求
    start_date  M   datetime    查询开始日期
    end_date    M   datetime    查询截止日期
    ware_category_2_ids M   list    库区ID
    ----- 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"  M   string  库区名
        "freeze_fees": [{   O   list    冷藏费
            "name"  M   string  商品名
            "charge_count"  M   float   计费数量
            "should_pay"    M   float   应付金额
            "days"  M   int 天数
            "customer_name" M   string  客户名
            "batch_id"  M   string  批号
            "end_date"  M   datetime    截止日期
            "start_date"    M   datetime    起算日期
            "unit_name" M   string  单位
            "unit_price"    M   float  单价
            "customer_id"   M   string  客户ID
            "real_count"    M   float   实际数量
        }],
        "other_fees": [{    O   list    杂费
            "should_pay"    M   float   应付金额
            "customer_name" M   string  客户名
            "batch_id"  M   string  批号
            "name"  M   string  商品名
            "charge_count"  M   float   计费数量
            "unit_name" M   string  单位
            "type"  M   string  杂费名称
            "unit_price"    M   float   单价
            "customer_id"   M   string  客户ID
            "real_count"    M   float   实际数量
        }]
    }]

示例
    request
        http://test.guanmai.cn:8888/datacenter/finance/ware_fee?start_date=2016-10-02&end_date=2016-10-02
    response
        {
            "code": 0,
            "msg": "ok",
            "data": [{
                "ware_category_1_name": "mila-b",
                "ware_category_2_name": "b2"
                "freeze_fees": [{
                    "name": "100003a",
                    "charge_count": 1.5,
                    "should_pay": 90.0,
                    "days": 5,
                    "customer_name": "客户20",
                    "batch_id": "100003-1",
                    "end_date": "2016-09-20",
                    "start_date": "2016-09-16",
                    "unit_name": "吨",
                    "unit_price": 12.0,
                    "customer_id": "K00079",
                    "real_count": 1.245
                }],
                "other_fees": [{
                    "should_pay": 34.5,
                    "customer_name": "客户20",
                    "batch_id": "100003-1",
                    "name": "100003a",
                    "charge_count": 1.5,
                    "unit_name": "吨",
                    "type": "处置费",
                    "unit_price": 23.0,
                    "customer_id": "K00079",
                    "real_count": 1.25
                }]
            }]
        }

库房费用导出

接口名
    /datacenter/finance/ware_fee/export
Method
    GET
请求
    start_date  M   datetime    查询开始日期
    end_date    M   datetime    查询截止日期
    ware_category_2_ids M   list    库区ID
    ----- session -----
    station_id  M   string  站点ID
响应
    xlsx文件

示例
    request
        http://test.guanmai.cn:8888/datacenter/finance/ware_fee/export?start_date=2016-10-02&end_date=2016-10-02
    response

库房费用表可选的库区

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

    [{
        "id"    M   string  库区ID
        "ware_category_1_name"  M   string  仓库名
        "delete_time"   O   库区被删除日期
        "create_time"   M   库区创建日期
        "ware_category_2_name"  M   string  库区名
    }]

示例
    request
        http://test.guanmai.cn:8888/datacenter/finance/ware_fee/wares?start_date=2016-10-02&end_date=2016-10-02
    response
        {
            "code": 0,
            "msg": "ok",
            "data": [{
                "id": "WB000002",
                "ware_category_1_name": "A1",
                "delete_time": "2016-10-31",
                "create_time": "2016-06-04",
                "ware_category_2_name": "B1"
            }]
        }