| | |
| | | package com.product.module.data.service; |
| | | |
| | | |
| | | import cn.hutool.extra.spring.SpringUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.google.common.collect.Lists; |
| | | import com.google.common.collect.Maps; |
| | |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | |
| | | FieldSetEntity attachmentFse = baseDao.getFieldSetEntity(CmnConst.TABLE_PRODUCT_SYS_ATTACHMENT, logFse.getString(CmnConst.FIELD_IMPORT_INFO), false); |
| | | String relativePath = attachmentFse.getString(CmnConst.FIELD_ATTACHMENT_URL); |
| | | String templateName = attachmentFse.getString(CmnConst.FIELD_ATTACHMENT_TITLE); |
| | | String filePath = Global.getSystemConfig("local.dir", "") + File.separator + relativePath + File.separator + templateName; |
| | | Map<String, List<List<String>>> dataMap = EasyExcelUtil.readExcelByString(filePath); |
| | | |
| | | Map<String, List<List<String>>> dataMap= new HashMap<>(); |
| | | try{ |
| | | String filePath = Global.getSystemConfig("local.dir", "") + File.separator + relativePath + File.separator + templateName; |
| | | dataMap = EasyExcelUtil.readExcelByString(filePath); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | // 封装到dte中 |
| | | List<DataTableEntity> beforeSaveDataList = Lists.newArrayList(); |
| | | List<String> titleList; |