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
2b2dc0e8
Commit
2b2dc0e8
authored
Jun 27, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.6.6-预入职相关_新校验
parent
b350bce9
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
859 additions
and
116 deletions
+859
-116
TPreEmpMainServiceImpl.java
...v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
+376
-108
TPreEmpCheckNum.java
.../com/yifu/cloud/plus/v1/check/entity/TPreEmpCheckNum.java
+85
-0
TCheckIdCardController.java
...loud/plus/v1/check/controller/TCheckIdCardController.java
+13
-0
TCheckMobileController.java
...loud/plus/v1/check/controller/TCheckMobileController.java
+14
-0
TPreEmpCheckNumMapper.java
...ifu/cloud/plus/v1/check/mapper/TPreEmpCheckNumMapper.java
+38
-0
TCheckIdCardService.java
...yifu/cloud/plus/v1/check/service/TCheckIdCardService.java
+8
-0
TCheckMobileService.java
...yifu/cloud/plus/v1/check/service/TCheckMobileService.java
+9
-0
TPreEmpCheckNumService.java
...u/cloud/plus/v1/check/service/TPreEmpCheckNumService.java
+36
-0
TCheckIdCardServiceImpl.java
...d/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
+109
-8
TCheckMobileServiceImpl.java
...d/plus/v1/check/service/impl/TCheckMobileServiceImpl.java
+64
-0
TPreEmpCheckNumServiceImpl.java
...lus/v1/check/service/impl/TPreEmpCheckNumServiceImpl.java
+44
-0
application.yml
yifu-check/yifu-check-biz/src/main/resources/application.yml
+16
-0
TPreEmpCheckNumMapper.xml
...k-biz/src/main/resources/mapper/TPreEmpCheckNumMapper.xml
+47
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
View file @
2b2dc0e8
...
...
@@ -24,7 +24,6 @@ import com.alibaba.excel.context.AnalysisContext;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.builder.ExcelWriterBuilder
;
import
com.alibaba.excel.write.builder.ExcelWriterSheetBuilder
;
import
com.alibaba.excel.write.merge.OnceAbsoluteMergeStrategy
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
...
...
@@ -173,6 +172,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo
.
setPreMainId
(
main
.
getId
());
tPreEmployeeInfo
.
setCreateBy
(
user
.
getId
());
tPreEmployeeInfo
.
setCreateName
(
user
.
getNickname
());
tPreEmployeeInfo
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmployeeInfoService
.
save
(
tPreEmployeeInfo
);
vo
.
setTpreEmployeeInfo
(
tPreEmployeeInfo
);
}
...
...
@@ -190,6 +190,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeProject
.
setPreMainId
(
main
.
getId
());
tPreEmployeeProject
.
setCreateBy
(
user
.
getId
());
tPreEmployeeProject
.
setCreateName
(
user
.
getNickname
());
tPreEmployeeProject
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmployeeProjectService
.
save
(
tPreEmployeeProject
);
vo
.
setTpreEmployeeProject
(
tPreEmployeeProject
);
}
...
...
@@ -228,10 +229,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo
.
setPreMainId
(
main
.
getId
());
tPreEmployeeInfo
.
setCreateBy
(
user
.
getId
());
tPreEmployeeInfo
.
setCreateName
(
user
.
getNickname
());
// TODO - 要记得去掉out
System
.
out
.
println
(
"空的能有id?:"
+
tPreEmployeeInfo
.
getId
());
tPreEmployeeInfo
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmployeeInfoService
.
saveOrUpdate
(
tPreEmployeeInfo
);
vo
.
setTpreEmployeeInfo
(
tPreEmployeeInfo
);
project
=
tEmployeeProjectService
.
getByEmpIdAndDeptId
(
empId
,
deptId
);
...
...
@@ -242,6 +240,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeProject
.
setPreMainId
(
main
.
getId
());
tPreEmployeeProject
.
setCreateBy
(
user
.
getId
());
tPreEmployeeProject
.
setCreateName
(
user
.
getNickname
());
tPreEmployeeProject
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmployeeProjectService
.
saveOrUpdate
(
tPreEmployeeProject
);
vo
.
setTpreEmployeeProject
(
tPreEmployeeProject
);
}
...
...
@@ -251,6 +250,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo
.
setPreMainId
(
main
.
getId
());
tPreEmployeeInfo
.
setCreateBy
(
user
.
getId
());
tPreEmployeeInfo
.
setCreateName
(
user
.
getNickname
());
tPreEmployeeInfo
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmployeeInfoService
.
save
(
tPreEmployeeInfo
);
vo
.
setTpreEmployeeInfo
(
tPreEmployeeInfo
);
tPreEmployeeProject
=
new
TPreEmployeeProject
();
...
...
@@ -261,6 +261,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeProject
.
setPreMainId
(
main
.
getId
());
tPreEmployeeProject
.
setCreateBy
(
user
.
getId
());
tPreEmployeeProject
.
setCreateName
(
user
.
getNickname
());
tPreEmployeeProject
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmployeeProjectService
.
save
(
tPreEmployeeProject
);
vo
.
setTpreEmployeeProject
(
tPreEmployeeProject
);
}
...
...
@@ -285,6 +286,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpBadRecord
.
setEmpIdcard
(
empIdCard
);
tPreEmpBadRecord
.
setCreateBy
(
user
.
getId
());
tPreEmpBadRecord
.
setCreateName
(
user
.
getNickname
());
tPreEmpBadRecord
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpBadRecordService
.
save
(
tPreEmpBadRecord
);
}
vo
.
setTpreEmpBadRecord
(
tPreEmpBadRecord
);
...
...
@@ -306,6 +308,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpContactInfo
.
setEmpIdcard
(
empIdCard
);
tPreEmpContactInfo
.
setCreateBy
(
user
.
getId
());
tPreEmpContactInfo
.
setCreateName
(
user
.
getNickname
());
tPreEmpContactInfo
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpContactInfoService
.
save
(
tPreEmpContactInfo
);
}
vo
.
setTpreEmpContactInfo
(
tPreEmpContactInfo
);
...
...
@@ -330,6 +333,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpDisabilityInfo
.
setEmpIdcard
(
empIdCard
);
tPreEmpDisabilityInfo
.
setCreateBy
(
user
.
getId
());
tPreEmpDisabilityInfo
.
setCreateName
(
user
.
getNickname
());
tPreEmpDisabilityInfo
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpDisabilityInfoService
.
save
(
tPreEmpDisabilityInfo
);
}
vo
.
setTpreEmpDisabilityInfo
(
tPreEmpDisabilityInfo
);
...
...
@@ -366,6 +370,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpEducation
.
setAttaList
(
new
ArrayList
<>());
tPreEmpEducation
.
setCreateBy
(
user
.
getId
());
tPreEmpEducation
.
setCreateName
(
user
.
getNickname
());
tPreEmpEducation
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpEducationService
.
save
(
tPreEmpEducation
);
}
else
{
// 附件
...
...
@@ -402,6 +407,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
record
.
setPreMainId
(
id
);
record
.
setCreateBy
(
user
.
getId
());
record
.
setCreateName
(
user
.
getNickname
());
record
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpFamilyList
.
add
(
record
);
}
tPreEmpFamilyService
.
saveBatch
(
tPreEmpFamilyList
);
...
...
@@ -419,6 +425,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
record
.
setPreMainId
(
id
);
record
.
setCreateBy
(
user
.
getId
());
record
.
setCreateName
(
user
.
getNickname
());
record
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpFamilyService
.
save
(
record
);
tPreEmpFamilyList
.
add
(
record
);
}
...
...
@@ -467,6 +474,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
record
.
setEmpIdcard
(
empIdCard
);
record
.
setCreateBy
(
user
.
getId
());
record
.
setCreateName
(
user
.
getNickname
());
record
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpProfessionalQualificationList
.
add
(
record
);
}
tPreEmpProfessionalQualificationService
.
saveBatch
(
tPreEmpProfessionalQualificationList
);
...
...
@@ -485,6 +493,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
record
.
setAttaList
(
new
ArrayList
<>());
record
.
setCreateBy
(
user
.
getId
());
record
.
setCreateName
(
user
.
getNickname
());
record
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpProfessionalQualificationService
.
save
(
record
);
tPreEmpProfessionalQualificationList
.
add
(
record
);
}
...
...
@@ -525,6 +534,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
record
.
setPreMainId
(
id
);
record
.
setCreateBy
(
user
.
getId
());
record
.
setCreateName
(
user
.
getNickname
());
record
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpWorkRecordingList
.
add
(
record
);
}
tPreEmpWorkRecordingService
.
saveBatch
(
tPreEmpWorkRecordingList
);
...
...
@@ -542,6 +552,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
record
.
setPreMainId
(
id
);
record
.
setCreateBy
(
user
.
getId
());
record
.
setCreateName
(
user
.
getNickname
());
record
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpWorkRecordingService
.
save
(
record
);
tPreEmpWorkRecordingList
.
add
(
record
);
}
...
...
@@ -748,7 +759,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
else
{
main
.
setStatus
(
status
);
main
.
setCreateBy
(
user
.
getId
());
main
.
setCreateBy
(
user
.
getNickname
());
main
.
setCreateName
(
user
.
getNickname
());
main
.
setCreateTime
(
LocalDateTime
.
now
());
this
.
saveOrUpdate
(
main
);
String
mainId
=
main
.
getId
();
...
...
@@ -757,7 +769,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
tPreEmpBadRecord
!=
null
)
{
tPreEmpBadRecord
.
setPreMainId
(
mainId
);
tPreEmpBadRecord
.
setCreateBy
(
user
.
getId
());
tPreEmpBadRecord
.
setCreateBy
(
user
.
getNickname
());
tPreEmpBadRecord
.
setCreateName
(
user
.
getNickname
());
tPreEmpBadRecord
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpBadRecordService
.
saveOrUpdate
(
tPreEmpBadRecord
);
}
// 预入职-紧急联络人
...
...
@@ -765,7 +778,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
tPreEmpContactInfo
!=
null
)
{
tPreEmpContactInfo
.
setPreMainId
(
mainId
);
tPreEmpContactInfo
.
setCreateBy
(
user
.
getId
());
tPreEmpContactInfo
.
setCreateBy
(
user
.
getNickname
());
tPreEmpContactInfo
.
setCreateName
(
user
.
getNickname
());
tPreEmpContactInfo
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpContactInfoService
.
saveOrUpdate
(
tPreEmpContactInfo
);
}
// 预入职-员工伤残信息表
...
...
@@ -773,7 +787,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
tPreEmpDisabilityInfo
!=
null
)
{
tPreEmpDisabilityInfo
.
setPreMainId
(
mainId
);
tPreEmpDisabilityInfo
.
setCreateBy
(
user
.
getId
());
tPreEmpDisabilityInfo
.
setCreateBy
(
user
.
getNickname
());
tPreEmpDisabilityInfo
.
setCreateName
(
user
.
getNickname
());
tPreEmpDisabilityInfo
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpDisabilityInfoService
.
saveOrUpdate
(
tPreEmpDisabilityInfo
);
}
// 预入职-员工学历信息表
...
...
@@ -781,7 +796,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if
(
tPreEmpEducation
!=
null
)
{
tPreEmpEducation
.
setPreMainId
(
mainId
);
tPreEmpEducation
.
setCreateBy
(
user
.
getId
());
tPreEmpEducation
.
setCreateBy
(
user
.
getNickname
());
tPreEmpEducation
.
setCreateName
(
user
.
getNickname
());
tPreEmpEducation
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpEducationService
.
saveOrUpdate
(
tPreEmpEducation
);
// 附件
if
(
tPreEmpEducation
.
getAttaList
()
!=
null
&&
!
tPreEmpEducation
.
getAttaList
().
isEmpty
())
{
...
...
@@ -791,7 +807,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
for
(
TAttaInfo
atta
:
attaList
)
{
atta
.
setDomainId
(
tPreEmpEducation
.
getId
());
atta
.
setCreateBy
(
user
.
getId
());
atta
.
setCreateBy
(
user
.
getNickname
());
atta
.
setCreateName
(
user
.
getNickname
());
atta
.
setCreateTime
(
LocalDateTime
.
now
());
}
tAttaInfoService
.
saveOrUpdateBatch
(
attaList
);
}
...
...
@@ -803,7 +820,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
for
(
TPreEmpFamily
info
:
tPreEmpFamily
)
{
info
.
setPreMainId
(
mainId
);
info
.
setCreateBy
(
user
.
getId
());
info
.
setCreateBy
(
user
.
getNickname
());
info
.
setCreateName
(
user
.
getNickname
());
info
.
setCreateTime
(
LocalDateTime
.
now
());
}
tPreEmpFamilyService
.
saveOrUpdateBatch
(
tPreEmpFamily
);
}
...
...
@@ -827,14 +845,16 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
this
.
setBaseSexInfo
(
tPreEmployeeInfo
);
tPreEmployeeInfo
.
setPreMainId
(
mainId
);
tPreEmployeeInfo
.
setCreateBy
(
user
.
getId
());
tPreEmployeeInfo
.
setCreateBy
(
user
.
getNickname
());
tPreEmployeeInfo
.
setCreateName
(
user
.
getNickname
());
tPreEmployeeInfo
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmployeeInfoService
.
saveOrUpdate
(
tPreEmployeeInfo
);
}
// 预入职-项目档案表
if
(
tPreEmployeeProject
!=
null
)
{
tPreEmployeeProject
.
setPreMainId
(
mainId
);
tPreEmployeeProject
.
setCreateBy
(
user
.
getId
());
tPreEmployeeProject
.
setCreateBy
(
user
.
getNickname
());
tPreEmployeeProject
.
setCreateName
(
user
.
getNickname
());
tPreEmployeeProject
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmployeeProjectService
.
saveOrUpdate
(
tPreEmployeeProject
);
}
// 预入职-员工职业资格信息表
...
...
@@ -843,7 +863,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
for
(
TPreEmpProfessionalQualification
info
:
tPreEmpProfessionalQualification
)
{
info
.
setPreMainId
(
mainId
);
info
.
setCreateBy
(
user
.
getId
());
info
.
setCreateBy
(
user
.
getNickname
());
info
.
setCreateName
(
user
.
getNickname
());
info
.
setCreateTime
(
LocalDateTime
.
now
());
tPreEmpProfessionalQualificationService
.
saveOrUpdate
(
info
);
// 附件
if
(
info
.
getAttaList
()
!=
null
&&
!
info
.
getAttaList
().
isEmpty
())
{
...
...
@@ -853,7 +874,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
for
(
TAttaInfo
atta
:
attaList
)
{
atta
.
setDomainId
(
info
.
getId
());
atta
.
setCreateBy
(
user
.
getId
());
atta
.
setCreateBy
(
user
.
getNickname
());
atta
.
setCreateName
(
user
.
getNickname
());
atta
.
setCreateTime
(
LocalDateTime
.
now
());
}
tAttaInfoService
.
saveOrUpdateBatch
(
attaList
);
}
...
...
@@ -866,7 +888,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
for
(
TPreEmpWorkRecording
info
:
tPreEmpWorkRecording
)
{
info
.
setPreMainId
(
mainId
);
info
.
setCreateBy
(
user
.
getId
());
info
.
setCreateBy
(
user
.
getNickname
());
info
.
setCreateName
(
user
.
getNickname
());
info
.
setCreateTime
(
LocalDateTime
.
now
());
}
tPreEmpWorkRecordingService
.
saveOrUpdateBatch
(
tPreEmpWorkRecording
);
}
...
...
@@ -876,7 +899,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
for
(
TAttaInfo
info
:
attaInfoList
)
{
info
.
setDomainId
(
mainId
);
info
.
setCreateBy
(
user
.
getId
());
info
.
setCreateBy
(
user
.
getNickname
());
info
.
setCreateName
(
user
.
getNickname
());
info
.
setCreateTime
(
LocalDateTime
.
now
());
}
tAttaInfoService
.
updateBatchById
(
attaInfoList
);
}
...
...
@@ -1267,6 +1291,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
insTEmployeePro
.
setEmpCode
(
tEmployeeInfo
.
getEmpCode
());
insTEmployeePro
.
setCreateBy
(
user
.
getId
());
insTEmployeePro
.
setEmpName
(
tEmployeeInfo
.
getEmpName
());
insTEmployeePro
.
setCreateTime
(
LocalDateTime
.
now
());
insTEmployeePro
.
setCreateName
(
user
.
getNickname
());
insTEmployeePro
.
setProjectSource
(
CommonConstants
.
SIX_STRING
);
insTEmployeePro
.
setEmpId
(
tEmployeeInfo
.
getId
());
...
...
@@ -1665,78 +1690,78 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
List
<
List
<
String
>>
headList
=
Lists
.
newArrayList
();
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"状态"
,
"状态"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"提交时间"
,
"提交时间"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"状态"
,
"状态"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"提交时间"
,
"提交时间"
}));
String
oneTitle
=
"员工基本信息"
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"员工主码"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"员工类型"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"员工姓名"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证号"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"性别"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证期限"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证开始日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证截止日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"出生日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"年龄"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"婚姻状况"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"民族"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"政治面貌"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"手机号码"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"邮箱"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"户籍所在地"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"户口性质"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"档案所在地"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"档案状态"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"通信地址"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"员工主码"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"员工类型"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"员工姓名"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证号"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"性别"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证期限"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证开始日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证截止日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"出生日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"年龄"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"婚姻状况"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"民族"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"政治面貌"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"手机号码"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"邮箱"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"户籍所在地"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"户口性质"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"档案所在地"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"档案状态"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"通信地址"
}));
oneTitle
=
"在项信息"
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"客户名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"项目名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"业务类型"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"合同类型"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"工时制"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"就职岗位"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"入职日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"试用期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"标签"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"客户名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"项目名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"业务类型"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"合同类型"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"工时制"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"就职岗位"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"入职日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"试用期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"标签"
}));
oneTitle
=
"紧急联络人"
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"姓名"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"与本人关系"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"联系地址"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"联系电话"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"姓名"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"与本人关系"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"联系地址"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"联系电话"
}));
oneTitle
=
"最高教育经历"
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"学校"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"专业"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"学历"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否大专及以上"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"最高学历"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"入学时间"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"毕业时间"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"学校"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"专业"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"学历"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否大专及以上"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"最高学历"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"入学时间"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"毕业时间"
}));
oneTitle
=
"主要工作经历"
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否为首份工作"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"工作单位"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"工作岗位"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"开始工作日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"结束工作日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否为首份工作"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"工作单位"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"工作岗位"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"开始工作日期"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"结束工作日期"
}));
oneTitle
=
"主要家庭成员信息"
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"成员姓名"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"与本人关系"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"手机号码"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"成员姓名"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"与本人关系"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"手机号码"
}));
oneTitle
=
"职业资格信息"
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否有职业资格证书"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"申报年度"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"职业资格名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否有职业资格证书"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"申报年度"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"职业资格名称"
}));
oneTitle
=
"伤残信息"
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否曾被认定为工伤"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否有职业病"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"职业病名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否有传染性疾病"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"传染病名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否持有残疾人证明"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"伤残病名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"伤残等级"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否曾被认定为工伤"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否有职业病"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"职业病名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否有传染性疾病"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"传染病名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否持有残疾人证明"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"伤残病名称"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"伤残等级"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种"
}));
oneTitle
=
"不良记录"
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"不良记录描述"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"不良记录描述"
}));
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
).
head
(
headList
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
...
...
@@ -1748,33 +1773,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
list
=
baseMapper
.
getTPreEmpMainAllList
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelWriterSheetBuilder
writeSheet
=
EasyExcelFactory
.
writerSheet
(
name
+
index
);
if
(
list
.
size
()>
1
)
{
int
startRow
=
0
;
int
endRow
=
0
;
boolean
preBoo
;
boolean
afterBoo
;
for
(
int
j
=
1
;
j
<
list
.
size
()
-
1
;
j
++)
{
// 身份证
preBoo
=
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
());
afterBoo
=
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
());
if
(
preBoo
&&
startRow
==
0
)
{
startRow
=
1
+
j
;
}
if
(!
afterBoo
)
{
endRow
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
1
)
{
endRow
=
3
+
j
;
}
if
(
startRow
>
0
&&
endRow
>
0
)
{
for
(
int
k
=
2
;
k
<=
21
;
k
++)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow
,
endRow
,
k
,
k
);
writeSheet
.
registerWriteHandler
(
strategy
);
}
startRow
=
0
;
endRow
=
0
;
}
}
if
(
list
.
size
()
>
1
&&
list
.
size
()
<
10000
)
{
// 合并重复行
this
.
getHeBingHang
(
list
,
writeSheet
);
}
excelWriter
.
write
(
list
,
writeSheet
.
build
());
index
++;
...
...
@@ -1805,4 +1806,271 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
/**
* @Description: 合并单元格
* @Author: hgw
* @Date: 2024/6/27 10:35
* @return: void
**/
private
void
getHeBingHang
(
List
<
TPreMainExportAllVO
>
list
,
ExcelWriterSheetBuilder
writeSheet
)
{
OnceAbsoluteMergeStrategy
strategy
;
int
startRow
=
0
;
int
endRow
=
0
;
boolean
preBoo
;
boolean
afterBoo
;
int
startRow0
=
0
;
int
endRow0
=
0
;
int
startRow1
=
0
;
int
endRow1
=
0
;
int
startRow2
=
0
;
int
endRow2
=
0
;
int
startRow3
=
0
;
int
endRow3
=
0
;
int
startRow4
=
0
;
int
endRow4
=
0
;
int
startRow5
=
0
;
int
endRow5
=
0
;
int
startRow6
=
0
;
int
endRow6
=
0
;
int
startRow7
=
0
;
int
endRow7
=
0
;
int
startRow8
=
0
;
int
endRow8
=
0
;
int
startRow9
=
0
;
int
endRow9
=
0
;
for
(
int
j
=
1
;
j
<
list
.
size
()
-
1
;
j
++)
{
// 0状态
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField1
())
&&
list
.
get
(
j
).
getField1
().
equals
(
list
.
get
(
j
-
1
).
getField1
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField1
())
&&
list
.
get
(
j
).
getField1
().
equals
(
list
.
get
(
j
+
1
).
getField1
()));
if
(
preBoo
&&
startRow0
==
0
)
{
startRow0
=
1
+
j
;
}
if
(!
afterBoo
&&
startRow0
>
0
)
{
endRow0
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow0
>
0
)
{
endRow0
=
3
+
j
;
}
if
(
startRow0
>
0
&&
endRow0
>
0
)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow0
,
endRow0
,
0
,
0
);
writeSheet
.
registerWriteHandler
(
strategy
);
startRow0
=
0
;
endRow0
=
0
;
}
// 1提交时间
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField2
())
&&
list
.
get
(
j
).
getField2
().
equals
(
list
.
get
(
j
-
1
).
getField2
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField2
())
&&
list
.
get
(
j
).
getField2
().
equals
(
list
.
get
(
j
+
1
).
getField2
()));
if
(
preBoo
&&
startRow1
==
0
)
{
startRow1
=
1
+
j
;
}
if
(!
afterBoo
&&
startRow1
>
0
)
{
endRow1
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow1
>
0
)
{
endRow1
=
3
+
j
;
}
if
(
startRow1
>
0
&&
endRow1
>
0
)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow1
,
endRow1
,
0
,
0
);
writeSheet
.
registerWriteHandler
(
strategy
);
startRow1
=
0
;
endRow1
=
0
;
}
// 1员工基本信息-身份证
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()));
if
(
startRow
==
0
)
{
if
(
preBoo
)
{
startRow
=
1
+
j
;
}
else
if
(
afterBoo
)
{
startRow
=
2
+
j
;
}
}
if
(!
afterBoo
&&
startRow
>
0
)
{
endRow
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow
>
0
)
{
endRow
=
3
+
j
;
}
if
(
startRow
>
0
&&
endRow
>
0
)
{
for
(
int
k
=
2
;
k
<
22
;
k
++)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow
,
endRow
,
k
,
k
);
writeSheet
.
registerWriteHandler
(
strategy
);
}
startRow
=
0
;
endRow
=
0
;
}
// 2在项信息-项目名称
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField24
())
&&
list
.
get
(
j
).
getField24
().
equals
(
list
.
get
(
j
-
1
).
getField24
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField24
())
&&
list
.
get
(
j
).
getField24
().
equals
(
list
.
get
(
j
+
1
).
getField24
()));
if
(
startRow2
==
0
)
{
if
(
preBoo
)
{
startRow2
=
1
+
j
;
}
else
if
(
afterBoo
)
{
startRow2
=
2
+
j
;
}
}
if
(!
afterBoo
&&
startRow2
>
0
)
{
endRow2
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow2
>
0
)
{
endRow2
=
3
+
j
;
}
if
(
startRow2
>
0
&&
endRow2
>
0
)
{
for
(
int
k
=
22
;
k
<
31
;
k
++)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow2
,
endRow2
,
k
,
k
);
writeSheet
.
registerWriteHandler
(
strategy
);
}
startRow2
=
0
;
endRow2
=
0
;
}
// 3紧急联络人-姓名
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField32
())
&&
list
.
get
(
j
).
getField32
().
equals
(
list
.
get
(
j
-
1
).
getField32
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField32
())
&&
list
.
get
(
j
).
getField32
().
equals
(
list
.
get
(
j
+
1
).
getField32
()));
if
(
startRow3
==
0
)
{
if
(
preBoo
)
{
startRow3
=
1
+
j
;
}
else
if
(
afterBoo
)
{
startRow3
=
2
+
j
;
}
}
if
(!
afterBoo
&&
startRow3
>
0
)
{
endRow3
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow3
>
0
)
{
endRow3
=
3
+
j
;
}
if
(
startRow3
>
0
&&
endRow3
>
0
)
{
for
(
int
k
=
31
;
k
<
35
;
k
++)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow3
,
endRow3
,
k
,
k
);
writeSheet
.
registerWriteHandler
(
strategy
);
}
startRow3
=
0
;
endRow3
=
0
;
}
// 4最高教育经历-专业
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField37
())
&&
list
.
get
(
j
).
getField37
().
equals
(
list
.
get
(
j
-
1
).
getField37
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField37
())
&&
list
.
get
(
j
).
getField37
().
equals
(
list
.
get
(
j
+
1
).
getField37
()));
if
(
preBoo
&&
startRow4
==
0
)
{
startRow4
=
1
+
j
;
}
if
(!
afterBoo
&&
startRow4
>
0
)
{
endRow4
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow4
>
0
)
{
endRow4
=
3
+
j
;
}
if
(
startRow4
>
0
&&
endRow4
>
0
)
{
for
(
int
k
=
35
;
k
<
42
;
k
++)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow4
,
endRow4
,
k
,
k
);
writeSheet
.
registerWriteHandler
(
strategy
);
}
startRow4
=
0
;
endRow4
=
0
;
}
// 5主要工作经历-专业
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField44
())
&&
list
.
get
(
j
).
getField44
().
equals
(
list
.
get
(
j
-
1
).
getField44
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField44
())
&&
list
.
get
(
j
).
getField44
().
equals
(
list
.
get
(
j
+
1
).
getField44
()));
if
(
preBoo
&&
startRow5
==
0
)
{
startRow5
=
1
+
j
;
}
if
(!
afterBoo
&&
startRow5
>
0
)
{
endRow5
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow5
>
0
)
{
endRow5
=
3
+
j
;
}
if
(
startRow5
>
0
&&
endRow5
>
0
)
{
for
(
int
k
=
42
;
k
<
47
;
k
++)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow5
,
endRow5
,
k
,
k
);
writeSheet
.
registerWriteHandler
(
strategy
);
}
startRow5
=
0
;
endRow5
=
0
;
}
// 6主要家庭成员信息-成员姓名
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField47
())
&&
list
.
get
(
j
).
getField47
().
equals
(
list
.
get
(
j
-
1
).
getField47
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField47
())
&&
list
.
get
(
j
).
getField47
().
equals
(
list
.
get
(
j
+
1
).
getField47
()));
if
(
preBoo
&&
startRow6
==
0
)
{
startRow6
=
1
+
j
;
}
if
(!
afterBoo
&&
startRow6
>
0
)
{
endRow6
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow6
>
0
)
{
endRow6
=
3
+
j
;
}
if
(
startRow6
>
0
&&
endRow6
>
0
)
{
for
(
int
k
=
47
;
k
<
50
;
k
++)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow6
,
endRow6
,
k
,
k
);
writeSheet
.
registerWriteHandler
(
strategy
);
}
startRow6
=
0
;
endRow6
=
0
;
}
// 7职业资格信息-职业资格名称
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField53
())
&&
list
.
get
(
j
).
getField53
().
equals
(
list
.
get
(
j
-
1
).
getField53
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField53
())
&&
list
.
get
(
j
).
getField53
().
equals
(
list
.
get
(
j
+
1
).
getField53
()));
if
(
preBoo
&&
startRow7
==
0
)
{
startRow7
=
1
+
j
;
}
if
(!
afterBoo
&&
startRow7
>
0
)
{
endRow7
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow7
>
0
)
{
endRow7
=
3
+
j
;
}
if
(
startRow7
>
0
&&
endRow7
>
0
)
{
for
(
int
k
=
50
;
k
<
53
;
k
++)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow7
,
endRow7
,
k
,
k
);
writeSheet
.
registerWriteHandler
(
strategy
);
}
startRow7
=
0
;
endRow7
=
0
;
}
// 8伤残信息-职业资格名称+传染病名称+伤残病名称
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField56
())
&&
list
.
get
(
j
).
getField56
().
equals
(
list
.
get
(
j
-
1
).
getField56
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField58
())
&&
list
.
get
(
j
).
getField58
().
equals
(
list
.
get
(
j
-
1
).
getField58
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField60
())
&&
list
.
get
(
j
).
getField60
().
equals
(
list
.
get
(
j
-
1
).
getField60
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField56
())
&&
list
.
get
(
j
).
getField56
().
equals
(
list
.
get
(
j
+
1
).
getField56
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField58
())
&&
list
.
get
(
j
).
getField58
().
equals
(
list
.
get
(
j
+
1
).
getField58
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField60
())
&&
list
.
get
(
j
).
getField60
().
equals
(
list
.
get
(
j
+
1
).
getField60
()));
if
(
preBoo
&&
startRow8
==
0
)
{
startRow8
=
1
+
j
;
}
if
(!
afterBoo
&&
startRow8
>
0
)
{
endRow8
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow8
>
0
)
{
endRow8
=
3
+
j
;
}
if
(
startRow8
>
0
&&
endRow8
>
0
)
{
for
(
int
k
=
53
;
k
<
62
;
k
++)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow8
,
endRow8
,
k
,
k
);
writeSheet
.
registerWriteHandler
(
strategy
);
}
startRow8
=
0
;
endRow8
=
0
;
}
// 9不良记录
preBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
-
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField63
())
&&
list
.
get
(
j
).
getField63
().
equals
(
list
.
get
(
j
-
1
).
getField63
()));
afterBoo
=
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField6
())
&&
list
.
get
(
j
).
getField6
().
equals
(
list
.
get
(
j
+
1
).
getField6
()))
&&
(
Common
.
isNotNull
(
list
.
get
(
j
).
getField63
())
&&
list
.
get
(
j
).
getField63
().
equals
(
list
.
get
(
j
+
1
).
getField63
()));
if
(
preBoo
&&
startRow9
==
0
)
{
startRow9
=
1
+
j
;
}
if
(!
afterBoo
&&
startRow9
>
0
)
{
endRow9
=
2
+
j
;
}
if
(
j
==
list
.
size
()
-
2
&&
startRow9
>
0
)
{
endRow9
=
3
+
j
;
}
if
(
startRow9
>
0
&&
endRow9
>
0
)
{
strategy
=
new
OnceAbsoluteMergeStrategy
(
startRow9
,
endRow9
,
62
,
62
);
writeSheet
.
registerWriteHandler
(
strategy
);
startRow9
=
0
;
endRow9
=
0
;
}
}
}
}
yifu-check/yifu-check-api/src/main/java/com/yifu/cloud/plus/v1/check/entity/TPreEmpCheckNum.java
0 → 100644
View file @
2b2dc0e8
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
check
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
/**
* C端预入职校验身份证与手机号限定调用表
*
* @author hgw
* @date 2024-06-27 14:33:06
*/
@Data
@TableName
(
"t_pre_emp_check_num"
)
@Schema
(
description
=
"C端预入职校验身份证与手机号限定调用表"
)
public
class
TPreEmpCheckNum
implements
Serializable
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"主键"
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 创建日
*/
@ExcelAttribute
(
name
=
"创建日"
,
isNotEmpty
=
true
,
errorInfo
=
"创建日不能为空"
,
maxLength
=
8
)
@NotBlank
(
message
=
"创建日不能为空"
)
@Length
(
max
=
8
,
message
=
"创建日不能超过8个字符"
)
@ExcelProperty
(
"创建日"
)
@Schema
(
description
=
"创建日"
)
private
String
createDay
;
/**
* 项目id
*/
@ExcelAttribute
(
name
=
"项目id"
,
isNotEmpty
=
true
,
errorInfo
=
"项目id不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"项目id不能为空"
)
@Length
(
max
=
32
,
message
=
"项目id不能超过32个字符"
)
@ExcelProperty
(
"项目id"
)
@Schema
(
description
=
"项目id"
)
private
String
deptId
;
/**
* 当日调用API总条数
*/
@ExcelAttribute
(
name
=
"当日调用API总条数"
,
isNotEmpty
=
true
,
errorInfo
=
"当日调用API总条数不能为空"
)
@NotBlank
(
message
=
"当日调用API总条数不能为空"
)
@ExcelProperty
(
"当日调用API总条数"
)
@Schema
(
description
=
"当日调用API总条数"
)
private
Integer
apiNum
;
/**
* 当日允许调用API总条数
*/
@ExcelAttribute
(
name
=
"当日允许调用API总条数"
,
isNotEmpty
=
true
,
errorInfo
=
"当日允许调用API总条数不能为空"
)
@NotBlank
(
message
=
"当日允许调用API总条数不能为空"
)
@ExcelProperty
(
"当日允许调用API总条数"
)
@Schema
(
description
=
"当日允许调用API总条数"
)
private
Integer
canApiNum
;
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/controller/TCheckIdCardController.java
View file @
2b2dc0e8
...
...
@@ -179,6 +179,19 @@ public class TCheckIdCardController {
return
tCheckIdCardService
.
checkSalaryIdCard
(
checkList
);
}
/**
* @Description: C端预入职校验姓名身份证
* @Author: hgw
* @Date: 2024-6-27 15:49:32
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Operation
(
description
=
"C端预入职校验姓名身份证"
)
@SysLog
(
"C端预入职校验姓名身份证"
)
@GetMapping
(
"/checkPreEmpIdCard"
)
public
R
<
String
>
checkPreEmpIdCard
(
@RequestParam
String
idCard
,
@RequestParam
String
name
,
@RequestParam
String
deptId
)
{
return
tCheckIdCardService
.
checkPreEmpIdCard
(
idCard
,
name
,
deptId
);
}
/**
* @Description: 批量校验姓名身份证
* @Author: hgw
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/controller/TCheckMobileController.java
View file @
2b2dc0e8
...
...
@@ -184,4 +184,18 @@ public class TCheckMobileController {
public
CheckBatchVo
checkMobileBatchs
(
@RequestBody
List
<
String
>
list
)
{
return
tCheckMobileService
.
checkMobileBatch
(
list
);
}
/**
* @Description: C端预入职校验手机号
* @Author: hgw
* @Date: 2024-6-27 15:49:32
* @return: com.yifu.cloud.v1.common.core.util.R
**/
@Operation
(
description
=
"C端预入职校验手机号"
)
@SysLog
(
"C端预入职校验手机号"
)
@GetMapping
(
"/checkPrePhone"
)
public
R
<
String
>
checkPrePhone
(
@RequestParam
String
phone
,
@RequestParam
String
deptId
)
{
return
tCheckMobileService
.
checkPrePhone
(
phone
,
deptId
);
}
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/mapper/TPreEmpCheckNumMapper.java
0 → 100644
View file @
2b2dc0e8
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
check
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.check.entity.TPreEmpCheckNum
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* C端预入职校验身份证与手机号限定调用表
*
* @author hgw
* @date 2024-06-27 14:33:06
*/
@Mapper
public
interface
TPreEmpCheckNumMapper
extends
BaseMapper
<
TPreEmpCheckNum
>
{
/**
* C端预入职校验身份证与手机号限定调用表简单查询
* @return
*/
TPreEmpCheckNum
getTPreEmpCheckNum
(
@Param
(
"deptId"
)
String
deptId
,
@Param
(
"createDay"
)
String
createDay
);
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/TCheckIdCardService.java
View file @
2b2dc0e8
...
...
@@ -48,4 +48,12 @@ public interface TCheckIdCardService extends IService<TCheckIdCard> {
TCheckIdCard
checkIdCardSingle
(
TCheckIdCard
tCheckIdCard
);
R
<
List
<
TCheckIdCard
>>
checkSalaryIdCard
(
List
<
TCheckIdCard
>
checkList
);
/**
* @Description: C端预入职校验
* @Author: hgw
* @Date: 2024/6/27 14:29
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.check.entity.TCheckIdCard>
**/
R
<
String
>
checkPreEmpIdCard
(
String
idCard
,
String
name
,
String
deptId
);
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/TCheckMobileService.java
View file @
2b2dc0e8
...
...
@@ -44,4 +44,13 @@ public interface TCheckMobileService extends IService<TCheckMobile> {
* @return: com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
**/
CheckBatchVo
checkMobileBatch
(
List
<
String
>
list
);
/**
* @Description: C端预入职校验手机号使用,其他慎用
* @Author: hgw
* @Date: 2024/6/27 16:04
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
checkPrePhone
(
String
phone
,
String
deptId
);
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/TPreEmpCheckNumService.java
0 → 100644
View file @
2b2dc0e8
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
check
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.check.entity.TPreEmpCheckNum
;
/**
* C端预入职校验身份证与手机号限定调用表
*
* @author hgw
* @date 2024-06-27 14:33:06
*/
public
interface
TPreEmpCheckNumService
extends
IService
<
TPreEmpCheckNum
>
{
/**
* C端预入职校验身份证与手机号限定调用表简单分页查询
*
* @return
*/
TPreEmpCheckNum
getTPreEmpCheckNum
(
String
deptId
,
String
createDay
);
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
View file @
2b2dc0e8
...
...
@@ -4,15 +4,9 @@ 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.yifu.cloud.plus.v1.check.entity.TCanCheck
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckApiNum
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckLock
;
import
com.yifu.cloud.plus.v1.check.entity.*
;
import
com.yifu.cloud.plus.v1.check.mapper.TCheckIdCardMapper
;
import
com.yifu.cloud.plus.v1.check.service.TCanCheckService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckApiNumService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckIdCardService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckLockService
;
import
com.yifu.cloud.plus.v1.check.service.*
;
import
com.yifu.cloud.plus.v1.check.utils.ChecksUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
...
...
@@ -43,6 +37,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
private
final
TCheckLockService
tCheckLockService
;
private
final
TCheckApiNumService
tCheckApiNumService
;
private
final
TPreEmpCheckNumService
tPreEmpCheckNumService
;
private
final
TCanCheckService
canCheckService
;
...
...
@@ -326,6 +321,112 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
return
returnMap
;
}
@Override
public
R
<
String
>
checkPreEmpIdCard
(
String
idCard
,
String
name
,
String
deptId
)
{
TCanCheck
tCanCheck
=
canCheckService
.
getById
(
1
);
boolean
canCheck
=
false
;
String
nowDay
=
DateUtil
.
getThisDay
();
if
(
tCanCheck
!=
null
&&
tCanCheck
.
getCanCheck
()
==
1
)
{
canCheck
=
true
;
TPreEmpCheckNum
nowDayNum
=
tPreEmpCheckNumService
.
getTPreEmpCheckNum
(
deptId
,
nowDay
);
if
(
nowDayNum
==
null
)
{
nowDayNum
=
new
TPreEmpCheckNum
();
nowDayNum
.
setCanApiNum
(
1000
);
nowDayNum
.
setApiNum
(
1
);
tPreEmpCheckNumService
.
save
(
nowDayNum
);
}
else
{
if
(
nowDayNum
.
getApiNum
()
>=
nowDayNum
.
getCanApiNum
())
{
return
R
.
failed
(
"该项目当日总条数:"
+
nowDayNum
.
getCanApiNum
()
+
"已到达上限!"
);
}
else
{
nowDayNum
.
setApiNum
(
nowDayNum
.
getApiNum
()
+
1
);
tPreEmpCheckNumService
.
updateById
(
nowDayNum
);
}
}
}
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
TCheckApiNum
nowMonthNum
=
tCheckApiNumService
.
getById
(
nowMonth
);
int
nowApiNum
=
tCheckLockService
.
getApiNumByMonth
(
nowMonth
);
if
(
nowMonthNum
==
null
)
{
TCheckApiNum
lastMonth
=
tCheckApiNumService
.
getById
(
DateUtil
.
addMonth
(-
1
));
int
canApiNum
=
10000
;
if
(
lastMonth
!=
null
&&
lastMonth
.
getCanApiNum
()
!=
null
)
{
canApiNum
=
lastMonth
.
getCanApiNum
();
}
nowMonthNum
=
new
TCheckApiNum
();
nowMonthNum
.
setId
(
nowMonth
);
nowMonthNum
.
setCanApiNum
(
canApiNum
);
nowMonthNum
.
setApiNum
(
0
);
tCheckApiNumService
.
save
(
nowMonthNum
);
}
else
if
(
nowApiNum
>=
nowMonthNum
.
getCanApiNum
())
{
return
R
.
failed
(
"当月总条数:"
+
nowMonthNum
.
getCanApiNum
()
+
"已到达上限!"
);
}
int
canApiNum
=
nowMonthNum
.
getCanApiNum
();
List
<
String
>
idCardList
=
new
ArrayList
<>();
idCardList
.
add
(
idCard
);
// 全部(身份证_姓名)
Map
<
String
,
TCheckIdCard
>
returnMap
=
this
.
getAllMapByList
(
idCardList
);
// 正确的身份证
Map
<
String
,
TCheckIdCard
>
trueMap
=
this
.
getTrueMapByList
(
idCardList
);
TCheckIdCard
nowIdCard
;
String
userId
=
"1"
;
try
{
if
(
Common
.
isNotNull
(
idCard
)
&&
Common
.
isNotNull
(
name
))
{
nowIdCard
=
returnMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
name
);
if
(
nowIdCard
!=
null
&&
Common
.
isNotNull
(
nowIdCard
.
getIsTrue
()))
{
if
(
CommonConstants
.
ONE_INT
==
nowIdCard
.
getIsTrue
())
{
return
R
.
ok
();
}
else
{
return
R
.
failed
(
nowIdCard
.
getReason
());
}
}
else
{
// 调用对的身份证信息
nowIdCard
=
trueMap
.
get
(
idCard
);
if
(
nowIdCard
!=
null
)
{
if
(
nowIdCard
.
getName
().
equals
(
name
))
{
return
R
.
ok
();
}
else
{
return
R
.
failed
(
"姓名错误!!"
);
}
}
else
{
// 校验姓名身份证规则
if
(!
regIdCard
(
idCard
))
{
return
R
.
failed
(
"身份证格式有误"
);
}
else
if
(
regEmpName
(
name
))
{
return
R
.
failed
(
"姓名含数字或空格,无法校验"
);
}
else
{
// 调用API校验
if
(
nowApiNum
<
canApiNum
)
{
TCheckIdCard
c
=
new
TCheckIdCard
();
c
.
setName
(
name
);
c
.
setIdCard
(
idCard
);
// 安全调用:
this
.
doSafetyApi
(
c
,
canCheck
,
userId
);
if
(
CommonConstants
.
ONE_INT
==
c
.
getIsTrue
())
{
return
R
.
ok
();
}
else
{
return
R
.
failed
(
c
.
getReason
());
}
}
else
{
return
R
.
failed
(
"调用创蓝的Api的条数已达上限:"
+
canApiNum
+
",请联系管理员处理!"
);
}
}
}
}
}
else
{
return
R
.
failed
(
"姓名身份证不可为空!"
);
}
}
catch
(
Exception
e
)
{
returnMap
.
clear
();
trueMap
.
clear
();
throw
new
RuntimeException
(
e
.
getMessage
()
==
null
?
"校验身份证失败!"
:
"校验身份证失败:"
+
e
.
getMessage
());
}
finally
{
returnMap
.
clear
();
trueMap
.
clear
();
}
}
@Override
public
R
<
List
<
TCheckIdCard
>>
checkSalaryIdCard
(
List
<
TCheckIdCard
>
checkList
)
{
TCanCheck
tCanCheck
=
canCheckService
.
getById
(
1
);
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckMobileServiceImpl.java
View file @
2b2dc0e8
...
...
@@ -18,15 +18,19 @@ package com.yifu.cloud.plus.v1.check.service.impl;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TCanCheck
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckMobile
;
import
com.yifu.cloud.plus.v1.check.entity.TPreEmpCheckNum
;
import
com.yifu.cloud.plus.v1.check.mapper.TCheckMobileMapper
;
import
com.yifu.cloud.plus.v1.check.service.TCanCheckService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckMobileService
;
import
com.yifu.cloud.plus.v1.check.service.TPreEmpCheckNumService
;
import
com.yifu.cloud.plus.v1.check.utils.ChecksUtil
;
import
com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -49,6 +53,7 @@ import java.util.stream.Collectors;
public
class
TCheckMobileServiceImpl
extends
ServiceImpl
<
TCheckMobileMapper
,
TCheckMobile
>
implements
TCheckMobileService
{
private
final
TCanCheckService
canCheckService
;
private
final
TPreEmpCheckNumService
tPreEmpCheckNumService
;
/**
* @Author fxj 待完善
...
...
@@ -199,6 +204,65 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
checkMobiles
(
tempList
,
vo
,
noMap
,
noCurlist
,
backMap
);
return
vo
;
}
@Override
public
R
<
String
>
checkPrePhone
(
String
phone
,
String
deptId
)
{
TCanCheck
tCanCheck
=
canCheckService
.
getById
(
1
);
boolean
canCheck
=
false
;
String
nowDay
=
DateUtil
.
getThisDay
();
if
(
tCanCheck
!=
null
&&
tCanCheck
.
getCanCheck
()
==
1
)
{
canCheck
=
true
;
TPreEmpCheckNum
nowDayNum
=
tPreEmpCheckNumService
.
getTPreEmpCheckNum
(
deptId
,
nowDay
);
if
(
nowDayNum
==
null
)
{
nowDayNum
=
new
TPreEmpCheckNum
();
nowDayNum
.
setCanApiNum
(
1000
);
nowDayNum
.
setApiNum
(
1
);
tPreEmpCheckNumService
.
save
(
nowDayNum
);
}
else
{
if
(
nowDayNum
.
getApiNum
()
>=
nowDayNum
.
getCanApiNum
())
{
return
R
.
failed
(
"该项目当日总条数:"
+
nowDayNum
.
getCanApiNum
()
+
"已到达上限!"
);
}
else
{
nowDayNum
.
setApiNum
(
nowDayNum
.
getApiNum
()
+
1
);
tPreEmpCheckNumService
.
updateById
(
nowDayNum
);
}
}
}
CheckBatchVo
vo
=
new
CheckBatchVo
();
Map
<
String
,
Boolean
>
noMap
=
new
HashMap
<>();
List
<
String
>
noList
=
new
ArrayList
<>();
noList
.
add
(
phone
);
List
<
TCheckMobile
>
checkMobileList
=
baseMapper
.
getListByNoList
(
noList
);
if
(
checkMobileList
!=
null
&&
!
checkMobileList
.
isEmpty
())
{
for
(
TCheckMobile
no
:
checkMobileList
)
{
noMap
.
put
(
no
.
getMobile
(),
CommonConstants
.
ONE_STRING
.
equals
(
no
.
getStatus
())
||
CommonConstants
.
FOUR_STRING
.
equals
(
no
.
getStatus
())
||
CommonConstants
.
FIVE_STRING
.
equals
(
no
.
getStatus
()));
}
}
List
<
String
>
tempList
=
new
ArrayList
<>();
// 因手机号码最多50个所以这里 要特殊处理下
tempList
.
add
(
phone
);
synchronized
(
this
)
{
R
<
Map
<
String
,
TCheckMobile
>>
mobileMapR
=
ChecksUtil
.
checkMobile
(
phone
,
canCheck
);
if
(
Common
.
isNotNull
(
mobileMapR
)
&&
Common
.
isNotNull
(
mobileMapR
.
getData
()))
{
Map
<
String
,
TCheckMobile
>
result
=
mobileMapR
.
getData
();
TCheckMobile
mo
=
result
.
get
(
phone
);
if
(
mo
!=
null
)
{
this
.
saveOrUpdate
(
mo
);
if
(
Common
.
isNotNull
(
mo
.
getStatus
())
&&
(
CommonConstants
.
ONE_STRING
.
equals
(
mo
.
getStatus
())
||
CommonConstants
.
FOUR_STRING
.
equals
(
mo
.
getStatus
())
||
CommonConstants
.
FIVE_STRING
.
equals
(
mo
.
getStatus
())))
{
return
R
.
ok
();
}
else
{
return
R
.
failed
(
Common
.
isNotNull
(
mo
.
getMessage
())
?
mo
.
getMessage
()
:
"校验错误!"
);
}
}
else
{
return
R
.
failed
(
"校验失败"
);
}
}
}
return
R
.
failed
(
"校验失败!"
);
}
private
void
checkMobiles
(
List
<
String
>
list
,
CheckBatchVo
vo
,
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TPreEmpCheckNumServiceImpl.java
0 → 100644
View file @
2b2dc0e8
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
check
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TPreEmpCheckNum
;
import
com.yifu.cloud.plus.v1.check.mapper.TPreEmpCheckNumMapper
;
import
com.yifu.cloud.plus.v1.check.service.TPreEmpCheckNumService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
/**
* C端预入职校验身份证与手机号限定调用表
*
* @author hgw
* @date 2024-06-27 14:33:06
*/
@Log4j2
@Service
public
class
TPreEmpCheckNumServiceImpl
extends
ServiceImpl
<
TPreEmpCheckNumMapper
,
TPreEmpCheckNum
>
implements
TPreEmpCheckNumService
{
/**
* C端预入职校验身份证与手机号限定调用表简单分页查询
*
* @return
*/
@Override
public
TPreEmpCheckNum
getTPreEmpCheckNum
(
String
deptId
,
String
createDay
)
{
return
baseMapper
.
getTPreEmpCheckNum
(
deptId
,
createDay
);
}
}
yifu-check/yifu-check-biz/src/main/resources/application.yml
View file @
2b2dc0e8
...
...
@@ -27,6 +27,22 @@ mybatis-plus:
configuration
:
map-underscore-to-camel-case
:
true
# spring security 配置
security
:
#client:
# client-id: pig
# client-secret: pig
# scope: server
oauth2
:
resource
:
loadBalanced
:
true
token-info-uri
:
http://yifu-auth/oauth/check_token
ignore
:
# 通用放行URL,服务个性化,请在对应配置文件覆盖
urls
:
-
/tcheckidcard/checkPreEmpIdCard
-
/tcheckmobile/checkPrePhone
spring
:
application
:
name
:
@
artifactId@
...
...
yifu-check/yifu-check-biz/src/main/resources/mapper/TPreEmpCheckNumMapper.xml
0 → 100644
View file @
2b2dc0e8
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.check.mapper.TPreEmpCheckNumMapper"
>
<resultMap
id=
"tPreEmpCheckNumMap"
type=
"com.yifu.cloud.plus.v1.check.entity.TPreEmpCheckNum"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"createDay"
column=
"CREATE_DAY"
/>
<result
property=
"deptId"
column=
"DEPT_ID"
/>
<result
property=
"apiNum"
column=
"API_NUM"
/>
<result
property=
"canApiNum"
column=
"CAN_API_NUM"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.CREATE_DAY,
a.DEPT_ID,
a.API_NUM,
a.CAN_API_NUM
</sql>
<!--tPreEmpCheckNum简单分页查询-->
<select
id=
"getTPreEmpCheckNum"
resultMap=
"tPreEmpCheckNumMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_pre_emp_check_num a
where a.DEPT_ID = #{deptId} and a.CREATE_DAY = #{createDay} limit 1
</select>
</mapper>
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