| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.utils.MapUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | import com.ruoyi.domain.ArchivePlaceName; |
| | | |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.ruoyi.mapper.ArchivePlaceNameMapper; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * 【案件地区信息】Service业务层处理 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-07-26 |
| | | */ |
| | | @Service |
| | | public class ArchivePlaceNameServiceImpl extends ServiceImpl<ArchivePlaceNameMapper, ArchivePlaceName> implements IArchivePlaceNameService { |
| | | private LambdaQueryWrapper<ArchivePlaceName> buildCondition(ArchivePlaceName archivePlaceName){ |
| | |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult importExcel(MultipartFile file) { |
| | | ExcelUtil<ArchivePlaceName> util = new ExcelUtil<>(ArchivePlaceName.class); |
| | | List<ArchivePlaceName> dataList = null; |
| | | try { |
| | | dataList = util.importExcel(file.getInputStream()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("没有按照规则导入数据"); |
| | | } |
| | | |
| | | assert dataList != null; |
| | | |
| | | for (ArchivePlaceName archiveCategory : dataList) { |
| | | // physcialService.mySave(physcial); |
| | | this.insertArchivePlaceName(archiveCategory); |
| | | } |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | } |