正在显示
3 个修改的文件
包含
10 行增加
和
12 行删除
| @@ -41,8 +41,8 @@ public class DictUtils | @@ -41,8 +41,8 @@ public class DictUtils | ||
| 41 | Object cacheObj = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key)); | 41 | Object cacheObj = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key)); |
| 42 | if (StringUtils.isNotNull(cacheObj)) | 42 | if (StringUtils.isNotNull(cacheObj)) |
| 43 | { | 43 | { |
| 44 | - List<SysDictData> DictDatas = StringUtils.cast(cacheObj); | ||
| 45 | - return DictDatas; | 44 | + List<SysDictData> dictDatas = StringUtils.cast(cacheObj); |
| 45 | + return dictDatas; | ||
| 46 | } | 46 | } |
| 47 | return null; | 47 | return null; |
| 48 | } | 48 | } |
| @@ -201,7 +201,8 @@ public class ExcelUtil<T> | @@ -201,7 +201,8 @@ public class ExcelUtil<T> | ||
| 201 | // 设置类的私有字段属性可访问. | 201 | // 设置类的私有字段属性可访问. |
| 202 | field.setAccessible(true); | 202 | field.setAccessible(true); |
| 203 | Integer column = cellMap.get(attr.name()); | 203 | Integer column = cellMap.get(attr.name()); |
| 204 | - if(column !=null ) { // 字段在excel 中没有,那么就不需要设置值 | 204 | + if (column != null) |
| 205 | + { | ||
| 205 | fieldsMap.put(column, field); | 206 | fieldsMap.put(column, field); |
| 206 | } | 207 | } |
| 207 | } | 208 | } |
| @@ -897,15 +898,7 @@ public class ExcelUtil<T> | @@ -897,15 +898,7 @@ public class ExcelUtil<T> | ||
| 897 | } | 898 | } |
| 898 | else | 899 | else |
| 899 | { | 900 | { |
| 900 | - /* if ((Double) val % 1 > 0) | ||
| 901 | - { | ||
| 902 | - val = new DecimalFormat("0.00").format(val); | ||
| 903 | - } | ||
| 904 | - else | ||
| 905 | - { | ||
| 906 | - val = new DecimalFormat("0").format(val); | ||
| 907 | - }*/ | ||
| 908 | - val = new BigDecimal(val.toString()); // 导入的数据保证原汁原味,不做处理 | 901 | + val = new BigDecimal(val.toString()); // 浮点格式处理 |
| 909 | } | 902 | } |
| 910 | } | 903 | } |
| 911 | else if (cell.getCellTypeEnum() == CellType.STRING) | 904 | else if (cell.getCellTypeEnum() == CellType.STRING) |
| @@ -11,6 +11,11 @@ import com.ruoyi.common.utils.StringUtils; | @@ -11,6 +11,11 @@ import com.ruoyi.common.utils.StringUtils; | ||
| 11 | import com.ruoyi.generator.domain.GenTable; | 11 | import com.ruoyi.generator.domain.GenTable; |
| 12 | import com.ruoyi.generator.domain.GenTableColumn; | 12 | import com.ruoyi.generator.domain.GenTableColumn; |
| 13 | 13 | ||
| 14 | +/** | ||
| 15 | + * 模板处理工具类 | ||
| 16 | + * | ||
| 17 | + * @author ruoyi | ||
| 18 | + */ | ||
| 14 | public class VelocityUtils | 19 | public class VelocityUtils |
| 15 | { | 20 | { |
| 16 | /** 项目空间路径 */ | 21 | /** 项目空间路径 */ |
-
请 注册 或 登录 后发表评论