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
d9b55752
Commit
d9b55752
authored
Dec 09, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目档案导出
parent
9488f4ef
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
49 deletions
+39
-49
EmployeeProjectExportVO.java
...oud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java
+9
-8
TEmployeeProjectMapper.java
.../plus/v1/yifu/archives/mapper/TEmployeeProjectMapper.java
+0
-6
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+8
-9
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+20
-26
ExcelAttributeConstants.java
...v1/yifu/common/core/constant/ExcelAttributeConstants.java
+2
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java
View file @
d9b55752
...
...
@@ -127,7 +127,7 @@ public class EmployeeProjectExportVO {
/**
* 身份证-省
*/
@ExcelAttribute
(
name
=
"户籍所在省"
,
isArea
=
true
)
@ExcelAttribute
(
name
=
"户籍所在省"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"户籍所在省"
)
private
String
idProvince
;
...
...
@@ -137,7 +137,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"户籍所在市"
)
@ExcelAttribute
(
name
=
"户籍所在市"
,
isArea
=
true
,
parentField
=
"idProvince"
)
@ExcelAttribute
(
name
=
"户籍所在市"
)
private
String
idCity
;
/**
...
...
@@ -145,7 +145,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"户籍所在县"
)
@ExcelAttribute
(
name
=
"户籍所在县"
,
isArea
=
true
,
parentField
=
"idCity"
)
@ExcelAttribute
(
name
=
"户籍所在县"
)
private
String
idTown
;
/**
...
...
@@ -161,7 +161,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"档案所在省"
)
@ExcelAttribute
(
name
=
"档案所在省"
,
isArea
=
true
)
@ExcelAttribute
(
name
=
"档案所在省"
)
private
String
fileProvince
;
/**
...
...
@@ -169,7 +169,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"档案所在市"
)
@ExcelAttribute
(
name
=
"档案所在市"
,
isArea
=
true
,
parentField
=
"fileProvince"
)
@ExcelAttribute
(
name
=
"档案所在市"
)
private
String
fileCity
;
/**
...
...
@@ -177,7 +177,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"档案所在县"
)
@ExcelAttribute
(
name
=
"档案所在县"
,
isArea
=
true
,
parentField
=
"fileCity"
)
@ExcelAttribute
(
name
=
"档案所在县"
)
private
String
fileTown
;
/**
...
...
@@ -243,10 +243,11 @@ public class EmployeeProjectExportVO {
/**
* 人员档案状态(0草稿、1已审核)
* , readConverterExp = "0=草稿,1=已审核"
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"人员档案状态"
)
@ExcelAttribute
(
name
=
"人员档案状态"
,
readConverterExp
=
"0=草稿,1=已审核"
)
@ExcelAttribute
(
name
=
"人员档案状态"
)
private
String
proStatus
;
/**
...
...
@@ -429,7 +430,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"近3个月发薪"
)
@ExcelAttribute
(
name
=
"近3个月发薪"
,
readConverterExp
=
"0=无,1=是,2=否"
)
@ExcelAttribute
(
name
=
"近3个月发薪"
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
FILE_SALARY_STATUS
)
private
String
salaryStatus
;
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeProjectMapper.java
View file @
d9b55752
...
...
@@ -56,12 +56,6 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
IPage
<
TEmployeeProject
>
getTEmployeeProjectInfoPage
(
Page
page
,
@Param
(
"tEmployeeProject"
)
TEmployeeProject
tEmployeeProject
);
/**
* 获得导出的项目档案列表
* @param tEmployeeProject
* @return
*/
List
<
EmployeeProjectExportVO
>
getTEmployeeProjectExportPage
(
@Param
(
"tEmployeeProject"
)
EmployeeProjectExportParamVO
tEmployeeProject
);
// getTEmployeeProjectExportPage 改造
List
<
EmployeeProjectExportVO
>
noPageDiy
(
@Param
(
"tEmployeeProject"
)
EmployeeProjectExportParamVO
searchVo
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
d9b55752
...
...
@@ -1083,24 +1083,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
ExcelUtil
<
EmployeeProjectExportVO
>
util
=
new
ExcelUtil
<>(
EmployeeProjectExportVO
.
class
);
// 获取所有字典type
Map
<
String
,
String
>
nameAndDicTypeMap
=
util
.
getConverterDicType
();
// 获取所有字典对应的值
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
EmployeeProjectExportVO
.
class
).
includeColumnFieldNames
(
includeColumnFiledNames
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
EmployeeProjectExportVO
.
class
)
.
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
))
.
includeColumnFieldNames
(
includeColumnFiledNames
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
Field
[]
allFields
=
EmployeeProjectExportVO
.
class
.
getDeclaredFields
();
WriteSheet
writeSheet
;
ExcelUtil
<
EmployeeProjectExportVO
>
util
;
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
util
=
new
ExcelUtil
<>(
EmployeeProjectExportVO
.
class
);
for
(
EmployeeProjectExportVO
vo:
list
){
util
.
convertEntityAsso
(
vo
,
null
,
null
,
null
,
allFields
);
}
}
if
(
Common
.
isNotNull
(
list
)){
writeSheet
=
EasyExcel
.
writerSheet
(
"项目档案批量导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
d9b55752
...
...
@@ -194,28 +194,28 @@
a.TRY_PERIOD,
a.PROJECT_SOURCE,
a.CONTRACT_STATUS,
b.STATUS
AS PROSTATUS,
if(b.STATUS=0,'草稿','已审核')
AS PROSTATUS,
b.CREATE_NAME AS PROCREATE_NAME,
b.CREATE_TIME AS PROCREATE_TIME,
b.EMP_PHONE,
a.INSURANCE_STATUS,
a.SOCIAL_STATUS,
a.FUND_STATUS,
b.
FILE_PROVINCE,
b.
FILE_CITY,
b.
FILE_TOWN,
a
.
SOCIAL_PROVINCE,
a
.
SOCIAL_CITY,
a
.
SOCIAL_TOWN,
a4.AREA_NAME
FILE_PROVINCE,
a5.AREA_NAME
FILE_CITY,
a6.AREA_NAME
FILE_TOWN,
a
7.AREA_NAME
SOCIAL_PROVINCE,
a
8.AREA_NAME
SOCIAL_CITY,
a
9.AREA_NAME
SOCIAL_TOWN,
a.SALARY_STATUS,
b.VALIDITY_START,
b.VALIDITY_END,
b.EMP_MARRI_STATUS,
b.EMP_NATIONAL,
b.POLITICAL_STATUS,
b.
ID_PROVINCE,
b.
ID_CITY,
b.
ID_TOWN,
a1.AREA_NAME
ID_PROVINCE,
a2.AREA_NAME
ID_CITY,
a3.AREA_NAME
ID_TOWN,
b.EMP_REGIS_TYPE,
b.IS_COLLEGE,
b.HIGN_EDUCATION,
...
...
@@ -224,7 +224,7 @@
b.ADMISSION_DATE,
b.GRADUTION_DATE,
b.REMARK,
a.
STATUS,
if(a.STATUS=0,'草稿','已审核')
STATUS,
a.CREATE_NAME,
a.CREATE_TIME,
b.EMP_EMAIL,
...
...
@@ -799,21 +799,6 @@
</where>
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo导出查询-->
<select
id=
"getTEmployeeProjectExportPage"
resultMap=
"tEmployeeProjectExportMap"
>
SELECT
<include
refid=
"Base_Export_List"
/>
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
<where>
a.DELETE_FLAG = '0'
<include
refid=
"exportTEmployeeProject_where"
/>
<if
test=
"tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''"
>
${tEmployeeProject.authSql}
</if>
</where>
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo导出查询改造 fxj 2022-11-03-->
<select
id=
"noPageDiy"
resultMap=
"tEmployeeProjectExportMap"
>
...
...
@@ -821,6 +806,15 @@
<include
refid=
"Base_Export_List"
/>
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
LEFT JOIN sys_area a1 on a1.id=b.ID_PROVINCE
LEFT JOIN sys_area a2 on a2.id=b.ID_CITY
LEFT JOIN sys_area a3 on a3.id=b.ID_TOWN
LEFT JOIN sys_area a4 on a4.id=b.FILE_PROVINCE
LEFT JOIN sys_area a5 on a5.id=b.FILE_CITY
LEFT JOIN sys_area a6 on a6.id=b.FILE_TOWN
LEFT JOIN sys_area a7 on a7.id=a.SOCIAL_PROVINCE
LEFT JOIN sys_area a8 on a8.id=a.SOCIAL_CITY
LEFT JOIN sys_area a9 on a9.id=a.SOCIAL_TOWN
<where>
a.DELETE_FLAG = '0'
<include
refid=
"exportTEmployeeProject_where"
/>
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/ExcelAttributeConstants.java
View file @
d9b55752
...
...
@@ -28,6 +28,8 @@ public class ExcelAttributeConstants {
public
static
final
String
SOCIAL_ECURITY_STATE
=
"social_ecurity_state"
;
// 公积金状态
public
static
final
String
FUND_STATUS
=
"fund_status"
;
// 档案近3个月发薪状态
public
static
final
String
FILE_SALARY_STATUS
=
"file_salary_status"
;
// 减档原因
public
static
final
String
DOWNSHIFT_REASON
=
"downshift_reason"
;
...
...
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