Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-miniappserver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b680f124
authored
Jul 04, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
定义swagger接口
1 parent
5a73b716
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
201 additions
and
4 deletions
src/main/java/cn/com/glsx/app/modules/controller/DashboardController.java
src/main/java/cn/com/glsx/app/modules/model/param/BasicSearch.java
src/main/java/cn/com/glsx/app/modules/model/vo/LowPowerVO.java
src/main/java/cn/com/glsx/app/modules/model/vo/StatisticalInfoVO.java
src/main/java/cn/com/glsx/app/modules/service/DashboardService.java
src/main/java/cn/com/glsx/app/modules/controller/DashboardController.java
View file @
b680f12
package
cn
.
com
.
glsx
.
app
.
modules
.
controller
;
package
cn
.
com
.
glsx
.
app
.
modules
.
controller
;
import
cn.com.glsx.app.modules.model.param.BasicSearch
;
import
cn.com.glsx.app.modules.model.vo.LowPowerVO
;
import
cn.com.glsx.app.modules.model.vo.StatisticalInfoVO
;
import
cn.com.glsx.app.modules.service.DashboardService
;
import
cn.com.glsx.app.modules.service.DashboardService
;
import
com.glsx.plat.core.web.R
;
import
com.glsx.plat.core.web.R
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -11,21 +14,43 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -11,21 +14,43 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
/**
* 看板展示 controller
* 看板展示 controller
*
*
* @author yangll
* @author yangll
*/
*/
@Api
(
value
=
"/dashboard"
,
tags
=
{
"看板展示 controller"
})
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
value
=
"/dashboard"
)
@RequestMapping
(
value
=
"/dashboard"
)
@Api
(
value
=
"看板"
,
tags
=
{
"看板"
})
public
class
DashboardController
{
public
class
DashboardController
{
@Autowired
@Autowired
private
DashboardService
dashboardService
;
private
DashboardService
dashboardService
;
//todo Basic information
//todo 低电量
/**
* 看板统计信息
*/
@ApiOperation
(
value
=
"看板统计信息"
,
notes
=
"看板统计信息"
,
httpMethod
=
"GET"
)
@GetMapping
(
"statisticalInfo"
)
public
R
<
StatisticalInfoVO
>
getStatisticalInfo
()
{
StatisticalInfoVO
data
=
dashboardService
.
getStatisticalInfo
();
return
R
.
ok
().
data
(
data
);
}
/**
* 低电量统计
*/
@ApiOperation
(
value
=
"低电量统计"
,
notes
=
"低电量统计"
,
httpMethod
=
"GET"
)
@GetMapping
(
"pageLowPower"
)
public
R
<
List
<
LowPowerVO
>>
pageTodayLowPower
(
BasicSearch
search
)
{
List
<
LowPowerVO
>
list
=
dashboardService
.
listTodayLowPower
(
search
);
return
R
.
ok
().
putPageData
(
list
,
list
.
size
());
}
/**
/**
...
@@ -34,8 +59,8 @@ public class DashboardController {
...
@@ -34,8 +59,8 @@ public class DashboardController {
* @param period
* @param period
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"查询设备激活趋势"
,
notes
=
"查询设备激活趋势"
,
httpMethod
=
"GET"
)
@GetMapping
(
"getActiveDeviceInfo"
)
@GetMapping
(
"getActiveDeviceInfo"
)
@ApiOperation
(
value
=
"查询设备激活趋势"
)
public
R
getActiveDeviceInfo
(
@RequestParam
Integer
period
)
{
public
R
getActiveDeviceInfo
(
@RequestParam
Integer
period
)
{
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
src/main/java/cn/com/glsx/app/modules/model/param/BasicSearch.java
0 → 100644
View file @
b680f12
package
cn
.
com
.
glsx
.
app
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
@ApiModel
@Data
@Accessors
(
chain
=
true
)
public
class
BasicSearch
extends
Page
{
/**
* 组织Id
*/
@ApiModelProperty
(
"组织Id"
)
private
Long
orgId
;
/**
* 组织类型
*/
@ApiModelProperty
(
"组织类型"
)
private
String
orgType
;
@ApiModelProperty
(
""
)
private
List
<
Long
>
checkedOrgIds
;
@ApiModelProperty
(
""
)
private
String
checkedUserIdsStr
;
}
src/main/java/cn/com/glsx/app/modules/model/vo/LowPowerVO.java
0 → 100644
View file @
b680f12
package
cn
.
com
.
glsx
.
app
.
modules
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 看板低电量统计返回
*
* @author xiangyanlin
* @date 2022/7/4
*/
@ApiModel
(
description
=
"看板低电量统计返回"
)
@Data
public
class
LowPowerVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 姓名
*/
@ApiModelProperty
(
"姓名"
)
private
String
ownerName
;
/**
* 车架号
**/
@ApiModelProperty
(
"车架号*/"
)
private
String
vin
;
/**
* 设备号
**/
@ApiModelProperty
(
"设备号*/"
)
private
String
sn
;
/**
* 时间
**/
@ApiModelProperty
(
"时间*/"
)
private
Date
timeFlag
;
/**
* 激活时间
**/
@ApiModelProperty
(
"激活时间*/"
)
private
String
activeDate
;
/**
* 车辆ID
*/
@ApiModelProperty
(
"车辆ID"
)
private
Long
vehicleId
;
}
src/main/java/cn/com/glsx/app/modules/model/vo/StatisticalInfoVO.java
0 → 100644
View file @
b680f12
package
cn
.
com
.
glsx
.
app
.
modules
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* 看板统计信息返回
*
* @author xiangyanlin
* @date 2022/7/4
*/
@ApiModel
(
description
=
"看板统计信息返回"
)
@Data
public
class
StatisticalInfoVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 设备总数
*/
@ApiModelProperty
(
"设备总数"
)
private
Integer
totalDevice
;
/**
* 车辆总数
*/
@ApiModelProperty
(
"车辆总数"
)
private
Integer
totalVehicle
;
/**
* 今日激活
*/
@ApiModelProperty
(
"今日激活"
)
private
Integer
activeNumToday
;
/**
* 断电报警
*/
@ApiModelProperty
(
"断电报警"
)
private
Integer
powerOffAlarmNum
;
/**
* 围栏报警
*/
@ApiModelProperty
(
"围栏报警"
)
private
Integer
fenceAlarmNum
;
/**
* 光感报警
*/
@ApiModelProperty
(
"光感报警"
)
private
Integer
lightAlarmNum
;
/**
* 在线率
*/
@ApiModelProperty
(
"在线率"
)
private
String
onlineRate
;
}
src/main/java/cn/com/glsx/app/modules/service/DashboardService.java
View file @
b680f12
package
cn
.
com
.
glsx
.
app
.
modules
.
service
;
package
cn
.
com
.
glsx
.
app
.
modules
.
service
;
import
cn.com.glsx.app.modules.model.param.BasicSearch
;
import
cn.com.glsx.app.modules.model.vo.LowPowerVO
;
import
cn.com.glsx.app.modules.model.vo.StatisticalInfoVO
;
import
com.glsx.plat.core.web.R
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* 看板展示 service
* 看板展示 service
*
*
...
@@ -12,4 +18,14 @@ import org.springframework.stereotype.Service;
...
@@ -12,4 +18,14 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
DashboardService
{
public
class
DashboardService
{
public
StatisticalInfoVO
getStatisticalInfo
()
{
return
null
;
}
public
List
<
LowPowerVO
>
listTodayLowPower
(
BasicSearch
search
)
{
return
null
;
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment