Skip to content

服务时间配置

服务时间配置

/station/service_time GET 获取站点服务时间配置

接口名: /station/service_time
Method: GET
请求:
    station_id          O string    站点ID (默认当前登录站点)
    less                O bool      是否返回详细数据,为true时只返回名字和描述(true/false 默认false)
    id                  O string    时间配置id
    date_detail         O bool      获取服务时间的具体下单时间(true/false 默认false)
    cycle_days          O int       间隔周期数
    distribute_center   O string    是否为中央调度中心(yes/no)
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息
    data M list 返回服务时间信息
示例:
    /station/service_time?id=&less=1
    [{
        can_be_modified: false,
        desc: "默认服务时间",
        name: "默认服务时间",
        id: "ST001"
    }]
    /station/service_time?id=ST001&less=1
    {
        final_distribute_time_span: 1,
        service_time_creator: "T001",
        final_distribute_time: "06:00",
        receive_time_limit: {
            end: "12:00",
            start: "06:00",
            s_span_time: 1,
            e_span_time: 1,
            receiveTimeSpan: "30"
        },
        desc: "默认服务时间",
        type: 0,
        _id: "ST001",
        task_begin_time: "06:00",
        name: "默认服务时间",
        order_time_limit: {
            end: "23:00",
            start: "06:00",
            e_span_time: 0
        }
    }
    /station/service_time?date_detail=true&cycle_days=2&id=ST001
    [{
        text: "2月16日06:00~2月16日23:00的订单",
        cycle_start_time: "2017-02-16-06-00-00"
    }]
逻辑:
    参数带id时获取对应id的时间配置数据,如果date_detail为true,则返回具体下单时间
    然后distribute_center为yes时获取分站点的时间配置详情
    最后总部拉取所有的时间配置,站点获取各自站点的时间配置,less为true时只返回名字和描述

/station/service_time POST 修改站点服务时间配置

接口名: /station/service_time
Method: POST
请求:
    name                        M string    服务时间名称
    id                          O string    时间配置id (不带表示创建)
    receive_time_limit          M dict      收货时间限制
    order_time_limit            M dict      下单时间限制
    final_distribute_time       M str       最晚出库时间
    final_distribute_time_span  M int       最晚出库时间间隔
    desc                        O string    描述
响应:
    code M int 0为成功,其它为失败
    msg M string 错误提示信息