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 e91f9e0c
authored
May 26, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改里程统计SQL函数
1 parent
48550988
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/main/resources/mapper/TrialMileageMapper.xml
src/main/resources/mapper/TrialMileageMapper.xml
View file @
e91f9e0
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<select
id=
"getStatisticalData"
resultType=
"cn.com.glsx.admin.modules.model.export.MileageReportExport"
>
<select
id=
"getStatisticalData"
resultType=
"cn.com.glsx.admin.modules.model.export.MileageReportExport"
>
select
select
count(1) as totalTripsNum,
count(1) as totalTripsNum,
format(sum(tefd.total_mileage)/1000,3
) as totalMileage
convert(sum(tefd.total_mileage)/1000, decimal(12, 3)
) as totalMileage
from t_electric_fence_drive tefd
from t_electric_fence_drive tefd
left join t_vehicle_device tvd on tvd.id = tefd.vd_id
left join t_vehicle_device tvd on tvd.id = tefd.vd_id
left join t_vehicle tv on tv.id = tvd.vehicle_id
left join t_vehicle tv on tv.id = tvd.vehicle_id
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
tefd.journey_time mileageStartTime ,
tefd.journey_time mileageStartTime ,
tefd.journey_end_time mileageEndTime ,
tefd.journey_end_time mileageEndTime ,
TIMESTAMPDIFF(second ,tefd.journey_time,tefd.journey_end_time) drivingTimeNum ,
TIMESTAMPDIFF(second ,tefd.journey_time,tefd.journey_end_time) drivingTimeNum ,
format(tefd.total_mileage/1000,3
) drivingMileage ,
convert(tefd.total_mileage/1000, decimal(12, 3)
) drivingMileage ,
tefd.fence_id fenceId
tefd.fence_id fenceId
from t_electric_fence_drive tefd
from t_electric_fence_drive tefd
left join t_vehicle_device tvd on tvd.id = tefd.vd_id
left join t_vehicle_device tvd on tvd.id = tefd.vd_id
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
<select
id=
"findDailyData"
resultType=
"cn.com.glsx.admin.modules.model.export.DeviceDailyExport"
>
<select
id=
"findDailyData"
resultType=
"cn.com.glsx.admin.modules.model.export.DeviceDailyExport"
>
select
select
format(sum(tefd.total_mileage)/1000,3
) as drivingMileage ,
convert(sum(tefd.total_mileage)/1000, decimal(12, 3)
) as drivingMileage ,
left(tefd.journey_time,10) as mileageTime
left(tefd.journey_time,10) as mileageTime
from t_electric_fence_drive tefd
from t_electric_fence_drive tefd
where tefd.sn = #{sn}
where tefd.sn = #{sn}
...
...
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