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
cc780621
Commit
cc780621
authored
Aug 05, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
缴费库 代码修改
parent
59b0523e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
17 deletions
+20
-17
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+20
-17
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
cc780621
...
...
@@ -65,7 +65,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/**
* @Author huyc
* @Description
档案划转
* @Description 档案划转
* @Date 2022/6/22
**/
@Override
...
...
@@ -73,8 +73,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//待划转员工已在目标项目下不可划转
TEmployeeProject
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmpChangeInfo
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
tEmpChangeInfo
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmpChangeInfo
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
tEmpChangeInfo
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
return
R
.
failed
(
"待划转员工已在目标项目下不可划转"
);
}
...
...
@@ -85,8 +85,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//划转,更新项目信息
TEmployeeProject
updateTEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmpChangeInfo
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptName
,
tEmpChangeInfo
.
getOldSettle
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
).
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmpChangeInfo
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptName
,
tEmpChangeInfo
.
getOldSettle
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
).
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
updateTEmployeeProject
))
{
TSettleDomain
tSettleDomain
=
tSettleDomainMapper
.
selectOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
...
...
@@ -116,9 +116,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
public
R
<
List
<
ErrorMessage
>>
batchChangeArc
(
List
<
TEmpChangeInfoVO
>
excelVOList
,
BindingResult
bindingResult
)
{
// 通用校验获取失败的数据
List
<
ErrorMessage
>
errorMessageList
=
(
List
<
ErrorMessage
>)
bindingResult
.
getTarget
();
Map
<
Long
,
ErrorMessage
>
errorMsgMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
errorMessageList
)){
errorMessageList
.
stream
().
forEach
(
errorMessage
->
errorMsgMap
.
put
(
errorMessage
.
getLineNum
(),
errorMessage
));
Map
<
Long
,
ErrorMessage
>
errorMsgMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
errorMessageList
))
{
errorMessageList
.
stream
().
forEach
(
errorMessage
->
errorMsgMap
.
put
(
errorMessage
.
getLineNum
(),
errorMessage
));
}
List
<
TEmployeeProject
>
updateList
=
new
ArrayList
<>();
...
...
@@ -126,7 +126,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
// 已有验证报错直接下一个
if
(
Common
.
isNotNull
(
errorMsgMap
.
get
(
i
+
2
)))
{
if
(
Common
.
isNotNull
(
errorMsgMap
.
get
(
i
+
2
)))
{
continue
;
}
errorMsg
=
new
HashSet
<>();
...
...
@@ -159,9 +159,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//待划转员工已在目标项目下不可划转
TEmployeeProject
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getNewSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getNewSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_CHANGE_EMP_PROJECT
,
excel
.
getNewSettleCode
()));
}
...
...
@@ -169,8 +169,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if
(
CollUtil
.
isEmpty
(
errorMsg
))
{
//划转,更新项目信息
TEmployeeProject
updateTEmployeePro
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
if
(
CommonConstants
.
ONE_INT
==
updateTEmployeePro
.
getProjectStatus
())
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_DELETE_EXIT
,
excel
.
getOldSettleCode
()));
...
...
@@ -211,6 +211,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/**
* 获取所有项目名称
*
* @return R
* @Author huyc
* @Date 2022-06-22
...
...
@@ -218,12 +219,13 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
@Override
public
R
<
List
<
TSettleDomain
>>
getAllDept
()
{
List
<
TSettleDomain
>
list
=
tSettleDomainMapper
.
selectList
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
().
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
STATUS_NORMAL
));
return
R
.
ok
(
list
);
}
/**
* 获取所有单位名称
*
* @return R
* @Author huyc
* @Date 2022-06-22
...
...
@@ -236,6 +238,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
/**
* 分页获取所有项目名称
*
* @return R
* @Author huyc
* @Date 2022-07-26
...
...
@@ -243,9 +246,9 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
@Override
public
IPage
<
TSettleDomain
>
getAllDeptPage
(
Page
page
,
String
deptName
)
{
LambdaQueryWrapper
<
TSettleDomain
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
likeRight
(
TSettleDomain:
:
getDepartName
,
deptName
);
wrapper
.
likeRight
(
TSettleDomain:
:
getDepartName
,
deptName
);
wrapper
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
);
wrapper
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
);
return
tSettleDomainMapper
.
selectPage
(
page
,
wrapper
);
return
tSettleDomainMapper
.
selectPage
(
page
,
wrapper
);
}
}
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