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
9b1b3181
Commit
9b1b3181
authored
Jul 05, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员花名册
parent
95e01019
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
22 deletions
+70
-22
TPersonnelRosterExportVo.java
...ud/plus/v1/yifu/archives/vo/TPersonnelRosterExportVo.java
+2
-4
TPersonnelRosterServiceImpl.java
...fu/archives/service/impl/TPersonnelRosterServiceImpl.java
+13
-15
TPersonnelRosterMapper.xml
...-biz/src/main/resources/mapper/TPersonnelRosterMapper.xml
+55
-3
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TPersonnelRosterExportVo.java
View file @
9b1b3181
...
...
@@ -153,7 +153,7 @@ public class TPersonnelRosterExportVo{
/**
* 性别
*/
@ExcelAttribute
(
name
=
"性别"
,
maxLength
=
10
,
isDataId
=
true
,
readConverterExp
=
"1=男,2=女"
)
@ExcelAttribute
(
name
=
"性别"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"性别不能超过10个字符"
)
@ExcelProperty
(
"性别"
)
@Schema
(
description
=
"性别"
)
...
...
@@ -162,13 +162,11 @@ public class TPersonnelRosterExportVo{
/**
* 出生日期
*/
@DateTimeFormat
(
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@ExcelAttribute
(
name
=
"出生日期"
,
isDate
=
true
)
@ExcelProperty
(
"出生日期"
)
@Schema
(
description
=
"出生日期"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
private
Date
empBirthDate
;
private
String
empBirthDate
;
/**
* 年龄
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPersonnelRosterServiceImpl.java
View file @
9b1b3181
...
...
@@ -28,12 +28,10 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPersonnelRosterMapper;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TPersonnelRosterService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TPersonnelRosterExportVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TPersonnelRosterSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
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.ExcelUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
...
...
@@ -97,22 +95,22 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TPersonnelRosterExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
ExcelUtil
<
TPersonnelRosterExportVo
>
util
;
WriteSheet
writeSheet
;
WriteSheet
writeSheet
;
HashMap
<
String
,
String
>
userMap
=
new
HashMap
<>();
ExcelUtil
<
TPersonnelRosterExportVo
>
util
=
new
ExcelUtil
<>(
TPersonnelRosterExportVo
.
class
);
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
redisLabelMap
.
putAll
(
userMap
);
Map
<
String
,
String
>
nameAndDicTypeMap
=
util
.
getConverterDicType
();
// 获取所有字典type
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TPersonnelRosterExportVo
.
class
)
.
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
)).
build
();
if
(
count
>
CommonConstants
.
ZERO_INT
){
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
util
=
new
ExcelUtil
<>(
TPersonnelRosterExportVo
.
class
);
for
(
TPersonnelRosterExportVo
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
writeSheet
=
EasyExcel
.
writerSheet
(
""
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
...
...
@@ -124,7 +122,7 @@ public class TPersonnelRosterServiceImpl extends ServiceImpl<TPersonnelRosterMap
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
""
+
index
).
build
();
writeSheet
=
EasyExcel
.
writerSheet
(
""
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
)){
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TPersonnelRosterMapper.xml
View file @
9b1b3181
...
...
@@ -371,9 +371,61 @@
<!--tEmployeeInfo人员档案导出查询改造 fxj 2022-11-02-->
<select
id=
"noPageDiy"
resultMap=
"tPersonnelRosterExportMap"
>
select
<include
refid=
"Base_Column_List"
/>
from t_personnel_roster a
SELECT
a.ID,
a.CUSTOMER_NAME,
a.DEPART_NAME,
a.DEPART_NO,
a.BUSINESS_PRIMARY,
a.BUSINESS_SECOND,
a.BUSINESS_THIRD,
a.LABEL,
a.BUSINESS_TYPE,
a.BU_BELONG,
a.EMP_TYPE,
a.EMP_NAME,
CASE WHEN a.EMP_SEX=1 THEN "男" WHEN a.EMP_SEX=2 THEN "女" ELSE "" END as "EMP_SEX",
a.EMP_BIRTH_DATE,
a.EMP_AGE,
a.EMP_IDCARD,
a.BANK_NO,
a.BANK_NAME,
a1.AREA_NAME as "BANK_PROVINCE",
a1.AREA_NAME as "BANK_CITY",
a.BANK_NAME_SUB,
a.EMP_PHONE,
a6.AREA_NAME as "EMP_PROVINCE",
a7.AREA_NAME as "EMP_CITY",
a8.AREA_NAME as "EMP_TOWN",
a3.AREA_NAME as "SOCIAL_PROVINCE",
a4.AREA_NAME as "SOCIAL_CITY",
a5.AREA_NAME as "SOCIAL_TOWN",
a.CONTRACT_APPLY_NO,
a.CONTRACT_START,
a.CONTRACT_END,
a.CONTRACT_TYPE,
a.BUSINESS_DETAIL,
a.SIGN_TYPE,
a.SIGN_TERM,
a.CONTRACT_PARTY_A,
a.CONTRACT_POST,
a.CONTRACT_TASK_TIME,
a.CONTRACT_CODE,
a.CONTRACT_CREATER,
a.CONTRACT_CREATE_TIME,
a.DATA_CREATE_MONTH,
a.SETTLE_DOMAIN
FROM
t_personnel_roster a
LEFT JOIN sys_area a1 on a1.id=a.BANK_PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.BANK_CITY
LEFT JOIN sys_area a3 on a3.id=a.SOCIAL_PROVINCE
LEFT JOIN sys_area a4 on a4.id=a.SOCIAL_CITY
LEFT JOIN sys_area a5 on a5.id=a.SOCIAL_TOWN
LEFT JOIN sys_area a6 on a6.id=a.EMP_PROVINCE
LEFT JOIN sys_area a7 on a7.id=a.EMP_CITY
LEFT JOIN sys_area a8 on a8.id=a.EMP_TOWN
<where>
1=1
<include
refid=
"tPersonnelRoster_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