YD_YiLu.Api/壹路文档/docx1_text.txt
2026-03-27 10:53:02 +08:00

501 lines
7.7 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

壹动站对接协议
2025年5月
深圳前海壹路科技有限公司
修订记录
日期
版本
修改人
修改描述
20241203
V1.0
曹向
新建壹动站和学校智慧体育平台的对接协议
20250506
V1.1
曹向
接口字段含义和类型说明
20250624
V1.3
唐明冠
新增二、(5、6、7) 服务器推送远程标定相关协议
20250626
V1.4
唐明冠
新增一、获取人员详情接口
20250704
V1.5
唐明冠
修改一、2人员下发接口(新增后台回传字段current,pages,total用于实时监测下发进度)
20250707
V1.6
唐明冠
增加“服务器主动推送获取设备标定现场参照图”接口备注
20250718
V1.7
曹向
修改人员下发相关接口新增年级名称字段
20250722
V1.8
唐明冠
一
、
10查询我的运动新增选填字段 身高
、
体重
20250822
V1.9
曹向
增加组织下发接口
壹动站调用平台接口部分
1、小站登录
后台小站的状态通过小站登录之后显示为在线,当小站中断心跳三分钟后离线,离线后需要重新调用该接口重新登录
WebSocket地址:ws://192.168.51.36:22001/ws/camera/device
客户端请求示例:
{
   
"serialNumber"
:
"sn1881"
,  
//序列码,区分设备唯一性
   
"androidId"
:
""
,        
//安卓Id,本次后端没用到,李总要求保留该字段
   
"imei"
:
""
,              
//国际移动设备识别码,本次后端没用到,李总要求保留该字段
   
"imsi"
:
""
,          
//国际移动用户识别码,本次后端没用到,李总要求保留该字段
"request"
:
"station:live"
,    
//
   
请求类型
"msgId"
:
"c7e6a04a5f3842d8b7f343d35d05d923"
 
//消息随机码,随机字符串,确保对话消息对称性
}
服务器返回示例:
{
   
"msgId"
:
"c7e6a04a5f3842d8b7f343d35d05d923"
,
   
"request"
:
"station:live"
,
   
"data"
: {
       
"sportStationId"
:
0
,
//运动小站id
       
"name"
:
""
,
//运动小站名称
       
"tenantName"
:
""
,
//客户名称
       
"serialNumber"
:
""
,
//唯一序列号
       
"isCalibration"
:
0
,
//是否标定
       
"isSynchronization"
:
0
,
//是否开启数据同步
       
"isActive"
:
0
,
//是否激活
       
"courseList"
: [
//课程列表,每个课目的id和名称对应
            {
               
"courseId"
:
0
, //课目类型id 见备注
               
"courseName"
:
""//课目名称
            }
        ]
    },
   
"msg"
:
"OK"
,
   
"code"
:
0
}
请求报文字段说明
字段
类型
说明
是否必填
备注
request
String
请求类型
是
必须与示例相同:station:live
msgId
String
消息随机码
是
随机字符串,确保对话消息对称性
serialNumber
String
序列码,区分设备唯一性
是
androidId
String
安卓Id
否
预留字段,可不作处理
imei
String
国际移动设备识别码
否
预留字段,可不作处理
imsi
String
国际移动用户识别码
否
预留字段,可不作处理
响应报文字段说明
字段
类型
说明
是否必填
备注
request
String
请求类型
是
必须与示例相同:station:live
msgId
String
消息随机码
是
随机字符串,确保对话消息对称性
data
Object
返回体
是
msg
String
返回信息
是
code
Integer
返回码
是
sportStationId
Integer
运动小站id
是
name
String
运动小站名称
是
tenantName
String
客户名称
是
serialNumber
String
唯一序列号
是
isCalibration
Integer
是否标定
是
isSynchronization
Integer
是否开启数据同步
是
0 否 1是
courseList
List
课程列表
否
每个课目的id和名称对应
courseId
Integer
课目类型id
否
见备注
courseName
String
课目名称
否
见备注
2、人员下发
测试地址(弃用):
192.168.51.36:22001/device/sync/user_trace
修改接口地址为:
192.168.51.36:22001/device/sync/user_page
 
请求类型:POST
请求参数示例:
{
   
"deviceSerial"
:
"fa0132e389448588"
, //设备序列号
   
"deviceType"
:
11
, //设备类型
"userType"
:
2 //人员类型 1教师,2 学生
"pageIndex"
:
1
,
//分页页码
   
"pageSize"
:
10 //分页个数
}
 
返回参数示例:
{
   
"code"
:
0
,
   
"msg"
:
"OK"
,
   
"data"
: {
       
"syncId"
:
215055665
, //同步id
"current"
:
1
, //当前查询页码
"pages"
:
10
, //当前页码总数
"total"
:
1000
, //所有数据总人数
       
"userList"
: [
            {
               
"userId"
:
2762
,
//人员id
               
"userType"
:
2
,
//人员类型,1:教师、2:学生,3:家长(仅app支持)
               
"username"
:
"0201009"
,
//用户名,(登录用)
               
"nickname"
:
"陈志强"
,
//姓名
               
"organizationId"
:
231
,
//组织id
         
"organizationName": "一班", //
具体组织
名称
(
班级
)
 
"grade
Name
": "二年级", //
年级
名称
               
"facePictureUrl"
:
"http://192.168.51.36:9000/user-face-picture/18095480862818631680201009.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minioadmin%2F20240812%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240812T095444Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=7a98374f95b49d0be67c78329523d97b2888d21841cc69c6256909f23e3bc7b3"
,
//人脸图片链接
               
"identity"
:
"学生"
,
//身份 userType对应属性
               
"gender"
:
"男"
,
//性别
               
"birthday"
:
"1999-06-25"
,
//生日
               
"userSerial"
:
"0201009"
,
//人员编码,对应本地U盘导入人员序列号
               
"trainLimitValues"
: [
//训练极致
                    {
                       
"courseId"
:
8
,
//课目id ,不同课目id对应不同课目
                       
"bestResult"
:
"23"
,
//该课目最佳成绩
                       
"lastResult"
:
"23"
//该课目最差成绩
                    },
                    {
                       
"courseId"
:
2
,
                       
"bestResult"
:
"0"
,
                       
"lastResult"
:
"0"
                    },
                    {
                       
"courseId"
:
7
,
                       
"bestResult"
:
"16700"
,
                       
"lastResult"
:
"16700"
                    },
                    {
                       
"courseId"
:
9
,
                       
"bestResult"
:
"20"
,
                       
"lastResult"
:
"20"
                    },
                    {
                       
"courseId"
:
10