Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-opsdoc
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 f5d90be2
authored
Apr 21, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://192.168.3.233:8090/eshiled-new/ne-shield-opsdoc
2 parents
6afa2bb0
9aa9b359
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
1.6.0_四月/1.6.0数据库SQL脚本.sql
1.6.0_四月/1.6.0数据库SQL脚本.sql
View file @
f5d90be
...
...
@@ -95,7 +95,7 @@ create table t_device_power
constraint
sn_uindex
unique
(
sn
)
)
comment
'新e盾|设备
里程
表'
;
comment
'新e盾|设备
电量
表'
;
ALTER
TABLE
`t_device_power`
ADD
INDEX
idx_sn
(
`sn`
);
ALTER
TABLE
`t_device_power`
...
...
@@ -167,9 +167,8 @@ where tvd.del_flag = 0
and
tvd
.
bind_status
=
1
and
tdj
.
id
<
500000
and
tdj
.
id
>=
0
;
#
更新总里程
INSERT
INTO
t_device_journey_overview
(
sn
,
vd_id
,
total_journey_count
,
distance
)
select
sn
,
vd_id
,
count
(
1
),
sum
(
mileage
)
INSERT
INTO
t_device_journey_overview
(
sn
,
vd_id
,
total_journey_count
,
distance
,
created_by
,
created_date
,
updated_date
)
select
sn
,
vd_id
,
count
(
1
),
sum
(
mileage
),
created_by
,
created_date
,
updated_date
from
t_device_journey
where
vd_id
is
not
null
group
by
sn
,
vd_id
;
\ No newline at end of file
group
by
sn
,
vd_id
;
\ No newline at end of file
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