Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
TDLCloud
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
TDLCloud
Commits
8b8e75f1
Commit
8b8e75f1
authored
May 31, 2018
by
chenying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5.31添加仓库接口说明
parent
87c970f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
22 deletions
+94
-22
WarehouseGatewayDateVo.java
...ava/com/example/tdl/domain/vo/WarehouseGatewayDateVo.java
+0
-2
WarehouseController.java
src/main/java/com/example/tdl/web/WarehouseController.java
+94
-20
No files found.
src/main/java/com/example/tdl/domain/vo/WarehouseGatewayDateVo.java
View file @
8b8e75f1
...
@@ -7,8 +7,6 @@ public class WarehouseGatewayDateVo {
...
@@ -7,8 +7,6 @@ public class WarehouseGatewayDateVo {
private
String
type
;
private
String
type
;
private
List
<
WarehouseDataVo
>
warehouseDataVos
;
private
List
<
WarehouseDataVo
>
warehouseDataVos
;
public
String
getgSN
()
{
public
String
getgSN
()
{
...
...
src/main/java/com/example/tdl/web/WarehouseController.java
View file @
8b8e75f1
...
@@ -248,7 +248,37 @@ public class WarehouseController {
...
@@ -248,7 +248,37 @@ public class WarehouseController {
}
}
//根据仓库编号获取仓库信息
//根据仓库编号获取仓库信息
@ApiOperation
(
value
=
"根据仓库编号获取仓库信息"
,
notes
=
"根据仓库编号获取仓库信息,传值说明:"
)
@ApiOperation
(
value
=
"根据仓库编号获取仓库信息"
,
notes
=
"根据仓库编号获取仓库信息,传值说明:"
+
" {"
+
" warehouseNo: 仓库编号,"
+
" warehouseName: 仓库名,"
+
" country: 国家,"
+
" city: 城市,"
+
" addressDetail: 详细地址,"
+
" gatewayCounts: 仓库下网关数量,"
+
" tdlCounts: 仓库下TDL数量,"
+
" property: 仓库属性,"
+
" type: 仓库类型,"
+
" hardwareLevel: 硬件等级,"
+
" areaPlanIndoor: 实际室内总面积,"
+
" gatewayOnLineVos: ["
+
" {"
+
" type: 网关类型,"
+
" state: 在线状态(6离线,7在线),"
+
" battery: 电量,"
+
" tdlDeviceDetailVos: ["
+
" {"
+
" pressure: 电压,"
+
" temperature: 温度,"
+
" humidity: 湿度,"
+
" time: 时间,"
+
" tdlsn: TDL编号"
+
" }"
+
" ],"
+
" sn: 设备编号"
+
" }"
+
" ]"
+
" }"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
})
})
...
@@ -308,9 +338,12 @@ public class WarehouseController {
...
@@ -308,9 +338,12 @@ public class WarehouseController {
}
}
//获取某个仓库的网关
//获取某个仓库的网关
@ApiOperation
(
value
=
"添加网关"
,
notes
=
"添加网关,传值:"
+
@ApiOperation
(
value
=
"获取某个仓库的网关"
,
notes
=
"获取某个仓库的网关,传值:warehouseNo:仓库编号,"
+
"warehouseNo:仓库编号"
+
" 返回值:["
+
"SN:网关编号"
)
" {"
+
" sn: 网关编号"
+
" }"
+
" ]"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
})
})
...
@@ -745,8 +778,6 @@ public class WarehouseController {
...
@@ -745,8 +778,6 @@ public class WarehouseController {
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
@ApiOperation
(
value
=
"添加网关"
,
notes
=
"添加网关,传值:"
+
@ApiOperation
(
value
=
"添加网关"
,
notes
=
"添加网关,传值:"
+
"warehouseNo:仓库编号"
+
"warehouseNo:仓库编号"
+
"SN:网关编号"
)
"SN:网关编号"
)
...
@@ -797,7 +828,6 @@ public class WarehouseController {
...
@@ -797,7 +828,6 @@ public class WarehouseController {
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
//绑定报警联系人
//绑定报警联系人
@ApiOperation
(
value
=
"绑定报警联系人"
,
notes
=
"绑定报警联系人,传值:"
+
@ApiOperation
(
value
=
"绑定报警联系人"
,
notes
=
"绑定报警联系人,传值:"
+
"warehouseNo:仓库编号"
+
"warehouseNo:仓库编号"
+
...
@@ -851,9 +881,30 @@ public class WarehouseController {
...
@@ -851,9 +881,30 @@ public class WarehouseController {
return
gson
.
toJson
(
fb
);
return
gson
.
toJson
(
fb
);
}
}
//根据仓库编号获取仓库实时数据
//根据仓库编号获取仓库实时数据
@ApiOperation
(
value
=
"根据仓库编号获取仓库信息"
,
notes
=
"根据仓库编号获取仓库信息,传值说明:"
)
@ApiOperation
(
value
=
"根据仓库编号获取仓库信息"
,
notes
=
"根据仓库编号获取仓库信息,传值说明:"
+
" warehouseNo:仓库编号,"
+
"返回值:"
+
" ["
+
" {"
+
" gSN: 网关编号,"
+
" type: 网关类型,"
+
" warehouseDataVos: ["
+
" {"
+
" warehouseTDLDetailVos: ["
+
" description: 描述,"
+
" max: 最大值,"
+
" min: 最小值"
+
" timeAndValuesVos: {"
+
" time:时间,"
+
" value:值"
+
" }"
+
" ],"
+
" tdlsn: TDL-201802271711"
+
" }"
+
" ]"
+
" }"
+
" ]"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
})
})
...
@@ -909,12 +960,33 @@ public class WarehouseController {
...
@@ -909,12 +960,33 @@ public class WarehouseController {
return
warehouseGatewayDateVoList
;
return
warehouseGatewayDateVoList
;
}
}
//货物仓库某一tdl的温湿度
//货物仓库某一tdl的温湿度
@ApiOperation
(
value
=
"绑定报警联系人"
,
notes
=
"绑定报警联系人,传值:"
+
@ApiOperation
(
value
=
"货物仓库某一tdl的温湿度"
,
notes
=
"货物仓库某一tdl的温湿度,传值:"
+
"warehouseNo:仓库编号"
+
" warehouseNo:仓库编号,"
+
"userNameList:用户名的集合"
)
" sn:网关编号,"
+
" tdlSN:TDL编号,"
+
"返回值说明:"
+
" {"
+
" gSN: 网关编号,"
+
" tdl: TDL编号,"
+
" warehouseName: 仓库名,"
+
" temp: 温度,"
+
" humidity: 湿度,"
+
" historyDataList: ["
+
" {"
+
" time:时间,"
+
" temp:温度,"
+
" humidity:湿度"
+
" }"
+
" ],"
+
" graphicDataList: ["
+
" {"
+
" descption:描述,"
+
" max:最大值,"
+
" min:最小值"
+
" }"
+
" ],"
+
" }"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
})
})
...
@@ -964,10 +1036,14 @@ public class WarehouseController {
...
@@ -964,10 +1036,14 @@ public class WarehouseController {
return
tdlDataVo
;
return
tdlDataVo
;
}
}
//根据仓库获取报警联系人
@ApiOperation
(
value
=
"根据仓库获取报警联系人"
,
notes
=
"根据仓库获取报警联系人,传值:仓库编号,"
+
//根据仓库获取用户
" 返回值说明:"
+
@ApiOperation
(
value
=
"获取报警联系人"
,
notes
=
"获取报警联系人,传值:仓库编号"
)
" ["
+
" {"
+
" userName: 用户名"
+
" }"
+
" ]"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
@ApiImplicitParam
(
paramType
=
"header"
,
name
=
"Account_token"
,
value
=
"token"
,
required
=
true
,
dataType
=
"String"
),
})
})
...
@@ -991,8 +1067,6 @@ public class WarehouseController {
...
@@ -991,8 +1067,6 @@ public class WarehouseController {
return
warehouseService
.
getAlarmContacts
(
warehouseNo
);
return
warehouseService
.
getAlarmContacts
(
warehouseNo
);
}
}
//生成仓库编号
//生成仓库编号
public
String
getWarehouseNo
(){
public
String
getWarehouseNo
(){
String
warehouseNo
=
"WH"
+
System
.
currentTimeMillis
()
;
String
warehouseNo
=
"WH"
+
System
.
currentTimeMillis
()
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment