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 0b1def1f
authored
May 29, 2021
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]试驾服务
1 parent
a86820b5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
src/main/java/cn/com/glsx/admin/modules/model/VehicleDocDto.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/java/cn/com/glsx/admin/modules/model/VehicleDocDto.java
View file @
0b1def1
...
@@ -17,7 +17,7 @@ public class VehicleDocDto {
...
@@ -17,7 +17,7 @@ public class VehicleDocDto {
/**
/**
* 资料类型
* 资料类型
*/
*/
private
Byte
docType
;
private
Integer
docType
;
/**
/**
* 文件链接
* 文件链接
...
...
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
0b1def1
...
@@ -198,6 +198,25 @@ public class VehicleService {
...
@@ -198,6 +198,25 @@ public class VehicleService {
}
}
/**
/**
* 解绑车辆设备(根据车辆id解绑)
*
* @param tempId
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
unbindDriveVehicle
(
String
tempId
)
{
List
<
VehicleDevice
>
vehicleDevices
=
vehicleDeviceService
.
listVehicleDeviceByVehicleIdBind
(
Long
.
parseLong
(
tempId
));
if
(
CollectionUtils
.
isEmpty
(
vehicleDevices
))
{
throw
new
AdminException
(
ResultEnum
.
PARAM_ERROR
);
}
for
(
VehicleDevice
vehicleDevice
:
vehicleDevices
)
{
vehicleDevice
.
setBindStatus
(
ConstantsDevice
.
UN_BIND_VEHICLE_STATUS
);
vehicleDevice
.
setUpdatedBy
(
ShieldContextHolder
.
getUserId
());
vehicleDevice
.
setUpdatedDate
(
new
Date
());
vehicleDeviceService
.
updateByPrimaryKey
(
vehicleDevice
);
}
}
/**
* 编辑回显车辆数据
* 编辑回显车辆数据
*
*
* @param tempId
* @param tempId
...
@@ -232,25 +251,6 @@ public class VehicleService {
...
@@ -232,25 +251,6 @@ public class VehicleService {
}
}
/**
/**
* 解绑车辆设备(根据车辆id解绑)
*
* @param tempId
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
unbindDriveVehicle
(
String
tempId
)
{
List
<
VehicleDevice
>
vehicleDevices
=
vehicleDeviceService
.
listVehicleDeviceByVehicleIdBind
(
Long
.
parseLong
(
tempId
));
if
(
CollectionUtils
.
isEmpty
(
vehicleDevices
))
{
throw
new
AdminException
(
ResultEnum
.
PARAM_ERROR
);
}
for
(
VehicleDevice
vehicleDevice
:
vehicleDevices
)
{
vehicleDevice
.
setBindStatus
(
ConstantsDevice
.
UN_BIND_VEHICLE_STATUS
);
vehicleDevice
.
setUpdatedBy
(
ShieldContextHolder
.
getUserId
());
vehicleDevice
.
setUpdatedDate
(
new
Date
());
vehicleDeviceService
.
updateByPrimaryKey
(
vehicleDevice
);
}
}
/**
* 批量删除车辆
* 批量删除车辆
*
*
* @param tempId
* @param tempId
...
...
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