Commit 1b8106c5 authored by jiaorz's avatar jiaorz

后台导出车辆信息

parent 1104ac65
...@@ -34,10 +34,5 @@ public class BranchCompanyVehicleCount { ...@@ -34,10 +34,5 @@ public class BranchCompanyVehicleCount {
@Column(name = "count_date") @Column(name = "count_date")
private Date countDate; private Date countDate;
/**
* 公司ID
*/
@Column(name = "company_id")
private Integer companyId;
} }
\ No newline at end of file
...@@ -114,7 +114,6 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl ...@@ -114,7 +114,6 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
branchCompanyVehicleCountVos.parallelStream().forEach(result->{ branchCompanyVehicleCountVos.parallelStream().forEach(result->{
try { try {
BranchCompanyVehicleCount branchCompanyVehicleCount = new BranchCompanyVehicleCount(); BranchCompanyVehicleCount branchCompanyVehicleCount = new BranchCompanyVehicleCount();
branchCompanyVehicleCount.setCompanyId(result.getCompanyId());
branchCompanyVehicleCount.setCompanyName(result.getParkBranchCompanyName()); branchCompanyVehicleCount.setCompanyName(result.getParkBranchCompanyName());
branchCompanyVehicleCount.setVehicleNum(result.getCount()); branchCompanyVehicleCount.setVehicleNum(result.getCount());
DateTime dateTime = DateTime.now(); DateTime dateTime = DateTime.now();
......
...@@ -84,6 +84,7 @@ public class VehicleInformationDownloadController extends BaseController<Vehicle ...@@ -84,6 +84,7 @@ public class VehicleInformationDownloadController extends BaseController<Vehicle
} }
List<BranchCompanyVehicleCount> rows = pageDataVO.getData(); List<BranchCompanyVehicleCount> rows = pageDataVO.getData();
ExcelWriter writer = ExcelUtil.getWriter(true); ExcelWriter writer = ExcelUtil.getWriter(true);
writer.addHeaderAlias("id", "ID");
writer.addHeaderAlias("countDate", "日期"); writer.addHeaderAlias("countDate", "日期");
writer.addHeaderAlias("companyName", "停靠分公司"); writer.addHeaderAlias("companyName", "停靠分公司");
writer.addHeaderAlias("vehicleNum", "车辆数量"); writer.addHeaderAlias("vehicleNum", "车辆数量");
......
...@@ -594,8 +594,7 @@ ...@@ -594,8 +594,7 @@
<select id="getAllVehicleInfo" resultType="com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo"> <select id="getAllVehicleInfo" resultType="com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo">
SELECT SELECT
b1. NAME AS parkBranchCompanyName, b1. NAME AS parkBranchCompanyName,
count(v1.id) as count, count(v1.id) as count
b1.id as companyId
FROM FROM
branch_company b1 branch_company b1
LEFT JOIN vehicle v1 ON v1.park_branch_company_id = b1.id LEFT JOIN vehicle v1 ON v1.park_branch_company_id = b1.id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment