Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
0ef670a1
Commit
0ef670a1
authored
Jul 07, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
区域调整
parent
342a47c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ExcelUtil.java
...m/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
+5
-5
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
View file @
0ef670a1
...
@@ -137,7 +137,7 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -137,7 +137,7 @@ public class ExcelUtil <T> implements Serializable {
}
}
}
else
if
(
attr
.
isArea
()){
}
else
if
(
attr
.
isArea
()){
//区域字段处理 TODO
//区域字段处理 TODO
value
=
getAreaLabel
(
"area_"
+
field
.
get
(
vo
));
value
=
getAreaLabel
(
(
String
)
field
.
get
(
vo
));
}
}
field
.
set
(
vo
,
Common
.
isNotNull
(
value
)?
value:
field
.
get
(
vo
));
field
.
set
(
vo
,
Common
.
isNotNull
(
value
)?
value:
field
.
get
(
vo
));
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
@@ -287,10 +287,10 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -287,10 +287,10 @@ public class ExcelUtil <T> implements Serializable {
if
(
attr
.
isArea
())
{
if
(
attr
.
isArea
())
{
//区域字段处理 TODO
//区域字段处理 TODO
if
(!
Common
.
isNotNull
(
attr
.
parentField
()))
{
if
(!
Common
.
isNotNull
(
attr
.
parentField
()))
{
tempStr
=
getAreaValue
(
"area_"
+
c
.
trim
(),
tempStr
,
attr
,
rowNum
,
errorTemp
);
tempStr
=
getAreaValue
(
c
.
trim
(),
tempStr
,
attr
,
rowNum
,
errorTemp
);
}
else
{
}
else
{
// TODO
// TODO
tempStr
=
getAreaValue
(
"area_"
+
c
.
trim
()+
"_"
+
getFieldValueByName
(
attr
.
parentField
(),
data
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
),
tempStr
,
attr
,
rowNum
,
errorTemp
);
tempStr
=
getAreaValue
(
c
.
trim
()+
"_"
+
getFieldValueByName
(
attr
.
parentField
(),
data
,
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
),
tempStr
,
attr
,
rowNum
,
errorTemp
);
}
}
}
}
}
}
...
@@ -449,11 +449,11 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -449,11 +449,11 @@ public class ExcelUtil <T> implements Serializable {
return
propertyValue
;
return
propertyValue
;
}
}
private
String
getAreaLabel
(
String
c
)
{
private
String
getAreaLabel
(
String
c
)
{
return
(
String
)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_
VALUE
+
c
);
return
(
String
)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_
LABEL
+
c
);
}
}
private
String
getAreaValue
(
String
c
,
String
tempStr
,
ExcelAttribute
attr
,
Integer
rowNum
,
ErrorMessage
errorTemp
)
{
private
String
getAreaValue
(
String
c
,
String
tempStr
,
ExcelAttribute
attr
,
Integer
rowNum
,
ErrorMessage
errorTemp
)
{
tempStr
=
String
.
valueOf
(
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_
LABEL
+
c
));
tempStr
=
String
.
valueOf
(
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_
VALUE
+
c
));
if
(
Common
.
isEmpty
(
tempStr
)){
if
(
Common
.
isEmpty
(
tempStr
)){
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()
+
":"
+
c
.
trim
()
+
"校验异常,请联系管理人员"
),
errorTemp
);
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()
+
":"
+
c
.
trim
()
+
"校验异常,请联系管理人员"
),
errorTemp
);
return
CommonConstants
.
EMPTY_STRING
;
return
CommonConstants
.
EMPTY_STRING
;
...
...
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