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 67dd45a5
authored
Jul 21, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
f6121b71
410af133
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
22 deletions
src/main/java/cn/com/glsx/app/modules/controller/DashboardController.java
src/main/java/cn/com/glsx/app/modules/model/param/DeviceActiveSearch.java
src/main/resources/mapper/UserWechatAccountMapper.xml
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/app/modules/controller/DashboardController.java
View file @
67dd45a
...
@@ -13,6 +13,7 @@ import io.swagger.annotations.Api;
...
@@ -13,6 +13,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -58,7 +59,7 @@ public class DashboardController {
...
@@ -58,7 +59,7 @@ public class DashboardController {
@GetMapping
(
"/getActiveDeviceWeekReport"
)
@GetMapping
(
"/getActiveDeviceWeekReport"
)
@ApiOperation
(
value
=
"一周激活设备报表统计"
,
response
=
DeviceActiveVO
.
class
)
@ApiOperation
(
value
=
"一周激活设备报表统计"
,
response
=
DeviceActiveVO
.
class
)
@SysLog
(
module
=
"一周激活设备报表统计"
,
value
=
"一周激活设备报表统计"
,
action
=
OperateType
.
QUERY
,
saveLog
=
false
)
@SysLog
(
module
=
"一周激活设备报表统计"
,
value
=
"一周激活设备报表统计"
,
action
=
OperateType
.
QUERY
,
saveLog
=
false
)
public
R
<
DeviceActiveVO
>
getActiveDeviceWeekReport
(
DeviceActiveSearch
search
)
{
public
R
<
DeviceActiveVO
>
getActiveDeviceWeekReport
(
@Validated
DeviceActiveSearch
search
)
{
List
<
DeviceActiveVO
>
deviceActiveList
=
dashboardService
.
getActiveDeviceWeekReport
(
search
);
List
<
DeviceActiveVO
>
deviceActiveList
=
dashboardService
.
getActiveDeviceWeekReport
(
search
);
return
R
.
ok
().
data
(
deviceActiveList
);
return
R
.
ok
().
data
(
deviceActiveList
);
}
}
...
...
src/main/java/cn/com/glsx/app/modules/model/param/DeviceActiveSearch.java
View file @
67dd45a
...
@@ -4,6 +4,9 @@ import io.swagger.annotations.ApiModel;
...
@@ -4,6 +4,9 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
/**
/**
* 设备激活查询
* 设备激活查询
*
*
...
@@ -17,11 +20,13 @@ public class DeviceActiveSearch extends BasicSearch {
...
@@ -17,11 +20,13 @@ public class DeviceActiveSearch extends BasicSearch {
* 查询开始时间
* 查询开始时间
*/
*/
@ApiModelProperty
(
"查询开始时间"
)
@ApiModelProperty
(
"查询开始时间"
)
@NotBlank
(
message
=
"startTime不能为空"
)
String
startTime
;
String
startTime
;
/**
/**
* 查询结束时间
* 查询结束时间
*/
*/
@ApiModelProperty
(
"查询结束时间"
)
@ApiModelProperty
(
"查询结束时间"
)
@NotBlank
(
message
=
"endTime不能为空"
)
String
endTime
;
String
endTime
;
}
}
src/main/resources/mapper/UserWechatAccountMapper.xml
View file @
67dd45a
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
</select>
</select>
<select
id=
"selectByUserIds"
resultType=
"cn.com.glsx.app.modules.model.CTerminalUserModel"
>
<select
id=
"selectByUserIds"
resultType=
"cn.com.glsx.app.modules.model.CTerminalUserModel"
>
select tcuar.user_id userId, tcu.rel_user_id relUserId, tcuta.openid account,
tcuwa.wechat_name
username, tcuwa.wechat_avatar avatar
select tcuar.user_id userId, tcu.rel_user_id relUserId, tcuta.openid account,
ifnull(tcuwa.wechat_name, 'wechat_user')
username, tcuwa.wechat_avatar avatar
from t_cust_user_auth_rel tcuar
from t_cust_user_auth_rel tcuar
inner join t_cust_user_third_auth tcuta on tcuar.auth_id = tcuta.id
inner join t_cust_user_third_auth tcuta on tcuar.auth_id = tcuta.id
left join t_cust_user tcu on tcuar.user_id = tcu.id
left join t_cust_user tcu on tcuar.user_id = tcu.id
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
67dd45a
...
@@ -90,8 +90,8 @@
...
@@ -90,8 +90,8 @@
tv.vin,
tv.vin,
tv.owner_name as ownerName,
tv.owner_name as ownerName,
tw.partner_order_no workOrderNo,
tw.partner_order_no workOrderNo,
group_concat(
tvd.sn
) as sns,
group_concat(
distinct td.sn order by td.source desc
) as sns,
group_concat(
td.source
) as sources,
group_concat(
distinct td.source order by td.source desc
) as sources,
tcusd.permit_type as permitType,
tcusd.permit_type as permitType,
group_concat(tvs.receiver_id) as receiverIds
group_concat(tvs.receiver_id) as receiverIds
from t_vehicle tv
from t_vehicle tv
...
@@ -140,33 +140,33 @@
...
@@ -140,33 +140,33 @@
<select
id=
"selectVehicleDeviceByVehicleId"
resultType=
"cn.com.glsx.app.modules.model.view.VehicleDeviceDTO"
>
<select
id=
"selectVehicleDeviceByVehicleId"
resultType=
"cn.com.glsx.app.modules.model.view.VehicleDeviceDTO"
>
select tv.id,
select tv.id,
tv.vin,
tv.vin,
tv.owner_name
ownerName,
tv.owner_name
ownerName,
tw.partner_order_no
workOrderNo,
tw.partner_order_no
workOrderNo,
group_concat(tvd.sn)
as sns,
group_concat(tvd.sn)
as sns,
group_concat(td.source) as sources
group_concat(td.source) as sources
from t_vehicle tv
from t_vehicle tv
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
left join t_device td on td.sn = tvd.sn
left join t_device td on td.sn = tvd.sn
left join t_workorder tw on tw.id = tv.workorder_id
left join t_workorder tw on tw.id = tv.workorder_id
where tv.del_flag = 0
where tv.del_flag = 0
and tvd.del_flag = 0
and tvd.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
and tv.id = #{vehicleId}
and tv.id = #{vehicleId}
group by tv.id
group by tv.id
order by tv.id desc
order by tv.id desc
</select>
</select>
<select
id=
"getAllTrackAlarmDataByAuth"
resultType=
"cn.com.glsx.app.modules.model.view.TrackAlarmVO"
>
<select
id=
"getAllTrackAlarmDataByAuth"
resultType=
"cn.com.glsx.app.modules.model.view.TrackAlarmVO"
>
select tv.id as vehicleId,
select tv.id
as vehicleId,
tv.owner_name as ownerName,
tv.owner_name as ownerName,
tv.vin,
tv.vin,
tvd.sn
tvd.sn
from t_vehicle tv
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
where tv.del_flag = 0
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
and tvd.del_flag = 0
and tvd.del_flag = 0
</select>
</select>
<select
id=
"getAllDeviceSnByAuth"
resultType=
"String"
>
<select
id=
"getAllDeviceSnByAuth"
resultType=
"String"
>
...
...
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