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
6f3806c3
Commit
6f3806c3
authored
Nov 18, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-vehicle-bg' into dev
parents
689b4731
16d00b54
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
10 deletions
+28
-10
BranchCompanyVehicleCount.java
...xxfc/platform/vehicle/pojo/BranchCompanyVehicleCount.java
+9
-0
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+1
-1
VehicleInformationDownloadBiz.java
...c/platform/vehicle/biz/VehicleInformationDownloadBiz.java
+2
-1
VehicleMapper.java
.../java/com/xxfc/platform/vehicle/mapper/VehicleMapper.java
+1
-1
VehicleInformationDownloadController.java
...icle/rest/admin/VehicleInformationDownloadController.java
+3
-3
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+12
-4
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/BranchCompanyVehicleCount.java
0 → 100644
View file @
6f3806c3
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
;
import
lombok.Data
;
@Data
public
class
BranchCompanyVehicleCount
{
private
String
parkBranchCompanyName
;
private
Integer
count
;
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
6f3806c3
...
...
@@ -1516,7 +1516,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
return
vehicles
.
stream
().
map
(
Vehicle:
:
getId
).
collect
(
Collectors
.
toList
());
}
public
List
<
VehicleExcelVo
>
getAllVehicleInfo
()
{
public
List
<
BranchCompanyVehicleCount
>
getAllVehicleInfo
()
{
return
mapper
.
getAllVehicleInfo
();
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleInformationDownloadBiz.java
View file @
6f3806c3
...
...
@@ -6,6 +6,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
com.google.common.collect.Lists
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.mapper.VehicleMapper
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCount
;
import
com.xxfc.platform.vehicle.pojo.ResultVehicleVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleExcelVo
;
import
com.xxfc.platform.vehicle.pojo.VehiclePageQueryVo
;
...
...
@@ -93,7 +94,7 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
}
public
List
<
VehicleExcelVo
>
getAllVehicleInfo
()
{
public
List
<
BranchCompanyVehicleCount
>
getAllVehicleInfo
()
{
return
vehicleBiz
.
getAllVehicleInfo
();
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleMapper.java
View file @
6f3806c3
...
...
@@ -54,5 +54,5 @@ public interface VehicleMapper extends Mapper<Vehicle> {
@Select
(
"select `id` from `vehicle` where `is_del`=0"
)
List
<
String
>
findExistVehicleIds
();
List
<
VehicleExcelVo
>
getAllVehicleInfo
();
List
<
BranchCompanyVehicleCount
>
getAllVehicleInfo
();
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/VehicleInformationDownloadController.java
View file @
6f3806c3
...
...
@@ -10,6 +10,7 @@ import com.github.wxiaoqi.security.common.exception.BaseException;
import
com.xxfc.platform.vehicle.biz.VehicleBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleInformationDownloadBiz
;
import
com.xxfc.platform.vehicle.common.BaseController
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCount
;
import
com.xxfc.platform.vehicle.pojo.VehicleExcelVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -70,11 +71,10 @@ public class VehicleInformationDownloadController extends BaseController<Vehicle
@GetMapping
(
"/app/unauth/import"
)
public
void
exportVehicleInfo
()
throws
Exception
{
List
<
VehicleExcelVo
>
rows
=
baseBiz
.
getAllVehicleInfo
();
List
<
BranchCompanyVehicleCount
>
rows
=
baseBiz
.
getAllVehicleInfo
();
ExcelWriter
writer
=
ExcelUtil
.
getWriter
(
true
);
writer
.
addHeaderAlias
(
"numberPlate"
,
"车牌号"
);
writer
.
addHeaderAlias
(
"code"
,
"车辆编码"
);
writer
.
addHeaderAlias
(
"parkBranchCompanyName"
,
"停靠分公司"
);
writer
.
addHeaderAlias
(
"count"
,
"车辆数量"
);
// 一次性写出内容,使用默认样式,强制输出标题
writer
.
write
(
rows
,
true
);
//response为HttpServletResponse对象
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
6f3806c3
...
...
@@ -591,10 +591,18 @@
</select>
<!--导出分公司停靠所有车辆-->
<select
id=
"getAllVehicleInfo"
resultType=
"com.xxfc.platform.vehicle.pojo.VehicleExcelVo"
>
select b1.name as parkBranchCompanyName, v1.number_plate as numberPlate, v1.code as code from branch_company b1
left join vehicle v1 on v1.park_branch_company_id = b1.id
where b1.is_del = 0 and v1.is_del = 0
<select
id=
"getAllVehicleInfo"
resultType=
"com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCount"
>
SELECT
b1. NAME AS parkBranchCompanyName,
count(v1.id) as count
FROM
branch_company b1
LEFT JOIN vehicle v1 ON v1.park_branch_company_id = b1.id
WHERE
b1.is_del = 0
AND v1.is_del = 0
GROUP BY b1.`name`
order by b1.`name`
</select>
<select
id=
"lockByCode"
resultType=
"com.xxfc.platform.vehicle.entity.Vehicle"
...
...
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