Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
8c61cc63
Commit
8c61cc63
authored
Oct 23, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加车辆信息下载
parent
51691ac4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
5 deletions
+19
-5
ResultVehicleVo.java
.../java/com/xxfc/platform/vehicle/pojo/ResultVehicleVo.java
+7
-1
VehicleInformationDownloadBiz.java
...c/platform/vehicle/biz/VehicleInformationDownloadBiz.java
+3
-1
VehicleMapper.java
.../java/com/xxfc/platform/vehicle/mapper/VehicleMapper.java
+2
-2
VehicleInformationDownloadController.java
...icle/rest/admin/VehicleInformationDownloadController.java
+7
-1
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/ResultVehicleVo.java
View file @
8c61cc63
...
@@ -5,7 +5,7 @@ import lombok.Data;
...
@@ -5,7 +5,7 @@ import lombok.Data;
import
java.util.Date
;
import
java.util.Date
;
@Data
@Data
public
class
ResultVehicleVo
extends
VehicleExcelVo
{
public
class
ResultVehicleVo
extends
VehicleExcelVo
{
/**
/**
* 主键(uuid)
* 主键(uuid)
*/
*/
...
@@ -26,6 +26,12 @@ public class ResultVehicleVo extends VehicleExcelVo {
...
@@ -26,6 +26,12 @@ public class ResultVehicleVo extends VehicleExcelVo {
*/
*/
private
String
numberPlate
;
private
String
numberPlate
;
/**
* 车型
*/
private
String
vehicleType
;
/**
/**
* 品牌(编码,对应关系见相关常量),0-未填写
* 品牌(编码,对应关系见相关常量),0-未填写
*/
*/
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleInformationDownloadBiz.java
View file @
8c61cc63
...
@@ -7,6 +7,7 @@ import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
...
@@ -7,6 +7,7 @@ import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.mapper.VehicleMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleMapper
;
import
com.xxfc.platform.vehicle.pojo.ResultVehicleVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleExcelVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleExcelVo
;
import
com.xxfc.platform.vehicle.pojo.VehiclePageQueryVo
;
import
com.xxfc.platform.vehicle.pojo.VehiclePageQueryVo
;
import
org.apache.commons.beanutils.PropertyUtils
;
import
org.apache.commons.beanutils.PropertyUtils
;
...
@@ -36,7 +37,8 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
...
@@ -36,7 +37,8 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
}
else
{
}
else
{
params
.
put
(
"companyList"
,
Arrays
.
asList
(-
1
));
params
.
put
(
"companyList"
,
Arrays
.
asList
(-
1
));
}
}
return
mapper
.
getByPageNotAllData
(
params
);
return
mapper
.
getByPageNotAllData
(
params
);
}
}
public
List
getByPage
(
VehiclePageQueryVo
vehiclePageQueryVo
)
throws
Exception
{
public
List
getByPage
(
VehiclePageQueryVo
vehiclePageQueryVo
)
throws
Exception
{
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleMapper.java
View file @
8c61cc63
...
@@ -12,9 +12,9 @@ import java.util.Map;
...
@@ -12,9 +12,9 @@ import java.util.Map;
public
interface
VehicleMapper
extends
Mapper
<
Vehicle
>
{
public
interface
VehicleMapper
extends
Mapper
<
Vehicle
>
{
public
List
<
ResultVehicleVo
>
getByPage
(
Map
<
String
,
Object
>
params
);
public
List
<
ResultVehicleVo
>
getByPage
(
Map
<
String
,
Object
>
params
);
public
List
<
ResultVehicleVo
>
getByPageNotAllData
(
Map
<
String
,
Object
>
params
);
public
List
<
ResultVehicleVo
>
getByPageNotAllData
(
Map
<
String
,
Object
>
params
);
public
int
updateStatusById
(
Map
<
String
,
Object
>
params
);
public
int
updateStatusById
(
Map
<
String
,
Object
>
params
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/VehicleInformationDownloadController.java
View file @
8c61cc63
...
@@ -8,15 +8,19 @@ import com.alibaba.fastjson.JSONException;
...
@@ -8,15 +8,19 @@ import com.alibaba.fastjson.JSONException;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.google.common.collect.Lists
;
import
com.xxfc.platform.vehicle.biz.VehicleBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleInformationDownloadBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleInformationDownloadBiz
;
import
com.xxfc.platform.vehicle.common.BaseController
;
import
com.xxfc.platform.vehicle.common.BaseController
;
import
com.xxfc.platform.vehicle.common.CustomIllegalParamException
;
import
com.xxfc.platform.vehicle.common.CustomIllegalParamException
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.pojo.ResultVehicleVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleExcelVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleExcelVo
;
import
com.xxfc.platform.vehicle.pojo.VehiclePageQueryVo
;
import
com.xxfc.platform.vehicle.pojo.VehiclePageQueryVo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.beanutils.BeanUtilsBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -26,6 +30,8 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -26,6 +30,8 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -47,7 +53,7 @@ public class VehicleInformationDownloadController extends BaseController<Vehicle
...
@@ -47,7 +53,7 @@ public class VehicleInformationDownloadController extends BaseController<Vehicle
HttpServletResponse
response
;
HttpServletResponse
response
;
@GetMapping
(
"/excel"
)
@GetMapping
(
"/excel"
)
public
void
downloadExcel
(
@RequestParam
(
value
=
"vehiclePageQueryVoJson"
,
required
=
false
)
String
vehiclePageQueryVoJson
)
throws
IOException
{
public
void
downloadExcel
(
@RequestParam
(
value
=
"vehiclePageQueryVoJson"
,
required
=
false
)
String
vehiclePageQueryVoJson
)
throws
IOException
,
InvocationTargetException
,
IllegalAccessException
{
UserDTO
userDTO
=
userFeign
.
userinfoByToken
(
userAuthConfig
.
getToken
(
request
)).
getData
();
UserDTO
userDTO
=
userFeign
.
userinfoByToken
(
userAuthConfig
.
getToken
(
request
)).
getData
();
List
<
VehicleExcelVo
>
rows
=
baseBiz
.
getList
(
vehiclePageQueryVoJson
,
userDTO
);
List
<
VehicleExcelVo
>
rows
=
baseBiz
.
getList
(
vehiclePageQueryVoJson
,
userDTO
);
ExcelWriter
writer
=
ExcelUtil
.
getWriter
(
true
);
ExcelWriter
writer
=
ExcelUtil
.
getWriter
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment