npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@gopalroy/fleet

v1.10.6

Published

车队业务

Readme

英卡车队业务

API

GET /api/fleet

获取所有车队 可选的查询参数 pageSize: 分页返回时,一页的大小,如果没有,则表示返回所有
nextMarker: 填入上1页返回的最后一个org.id, 默认不填表示从第1页开始返回.
sortBy: 排序属性,默认按id升序.如name-表示按name降序, id+或id表示按id升序(+号需要使用URL编码为%2b)
所有其它查询参数表示过滤属性 如果过滤条件里是一个正则表达式(如 /.*abc.*/ ),那么进行正则表达式匹配; 如果过滤条件里不是正则表达式,那么直接比较值是否相等匹配.
return: { total: 34, orgs: [] }. total,符合过滤条件的对象总数;orgs,对象Org的数组

GET /api/fleet?name=%2fs%2fi&biz_mode=1&pageSize=1&nextMarker=2&sortBy=name

POST /api/fleet

创建一个车队

{
    name: '北京移动望京车队', // 车队全名
    short_name: 'bjmc', // 车队简称,通常为英文或数字
    status: 1, // 0-禁用,1-启用 缺省为1
    prov: '北京', // 省级行政区
    city: '北京', // 市级行政区
    description: '实验性车队', // 简要说明性文字
    logo_url: 'http://www.baidu.com/logo.png', // 车队图标
    address: '北京市望京西路222号', // 车队地址
    phone: '+86 10 88888888', // 车队联系电话
    hotline: '+86 400 88888888'  // 车队热线电话
}

PUT /api/fleet/:fleetId

修改一个车队 :fleetId 传入车队的id和要修改的数据 return: 修改后的车队数据

{
    name: '北京移动望京车队111', // 车队全名
}

DELETE /api/fleet/:fleetId

删除一个组织 删除一个组织时,也应删除车队里所有Staffs :fleetId 传入要删除组织的id

GET /api/fleet/:fleetId/staff

查询车队里所有的职员 可选的查询参数 :fleetId 车队的id pageSize: 分页返回时,一页的大小,如果没有,则表示返回所有 nextMarker: 从哪一个开始返回, 默认不填表示从第1页开始返回 sortBy: 排序属性,默认按id升序.如name-表示按name降序, id+或id表示按id升序(+号需要使用URL编码为%2b) 所有其它查询参数表示过滤属性 如果过滤条件里是一个正则表达式,那么把属性转换为字符串,做字符串匹配; 如果过滤条件里不是正则表达式,那么直接比较值是否相等匹配 return: { total: 34, staffs: [] }. total,符合过滤条件的对象总数;staffs,对象Staff的数组

GET /api/fleet/199/staff?name=meili&pageSize=1&nextMarker=2&sortBy=name

GET /api/fleet/:fleetId/staff/:staffId

查询车队里的一个职员 :fleetId 车队的id :staffId 职员的id

GET /api/fleet/199/staff/41

POST /api/fleet/:fleedId/staff

向车队中增加一个Staff :fleetId 车队的id

{
    s4_id: 199,
    name: 'Sept'+suffix,
    phone:13888888888,
    pwd:'0000000000000000000000000000000000000000',
    nick:'九月'
}

PUT /api/fleet/:fleetId/staff/:staffId

修改车队中的一个Staff :fleetId 车队的id :staffId 职员的id

{
    s4_id: 199,
    name: 'Sept'+suffix,
    phone:13888888888,
    pwd:'0000000000000000000000000000000000000000',
    nick:'九月'
}

DELETE /api/fleet/:fleetId/staff/:staffId

删除车队中的一个Staff :fleetId 车队的id :staffId 职员的id

GET /api/fleet/:fleetId/vehicle

查询车队里所有的车辆 可选的查询参数 :fleetId 车队的id pageSize: 分页返回时,一页的大小,如果没有,则表示返回所有 nextMarker: 从哪一个开始返回, 默认不填表示从第1页开始返回 sortBy: 排序属性,默认按id升序.如id+或id表示按id升序(+号需要使用URL编码为%2b) 所有其它查询参数表示过滤属性 如果过滤条件里是一个正则表达式,那么把属性转换为字符串,做字符串匹配; 如果过滤条件里不是正则表达式,那么直接比较值是否相等匹配 return: { total: 34, vehicles: [] }. total,符合过滤条件的对象总数;vehicles,对象Vehicle的数组

GET /api/fleet/199/vehicle?obd_code=INCAR0000065597&pageSize=1&nextMarker=2&sortBy=name

POST /api/fleet/:fleedId/vehicle

向车队中增加一台车

{
    s4_id: 199,
    license:"鄂A11122",
    obd_code:"INCAR0000011122",
    brand:11,
    series:13
}

GET /api/fleet/:fleetId/vehicle/:vehicleId

查询一台车 :vehicleId 车辆的id

GET /api/fleet/199/vehicle/161

PUT /api/fleet/:fleetId/vehicle/:vehicleId

修改一台车 :vehicleId 车辆的id

{
    s4_id: 199,
    license:"鄂A11133",
    obd_code:"INCAR0000011133",
    brand:11,
    series:13
}

