Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
77909e02
Commit
77909e02
authored
Jun 01, 2022
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出生日期字段丢失
parent
790966cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
25 deletions
+19
-25
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+19
-25
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
77909e02
...
@@ -3,16 +3,9 @@ package com.yeejoin.amos.boot.module.common.biz.service.impl;
...
@@ -3,16 +3,9 @@ package com.yeejoin.amos.boot.module.common.biz.service.impl;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Type
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -2938,31 +2931,32 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -2938,31 +2931,32 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
formValue
->
!
ObjectUtils
.
isEmpty
(
formValue
.
getValue
())
?
formValue
.
getValue
()
:
""
));
formValue
->
!
ObjectUtils
.
isEmpty
(
formValue
.
getValue
())
?
formValue
.
getValue
()
:
""
));
// 获取对象属性和值
// 获取对象属性和值
Field
[]
fields
=
peopleBasicInfoDto
.
getClass
().
getDeclaredFields
();
Field
[]
fields
=
peopleBasicInfoDto
.
getClass
().
getDeclaredFields
();
Object
birthdayTimeValue
=
null
;
for
(
Field
field
:
fields
)
{
for
(
Field
field
:
fields
)
{
try
{
try
{
field
.
setAccessible
(
true
);
field
.
setAccessible
(
true
);
String
name
=
field
.
getName
();
String
name
=
field
.
getName
();
if
(
"birthdayTime"
.
equals
(
name
)){
birthdayTimeValue
=
collect
.
get
(
name
);
}
Object
value
=
collect
.
get
(
name
);
Object
value
=
collect
.
get
(
name
);
field
.
set
(
peopleBasicInfoDto
,
value
);
String
genericType
=
((
Class
)
field
.
getGenericType
()).
getSimpleName
();
}
catch
(
Exception
ex
){
if
(
"Date"
.
equals
(
genericType
))
{
if
(!
ObjectUtils
.
isEmpty
(
value
))
{
Date
date
;
SimpleDateFormat
ft
=
new
SimpleDateFormat
(
"EEE MMM dd HH:mm:ss zzz yyyy"
,
Locale
.
US
);
try
{
date
=
ft
.
parse
(
value
.
toString
());
field
.
set
(
peopleBasicInfoDto
,
date
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"日期转换失败"
);
}
}
}
else
{
field
.
set
(
peopleBasicInfoDto
,
value
);
}
}
catch
(
Exception
ex
){
logger
.
error
(
"获取{}字段值失败, {}"
,
field
.
getName
(),
ex
);
logger
.
error
(
"获取{}字段值失败, {}"
,
field
.
getName
(),
ex
);
}
}
}
}
// if (!ObjectUtils.isEmpty(birthdayTimeValue)) {
// Date date;
// SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// try {
// date = ft.parse(birthdayTimeValue.toString());
// peopleBasicInfoDto.setBirthdayTime(date);
// } catch (ParseException e) {
// logger.error("日期转换失败");
// }
// }
if
(!
ObjectUtils
.
isEmpty
(
orgUsr
.
getSequenceNbr
()))
{
if
(!
ObjectUtils
.
isEmpty
(
orgUsr
.
getSequenceNbr
()))
{
peopleBasicInfoDto
.
setName
(
orgUsr
.
getBizOrgName
());
peopleBasicInfoDto
.
setName
(
orgUsr
.
getBizOrgName
());
...
...
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