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
551fdbd9
Commit
551fdbd9
authored
Jun 27, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huyc 项目档案代码提交
parent
9c2423c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
2 deletions
+42
-2
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+42
-2
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
551fdbd9
...
@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
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.TEmployeeProject
;
...
@@ -39,11 +40,15 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
...
@@ -39,11 +40,15 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.support.SimpleValueWrapper
;
import
org.springframework.cache.support.SimpleValueWrapper
;
...
@@ -66,6 +71,7 @@ import java.util.stream.Collectors;
...
@@ -66,6 +71,7 @@ import java.util.stream.Collectors;
*/
*/
@Service
@Service
@RequiredArgsConstructor
@RequiredArgsConstructor
@EnableConfigurationProperties
(
DaprCheckProperties
.
class
)
public
class
TEmployeeProjectServiceImpl
extends
ServiceImpl
<
TEmployeeProjectMapper
,
TEmployeeProject
>
implements
TEmployeeProjectService
{
public
class
TEmployeeProjectServiceImpl
extends
ServiceImpl
<
TEmployeeProjectMapper
,
TEmployeeProject
>
implements
TEmployeeProjectService
{
private
final
TEmployeeLogService
tEmployeeLogService
;
private
final
TEmployeeLogService
tEmployeeLogService
;
...
@@ -76,6 +82,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -76,6 +82,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
private
final
TCustomerInfoMapper
tCustomerInfoMapper
;
private
final
TCustomerInfoMapper
tCustomerInfoMapper
;
private
final
DaprCheckProperties
daprCheckProperties
;
// 缓存信息
// 缓存信息
private
final
CacheManager
cacheManager
;
private
final
CacheManager
cacheManager
;
...
@@ -216,6 +224,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -216,6 +224,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
List
<
TEmployeeInfo
>
updateList
=
new
ArrayList
();
List
<
TEmployeeInfo
>
updateList
=
new
ArrayList
();
List
<
TEmployeeProject
>
proInsList
=
new
ArrayList
();
List
<
TEmployeeProject
>
proInsList
=
new
ArrayList
();
List
<
TEmployeeProject
>
proupdateList
=
new
ArrayList
();
List
<
TEmployeeProject
>
proupdateList
=
new
ArrayList
();
// 获取身份证、手机号列表,批量查询档案
Map
<
String
,
Integer
>
idCardMap
=
new
HashMap
<>();
String
idCard
;
// 执行数据插入操作 组装 PostDto
// 执行数据插入操作 组装 PostDto
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
EmployeeProjectVO
excel
=
excelVOList
.
get
(
i
);
EmployeeProjectVO
excel
=
excelVOList
.
get
(
i
);
...
@@ -226,6 +239,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -226,6 +239,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
continue
;
continue
;
}
}
idCard
=
excel
.
getEmpIdcard
();
if
(
idCardMap
.
get
(
idCard
)
!=
null
)
{
errorMsgMap
.
put
((
i
+
2L
),
new
ErrorMessage
(
"第"
+
(
i
+
2
)
+
"行身份证号与第"
+
idCardMap
.
get
(
idCard
)
+
"行重复!"
));
}
else
{
idCardMap
.
put
(
idCard
,
i
+
2
);
}
//根据身份证获取人员档案
//根据身份证获取人员档案
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
...
@@ -239,8 +259,28 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -239,8 +259,28 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//不存在复档或复项的情况
//不存在复档或复项的情况
//档案无(在档人员、离职库皆无),项目无
//档案无(在档人员、离职库皆无),项目无
if
(
Common
.
isEmpty
(
tEmployeeInfo
)
&&
Common
.
isEmpty
(
tEmployeeProject
))
{
if
(
Common
.
isEmpty
(
tEmployeeInfo
)
&&
Common
.
isEmpty
(
tEmployeeProject
))
{
insertExcelPost
(
excel
,
insertList
);
// 校验身份证实名
insertExcelPro
(
excel
,
proInsList
);
TCheckIdCard
checkIdCard
=
new
TCheckIdCard
();
checkIdCard
.
setName
(
excel
.
getEmpName
());
checkIdCard
.
setIdCard
(
excel
.
getEmpIdcard
());
List
<
TCheckIdCard
>
checkList
=
new
ArrayList
<>();
checkList
.
add
(
checkIdCard
);
R
<
List
<
TCheckIdCard
>>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckidcard/inner/checkIdCard"
,
checkList
,
TCheckIdCard
.
class
,
SecurityConstants
.
FROM_IN
);
Boolean
isSave
=
false
;
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
for
(
TCheckIdCard
check
:
checkListR
.
getData
())
{
if
(
check
.
getIsTrue
()
==
CommonConstants
.
ZERO_INT
)
{
errorMsg
.
add
(
check
.
getReason
());
isSave
=
true
;
break
;
}
}
}
if
(!
isSave
)
{
insertExcelPost
(
excel
,
insertList
);
insertExcelPro
(
excel
,
proInsList
);
}
//档案有(在档人员),项目无
//档案有(在档人员),项目无
}
else
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
Common
.
isEmpty
(
tEmployeeProject
)
}
else
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
Common
.
isEmpty
(
tEmployeeProject
)
&&
CommonConstants
.
dingleDigitIntArray
[
0
]
==
tEmployeeInfo
.
getFileStatus
())
{
&&
CommonConstants
.
dingleDigitIntArray
[
0
]
==
tEmployeeInfo
.
getFileStatus
())
{
...
...
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