Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cocktail-party-server
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cocktail-party
cocktail-party-server
Commits
388e36ed
提交
388e36ed
authored
7月 23, 2020
作者:
RuoYi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化参数
上级
5d89d0b3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
12 行增加
和
14 行删除
+12
-14
DictUtils.java
...ommon/src/main/java/com/ruoyi/common/utils/DictUtils.java
+2
-2
ExcelUtil.java
...n/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
+5
-12
VelocityUtils.java
...src/main/java/com/ruoyi/generator/util/VelocityUtils.java
+5
-0
没有找到文件。
ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java
浏览文件 @
388e36ed
...
@@ -41,8 +41,8 @@ public class DictUtils
...
@@ -41,8 +41,8 @@ public class DictUtils
Object
cacheObj
=
SpringUtils
.
getBean
(
RedisCache
.
class
).
getCacheObject
(
getCacheKey
(
key
));
Object
cacheObj
=
SpringUtils
.
getBean
(
RedisCache
.
class
).
getCacheObject
(
getCacheKey
(
key
));
if
(
StringUtils
.
isNotNull
(
cacheObj
))
if
(
StringUtils
.
isNotNull
(
cacheObj
))
{
{
List
<
SysDictData
>
D
ictDatas
=
StringUtils
.
cast
(
cacheObj
);
List
<
SysDictData
>
d
ictDatas
=
StringUtils
.
cast
(
cacheObj
);
return
D
ictDatas
;
return
d
ictDatas
;
}
}
return
null
;
return
null
;
}
}
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
浏览文件 @
388e36ed
...
@@ -201,8 +201,9 @@ public class ExcelUtil<T>
...
@@ -201,8 +201,9 @@ public class ExcelUtil<T>
// 设置类的私有字段属性可访问.
// 设置类的私有字段属性可访问.
field
.
setAccessible
(
true
);
field
.
setAccessible
(
true
);
Integer
column
=
cellMap
.
get
(
attr
.
name
());
Integer
column
=
cellMap
.
get
(
attr
.
name
());
if
(
column
!=
null
)
{
// 字段在excel 中没有,那么就不需要设置值
if
(
column
!=
null
)
fieldsMap
.
put
(
column
,
field
);
{
fieldsMap
.
put
(
column
,
field
);
}
}
}
}
}
}
...
@@ -695,7 +696,7 @@ public class ExcelUtil<T>
...
@@ -695,7 +696,7 @@ public class ExcelUtil<T>
}
}
return
StringUtils
.
stripEnd
(
propertyString
.
toString
(),
separator
);
return
StringUtils
.
stripEnd
(
propertyString
.
toString
(),
separator
);
}
}
/**
/**
* 解析字典值
* 解析字典值
*
*
...
@@ -897,15 +898,7 @@ public class ExcelUtil<T>
...
@@ -897,15 +898,7 @@ public class ExcelUtil<T>
}
}
else
else
{
{
/* if ((Double) val % 1 > 0)
val
=
new
BigDecimal
(
val
.
toString
());
// 浮点格式处理
{
val = new DecimalFormat("0.00").format(val);
}
else
{
val = new DecimalFormat("0").format(val);
}*/
val
=
new
BigDecimal
(
val
.
toString
());
// 导入的数据保证原汁原味,不做处理
}
}
}
}
else
if
(
cell
.
getCellTypeEnum
()
==
CellType
.
STRING
)
else
if
(
cell
.
getCellTypeEnum
()
==
CellType
.
STRING
)
...
...
ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java
浏览文件 @
388e36ed
...
@@ -11,6 +11,11 @@ import com.ruoyi.common.utils.StringUtils;
...
@@ -11,6 +11,11 @@ import com.ruoyi.common.utils.StringUtils;
import
com.ruoyi.generator.domain.GenTable
;
import
com.ruoyi.generator.domain.GenTable
;
import
com.ruoyi.generator.domain.GenTableColumn
;
import
com.ruoyi.generator.domain.GenTableColumn
;
/**
* 模板处理工具类
*
* @author ruoyi
*/
public
class
VelocityUtils
public
class
VelocityUtils
{
{
/** 项目空间路径 */
/** 项目空间路径 */
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论