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
a7077194
Commit
a7077194
authored
Jul 08, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化人员档案
parent
5979f248
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
9 deletions
+41
-9
TEmployeeInfo.java
...ifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
+4
-4
EmployeeExportVO.java
...yifu/cloud/plus/v1/yifu/archives/vo/EmployeeExportVO.java
+1
-1
EmployeeVO.java
...a/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeVO.java
+1
-0
EmployeeConstants.java
...ud/plus/v1/yifu/archives/constants/EmployeeConstants.java
+1
-0
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+33
-4
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+1
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeInfo.java
View file @
a7077194
...
...
@@ -311,28 +311,28 @@ public class TEmployeeInfo extends BaseEntity {
/**
* 减档操作人姓名
*/
@Schema
(
description
=
"
离职操作姓名
"
)
@Schema
(
description
=
"
减档人
"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
leaveUserName
;
/**
* 离职时间
*/
@Schema
(
description
=
"
离职
时间"
)
@Schema
(
description
=
"
减档
时间"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Date
leaveTime
;
/**
* 离职原因
*/
@Schema
(
description
=
"
离职
原因"
)
@Schema
(
description
=
"
减档
原因"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
leaveReason
;
/**
* 离职备注
*/
@Schema
(
description
=
"
离职
备注"
)
@Schema
(
description
=
"
减档
备注"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
leaveRemark
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeExportVO.java
View file @
a7077194
...
...
@@ -189,7 +189,7 @@ public class EmployeeExportVO extends BaseEntity {
@ExcelProperty
(
value
=
"近3个月发薪"
)
private
String
salaryStatus
;
@ExcelProperty
(
value
=
"减档
操作
人"
)
@ExcelProperty
(
value
=
"减档人"
)
private
String
leaveUserName
;
@ExcelProperty
(
value
=
"减档时间"
)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeVO.java
View file @
a7077194
...
...
@@ -215,6 +215,7 @@ public class EmployeeVO extends RowIndex implements Serializable {
* 通信地址
*/
@Schema
(
description
=
"通信地址"
)
@ExcelProperty
(
value
=
"通信地址"
)
private
String
contactAddress
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeConstants.java
View file @
a7077194
...
...
@@ -28,6 +28,7 @@ public class EmployeeConstants {
public
static
final
String
ID_CITY_MUST
=
"更新户籍县,户籍市必填"
;
public
static
final
String
FILE_ROVINCE_MUST
=
"更新档案市,档案省必填"
;
public
static
final
String
FILE_CITY_MUST
=
"更新档案县,档案市必填"
;
public
static
final
String
DEPT_NO_ERROR
=
"项目编码错误"
;
/**
* 无数据可更新
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
a7077194
...
...
@@ -24,6 +24,7 @@ import com.alibaba.excel.read.listener.ReadListener;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
...
...
@@ -33,11 +34,9 @@ import com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
...
...
@@ -86,6 +85,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
private
final
DaprUpmsProperties
daprUpmsProperties
;
private
final
TEmployeeLogService
tEmployeeLogService
;
private
final
TEmpEducationService
tEmpEducationService
;
private
final
TSettleDomainService
tSettleDomainService
;
@Override
public
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
,
String
sql
)
{
...
...
@@ -794,6 +794,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
Common
.
isNotNull
(
errorMessageList
))
{
errorMessageList
.
stream
().
forEach
(
errorMessage
->
errorMsgMap
.
put
(
errorMessage
.
getLineNum
(),
errorMessage
));
}
// 获取身份证、手机号列表,批量查询档案
List
<
String
>
idCardList
=
new
ArrayList
<>();
List
<
String
>
phoneList
=
new
ArrayList
<>();
...
...
@@ -801,6 +802,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
String
idCard
;
// 个性化校验逻辑
Set
<
String
>
errorMsg
;
List
<
String
>
deptNoList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
errorMsg
=
new
HashSet
<>();
// 判空
...
...
@@ -822,12 +824,31 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
Common
.
isNotNull
(
excelVOList
.
get
(
i
).
getEmpPhone
()))
{
phoneList
.
add
(
excelVOList
.
get
(
i
).
getEmpPhone
());
}
if
(
Common
.
isNotNull
(
excelVOList
.
get
(
i
).
getDeptNo
()))
{
deptNoList
.
add
(
excelVOList
.
get
(
i
).
getDeptNo
());
}
// 数据合法情况
if
(!
CollUtil
.
isEmpty
(
errorMsg
))
{
// 数据不合法
errorMessageList
.
add
(
new
ErrorMessage
((
i
+
2L
),
errorMsg
));
}
}
List
<
TSettleDomain
>
deptList
=
tSettleDomainService
.
list
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
in
(
TSettleDomain:
:
getDepartNo
,
deptNoList
)
);
Map
<
String
,
Integer
>
deptMap
=
new
HashMap
<>();
if
(
deptList
==
null
||
deptList
.
isEmpty
())
{
return
R
.
failed
(
"根据项目编码未找到项目!"
);
}
else
{
for
(
TSettleDomain
dept
:
deptList
)
{
deptMap
.
put
(
dept
.
getDepartNo
(),
CommonConstants
.
ONE_INT
);
}
}
// 查找档案库
Map
<
String
,
TEmployeeInfo
>
existEmpMap
=
new
HashMap
<>();
Map
<
String
,
TEmployeeInfo
>
existPhoneMap
=
new
HashMap
<>();
...
...
@@ -901,6 +922,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
saveEmp
=
new
TEmployeeInfo
();
errorMsg
=
new
HashSet
<>();
excel
=
excelVOList
.
get
(
i
);
if
(
deptMap
.
get
(
excel
.
getDeptNo
())
==
null
)
{
errorMsg
.
add
(
EmployeeConstants
.
DEPT_NO_ERROR
);
}
existEmp
=
existEmpMap
.
get
(
excel
.
getEmpIdcard
());
// 档案存在
if
(
existEmp
!=
null
)
{
...
...
@@ -1832,6 +1857,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
ServletOutputStream
out
=
null
;
try
{
ExcelUtil
<
EmployeeExportVO
>
util
=
new
ExcelUtil
<>(
EmployeeExportVO
.
class
);
for
(
EmployeeExportVO
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
a7077194
...
...
@@ -549,6 +549,7 @@
,GROUP_CONCAT(DISTINCT b.unit_no) UNIT_NO
,a.LEAVE_TIME
,a.LEAVE_USER
,a.LEAVE_USER_NAME
,a.LEAVE_REASON
from t_employee_info a
left join t_employee_project b on a.id = b.EMP_ID
...
...
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