DELETE /api/fleet/:fleetId/vehicle/:vehicleId

删除一台车 :vehicleId 车辆的id

GET /api/fleet/:fleetId/dispatchTeam

获取全部派遣记录 可选的查询参数 pageSize: 分页返回时,一页的大小,如果没有,则表示返回所有 nextMarker: 从哪一个开始返回, 默认不填表示从第1页开始返回 sortBy: 排序属性,默认按id升序.如id+或id表示按id升序(+号需要使用URL编码为%2b) return: { total: 34, teams: [] }. total,符合过滤条件的对象总数;teams,对象dispatchTeam的数组

GET /api/fleet/199/dispatchTeam?pageSize=1&nextMarker=2&sortBy=id

POST /api/fleet/:fleetId/dispatchTeam

新增派遣记录

{id: [
    {staffId:46, vehicleId:161},
    {staffId:56, vehicleId:171
}]

GET /api/fleet/:fleetId/dispatchTeam/:dispatchTeamId

:dispatchTeamId 派遣小队的Id 返回一个派遣小队

PUT /api/fleet/:fleetId/dispatchTeam/:dispatchTeamId

修改派遣记录,主要用于回收派遣车

DELETE /api/fleet/:fleetId//dispatchTeam/:dispatchTeamId

删除派遣记录 主要用于撤消错误录入的记录 参数通过查询字串传入

GET /api/fleet/:fleetId/vehicle/:vehicleId/trip

查询某台车的所有行程数据 可选的查询参数 pageSize: 分页返回时,一页的大小,如果没有,则表示返回所有 nextMarker: 从哪一个开始返回, 默认不填表示从第1页开始返回 return: { total: 34, trips: [] }. total,符合过滤条件的对象总数;trips,对象trip的数组

GET /api/fleet/:fleetId/Vehicle/:vehicleId/trip/:tripId

获取单独1个行程数据 :tripId 行程的Id

GET /api/fleet/:fleetId/Vehicle/:vehicleId/trip/:tripId/path

查询行程位置数据 可选的查询参数 pageSize: 分页返回时,一页的大小,如果没有,则表示返回所有 nextMarker: 从哪一个开始返回, 默认不填表示从第1页开始返回 return: { total: 34, paths: [] }. total,符合过滤条件的对象总数;paths,对象path的数组

GET /api/fleet/:fleetId/Vehicle/:vehicleId/trip/:tripId/detail

查询行程详情 可选的查询参数 pageSize: 分页返回时,一页的大小,如果没有,则表示返回所有 nextMarker: 从哪一个开始返回, 默认不填表示从第1页开始返回 sortBy: 排序属性,默认按createTime升序 return: { total: 1, details: [] }. total,符合过滤条件的对象总数;details,对象detail的数组

GET /api/fleet/:fleetId/pos

获取组织中所有车辆的最后位置 从t_obd_location中获取 不用支持分页 不用支持过滤

GET /api/fleet/:fleetId/statistics/staffMileage

获取车队中司机的里程 return:({status:'ok',total:count,statisticsData:statisticsData}).total,司机里程总数;statisticsData,司机里程的数组

GET /api/fleet/:fleetId/statistics/staffSpeedmax

获取车队中司机的超速 return:({status:'ok',total:count,statisticsData:statisticsData}).total,司机超速总次数;statisticsData,司机超速的数组

GET /api/fleet/:fleetId/statistics/staffSpeedupdown

获取车队中司机的急加速 return:({status:'ok',total:count,statisticsData:statisticsData}).total,司机急加速总次数;statisticsData,司机急加速的数组

GET /api/fleet/:fleetId/statistics/staffOilused

获取车队中司机的油耗 return:({status:'ok',total:count,statisticsData:statisticsData}).total,司机油耗总数;statisticsData,司机油耗的数组

GET /api/fleet/:fleetId/statistics/staffStarttime

获取车队中司机的启动次数 return:({status:'ok',total:count,statisticsData:statisticsData}).total,司机启动总次数;statisticsData,司机启动的数组

GET /api/fleet/:fleetId/statistics/mileage

获取车队中车辆的里程 return:({status:'ok',total:count,statisticsData:statisticsData}).total,车辆里程总数;statisticsData,车辆里程的数组

GET /api/fleet/:fleetId/statistics/speedmax

获取车队中车辆的超速 return:({status:'ok',total:count,statisticsData:statisticsData}).total,车辆超速总次数;statisticsData,车辆超速的数组

GET /api/fleet/:fleetId/statistics/speedupdown

获取车队中车辆的急加速 return:({status:'ok',total:count,statisticsData:statisticsData}).total,车辆急加速总次数;statisticsData,车辆急加速的数组

GET /api/fleet/:fleetId/statistics/oilused

获取车队中车辆的油耗 return:({status:'ok',total:count,statisticsData:statisticsData}).total,车辆油耗总数;statisticsData,车辆油耗的数组

GET /api/fleet/:fleetId/statistics/starttime

获取车队中车辆的启动次数 return:({status:'ok',total:count,statisticsData:statisticsData}).total,车辆启动总次数;statisticsData,车辆启动的数组