| | |
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | | import com.ruoyi.common.core.text.Convert;
|
| | | import com.ruoyi.common.exception.CustomException;
|
| | | import com.ruoyi.common.exception.UtilException;
|
| | | import com.ruoyi.common.utils.DateUtils;
|
| | | import com.ruoyi.common.utils.DictUtils;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | |
| | | {
|
| | | val = "";
|
| | | }
|
| | | byte[] data = image.getData();
|
| | | val = FileUtils.writeImportBytes(data);
|
| | | else
|
| | | {
|
| | | byte[] data = image.getData();
|
| | | val = FileUtils.writeImportBytes(data);
|
| | | }
|
| | | }
|
| | | ReflectUtils.invokeSetter(entity, propertyName, val);
|
| | | }
|
| | |
| | | catch (Exception e)
|
| | | {
|
| | | log.error("导出Excel异常{}", e.getMessage());
|
| | | throw new CustomException("导出Excel失败,请联系网站管理员!");
|
| | | throw new UtilException("导出Excel失败,请联系网站管理员!");
|
| | | }
|
| | | finally
|
| | | {
|