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 f88a4b13
authored
May 25, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车辆导入
1 parent
7b468a67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
src/main/java/cn/com/glsx/admin/modules/controller/VehicleController.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
src/main/java/cn/com/glsx/admin/modules/controller/VehicleController.java
View file @
f88a4b1
...
...
@@ -22,6 +22,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -65,7 +66,7 @@ public class VehicleController {
@ApiOperation
(
value
=
"根据id查询某条试驾车辆数据(数据回显)"
)
@GetMapping
(
"/drivevehicle/findbyid"
)
public
R
findDriveVehicleById
(
@RequestParam
(
required
=
true
)
String
tempId
)
{
public
R
findDriveVehicleById
(
@RequestParam
(
required
=
true
)
String
tempId
)
{
TrialDriveVehicleEditDTO
vehicleEditDTO
=
vehicleService
.
findDriveVehicleById
(
tempId
);
return
R
.
ok
().
data
(
vehicleEditDTO
);
}
...
...
@@ -79,7 +80,7 @@ public class VehicleController {
@ApiOperation
(
value
=
"设备和车辆解绑"
)
@GetMapping
(
"/unbindSn"
)
public
R
unbindDriveVehicle
(
@RequestParam
(
required
=
true
)
String
tempId
)
{
public
R
unbindDriveVehicle
(
@RequestParam
(
required
=
true
)
String
tempId
)
{
vehicleService
.
unbindDriveVehicle
(
tempId
);
return
R
.
ok
();
}
...
...
@@ -104,10 +105,10 @@ public class VehicleController {
}
@ApiOperation
(
value
=
"导入试驾车辆数据"
)
@PostMapping
(
"/drivevehicle/import"
)
public
R
importDriveVehicle
(
@RequestPar
am
(
"file"
)
MultipartFile
file
)
throws
IOException
{
@PostMapping
(
value
=
"/drivevehicle/import"
,
consumes
=
MediaType
.
MULTIPART_FORM_DATA_VALUE
)
public
R
importDriveVehicle
(
@RequestPar
t
(
"file"
)
MultipartFile
file
)
throws
IOException
{
TrialDriveVehicleImportListener
listener
=
new
TrialDriveVehicleImportListener
(
vehicleMapper
);
EasyExcel
.
read
(
file
.
getInputStream
(),
TrialDriveVehicleImport
.
class
,
new
TrialDriveVehicleImportListener
(
vehicleMapper
)
)
EasyExcel
.
read
(
file
.
getInputStream
(),
TrialDriveVehicleImport
.
class
,
listener
)
.
head
(
TrialDriveVehicleImport
.
class
)
.
sheet
().
doRead
();
return
R
.
ok
();
...
...
@@ -115,6 +116,7 @@ public class VehicleController {
/**
* 试驾车辆管理-下载车辆导入模板
*
* @throws Exception
*/
@RequestMapping
(
value
=
"/drivevehicle/downloadtemplate"
)
...
...
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
View file @
f88a4b1
...
...
@@ -81,6 +81,7 @@ public class VehicleMonitorSevice {
List
<
Organization
>
orgList
=
Lists
.
newArrayList
();
if
(
search
.
getTermType
()
!=
null
&&
StringUtils
.
isNotBlank
(
search
.
getTerm
()))
{
// TODO: 2021/5/25 搜索车辆或设备
}
else
{
if
(
search
.
getOrgId
()
==
null
)
{
...
...
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