Browse Source

修改车辆信息导出

dist.1.3.0
chenlong 5 months ago
parent
commit
9f6170d39c
  1. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataVehicleController.java
  2. 121
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataVehicleReadingFriendlyExcel.java
  3. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.java
  4. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.xml
  5. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataVehicleService.java
  6. 14
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java
  7. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java
  8. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/vo/SplitPackageOrderVO.java

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataVehicleController.java

@ -210,8 +210,8 @@ public class BasicdataVehicleController extends BladeController {
@ApiOperation(value = "导出数据", notes = "传入basicdataVehicle")
public void exportBasicdataVehicle(@ApiIgnore @RequestParam String ids, HttpServletResponse response) {
List<BasicdataVehicleExcel> list = basicdataVehicleService.exportBasicdataVehicle(ids);
ExcelUtil.export(response, "车辆信息表数据" + DateUtil.time(), "车辆信息表数据表", list, BasicdataVehicleExcel.class);
List<BasicdataVehicleReadingFriendlyExcel> list = basicdataVehicleService.exportBasicdataVehicle(ids);
ExcelUtil.export(response, "车辆信息表数据" + DateUtil.time(), "车辆信息表数据表", list, BasicdataVehicleReadingFriendlyExcel.class);
}

121
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataVehicleReadingFriendlyExcel.java

@ -0,0 +1,121 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import org.springblade.system.cache.DictBizCache;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 车辆信息表 Excel实体类
*
* @author lmy
* @since 2023-05-16
*/
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BasicdataVehicleReadingFriendlyExcel extends BasicdataVehicleExcel implements Serializable {
private static final long serialVersionUID = 1L;
// // 车辆来源
// getDictionaryBiz('basic_vehicle_source').then(res => handleData('车辆来源', res)),
// // 是否车头
// getDictionaryBiz('yes_no').then(res => handleData('是否车头', res)),
// // 挂车类型
// getDictionaryBiz('basic_trailer_type').then(res => handleData('挂车类型', res)),
// // 车辆类型
// getDictionaryBiz('basic_vehicle_model').then(res => handleData('车辆类型', res)),
// // 车厢类型
// getDictionaryBiz('basic_car_type').then(res => handleData('车厢类型', res)),
// // 付款方式
// getDictionaryBiz('basicdata_vehicle_paymentmethod').then(res => handleData('付款方式', res)),
// // 车牌颜色
// getDictionaryBiz('basic_plate_color').then(res => handleData('车牌颜色', res)),
// // 车身颜色
// getDictionaryBiz('basic_vehicle_color').then(res => handleData('车身颜色', res)),
// // 能源类型
// getDictionaryBiz('basic_energy_type').then(res => handleData('能源类型', res)),
// // 车牌类型
// getDictionaryBiz('basic_plate_type').then(res => handleData('车牌类型', res)),
@Override
public String getVehicleSource() {
return DictBizCache.getValue("basic_vehicle_source", super.getVehicleSource());
}
@Override
public String getIsHead() {
return DictBizCache.getValue("yes_no", super.getIsHead());
}
@Override
public String getTrailerType() {
return DictBizCache.getValue("basic_trailer_type", super.getTrailerType());
}
@Override
public String getVehicleModel() {
return DictBizCache.getValue("basic_vehicle_model", super.getVehicleModel());
}
@Override
public String getCarType() {
return DictBizCache.getValue("basic_car_type", super.getCarType());
}
@Override
public String getPaymentMethod() {
return DictBizCache.getValue("basicdata_vehicle_paymentmethod", super.getPaymentMethod());
}
@Override
public String getLicensePlateColor() {
return DictBizCache.getValue("basic_plate_color", super.getLicensePlateColor());
}
@Override
public String getVehicleColor() {
return DictBizCache.getValue("basic_vehicle_color", super.getVehicleColor());
}
@Override
public String getEnergyType() {
return DictBizCache.getValue("basic_energy_type", super.getEnergyType());
}
@Override
public String getLicensePlateType() {
return DictBizCache.getValue("basic_plate_type", super.getLicensePlateType());
}
@Override
public String getWithGps() {
return DictBizCache.getValue("yes_no", super.getWithGps());
}
}

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.java

@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.BasicdataVehicleDTO;
import com.logpm.basicdata.entity.BasicdataVehicleEntity;
import com.logpm.basicdata.excel.BasicdataVehicleExcel;
import com.logpm.basicdata.excel.BasicdataVehicleReadingFriendlyExcel;
import com.logpm.basicdata.vo.BasicdataVehicleVO;
import org.apache.ibatis.annotations.Param;
@ -51,7 +52,7 @@ public interface BasicdataVehicleMapper extends BaseMapper<BasicdataVehicleEntit
* @param queryWrapper
* @return
*/
List<BasicdataVehicleExcel> exportBasicdataVehicle(@Param("ids") List<Long> ids);
List<BasicdataVehicleReadingFriendlyExcel> exportBasicdataVehicle(@Param("ids") List<Long> ids);
List<String> selectPhotoBymasterId(Long id);
/**

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.xml

@ -158,7 +158,7 @@
</select>
<select id="exportBasicdataVehicle" resultType="com.logpm.basicdata.excel.BasicdataVehicleExcel">
<select id="exportBasicdataVehicle" resultType="com.logpm.basicdata.excel.BasicdataVehicleReadingFriendlyExcel">
SELECT
lbc.vehicle_nub AS vehicleNub,
lbc.vehicle_source AS vehicleSource,

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataVehicleService.java

@ -22,6 +22,7 @@ import com.logpm.basicdata.dto.BasicdataVehicleDTO;
import com.logpm.basicdata.entity.BasicdataVehicleEntity;
import com.logpm.basicdata.excel.BasicdataVehicleExcel;
import com.logpm.basicdata.excel.BasicdataVehicleImportExcel;
import com.logpm.basicdata.excel.BasicdataVehicleReadingFriendlyExcel;
import com.logpm.basicdata.vo.BasicdataVehicleVO;
import org.springblade.core.mp.base.BaseService;
@ -50,7 +51,7 @@ public interface IBasicdataVehicleService extends BaseService<BasicdataVehicleEn
* @param ids
* @return
*/
List<BasicdataVehicleExcel> exportBasicdataVehicle(String ids);
List<BasicdataVehicleReadingFriendlyExcel> exportBasicdataVehicle(String ids);
/**
* 查询历史照片
*

14
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java

@ -32,11 +32,13 @@ import com.logpm.basicdata.entity.BasicdataDrivermiddleEntity;
import com.logpm.basicdata.entity.BasicdataVehicleEntity;
import com.logpm.basicdata.excel.BasicdataVehicleExcel;
import com.logpm.basicdata.excel.BasicdataVehicleImportExcel;
import com.logpm.basicdata.excel.BasicdataVehicleReadingFriendlyExcel;
import com.logpm.basicdata.mapper.BasicdataDriverArteryMapper;
import com.logpm.basicdata.mapper.BasicdataDrivermiddleMapper;
import com.logpm.basicdata.mapper.BasicdataVehicleMapper;
import com.logpm.basicdata.service.IBasicdataCarrierService;
import com.logpm.basicdata.service.IBasicdataVehicleService;
import com.logpm.basicdata.vo.BasicdataCarrierVO;
import com.logpm.basicdata.vo.BasicdataVehicleVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -80,9 +82,15 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl<BasicdataVehicl
@Override
public List<BasicdataVehicleExcel> exportBasicdataVehicle(String ids) {
List<BasicdataVehicleExcel> basicdataVehicleList = baseMapper.exportBasicdataVehicle(Func.toLongList(ids));
public List<BasicdataVehicleReadingFriendlyExcel> exportBasicdataVehicle(String ids) {
List<BasicdataVehicleReadingFriendlyExcel> basicdataVehicleList = baseMapper.exportBasicdataVehicle(Func.toLongList(ids));
// List<BasicdataCarrierVO> basicdataCarrierVOS = basicdataCarrierService.selectBasicdataCarrierDictionary();
// Map<Long, String> carrierMap = basicdataCarrierVOS.stream().collect(Collectors.toMap(BasicdataCarrierVO::getId, BasicdataCarrierVO::getCarrierName));
//
// basicdataVehicleList.stream().map(basicdataVehicleReadingFriendlyExcel -> {
// basicdataVehicleReadingFriendlyExcel.setCarrierName(carrierMap.get(basicdataVehicleReadingFriendlyExcel.getCarrierId()));
// });
return basicdataVehicleList;
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java

@ -891,6 +891,7 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl<Distr
splitPackageOrderVO.setMateriel(distributionParcelListEntity.getMaterialName());
splitPackageOrderVO.setOrderCode(distributionParcelListEntity.getOrderCode());
splitPackageOrderVO.setCategory(distributionParcelListEntity.getThirdProduct());
splitPackageOrderVO.setMaterielNo(distributionParcelListEntity.getMaterialCode());
return splitPackageOrderVO;
}).collect(Collectors.toList());
@ -918,6 +919,7 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl<Distr
splitPackageOrderVO.setMateriel(distributionParcelListEntity.getMaterialName());
splitPackageOrderVO.setOrderCode(distributionParcelListEntity.getOrderCode());
splitPackageOrderVO.setCategory(distributionParcelListEntity.getThirdProduct());
splitPackageOrderVO.setMaterielNo(distributionParcelListEntity.getMaterialCode());
return splitPackageOrderVO;
}).collect(Collectors.toList());
}

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/vo/SplitPackageOrderVO.java

@ -9,6 +9,7 @@ import lombok.Data;
public class SplitPackageOrderVO {
private String orderCode;
private String packageCode;
private String materielNo;
private String materiel;
private String category;
}

Loading…
Cancel
Save