| | |
| | | package com.vincent.rsf.server.manager.service.impl; |
| | | |
| | | import cn.afterturn.easypoi.excel.ExcelImportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.manager.entity.excel.MatnrsTemplate; |
| | | import com.vincent.rsf.server.manager.mapper.MatnrMapper; |
| | | import com.vincent.rsf.server.manager.entity.Matnr; |
| | | import com.vincent.rsf.server.manager.service.MatnrService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | @Service("matnrService") |
| | | public class MatnrServiceImpl extends ServiceImpl<MatnrMapper, Matnr> implements MatnrService { |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 物料数据导入接处理实现 |
| | | * @throws |
| | | * @return |
| | | * @time 2025/3/3 13:08 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importExcels(MultipartFile file) throws Exception { |
| | | //读取上传文件内容 |
| | | ExcelImportResult<MatnrsTemplate> result = ExcelImportUtil.importExcelMore(file.getInputStream(), MatnrsTemplate.class, ExcelUtil.getDefaultImportParams()); |
| | | //TODO 物料写入处理 |
| | | } |
| | | } |