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 edd695ed
authored
Feb 25, 2022
by
yangll
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
编辑车辆时增加车架号重复性校验
1 parent
4ea338c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
src/main/java/cn/com/glsx/admin/common/enums/ResultEnum.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/java/cn/com/glsx/admin/common/enums/ResultEnum.java
View file @
edd695e
...
...
@@ -59,6 +59,7 @@ public enum ResultEnum {
TRIAL_DRIVE_SHOP_FENCE_EXISTED
(
121430002
,
"特约店围栏名称已存在"
),
TENANT_VEHICLE_TYPES_EXISTED
(
121430003
,
"该组织车型库已存在"
),
VEHICLE_VIN_EXISTED
(
121430004
,
"车架号已经在系统中存在,请重新修改"
),
;
private
final
Integer
code
;
...
...
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
edd695e
...
...
@@ -1291,6 +1291,12 @@ public class VehicleService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateVehicleInfo
(
VehicleInfoVo
vehicleInfoVo
)
{
//校验修改后的车架号在系统中是否存在
Vehicle
vehicleByVin
=
vehicleMapper
.
getVehicleByVin
(
vehicleInfoVo
.
getVin
());
if
(
vehicleByVin
!=
null
)
{
throw
new
AdminException
(
ResultEnum
.
VEHICLE_VIN_EXISTED
);
}
Vehicle
dbVehicle
=
vehicleMapper
.
selectById
(
vehicleInfoVo
.
getId
());
Vehicle
vehicle
=
new
Vehicle
();
...
...
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