Commit 34b07ddf authored by hanfeng's avatar hanfeng

Merge branch 'master-bug-vehiclemodel-hf' into dev

# Conflicts:
#	xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/ResultVehicleVo.java
parents ea600213 098f6cb7
...@@ -92,6 +92,8 @@ public class ResultVehicleVo { ...@@ -92,6 +92,8 @@ public class ResultVehicleVo {
*/ */
private String vin; private String vin;
/** /**
* 商业险公司,见常量表 * 商业险公司,见常量表
*/ */
...@@ -104,28 +106,29 @@ public class ResultVehicleVo { ...@@ -104,28 +106,29 @@ public class ResultVehicleVo {
private String insuranceNo; private String insuranceNo;
/** /**
* 险开始时间 * 商业险开始时间
*/ */
private Date insuranceStartDate; private Date insuranceStartDate;
/** /**
* 商业险到期时间 * 商业险结束时间
*/ */
private Date insuranceEndDate; private Date insuranceEndDate;
/** /**
* 交强险公司 * 交强险公司
*/ */
private String strongInsuranceCompany; private Integer strongInsuranceCompany;
/** /**
* 交强险到期时间 * 交强险单号
*/ */
private Date strongInsuranceEndDate; private String strongInsuranceNo;
/** /**
* 交强险单号 * 交强险时间
*/ */
private String strongInsuranceNo; private Date strongInsuranceEndDate;
/** /**
* 年审时间 * 年审时间
......
...@@ -65,6 +65,51 @@ public class VehicleExcelVo { ...@@ -65,6 +65,51 @@ public class VehicleExcelVo {
*/ */
private String belongToName; private String belongToName;
/**
* 车架号
*/
private String vin;
/**
* 发动机号
*/
private String engineNum;
/**
* 商业险公司,见常量表
*/
private String insuranceCompany;
/**
* 商业险单号
*/
private String insuranceNo;
/**
* 商业险结束时间
*/
private Date insuranceEndDate;
/**
* 交强险公司
*/
private String strongInsuranceCompany;
/**
* 交强险单号
*/
private String strongInsuranceNo;
/**
* 交强险时间
*/
private Date strongInsuranceEndDate;
/** /**
* 车架号 * 车架号
......
package com.xxfc.platform.vehicle.biz; package com.xxfc.platform.vehicle.biz;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.github.wxiaoqi.security.admin.entity.Group;
import com.github.wxiaoqi.security.admin.feign.dto.UserDTO; 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.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.xxfc.platform.vehicle.entity.Constant;
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.ResultVehicleVo;
...@@ -22,6 +24,7 @@ import java.util.ArrayList; ...@@ -22,6 +24,7 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
@Service @Service
@Slf4j @Slf4j
...@@ -29,7 +32,8 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl ...@@ -29,7 +32,8 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
@Autowired @Autowired
private VehicleBiz vehicleBiz; private VehicleBiz vehicleBiz;
@Autowired
private ConstantBiz constantBiz;
@Autowired @Autowired
private BranchCompanyVehicleCountBiz branchCompanyVehicleCountBiz; private BranchCompanyVehicleCountBiz branchCompanyVehicleCountBiz;
...@@ -83,14 +87,15 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl ...@@ -83,14 +87,15 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
public List<VehicleExcelVo> getList(String vehiclePageQueryVoJson, UserDTO userDTO) throws Exception { public List<VehicleExcelVo> getList(String vehiclePageQueryVoJson, UserDTO userDTO) throws Exception {
List<Constant> constants = constantBiz.selectList(new Constant() {{
setType(3);
}});
Map<Integer, List<Constant>> map = constants.parallelStream().collect(Collectors.groupingBy(Constant::getCode));
List<ResultVehicleVo> resultVehicleVoList = getResultVehicleVoList(vehiclePageQueryVoJson, userDTO); List<ResultVehicleVo> resultVehicleVoList = getResultVehicleVoList(vehiclePageQueryVoJson, userDTO);
ArrayList<VehicleExcelVo> arrayList = Lists.newArrayList(); ArrayList<VehicleExcelVo> arrayList = Lists.newArrayList();
resultVehicleVoList.stream().forEach(result->{ resultVehicleVoList.stream().forEach(result->{
try { try {
Integer belongTo = result.getBelongTo();
if (belongTo!=null&& belongTo==1) {
System.out.println(belongTo);
}
VehicleExcelVo build = VehicleExcelVo.builder() VehicleExcelVo build = VehicleExcelVo.builder()
.code(result.getCode()) .code(result.getCode())
.numberPlate(result.getNumberPlate()) .numberPlate(result.getNumberPlate())
...@@ -99,6 +104,14 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl ...@@ -99,6 +104,14 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
.useTypeName(result.getUseTypeName()) .useTypeName(result.getUseTypeName())
.vehicleType(result.getVehicleType()) .vehicleType(result.getVehicleType())
.belongToName(result.getBelongTo()!=null&&result.getBelongTo()==1?"欣新房车有限公司":result.getBelongToName()) .belongToName(result.getBelongTo()!=null&&result.getBelongTo()==1?"欣新房车有限公司":result.getBelongToName())
.vin(result.getVin())
.engineNum(result.getEngineNum())
.insuranceCompany(result.getInsuranceCompany()!=null?map.get(result.getInsuranceCompany()).get(0).getVal():null)
.insuranceNo(result.getInsuranceNo())
.insuranceEndDate(result.getInsuranceEndDate())
.strongInsuranceCompany(result.getStrongInsuranceCompany()!=null?map.get(result.getStrongInsuranceCompany()).get(0).getVal():null)
.strongInsuranceNo(result.getInsuranceNo())
.strongInsuranceEndDate(result.getStrongInsuranceEndDate())
.build(); .build();
arrayList.add(build); arrayList.add(build);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -60,6 +60,15 @@ public class VehicleInformationDownloadController extends BaseController<Vehicle ...@@ -60,6 +60,15 @@ public class VehicleInformationDownloadController extends BaseController<Vehicle
writer.addHeaderAlias("parkBranchCompanyName", "停靠分公司"); writer.addHeaderAlias("parkBranchCompanyName", "停靠分公司");
writer.addHeaderAlias("useTypeName", "用途"); writer.addHeaderAlias("useTypeName", "用途");
writer.addHeaderAlias("belongToName", "托管人"); writer.addHeaderAlias("belongToName", "托管人");
writer.addHeaderAlias("vin", "车架号");
writer.addHeaderAlias("engineNum", "发动机号");
writer.addHeaderAlias("insuranceCompany", "商业险公司");
writer.addHeaderAlias("insuranceNo", "商业险单号");
writer.addHeaderAlias("insuranceEndDate", "商业险结束时间");
writer.addHeaderAlias("strongInsuranceCompany", "交强险公司");
writer.addHeaderAlias("strongInsuranceNo", "交强险单号");
writer.addHeaderAlias("strongInsuranceEndDate", "交强险时间");
// 一次性写出内容,使用默认样式,强制输出标题 // 一次性写出内容,使用默认样式,强制输出标题
......
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