|
|
@ -23,6 +23,8 @@ import cn.hutool.core.date.DateTime; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
|
|
|
|
import com.alibaba.excel.ExcelReader; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
@ -76,7 +78,9 @@ import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.InputStream; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
@ -373,6 +377,20 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
return priceClientVO; |
|
|
|
return priceClientVO; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public String upload(InputStream file) { |
|
|
|
|
|
|
|
StringBuilder message = new StringBuilder(); |
|
|
|
|
|
|
|
ExcelReader build = null; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
build = EasyExcel.read(file).build(); |
|
|
|
|
|
|
|
// 从build中获取5个sheet的数据
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void buildDetailMap(BasicdataPriceEntity priceEntity, Map<Integer, List<BasicdataPriceFullVehicleEntity>> fullMap, Map<Integer, List<BasicdataPriceCategoryBasicEntity>> basicMap, Map<Integer, List<BasicdataPriceCategoryWarehouseEntity>> warehouseMap, Map<Integer, List<BasicdataPriceCategoryDispatchEntity>> dispatchMap, Map<Integer, List<BasicdataPriceGeneralEntity>> generalMap) { |
|
|
|
private void buildDetailMap(BasicdataPriceEntity priceEntity, Map<Integer, List<BasicdataPriceFullVehicleEntity>> fullMap, Map<Integer, List<BasicdataPriceCategoryBasicEntity>> basicMap, Map<Integer, List<BasicdataPriceCategoryWarehouseEntity>> warehouseMap, Map<Integer, List<BasicdataPriceCategoryDispatchEntity>> dispatchMap, Map<Integer, List<BasicdataPriceGeneralEntity>> generalMap) { |
|
|
|
// 获取整车数据
|
|
|
|
// 获取整车数据
|
|
|
|
List<BasicdataPriceFullVehicleEntity> list = fullVehicleService.list(Wrappers.<BasicdataPriceFullVehicleEntity>lambdaQuery() |
|
|
|
List<BasicdataPriceFullVehicleEntity> list = fullVehicleService.list(Wrappers.<BasicdataPriceFullVehicleEntity>lambdaQuery() |
|
|
@ -737,7 +755,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
// fullVehicleEntities转为BasicdataPriceFullVehicleVO
|
|
|
|
// fullVehicleEntities转为BasicdataPriceFullVehicleVO
|
|
|
|
String pickupPricingType = templateEntity.getPickupPricingType(); |
|
|
|
String pickupPricingType = templateEntity.getPickupPricingType(); |
|
|
|
if (pickupPricingType.contains(PickupPricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
if (pickupPricingType.contains(PickupPricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
if(CollUtil.isNotEmpty(fullVehicleEntities)){ |
|
|
|
if (CollUtil.isNotEmpty(fullVehicleEntities)) { |
|
|
|
List<BasicdataPriceFullVehicleVO> fullVehicleVOS = fullVehicleEntities.stream().map(item -> { |
|
|
|
List<BasicdataPriceFullVehicleVO> fullVehicleVOS = fullVehicleEntities.stream().map(item -> { |
|
|
|
BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO(); |
|
|
|
BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO(); |
|
|
|
BeanUtil.copyProperties(item, basicdataPriceFullVehicleVO); |
|
|
|
BeanUtil.copyProperties(item, basicdataPriceFullVehicleVO); |
|
|
|