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
fac2f7ef
Commit
fac2f7ef
authored
Oct 24, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.0 优化
parent
01bc6528
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
470 additions
and
257 deletions
+470
-257
TArchivesExportLimit.java
...ud/plus/v1/yifu/archives/entity/TArchivesExportLimit.java
+71
-0
TArchivesExportLimitMapper.java
...s/v1/yifu/archives/mapper/TArchivesExportLimitMapper.java
+40
-0
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+13
-0
TPreEmpMainServiceImpl.java
...v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
+272
-233
TArchivesExportLimitMapper.xml
.../src/main/resources/mapper/TArchivesExportLimitMapper.xml
+74
-0
TPreEmpMainMapper.xml
...hives-biz/src/main/resources/mapper/TPreEmpMainMapper.xml
+0
-24
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TArchivesExportLimit.java
0 → 100644
View file @
fac2f7ef
/*
* 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
.
yifu
.
archives
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
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
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotBlank
;
/**
* 薪资导入、删除锁定表(锁定后不可导入删除,除非清理掉数据)
*
* @author hgw
* @date 2024-10-24 15:22:51
*/
@Data
@TableName
(
"t_archives_export_limit"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"档案导出限定表(限定后不可导出,除非清理掉数据或等10分钟)"
)
public
class
TArchivesExportLimit
extends
BaseEntity
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"id"
)
private
String
id
;
/**
* 删除标志:0未删除;1已删除(1代表已完成导出,释放了锁)
*/
@ExcelAttribute
(
name
=
"删除标志:0未删除;1已删除(1代表已完成导出,释放了锁)"
,
isNotEmpty
=
true
,
errorInfo
=
"删除标志:0未删除;1已删除(1代表已完成导入或删除,释放了锁)不能为空"
)
@NotBlank
(
message
=
"删除标志:0未删除;1已删除(1代表已完成导出,释放了锁)不能为空"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"删除标志:0未删除;1已删除(1代表已完成导出,释放了锁)"
)
private
Integer
deleteFlag
;
/**
* 类型:1预入职导出;2完整度监控导出
*/
@ExcelAttribute
(
name
=
"类型"
,
isNotEmpty
=
true
,
errorInfo
=
"类型:1预入职导出;2完整度监控导出不能为空"
)
@NotBlank
(
message
=
"类型:1预入职导出;2完整度监控导出不能为空"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"类型:1预入职导出;2完整度监控导出"
)
private
Integer
type
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TArchivesExportLimitMapper.java
0 → 100644
View file @
fac2f7ef
/*
* 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
.
yifu
.
archives
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TArchivesExportLimit
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 薪资导入、删除锁定表(锁定后不可导入删除,除非清理掉数据)
*
* @author hgw
* @date 2024-10-24 15:59:09
*/
@Mapper
public
interface
TArchivesExportLimitMapper
extends
BaseMapper
<
TArchivesExportLimit
>
{
/**
* 查询是否有锁
*/
List
<
TArchivesExportLimit
>
getLimitList
(
@Param
(
"tArchivesExportLimit"
)
TArchivesExportLimit
tArchivesExportLimit
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
fac2f7ef
...
@@ -3409,6 +3409,19 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
...
@@ -3409,6 +3409,19 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorMust
.
append
(
"有银行卡号则员工姓名必填;"
);
errorMust
.
append
(
"有银行卡号则员工姓名必填;"
);
}
}
}
}
// 联动必填校验:
if
(
Common
.
isNotNull
(
detail
.
getFileProvince
())
&&
Common
.
isEmpty
(
detail
.
getFileCity
()))
{
errorMust
.
append
(
"档案所在地-省、市联动必填;"
);
}
if
(
Common
.
isNotNull
(
detail
.
getContactProvince
())
&&
(
Common
.
isEmpty
(
detail
.
getContactCity
())
||
Common
.
isEmpty
(
detail
.
getContactTown
())))
{
errorMust
.
append
(
"通信地址-省、市、区/县联动必填;"
);
}
if
(
Common
.
isNotNull
(
detail
.
getRelationProvince
())
&&
(
Common
.
isEmpty
(
detail
.
getRelationCity
())
||
Common
.
isEmpty
(
detail
.
getRelationTown
())))
{
errorMust
.
append
(
"联系地址-省、市、区/县联动必填;"
);
}
if
(
Common
.
isNotNull
(
detail
.
getFileProvince
())
&&
Common
.
isEmpty
(
detail
.
getFileCity
()))
{
errorMust
.
append
(
"开户省、市联动必填;"
);
}
// 手机号码
// 手机号码
if
(
Common
.
isNotNull
(
detail
.
getEmpPhone
()))
{
if
(
Common
.
isNotNull
(
detail
.
getEmpPhone
()))
{
mobileList
.
add
(
detail
.
getEmpPhone
());
mobileList
.
add
(
detail
.
getEmpPhone
());
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
View file @
fac2f7ef
...
@@ -37,6 +37,7 @@ import com.yifu.cloud.plus.v1.check.entity.TCheckBankNo;
...
@@ -37,6 +37,7 @@ import com.yifu.cloud.plus.v1.check.entity.TCheckBankNo;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
;
import
com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TArchivesExportLimitMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpMainMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpMainMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.utils.ExcelStyle
;
import
com.yifu.cloud.plus.v1.yifu.archives.utils.ExcelStyle
;
...
@@ -151,6 +152,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -151,6 +152,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 导入批量校验身份证、卡号、手机号
// 导入批量校验身份证、卡号、手机号
private
final
DaprCheckProperties
checkProperties
;
private
final
DaprCheckProperties
checkProperties
;
private
final
TArchivesExportLimitMapper
tArchivesExportLimitMapper
;
private
final
OSSUtil
ossUtil
;
private
final
OSSUtil
ossUtil
;
private
static
final
String
ID
=
"id"
;
private
static
final
String
ID
=
"id"
;
...
@@ -1529,6 +1532,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -1529,6 +1532,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpEducation
tEmpEducation
=
null
;
TEmpEducation
tEmpEducation
=
null
;
if
(
Common
.
isNotNull
(
tPreEmpEducation
.
getOldId
()))
{
if
(
Common
.
isNotNull
(
tPreEmpEducation
.
getOldId
()))
{
tEmpEducation
=
tEmpEducationService
.
getById
(
tPreEmpEducation
.
getOldId
());
tEmpEducation
=
tEmpEducationService
.
getById
(
tPreEmpEducation
.
getOldId
());
}
else
{
// 测试金龙弟建议查询信息后更新,不新增额外的一条 2024-10-24 16:23:47 hgw修改
tEmpEducation
=
tEmpEducationService
.
getByEmpId
(
empId
);
}
}
if
(
tEmpEducation
==
null
)
{
if
(
tEmpEducation
==
null
)
{
tEmpEducation
=
new
TEmpEducation
();
tEmpEducation
=
new
TEmpEducation
();
...
@@ -1588,6 +1594,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -1588,6 +1594,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpBadRecord
tEmpBadRecord
=
null
;
TEmpBadRecord
tEmpBadRecord
=
null
;
if
(
Common
.
isNotNull
(
tPreEmpBadRecord
.
getOldId
()))
{
if
(
Common
.
isNotNull
(
tPreEmpBadRecord
.
getOldId
()))
{
tEmpBadRecord
=
tEmpBadRecordService
.
getById
(
tPreEmpBadRecord
.
getOldId
());
tEmpBadRecord
=
tEmpBadRecordService
.
getById
(
tPreEmpBadRecord
.
getOldId
());
}
else
{
// 测试金龙弟建议查询信息后更新,不新增额外的一条 2024-10-24 16:23:47 hgw修改
tEmpBadRecord
=
tEmpBadRecordService
.
getByEmpId
(
empId
);
}
}
if
(
tEmpBadRecord
==
null
)
{
if
(
tEmpBadRecord
==
null
)
{
tEmpBadRecord
=
new
TEmpBadRecord
();
tEmpBadRecord
=
new
TEmpBadRecord
();
...
@@ -1608,6 +1617,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -1608,6 +1617,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpContactInfo
tEmpContactInfo
=
null
;
TEmpContactInfo
tEmpContactInfo
=
null
;
if
(
Common
.
isNotNull
(
tPreEmpContactInfo
.
getOldId
()))
{
if
(
Common
.
isNotNull
(
tPreEmpContactInfo
.
getOldId
()))
{
tEmpContactInfo
=
tEmpContactInfoService
.
getById
(
tPreEmpContactInfo
.
getOldId
());
tEmpContactInfo
=
tEmpContactInfoService
.
getById
(
tPreEmpContactInfo
.
getOldId
());
}
else
{
// 测试金龙弟建议查询信息后更新,不新增额外的一条 2024-10-24 16:23:47 hgw修改
tEmpContactInfo
=
tEmpContactInfoService
.
getByEmpId
(
empId
);
}
}
if
(
tEmpContactInfo
==
null
)
{
if
(
tEmpContactInfo
==
null
)
{
tEmpContactInfo
=
new
TEmpContactInfo
();
tEmpContactInfo
=
new
TEmpContactInfo
();
...
@@ -1631,6 +1643,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -1631,6 +1643,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
TEmpDisabilityInfo
tEmpDisabilityInfo
=
null
;
TEmpDisabilityInfo
tEmpDisabilityInfo
=
null
;
if
(
Common
.
isNotNull
(
tPreEmpDisabilityInfo
.
getOldId
()))
{
if
(
Common
.
isNotNull
(
tPreEmpDisabilityInfo
.
getOldId
()))
{
tEmpDisabilityInfo
=
tEmpDisabilityInfoService
.
getById
(
tPreEmpDisabilityInfo
.
getOldId
());
tEmpDisabilityInfo
=
tEmpDisabilityInfoService
.
getById
(
tPreEmpDisabilityInfo
.
getOldId
());
}
else
{
// 测试金龙弟建议查询信息后更新,不新增额外的一条 2024-10-24 16:23:47 hgw修改
tEmpDisabilityInfo
=
tEmpDisabilityInfoService
.
getByEmpId
(
empId
);
}
}
if
(
tEmpDisabilityInfo
==
null
)
{
if
(
tEmpDisabilityInfo
==
null
)
{
tEmpDisabilityInfo
=
new
TEmpDisabilityInfo
();
tEmpDisabilityInfo
=
new
TEmpDisabilityInfo
();
...
@@ -2376,254 +2391,278 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -2376,254 +2391,278 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
*/
*/
@Override
@Override
public
void
exportAll
(
HttpServletResponse
response
,
TPreEmpMainSearchVo
searchVo
)
{
public
void
exportAll
(
HttpServletResponse
response
,
TPreEmpMainSearchVo
searchVo
)
{
String
name
=
"预入职导出全量"
;
String
fileName
=
name
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
YifuUser
user
=
SecurityUtils
.
getUser
();
//获取要导出的列表
if
(
user
!=
null
)
{
List
<
TPreMainExportAllVO
>
list
=
Lists
.
newArrayList
();
TArchivesExportLimit
exportLimit
=
new
TArchivesExportLimit
();
long
count
=
baseMapper
.
getTPreEmpMainAllCount
(
searchVo
);
exportLimit
.
setCreateBy
(
user
.
getId
());
ServletOutputStream
out
=
null
;
exportLimit
.
setType
(
CommonConstants
.
ONE_INT
);
try
{
List
<
TArchivesExportLimit
>
limitList
=
tArchivesExportLimitMapper
.
getLimitList
(
exportLimit
);
out
=
response
.
getOutputStream
();
String
name
=
"预入职导出全量"
;
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
String
fileName
=
name
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
response
.
setCharacterEncoding
(
"utf-8"
);
//获取要导出的列表
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
List
<
TPreMainExportAllVO
>
list
=
Lists
.
newArrayList
();
ExcelWriter
excelWriter
=
null
;
long
count
=
baseMapper
.
getTPreEmpMainAllCount
(
searchVo
);
if
(
count
>
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
ServletOutputStream
out
=
null
;
List
<
List
<
String
>>
strList
=
new
ArrayList
<>();
try
{
strList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"数据超过6万条,请联系管理员后端导出!!"
}));
out
=
response
.
getOutputStream
();
List
<
List
<
String
>>
headList
=
Lists
.
newArrayList
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"提示"
}));
response
.
setCharacterEncoding
(
"utf-8"
);
EasyExcelFactory
.
write
(
out
).
head
(
headList
).
sheet
(
"数据超限"
).
doWrite
(
strList
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
}
else
{
ExcelWriter
excelWriter
=
null
;
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
if
(
count
>
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
List
<
List
<
String
>>
headList
=
Lists
.
newArrayList
();
List
<
List
<
String
>>
strList
=
new
ArrayList
<>();
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"提交时间"
,
"提交时间"
}));
strList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"数据超过6万条,请联系管理员后端导出!!"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"状态"
,
"状态"
}));
List
<
List
<
String
>>
headList
=
Lists
.
newArrayList
();
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"审核人"
,
"审核人"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"提示"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"审核时间"
,
"审核时间"
}));
EasyExcelFactory
.
write
(
out
).
head
(
headList
).
sheet
(
"数据超限"
).
doWrite
(
strList
);
String
oneTitle
=
"员工基本信息"
;
}
else
if
(
limitList
!=
null
&&
limitList
.
size
()
>
2
)
{
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"员工主码"
}));
List
<
List
<
String
>>
strList
=
new
ArrayList
<>();
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"员工类型"
}));
strList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"多人正在导出,请耐心等待10分钟后再导出!"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"员工姓名"
}));
List
<
List
<
String
>>
headList
=
Lists
.
newArrayList
();
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证号"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"提示"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"性别"
}));
EasyExcelFactory
.
write
(
out
).
head
(
headList
).
sheet
(
"多人正在导出"
).
doWrite
(
strList
);
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证期限"
}));
}
else
{
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证开始日期"
}));
exportLimit
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"身份证截止日期"
}));
exportLimit
.
setCreateName
(
user
.
getNickname
());
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"出生日期"
}));
exportLimit
.
setCreateTime
(
LocalDateTime
.
now
());
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"年龄"
}));
tArchivesExportLimitMapper
.
insert
(
exportLimit
);
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"婚姻状况"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"民族"
}));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"政治面貌"
}));
List
<
List
<
String
>>
headList
=
Lists
.
newArrayList
();
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"手机号码"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"提交时间"
,
"提交时间"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"邮箱"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"状态"
,
"状态"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"户籍所在地-省"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"审核人"
,
"审核人"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"户籍所在地-市"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
"审核时间"
,
"审核时间"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"户籍所在地-区/县"
}));
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
,
"标签"
}));
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
,
"通信地址-省"
}));
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
,
"结束工作日期"
}));
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
,
"联系电话"
}));
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
,
"是否有传染性疾病"
}));
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
=
"不良记录"
;
oneTitle
=
"主要家庭成员信息"
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"不良记录描述"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"成员姓名"
}));
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"与本人关系"
}));
excelWriter
=
EasyExcelFactory
.
write
(
out
).
registerWriteHandler
(
ExcelStyle
.
getNormalStype
()).
head
(
headList
).
build
();
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"手机号码"
}));
int
index
=
1
;
oneTitle
=
"职业资格信息"
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否有职业资格证书"
}));
ExcelUtil
<
TPreMainExportAllVO
>
util
=
new
ExcelUtil
<>(
TPreMainExportAllVO
.
class
);
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"申报年度"
}));
//int limitNum = CommonConstants.EXCEL_EXPORT_LIMIT
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"职业资格名称"
}));
int
limitNum
=
1000
;
oneTitle
=
"伤残信息"
;
ExcelWriterSheetBuilder
writeSheet
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否曾被认定为工伤"
}));
List
<
TPreMainExportAllVO
>
listWork
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否有职业病"
}));
Map
<
String
,
TPreMainExportAllVO
>
mapWork
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"职业病名称"
}));
List
<
TPreMainExportAllVO
>
listFamily
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否有传染性疾病"
}));
Map
<
String
,
TPreMainExportAllVO
>
mapFamily
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"传染病名称"
}));
List
<
TPreMainExportAllVO
>
listProfessional
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否持有残疾人证明"
}));
Map
<
String
,
TPreMainExportAllVO
>
mapProfessional
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"伤残病名称"
}));
TPreMainExportAllVO
temp
;
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"伤残等级"
}));
Set
<
String
>
titleContent
=
getExportFieldNameDetailByClass
(
TPreMainExportAllVO
.
class
);
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种"
}));
for
(
int
i
=
0
;
i
<=
count
;
i
+=
limitNum
)
{
oneTitle
=
"不良记录"
;
// 获取实际记录
headList
.
add
(
this
.
getNewArrayList
(
new
String
[]{
oneTitle
,
"不良记录描述"
}));
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
limitNum
);
excelWriter
=
EasyExcelFactory
.
write
(
out
).
registerWriteHandler
(
ExcelStyle
.
getNormalStype
()).
head
(
headList
).
build
();
list
=
baseMapper
.
getTPreEmpMainAllList
(
searchVo
);
int
index
=
1
;
listWork
=
baseMapper
.
getTPreEmpMainAllListByWork
(
searchVo
);
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
listFamily
=
baseMapper
.
getTPreEmpMainAllListByFamily
(
searchVo
);
ExcelUtil
<
TPreMainExportAllVO
>
util
=
new
ExcelUtil
<>(
TPreMainExportAllVO
.
class
);
listProfessional
=
baseMapper
.
getTPreEmpMainAllListByProfessional
(
searchVo
);
//int limitNum = CommonConstants.EXCEL_EXPORT_LIMIT
mapWork
=
new
HashMap
<>();
int
limitNum
=
10000
;
mapFamily
=
new
HashMap
<>();
ExcelWriterSheetBuilder
writeSheet
;
mapProfessional
=
new
HashMap
<>();
List
<
TPreMainExportAllVO
>
listWork
;
if
(
listWork
!=
null
&&
!
listWork
.
isEmpty
())
{
Map
<
String
,
TPreMainExportAllVO
>
mapWork
;
for
(
TPreMainExportAllVO
vo
:
listWork
){
List
<
TPreMainExportAllVO
>
listFamily
;
mapWork
.
putIfAbsent
(
vo
.
getMainId
(),
vo
);
Map
<
String
,
TPreMainExportAllVO
>
mapFamily
;
}
List
<
TPreMainExportAllVO
>
listProfessional
;
}
Map
<
String
,
TPreMainExportAllVO
>
mapProfessional
;
if
(
listFamily
!=
null
&&
!
listFamily
.
isEmpty
())
{
TPreMainExportAllVO
temp
;
for
(
TPreMainExportAllVO
vo
:
listFamily
){
Set
<
String
>
titleContent
=
getExportFieldNameDetailByClass
(
TPreMainExportAllVO
.
class
);
mapFamily
.
putIfAbsent
(
vo
.
getMainId
(),
vo
);
for
(
int
i
=
0
;
i
<=
count
;
i
+=
limitNum
)
{
}
// 获取实际记录
}
searchVo
.
setLimitStart
(
i
);
if
(
listProfessional
!=
null
&&
!
listProfessional
.
isEmpty
())
{
searchVo
.
setLimitEnd
(
limitNum
);
for
(
TPreMainExportAllVO
vo
:
listProfessional
){
list
=
baseMapper
.
getTPreEmpMainAllList
(
searchVo
);
mapProfessional
.
putIfAbsent
(
vo
.
getMainId
(),
vo
);
listWork
=
baseMapper
.
getTPreEmpMainAllListByWork
(
searchVo
);
listFamily
=
baseMapper
.
getTPreEmpMainAllListByFamily
(
searchVo
);
listProfessional
=
baseMapper
.
getTPreEmpMainAllListByProfessional
(
searchVo
);
mapWork
=
new
HashMap
<>();
mapFamily
=
new
HashMap
<>();
mapProfessional
=
new
HashMap
<>();
if
(
listWork
!=
null
&&
!
listWork
.
isEmpty
())
{
for
(
TPreMainExportAllVO
vo
:
listWork
)
{
mapWork
.
putIfAbsent
(
vo
.
getMainId
(),
vo
);
}
}
}
}
if
(
listFamily
!=
null
&&
!
listFamily
.
isEmpty
())
{
if
(
Common
.
isNotNull
(
list
)){
for
(
TPreMainExportAllVO
vo
:
listFamily
)
{
for
(
TPreMainExportAllVO
vo
:
list
){
mapFamily
.
putIfAbsent
(
vo
.
getMainId
(),
vo
);
temp
=
mapWork
.
get
(
vo
.
getMainId
());
if
(
temp
!=
null
)
{
vo
.
setField44
(
temp
.
getField44
());
vo
.
setField45
(
temp
.
getField45
());
vo
.
setField46
(
temp
.
getField46
());
vo
.
setField47
(
temp
.
getField47
());
}
}
temp
=
mapFamily
.
get
(
vo
.
getMainId
());
}
if
(
temp
!=
null
)
{
if
(
listProfessional
!=
null
&&
!
listProfessional
.
isEmpty
())
{
vo
.
setField48
(
temp
.
getField48
());
for
(
TPreMainExportAllVO
vo
:
listProfessional
)
{
vo
.
setField49
(
temp
.
getField49
());
mapProfessional
.
putIfAbsent
(
vo
.
getMainId
(),
vo
);
vo
.
setField50
(
temp
.
getField50
());
}
}
temp
=
mapProfessional
.
get
(
vo
.
getMainId
());
}
if
(
temp
!=
null
)
{
if
(
Common
.
isNotNull
(
list
))
{
vo
.
setField52
(
temp
.
getField52
());
for
(
TPreMainExportAllVO
vo
:
list
)
{
vo
.
setField53
(
temp
.
getField53
());
temp
=
mapWork
.
get
(
vo
.
getMainId
());
if
(
temp
!=
null
)
{
vo
.
setField44
(
temp
.
getField44
());
vo
.
setField45
(
temp
.
getField45
());
vo
.
setField46
(
temp
.
getField46
());
vo
.
setField47
(
temp
.
getField47
());
}
temp
=
mapFamily
.
get
(
vo
.
getMainId
());
if
(
temp
!=
null
)
{
vo
.
setField48
(
temp
.
getField48
());
vo
.
setField49
(
temp
.
getField49
());
vo
.
setField50
(
temp
.
getField50
());
}
temp
=
mapProfessional
.
get
(
vo
.
getMainId
());
if
(
temp
!=
null
)
{
vo
.
setField52
(
temp
.
getField52
());
vo
.
setField53
(
temp
.
getField53
());
}
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
writeSheet
=
EasyExcelFactory
.
writerSheet
(
name
+
index
).
includeColumnFieldNames
(
titleContent
);
excelWriter
.
write
(
list
,
writeSheet
.
build
());
index
++;
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
writeSheet
=
EasyExcelFactory
.
writerSheet
(
name
+
index
).
includeColumnFieldNames
(
titleContent
);
excelWriter
.
write
(
list
,
writeSheet
.
build
());
index
++;
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
// 1工作经历
// 1工作经历
index
=
1
;
index
=
1
;
count
=
baseMapper
.
getTEmpMainAllCountOneWork
(
searchVo
);
count
=
baseMapper
.
getTEmpMainAllCountOneWork
(
searchVo
);
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
// 获取实际记录
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTEmpMainAllListOneWork
(
searchVo
);
list
=
baseMapper
.
getTEmpMainAllListOneWork
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
writeSheet
=
EasyExcelFactory
.
writerSheet
(
"工作经历"
+
index
).
includeColumnFieldNames
(
titleContent
);
writeSheet
=
EasyExcelFactory
.
writerSheet
(
"工作经历"
+
index
).
includeColumnFieldNames
(
titleContent
);
excelWriter
.
write
(
list
,
writeSheet
.
build
());
excelWriter
.
write
(
list
,
writeSheet
.
build
());
index
++;
index
++;
}
}
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
list
.
clear
();
}
}
}
}
// 2家庭成员
// 2家庭成员
index
=
1
;
index
=
1
;
count
=
baseMapper
.
getTEmpMainAllCountTwoFamily
(
searchVo
);
count
=
baseMapper
.
getTEmpMainAllCountTwoFamily
(
searchVo
);
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
// 获取实际记录
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTEmpMainAllListTwoFamily
(
searchVo
);
list
=
baseMapper
.
getTEmpMainAllListTwoFamily
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
writeSheet
=
EasyExcelFactory
.
writerSheet
(
"家庭成员"
+
index
).
includeColumnFieldNames
(
titleContent
);
writeSheet
=
EasyExcelFactory
.
writerSheet
(
"家庭成员"
+
index
).
includeColumnFieldNames
(
titleContent
);
excelWriter
.
write
(
list
,
writeSheet
.
build
());
excelWriter
.
write
(
list
,
writeSheet
.
build
());
index
++;
index
++;
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
if
(
Common
.
isNotNull
(
list
))
{
// 3职业资格
list
.
clear
();
index
=
1
;
count
=
baseMapper
.
getTEmpMainAllCountThreeProfessional
(
searchVo
);
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTEmpMainAllListThreeProfessional
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
writeSheet
=
EasyExcelFactory
.
writerSheet
(
"职业资格"
+
index
).
includeColumnFieldNames
(
titleContent
);
excelWriter
.
write
(
list
,
writeSheet
.
build
());
index
++;
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
name
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
}
// 3职业资格
if
(
Common
.
isNotNull
(
list
))
{
index
=
1
;
list
.
clear
();
count
=
baseMapper
.
getTEmpMainAllCountThreeProfessional
(
searchVo
);
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTEmpMainAllListThreeProfessional
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
writeSheet
=
EasyExcelFactory
.
writerSheet
(
"职业资格"
+
index
).
includeColumnFieldNames
(
titleContent
);
excelWriter
.
write
(
list
,
writeSheet
.
build
());
index
++;
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
name
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
out
.
flush
();
list
.
clear
();
if
(
excelWriter
!=
null
)
{
excelWriter
.
finish
();
}
}
}
}
catch
(
Exception
e
)
{
out
.
flush
();
if
(
excelWriter
!=
null
)
{
excelWriter
.
finish
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
// 结束后将状态更新为已导出
exportLimit
.
setDeleteFlag
(
CommonConstants
.
ONE_INT
);
exportLimit
.
setUpdateBy
(
user
.
getNickname
());
exportLimit
.
setUpdateTime
(
LocalDateTime
.
now
());
tArchivesExportLimitMapper
.
updateById
(
exportLimit
);
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
}
}
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TArchivesExportLimitMapper.xml
0 → 100644
View file @
fac2f7ef
<?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.yifu.archives.mapper.TArchivesExportLimitMapper"
>
<resultMap
id=
"tArchivesExportLimitMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TArchivesExportLimit"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"deleteFlag"
column=
"delete_flag"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a
.
id
,
a.type,
a.delete_flag,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql
id=
"tArchivesExportLimit_where"
>
<if
test=
"tArchivesExportLimit != null"
>
<if
test=
"tArchivesExportLimit.id != null and tArchivesExportLimit.id.trim() != ''"
>
AND a.id = #{tArchivesExportLimit.id}
</if>
<if
test=
"tArchivesExportLimit.createBy != null and tArchivesExportLimit.createBy.trim() != ''"
>
AND a.CREATE_BY = #{tArchivesExportLimit.createBy}
</if>
<if
test=
"tArchivesExportLimit.type != null"
>
AND a.type = #{tArchivesExportLimit.type}
</if>
</if>
</sql>
<!--tArchivesExportLimit查询-->
<select
id=
"getLimitList"
resultMap=
"tArchivesExportLimitMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_archives_export_limit a
<where>
a.DELETE_FLAG = 0 and a.create_time > DATE_SUB(NOW(),INTERVAL 10 MINUTE)
<include
refid=
"tArchivesExportLimit_where"
/>
</where>
</select>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TPreEmpMainMapper.xml
View file @
fac2f7ef
...
@@ -255,30 +255,6 @@
...
@@ -255,30 +255,6 @@
SELECT
SELECT
count(1)
count(1)
FROM t_pre_emp_main a
FROM t_pre_emp_main a
/*left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join view_sys_dict_item emp_natrue on emp_natrue.value=a.emp_Natrue and emp_natrue.type='emp_natrue'
left join view_sys_dict_item emp_married on emp_married.value=e.EMP_MARRI_STATUS and emp_married.type='emp_married'
left join view_sys_dict_item nation on nation.value=e.EMP_NATIONAL and nation.type='emp_national'
left join view_sys_dict_item registype on registype.value=e.EMP_REGIS_TYPE and registype.type='emp_registype'
left join view_sys_dict_item politicalStatus on politicalStatus.value=e.POLITICAL_STATUS and politicalStatus.type='emp_political'
left join sys_area pi on pi.id=e.ID_PROVINCE
left join sys_area ci on ci.id=e.ID_CITY
left join sys_area ti on ti.id=e.ID_TOWN
left join sys_area pf on pf.id=e.FILE_PROVINCE
left join sys_area cf on cf.id=e.FILE_CITY
left join sys_area tf on tf.id=e.FILE_TOWN
left join t_pre_employee_project p on a.id=p.PRE_MAIN_ID
left join view_sys_dict_item contractType on contractType.value=p.CONTRACT_TYPE and contractType.type='employee_contract_type'
left join view_sys_dict_item workingHours on workingHours.value=p.WORKING_HOURS and workingHours.type='working_hours'
left join t_pre_emp_contact_info ec on a.id=ec.PRE_MAIN_ID
left join t_pre_emp_education ee on a.id=ee.PRE_MAIN_ID
left join view_sys_dict_item education on education.value=ee.EDUCATION_NAME and education.type='education'
left join t_pre_emp_work_recording ew on a.id=ew.PRE_MAIN_ID
left join t_pre_emp_family ef on a.id=ef.PRE_MAIN_ID
left join t_pre_emp_professional_qualification ep on a.id=ep.PRE_MAIN_ID
left join view_sys_dict_item qualification_type on qualification_type.value=ep.QUALIFICATION_TYPE and qualification_type.type='qualification_type'
left join t_pre_emp_disability_info ed on a.id=ed.PRE_MAIN_ID
left join t_pre_emp_bad_record eb on a.id=eb.PRE_MAIN_ID*/
<where>
<where>
a.STATUS != '5'
a.STATUS != '5'
<include
refid=
"tPreEmpMain_where"
/>
<include
refid=
"tPreEmpMain_where"
/>
...
...
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