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 f4d11439
authored
Sep 07, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增车辆标签对应关系
1 parent
33449cfd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
28 deletions
src/main/java/cn/com/glsx/admin/modules/controller/VehicleController.java
src/main/java/cn/com/glsx/admin/modules/controller/VehicleController.java
View file @
f4d1143
...
@@ -376,34 +376,6 @@ public class VehicleController {
...
@@ -376,34 +376,6 @@ public class VehicleController {
@SysLog
(
module
=
"车辆管理"
,
value
=
"编辑车辆信息"
,
action
=
OperateType
.
EDIT
)
@SysLog
(
module
=
"车辆管理"
,
value
=
"编辑车辆信息"
,
action
=
OperateType
.
EDIT
)
@PostMapping
(
"/vehicleinfo/update"
)
@PostMapping
(
"/vehicleinfo/update"
)
public
R
updateVehicleInfo
(
@RequestBody
@Validated
(
ValidateGroups
.
Update
.
class
)
VehicleInfoVo
vehicleInfoVo
)
{
public
R
updateVehicleInfo
(
@RequestBody
@Validated
(
ValidateGroups
.
Update
.
class
)
VehicleInfoVo
vehicleInfoVo
)
{
// 校验设备号
List
<
String
>
noExistSnList
=
new
ArrayList
<>();
List
<
String
>
bindSnList
=
new
ArrayList
<>();
// 获取设备数据集合
List
<
DeviceInfoDto
>
deviceInfoDtos
=
vehicleInfoVo
.
getDeviceInfoDtos
();
for
(
DeviceInfoDto
deviceInfoDto
:
deviceInfoDtos
)
{
// 校验设备号是否存在
boolean
snExist
=
deviceService
.
checkSnLocalAndRemote
(
deviceInfoDto
.
getSn
());
if
(!
snExist
)
{
noExistSnList
.
add
(
deviceInfoDto
.
getSn
());
}
// 校验设备号是否已经绑定
boolean
bindSn
=
deviceService
.
checkBindSn
(
deviceInfoDto
.
getSn
());
if
(!
bindSn
)
{
bindSnList
.
add
(
deviceInfoDto
.
getSn
());
}
}
if
(
CollectionUtil
.
isNotEmpty
(
noExistSnList
))
{
noExistSnList
=
noExistSnList
.
stream
().
filter
(
StringUtils:
:
isNotEmpty
).
collect
(
Collectors
.
toList
());
return
R
.
error
(
StringUtils
.
join
(
noExistSnList
,
","
)
+
"设备不存在,请重新输入"
);
}
if
(
CollectionUtil
.
isNotEmpty
(
bindSnList
))
{
bindSnList
=
bindSnList
.
stream
().
filter
(
StringUtils:
:
isNotEmpty
).
collect
(
Collectors
.
toList
());
return
R
.
error
(
StringUtils
.
join
(
bindSnList
,
","
)
+
"设备已经绑定,请重新输入"
);
}
vehicleService
.
updateVehicleInfo
(
vehicleInfoVo
);
vehicleService
.
updateVehicleInfo
(
vehicleInfoVo
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
...
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