接口对接说明文档
*以下是入库,修改,出库,查询,领取操作,上传文件,扫面快件,后台手工操作等等系统所需要接口,
接口时区,时间格式后台服务器统一处理,前端只做展示,不处理,后台优化。
接口在线测试地址为http://120.27.209.6:8090/swagger-ui.html,
测试test文件上传页面地址http://120.27.209.6:8090/upload.html
文字识别接口http://120.27.209.6:8090/ocr/scan?url=http://120.27.209.6:8888/group1/M00/00/00/rBAzTFtAt7WADBSLAAEeePITqg8669.jpg
可换成其他图片地址
快递后台管理系统地址http://120.27.209.6:90/login
快件扫描 ——》job【暂时8s执行一次【1小时执行完毕450个峰值 1*60*7.5】即可查询扫描结果】
所写字段注释
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`account` varchar(255) DEFAULT NULL COMMENT '所属设备账户',
`number` varchar(50) DEFAULT NULL COMMENT '运单号',
`phone` varchar(11) DEFAULT NULL COMMENT '手机号',
`code` varchar(20) DEFAULT NULL COMMENT '取货码',
`img_url` varchar(255) DEFAULT NULL COMMENT '图片url',
`success_date` datetime DEFAULT NULL COMMENT '领取时间',
`status` varchar(255) DEFAULT NULL COMMENT '领取状态,scanning(待识别),wait(入库待领取),success(领取),fail(识别失败)',
`remark` varchar(255) DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
1
2
3
4
5
6
7
8
9
10
11
12
1.入库保存快件
http://120.27.209.6:8090/packUp/insert
请求体post
{
"account": "001",<SaaS账户码,必填>
"imgUrl": "group1/M00/00/00/rBAzTFst2PmAFYHoAAE2VbemYe8895.jpg",
"number": "a123456",
"remark": "备注"<非必填>
}
1
2
3
4
5
6
响应体
{
"message": {
"code": "200",
"msg": "获取成功"
},
"data": 1
}
1
2
3
4
5
6
7
2.根据快点单号查询
get请求 http://120.27.209.6:8090/packUp/get4number?number=b13131321
响应体
{
"message": {
"code": "200",
"msg": "获取成功"
},
"data": {
"id": 6,
"account": "扫描枪1号",
"number": "b13131321",
"phone": "14758265423",
"code": "0123",
"imgUrl": null,
"successDate": null,
"status": "wait",
"remark": "备注",
"createDate": null,
"updateDate": null
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
3.分页查询 支持模糊查询,支持查询总记录数
http://120.27.209.6:8090/packUp/list
请求体post
{
"pageNo":"1",
"pageSize":"10",
"id":10, <条件查询非必填>
"account":"003", <SaaS账户码,必填>
"number":"abc123456", <条件查询非必填,支持模糊查询>
"phone":"15638458525", <条件查询非必填,支持模糊查询>
"code":"1234", <条件查询非必填,支持模糊查询>
"imgUrl":"group1/M00/00/00/rBAzTFtFqi-AV8qNAAgr7tOdRhg298.jpg", <条件查询非必填>
"status":"success" <条件查询非必填>
"startCreateDate":"2018-08-10 13:42:45" <开始入库时间,非必填>
"endCreateDate":"2018-08-10 13:42:45" <结束入库时间,非必填>
}
1
2
3
4
5
6
7
8
9
10
11
12
13
响应体
{
"message": {
"code": "200",
"msg": "获取成功"
},
"data": {
"total": 67,
"rows": [
{
"id": "1826",
"account": null,
"number": "3866940607293",
"phone": "17760746217",
"code": "5-5-5003",
"imgUrl": "http://image.31xiaoyuan.com:80/group1/M00/00/07/rBAzTlttJdSAFHLSAASq5DS_AEs492.jpg",
"successDate": null,
"status": "wait",
"remark": "已发送短信",
"createDate": "2018-08-10 13:42:45",
"updateDate": "2018-08-10 15:42:51"
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
4 .领取操作 后台自动更新remark 为已领取
POST 请求 http://120.27.209.6:8090/packUp/receiveStatus?number=a123456789
响应体
{
"message": {
"code": "212",
"msg": "快递已领取,不可重复领取"
},
"data": null
}
1
2
3
4
5
6
7
5.刪除快件
get请求 http://120.27.209.6:8090/packUp/remove?packupID=11 #packupID 此条记录ID
响应体
{
"message": {
"code": "200",
"msg": "删除成功"
},
"data": 0
}
1
2
3
4
5
6
7
6.上传文件
post请求 http://120.27.209.6:8090/upload/uploadFile
响应体
{
"message":{
"code":"200",
"msg":"获取成功"
},
"data":"group1/M00/00/00/rBAzTFst89WAU3TkAAAQBiAihO4765.jpg"
}
1
2
3
4
5
6
7
5.查看文件
get请求 http://120.27.209.6:8090/upload/query4url?url=group1/M00/00/00/rBAzTFst89WAU3TkAAAQBiAihO4765.jpg
响应体
{
"message": {
"code": "200",
"msg": "获取成功"
},
"data": "120.27.209.6:8888/group1/M00/00/00/rBAzTFst89WAU3TkAAAQBiAihO4765.jpg"
}
1
2
3
4
5
6
7
6.修改快件-入库修改
http://120.27.209.6:8090/packUp/update
post请求体
{
"id": "8",
"account": "00000",<SaaS账户码,必填>
"code": "1111",<非必填,有值即修改>
"imgUrl": "group1/M00/00/00/rBAzTFtFqi-AV8qNAAgr7tOdRhg298.jpg",<非必填,有值即修改>
"status": "scanning",<非必填,有值即修改>
"remark": "修改图片"<非必填,有值即修改>
}
1
2
3
4
5
6
7
8
响应体
{
"message": {
"code": "200",
"msg": "获取成功"
},
"data": 0
}
1
2
3
4
5
6
7
7. 登录入口传参数–也可参考swagger
http://120.27.209.6:8090/app/user/login
post请求体
{
"password": "123456",《密码》
"username": "18337151123"《手机号》
}
1
2
3
4
响应体
{
"message": {
"code": "200",
"msg": "获取成功"
},
"data": {
"deptId": "1", 《SaaS账户码》
"userId": "140"《用户ID,现在简单做,没有token等,后期加入》
}
}
1
2
3
4
5
6
7
8
9
10
8. 注册接口传参数–也可参考swagger
http://120.27.209.6:8090/app/user/register
post请求体
{
"deptId": 1,《SaaS账户码,由后台管理开户审核》
"password": "123456",《登录密码》
"username": "18337157111"《注册登录账户》
}
1
2
3
4
5
响应体
{
"message": {
"code": "200",
"msg": "获取成功"
},
"data": {}
}
1
2
3
4
5
6
7
网友评论