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
50798f17
Commit
50798f17
authored
Jul 08, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员档案导入-更新,换代码逻辑date
parent
d5b0fb68
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
20 deletions
+29
-20
TEmployeeInfo.java
...ifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
+8
-9
TCertRecordVo.java
...om/yifu/cloud/plus/v1/yifu/archives/vo/TCertRecordVo.java
+2
-1
FddContractAttachInfoServiceImpl.java
...chives/service/impl/FddContractAttachInfoServiceImpl.java
+1
-1
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+6
-9
DateUtil.java
...om/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
+12
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
View file @
50798f17
...
...
@@ -27,8 +27,7 @@ import lombok.EqualsAndHashCode;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -60,7 +59,7 @@ public class TEmployeeInfo extends BaseEntity {
/**
* 员工类型(字典值,0外包1派遣2代理)
*/
@ExcelAttribute
(
name
=
"员工类型"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
)
@ExcelAttribute
(
name
=
"员工类型"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
)
@Schema
(
description
=
"员工类型(字典值,0外包1派遣2代理)"
)
@NotNull
(
message
=
"员工类型不可为空"
)
@Size
(
max
=
1
,
message
=
"员工类型不可超过1位"
)
...
...
@@ -87,14 +86,14 @@ public class TEmployeeInfo extends BaseEntity {
*/
@Schema
(
description
=
"身份证有效期起"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Local
Date
validityStart
;
private
Date
validityStart
;
/**
* 身份证有效期止
*/
@Schema
(
description
=
"身份证有效期止"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Local
Date
validityEnd
;
private
Date
validityEnd
;
/**
* 性别
...
...
@@ -106,7 +105,7 @@ public class TEmployeeInfo extends BaseEntity {
* 出生日期
*/
@Schema
(
description
=
"出生日期"
)
private
Local
Date
empBirthday
;
private
Date
empBirthday
;
/**
* 年龄
...
...
@@ -227,14 +226,14 @@ public class TEmployeeInfo extends BaseEntity {
*/
@Schema
(
description
=
"入学时间"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Local
Date
admissionDate
;
private
Date
admissionDate
;
/**
* 毕业时间
*/
@Schema
(
description
=
"毕业时间"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Local
Date
gradutionDate
;
private
Date
gradutionDate
;
/**
* 备注
...
...
@@ -321,7 +320,7 @@ public class TEmployeeInfo extends BaseEntity {
*/
@Schema
(
description
=
"离职时间"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
LocalDateTim
e
leaveTime
;
private
Dat
e
leaveTime
;
/**
* 离职原因
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TCertRecordVo.java
View file @
50798f17
...
...
@@ -6,6 +6,7 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
* @Author fxj
...
...
@@ -133,7 +134,7 @@ public class TCertRecordVo implements Serializable {
*/
@ExcelAttribute
(
name
=
"离职时间"
)
@Schema
(
description
=
"离职时间"
)
private
LocalDateTim
e
leaveTime
;
private
Dat
e
leaveTime
;
/**
* 派减原因
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/FddContractAttachInfoServiceImpl.java
View file @
50798f17
...
...
@@ -304,7 +304,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
if
(
null
!=
date
)
{
//初始化年龄
newEmployeeInfo
.
setEmpAge
(
IdCardUtil
.
IdNOToAge
(
fddContractAttachInfo
.
getEmpIdcard
()));
newEmployeeInfo
.
setEmpBirthday
(
date
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDate
()
);
newEmployeeInfo
.
setEmpBirthday
(
date
);
}
newEmployeeInfo
.
setEmpSex
(
IdCardUtil
.
getSex
(
fddContractAttachInfo
.
getEmpIdcard
()));
tEmployeeInfoMapper
.
insert
(
newEmployeeInfo
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
50798f17
...
...
@@ -64,9 +64,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
/**
...
...
@@ -431,7 +429,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employee
.
setFileStatus
(
CommonConstants
.
ONE_INT
);
employee
.
setLeaveUser
(
user
.
getId
());
employee
.
setLeaveUserName
(
user
.
getNickname
());
employee
.
setLeaveTime
(
LocalDateTime
.
now
());
employee
.
setLeaveTime
(
new
Date
());
employee
.
setLeaveReason
(
excel
.
getLeaveReason
());
employee
.
setLeaveRemark
(
excel
.
getLeaveRemark
());
canDeleteList
.
add
(
employee
);
...
...
@@ -485,7 +483,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employee
.
setFileStatus
(
CommonConstants
.
ONE_INT
);
employee
.
setLeaveUser
(
user
.
getId
());
employee
.
setLeaveUserName
(
user
.
getNickname
());
employee
.
setLeaveTime
(
LocalDateTime
.
now
());
employee
.
setLeaveTime
(
new
Date
());
employee
.
setLeaveReason
(
leaveReason
);
employee
.
setLeaveRemark
(
leaveRemark
);
this
.
updateById
(
employee
);
...
...
@@ -591,12 +589,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
**/
private
void
setBaseSexInfo
(
TEmployeeInfo
employeeInfo
)
{
String
idCard
=
employeeInfo
.
getEmpIdcard
();
if
(
Common
.
isNotNull
(
idCard
)
&&
Common
.
isEmpty
(
employeeInfo
.
getEmpSex
()))
{
if
(
Common
.
isNotNull
(
idCard
)
&&
Common
.
isEmpty
(
employeeInfo
.
getEmpSex
())
&&
idCard
.
length
()
>
14
)
{
// 出生日期
String
idCardDate
=
idCard
.
substring
(
6
,
14
);
DateTimeFormatter
fmt
=
DateTimeFormatter
.
ofPattern
(
"yyyyMMdd"
);
LocalDate
empBirthday
=
LocalDate
.
parse
(
idCardDate
,
fmt
);
Date
empBirthday
=
DateUtil
.
stringToDateByPatten
(
idCardDate
,
"yyyyMMdd"
);
employeeInfo
.
setEmpBirthday
(
empBirthday
);
// 性别
...
...
@@ -1776,8 +1773,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
education
.
setHighIdentification
(
CommonConstants
.
ZERO_STRING
);
education
.
setSchool
(
employeeInfo
.
getSchool
());
education
.
setMajor
(
employeeInfo
.
getMajor
());
education
.
setEntryDate
(
LocalDateTimeUtils
.
convertLDToDate
(
employeeInfo
.
getAdmissionDate
()
));
education
.
setGradutionDate
(
LocalDateTimeUtils
.
convertLDToDate
(
employeeInfo
.
getGradutionDate
()
));
education
.
setEntryDate
(
employeeInfo
.
getAdmissionDate
(
));
education
.
setGradutionDate
(
employeeInfo
.
getGradutionDate
(
));
tEmpEducationService
.
insertEducationOfEmp
(
education
);
}
}
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
View file @
50798f17
...
...
@@ -342,6 +342,18 @@ public class DateUtil {
public
static
Date
stringToDate
(
String
dateString
)
{
return
stringToDate2
(
dateString
,
ISO_EXPANDED_DATE_FORMAT
);
}
/**
* @param dateString
* @param patten 格式
* @Description:
* @Author: hgw
* @Date: 2022/7/8 12:02
* @return: java.util.Date
**/
public
static
Date
stringToDateByPatten
(
String
dateString
,
String
patten
)
{
return
stringToDate2
(
dateString
,
patten
);
}
/**
* @param pattern
...
...
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