Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-standard-interfaces
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e3e25137
authored
Nov 23, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化不在店数据中 无在店状态的统计
1 parent
41a5fb7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
src/main/java/cn/com/glsx/stdinterface/modules/service/ElectricInStoreService.java
src/main/java/cn/com/glsx/stdinterface/modules/service/ElectricInStoreService.java
View file @
e3e2513
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
service
;
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
service
;
import
cn.com.glsx.stdinterface.common.exception.StdinterfaceException
;
import
cn.com.glsx.stdinterface.dto.ElectricInStoreDto
;
import
cn.com.glsx.stdinterface.dto.ElectricInStoreDto
;
import
cn.com.glsx.stdinterface.modules.mapper.ElectricInStoreMapper
;
import
cn.com.glsx.stdinterface.modules.mapper.ElectricInStoreMapper
;
import
cn.com.glsx.stdinterface.modules.mapper.VehicleDeviceMapper
;
import
cn.com.glsx.stdinterface.modules.mapper.VehicleDeviceMapper
;
...
@@ -89,7 +88,17 @@ public class ElectricInStoreService {
...
@@ -89,7 +88,17 @@ public class ElectricInStoreService {
inStoreDrive
.
setPositionState
(
0
);
inStoreDrive
.
setPositionState
(
0
);
inStoreDrive
.
setGpsState
(
3
);
inStoreDrive
.
setGpsState
(
3
);
inStoreDrive
.
setGpsTime
(
cal
.
getTime
());
inStoreDrive
.
setGpsTime
(
cal
.
getTime
());
inStoreDrive
.
setVdId
(
allsnVdIdMap
.
get
(
sn
));
Long
vdId
=
allsnVdIdMap
.
get
(
sn
);
if
(
vdId
==
null
)
{
//从解绑的集合中获取最近的一个
VehicleDevice
device
=
vehicleDeviceMapper
.
getVdIdbySn
(
sn
);
if
(
device
==
null
)
{
log
.
warn
(
"vdId 不存在,属于无效数据,设备号为:"
+
sn
);
continue
;
}
vdId
=
device
.
getId
();
}
inStoreDrive
.
setVdId
(
vdId
);
inStoreDrive
.
setCreatedTime
(
new
Date
());
inStoreDrive
.
setCreatedTime
(
new
Date
());
inStoreDrives
.
add
(
inStoreDrive
);
inStoreDrives
.
add
(
inStoreDrive
);
}
}
...
...
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