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
673dee69
Commit
673dee69
authored
Jul 05, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
变更记录,忽略更新人更新时间
parent
f6cf2a4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
8 deletions
+38
-8
TEmployeeInfo.java
...ifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
+12
-4
HrEquator.java
...loud/plus/v1/yifu/common/core/util/equator/HrEquator.java
+26
-4
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
View file @
673dee69
...
@@ -16,10 +16,7 @@
...
@@ -16,10 +16,7 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
...
@@ -89,12 +86,14 @@ public class TEmployeeInfo extends BaseEntity {
...
@@ -89,12 +86,14 @@ public class TEmployeeInfo extends BaseEntity {
* 身份证有效期起
* 身份证有效期起
*/
*/
@Schema
(
description
=
"身份证有效期起"
)
@Schema
(
description
=
"身份证有效期起"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
LocalDate
validityStart
;
private
LocalDate
validityStart
;
/**
/**
* 身份证有效期止
* 身份证有效期止
*/
*/
@Schema
(
description
=
"身份证有效期止"
)
@Schema
(
description
=
"身份证有效期止"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
LocalDate
validityEnd
;
private
LocalDate
validityEnd
;
/**
/**
...
@@ -154,18 +153,21 @@ public class TEmployeeInfo extends BaseEntity {
...
@@ -154,18 +153,21 @@ public class TEmployeeInfo extends BaseEntity {
* 身份证-省
* 身份证-省
*/
*/
@Schema
(
description
=
"身份证-省"
)
@Schema
(
description
=
"身份证-省"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
idProvince
;
private
Integer
idProvince
;
/**
/**
* 身份证-市
* 身份证-市
*/
*/
@Schema
(
description
=
"身份证-市"
)
@Schema
(
description
=
"身份证-市"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
idCity
;
private
Integer
idCity
;
/**
/**
* 身份证-县
* 身份证-县
*/
*/
@Schema
(
description
=
"身份证-县"
)
@Schema
(
description
=
"身份证-县"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
idTown
;
private
Integer
idTown
;
/**
/**
...
@@ -178,24 +180,28 @@ public class TEmployeeInfo extends BaseEntity {
...
@@ -178,24 +180,28 @@ public class TEmployeeInfo extends BaseEntity {
* 档案-省
* 档案-省
*/
*/
@Schema
(
description
=
"档案-省"
)
@Schema
(
description
=
"档案-省"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
fileProvince
;
private
Integer
fileProvince
;
/**
/**
* 档案-市
* 档案-市
*/
*/
@Schema
(
description
=
"档案-市"
)
@Schema
(
description
=
"档案-市"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
fileCity
;
private
Integer
fileCity
;
/**
/**
* 档案-县
* 档案-县
*/
*/
@Schema
(
description
=
"档案-县"
)
@Schema
(
description
=
"档案-县"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
fileTown
;
private
Integer
fileTown
;
/**
/**
* 是否大专及以上(0否1是)
* 是否大专及以上(0否1是)
*/
*/
@Schema
(
description
=
"是否大专及以上(0否1是)"
)
@Schema
(
description
=
"是否大专及以上(0否1是)"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
isCollege
;
private
Integer
isCollege
;
/**
/**
...
@@ -220,12 +226,14 @@ public class TEmployeeInfo extends BaseEntity {
...
@@ -220,12 +226,14 @@ public class TEmployeeInfo extends BaseEntity {
* 入学时间
* 入学时间
*/
*/
@Schema
(
description
=
"入学时间"
)
@Schema
(
description
=
"入学时间"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
LocalDate
admissionDate
;
private
LocalDate
admissionDate
;
/**
/**
* 毕业时间
* 毕业时间
*/
*/
@Schema
(
description
=
"毕业时间"
)
@Schema
(
description
=
"毕业时间"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
LocalDate
gradutionDate
;
private
LocalDate
gradutionDate
;
/**
/**
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/equator/HrEquator.java
View file @
673dee69
...
@@ -7,7 +7,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
...
@@ -7,7 +7,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.logging.Handler
;
/**
/**
* @program: master
* @program: master
...
@@ -47,15 +50,34 @@ public class HrEquator extends GetterBaseEquator {
...
@@ -47,15 +50,34 @@ public class HrEquator extends GetterBaseEquator {
Equator
equator
=
new
HrEquator
();
Equator
equator
=
new
HrEquator
();
// 获取不同的属性
// 获取不同的属性
List
<
FieldInfo
>
diff
=
equator
.
getDiffFields
(
oldInfo
,
newInfo
);
List
<
FieldInfo
>
diff
=
equator
.
getDiffFields
(
oldInfo
,
newInfo
);
if
(!
Common
.
isEmpty
(
diff
)){
Map
<
String
,
Integer
>
curMap
=
new
HashMap
<>();
String
fieldName
;
boolean
newChange
=
false
;
if
(!
Common
.
isEmpty
(
diff
))
{
for
(
FieldInfo
field:
diff
){
for
(
FieldInfo
field:
diff
){
if
(!
"updateTime"
.
equals
(
field
.
getFieldName
())
&&
!
"updateBy"
.
equals
(
field
.
getFieldName
()))
{
fieldName
=
field
.
getFieldName
();
curMap
.
put
(
fieldName
,
1
);
if
(!
"updateTime"
.
equals
(
fieldName
)
&&
!
"updateBy"
.
equals
(
fieldName
))
{
newChange
=
true
;
sb
.
append
(
field
.
getFieldName
()).
append
(
","
);
sb
.
append
(
field
.
getFieldName
()).
append
(
","
);
}
}
}
}
sb
.
deleteCharAt
(
sb
.
length
()-
1
);
}
}
return
sb
.
toString
();
// 从有值变为空,也要记录变更日志
List
<
FieldInfo
>
diff2
=
equator
.
getDiffFields
(
newInfo
,
oldInfo
);
if
(!
Common
.
isEmpty
(
diff2
))
{
for
(
FieldInfo
field:
diff2
){
fieldName
=
field
.
getFieldName
();
if
(
curMap
.
get
(
fieldName
)
==
null
&&
!
"updateTime"
.
equals
(
field
.
getFieldName
())
&&
!
"updateBy"
.
equals
(
field
.
getFieldName
()))
{
newChange
=
true
;
sb
.
append
(
field
.
getFieldName
()).
append
(
","
);
}
}
}
if
(
newChange
)
{
sb
.
deleteCharAt
(
sb
.
length
()-
1
);
}
return
sb
.
toString
();
}
}
}
}
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