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 73a2338c
authored
Nov 01, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化获取 vdId 业务逻辑
1 parent
aa08a6d1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
src/main/java/cn/com/glsx/stdinterface/modules/service/ElectricInStoreService.java
src/main/java/cn/com/glsx/stdinterface/modules/service/FenceDriverService.java
src/main/java/cn/com/glsx/stdinterface/modules/service/RouteOilMileageService.java
src/main/java/cn/com/glsx/stdinterface/modules/service/ElectricInStoreService.java
View file @
73a2338
...
...
@@ -49,7 +49,8 @@ public class ElectricInStoreService {
if
(
device
!=
null
)
{
electricInStoreDrive
.
setVdId
(
device
.
getId
());
}
else
{
throw
new
StdinterfaceException
(
"vdId 不存在,属于无效数据,设备号为:"
+
electricInStoreDrive
.
getSn
());
log
.
warn
(
"vdId 不存在,属于无效数据,设备号为:"
+
electricInStoreDrive
.
getSn
());
return
;
}
}
}
...
...
src/main/java/cn/com/glsx/stdinterface/modules/service/FenceDriverService.java
View file @
73a2338
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
service
;
import
cn.com.glsx.stdinterface.common.exception.StdinterfaceException
;
import
cn.com.glsx.stdinterface.dto.ElectricFenceDto
;
import
cn.com.glsx.stdinterface.modules.mapper.ElectricFenceDriveMapper
;
import
cn.com.glsx.stdinterface.modules.mapper.VehicleDeviceMapper
;
import
cn.com.glsx.stdinterface.modules.model.ElectricFenceDrive
;
import
cn.com.glsx.stdinterface.modules.model.VehicleDevice
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -16,6 +16,7 @@ import java.util.List;
/**
* 有效试驾
*/
@Slf4j
@Service
public
class
FenceDriverService
{
...
...
@@ -48,7 +49,8 @@ public class FenceDriverService {
if
(
device
!=
null
)
{
fenceDrive
.
setVdId
(
device
.
getId
());
}
else
{
throw
new
StdinterfaceException
(
"vdId 不存在,属于无效数据,设备号为:"
+
fenceDrive
.
getSn
());
log
.
warn
(
"vdId 不存在,属于无效数据,设备号为:"
+
fenceDrive
.
getSn
());
return
;
}
}
}
...
...
src/main/java/cn/com/glsx/stdinterface/modules/service/RouteOilMileageService.java
View file @
73a2338
package
cn
.
com
.
glsx
.
stdinterface
.
modules
.
service
;
import
cn.com.glsx.stdinterface.common.exception.StdinterfaceException
;
import
cn.com.glsx.stdinterface.dto.RouteOilMileageDto
;
import
cn.com.glsx.stdinterface.modules.mapper.RouteOilMileageMapper
;
import
cn.com.glsx.stdinterface.modules.mapper.VehicleDeviceMapper
;
...
...
@@ -75,7 +74,8 @@ public class RouteOilMileageService {
if
(
device
!=
null
)
{
routeOilMileage
.
setVdId
(
device
.
getId
());
}
else
{
throw
new
StdinterfaceException
(
"vdId 不存在,属于无效数据,设备号为:"
+
romd
.
getSn
());
log
.
warn
(
"vdId 不存在,属于无效数据,设备号为:"
+
romd
.
getSn
());
return
;
}
}
}
...
...
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