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 7c820f24
authored
Jul 06, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
开发 1.9.0 优化围栏报警统计
1 parent
20b05f06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
src/main/resources/mapper/AlarmElectricFenceMapper.xml
src/main/resources/mapper/AlarmElectricFenceMapper.xml
View file @
7c820f2
...
...
@@ -44,19 +44,17 @@
tvd.sn as sn,
tv.created_date as activeDate,
taef.alarm_time as alarmTime
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_alarm_electric_fence taef on taef.vd_id = tvd.id
from t_alarm_electric_fence taef
left join t_vehicle_device tvd on tvd.id = taef.vd_id
left join t_device td on td.sn = tvd.sn
left join t_vehicle tv on tv.id = tvd.vehicle_id
left join t_electric_fence tef on tef.id = taef.fence_id
where tv.del_flag = 0
and taef.del_flag = 0
and tvd.del_flag = 0
and tvd.bind_status = 1
and tvd.id in (
select vd_id
from t_alarm_electric_fence
where del_flag = 0
and DATE_FORMAT(alarm_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')
)
order by taef.alarm_time desc
and td.source = 1
and tef.del_flag = 0
and DATE_FORMAT(taef.alarm_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')
</select>
...
...
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