Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
388e36ed
Commit
388e36ed
authored
Jul 23, 2020
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化参数
parent
5d89d0b3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+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
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java
View file @
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
View file @
388e36ed
...
@@ -201,7 +201,8 @@ public class ExcelUtil<T>
...
@@ -201,7 +201,8 @@ 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
);
}
}
}
}
...
@@ -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
View file @
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
{
{
/** 项目空间路径 */
/** 项目空间路径 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment