Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
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 1dc7bdf0
authored
Dec 28, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化设备首页统计展示
1 parent
2e96a809
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
src/main/resources/mapper/VehicleDeviceMapper.xml
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
View file @
1dc7bdf
...
@@ -111,7 +111,7 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
...
@@ -111,7 +111,7 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
*
*
* @return
* @return
*/
*/
@DataPerm
(
showSql
=
true
)
@DataPerm
(
permTable
=
"temp"
,
showSql
=
true
)
Map
<
String
,
Long
>
getVehicleBindNumWithAuth
();
Map
<
String
,
Long
>
getVehicleBindNumWithAuth
();
/**
/**
...
...
src/main/resources/mapper/VehicleDeviceMapper.xml
View file @
1dc7bdf
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
</resultMap>
</resultMap>
<resultMap
id=
"activeNumberMap"
type=
"HashMap"
>
<resultMap
id=
"activeNumberMap"
type=
"HashMap"
>
<result
property=
"allActiveNumber"
column=
"allActiveNumber"
/>
<result
property=
"allActiveNumber"
jdbcType=
"INTEGER"
column=
"allActiveNumber"
/>
<result
property=
"activeNumForToday"
column=
"activeNumForToday"
/>
<result
property=
"activeNumForToday"
jdbcType=
"VARCHAR"
column=
"activeNumForToday"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -78,9 +78,8 @@
...
@@ -78,9 +78,8 @@
<select
id=
"getActiveNumberWithAuth"
resultMap=
"activeNumberMap"
>
<select
id=
"getActiveNumberWithAuth"
resultMap=
"activeNumberMap"
>
select count(tvd.id) as allActiveNumber,
select count(tvd.id) as allActiveNumber,
count(case when TO_DAYS(tvd.created_date) = TO_DAYS(NOW()) then 1 end) as activeNumForToday
count(case when TO_DAYS(tvd.created_date) = TO_DAYS(NOW()) then 1 end) as activeNumForToday
from t_vehicle_device tvd
from t_vehicle tv
left join t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
on tv.id = tvd.vehicle_id
where tvd.bind_status = 1
where tvd.bind_status = 1
and tvd.del_flag = 0
and tvd.del_flag = 0
and tv.del_flag = 0;
and tv.del_flag = 0;
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
1dc7bdf
...
@@ -91,8 +91,8 @@
...
@@ -91,8 +91,8 @@
</resultMap>
</resultMap>
<resultMap
id=
"bindNumberMap"
type=
"hashmap"
>
<resultMap
id=
"bindNumberMap"
type=
"hashmap"
>
<result
property=
"allBindNumber"
column=
"allBindNumber"
/>
<result
property=
"allBindNumber"
jdbcType=
"INTEGER"
column=
"allBindNumber"
/>
<result
property=
"bindNumForToday"
column=
"bindNumForToday"
/>
<result
property=
"bindNumForToday"
jdbcType=
"VARCHAR"
column=
"bindNumForToday"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
@@ -474,7 +474,8 @@
...
@@ -474,7 +474,8 @@
select count(temp.id) as allBindNumber,
select count(temp.id) as allBindNumber,
count(case when TO_DAYS(temp.created_date) = TO_DAYS(NOW()) then 1 end) as bindNumForToday
count(case when TO_DAYS(temp.created_date) = TO_DAYS(NOW()) then 1 end) as bindNumForToday
from (select tv.id,
from (select tv.id,
max(tvd.created_date) as created_date
max(tvd.created_date) as created_date,
tv.created_by
from t_vehicle tv
from t_vehicle tv
left join t_vehicle_device tvd
left join t_vehicle_device tvd
on tv.id = tvd.vehicle_id
on tv.id = tvd.vehicle_id
...
...
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