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
0ac2012c
Commit
0ac2012c
authored
Jul 09, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.6.6-预入职相关_导出优化
parent
5dd18334
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
5 deletions
+86
-5
TCompleteMonitorServiceImpl.java
...fu/archives/service/impl/TCompleteMonitorServiceImpl.java
+7
-2
TPreEmpMainServiceImpl.java
...v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
+5
-3
ExcelStyle.java
...om/yifu/cloud/plus/v1/yifu/archives/utils/ExcelStyle.java
+74
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TCompleteMonitorServiceImpl.java
View file @
0ac2012c
...
@@ -12,6 +12,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
...
@@ -12,6 +12,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper
;
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.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
...
@@ -26,7 +27,9 @@ import java.io.IOException;
...
@@ -26,7 +27,9 @@ import java.io.IOException;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.net.URL
;
import
java.net.URL
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
/**
/**
* 档案完整度监控
* 档案完整度监控
...
@@ -327,7 +330,9 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
...
@@ -327,7 +330,9 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
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
,
"不良记录描述"
}));
excelWriter
=
EasyExcelFactory
.
write
(
out
).
head
(
headList
).
build
();
excelWriter
=
EasyExcelFactory
.
write
(
out
).
registerWriteHandler
(
ExcelStyle
.
getNormalStype
()).
head
(
headList
).
build
();
int
index
=
0
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPreEmpMainServiceImpl.java
View file @
0ac2012c
...
@@ -34,6 +34,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -34,6 +34,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.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.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
...
@@ -1197,7 +1198,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -1197,7 +1198,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tEmpContactInfo
.
setCreateName
(
user
.
getNickname
());
tEmpContactInfo
.
setCreateName
(
user
.
getNickname
());
tEmpContactInfo
.
setCreateTime
(
LocalDateTime
.
now
());
tEmpContactInfo
.
setCreateTime
(
LocalDateTime
.
now
());
}
}
if
(
Common
.
isEmpty
(
tEmpContactInfo
.
getEmpIdcard
())
&&
Common
.
isNotNull
(
emp
)){
if
(
Common
.
isEmpty
(
tEmpContactInfo
.
getEmpIdcard
())
&&
Common
.
isNotNull
(
emp
))
{
tEmpContactInfo
.
setEmpIdcard
(
emp
.
getEmpIdcard
());
tEmpContactInfo
.
setEmpIdcard
(
emp
.
getEmpIdcard
());
}
}
tEmpContactInfoService
.
saveOrUpdate
(
tEmpContactInfo
);
tEmpContactInfoService
.
saveOrUpdate
(
tEmpContactInfo
);
...
@@ -1368,7 +1369,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -1368,7 +1369,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
isNew
=
true
;
isNew
=
true
;
project
=
new
TEmployeeProject
();
project
=
new
TEmployeeProject
();
}
}
String
[]
ignoreProperties
=
new
String
[]{
"id"
,
"status"
};
String
[]
ignoreProperties
=
new
String
[]{
"id"
,
"status"
};
if
(
Common
.
isEmpty
(
tPreEmployeeProject
.
getWorkingHours
()))
{
if
(
Common
.
isEmpty
(
tPreEmployeeProject
.
getWorkingHours
()))
{
tPreEmployeeProject
.
setWorkingHours
(
""
);
tPreEmployeeProject
.
setWorkingHours
(
""
);
}
}
...
@@ -1966,7 +1967,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
...
@@ -1966,7 +1967,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
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
,
"不良记录描述"
}));
excelWriter
=
EasyExcelFactory
.
write
(
out
).
head
(
headList
).
build
();
excelWriter
=
EasyExcelFactory
.
write
(
out
).
registerWriteHandler
(
ExcelStyle
.
getNormalStype
()).
head
(
headList
).
build
();
int
index
=
0
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/ExcelStyle.java
0 → 100644
View file @
0ac2012c
/**
* Copyright © 2017yifu. All rights reserved.
*
* @Title: NumberToCN.java
* @Prject: wanxin_hr
* @Package: com.yifu.util
* @Description: TODO
* @author: Administrator
* @date: 2017年5月8日 下午6:45:01
* @version: V1.0
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
utils
;
import
com.alibaba.excel.write.metadata.style.WriteCellStyle
;
import
com.alibaba.excel.write.metadata.style.WriteFont
;
import
com.alibaba.excel.write.style.HorizontalCellStyleStrategy
;
import
org.apache.poi.ss.usermodel.BorderStyle
;
import
org.apache.poi.ss.usermodel.HorizontalAlignment
;
import
org.apache.poi.ss.usermodel.IndexedColors
;
import
java.math.BigDecimal
;
/**
* @Author: wangan
* @Date: 2019/8/9
* @Description: 金额转换金额大写, 从老hr复制过
* @return:
**/
public
class
ExcelStyle
{
/**
* @param
* @Description: 设置倩倩审美下的excel样式
* @Author: hgw
* @Date: 2024/7/9 20:30
* @return: com.alibaba.excel.write.style.HorizontalCellStyleStrategy
**/
public
static
HorizontalCellStyleStrategy
getNormalStype
()
{
// 表头——单元格样式对象
WriteCellStyle
headWriteCellStyle
=
new
WriteCellStyle
();
headWriteCellStyle
.
setWrapped
(
false
);
// 背景设置为白色,也可设置为其他颜色
headWriteCellStyle
.
setFillForegroundColor
(
IndexedColors
.
WHITE
.
getIndex
());
// 设置表头字体
WriteFont
headWriteFont
=
new
WriteFont
();
// 设置字体大小为12
headWriteFont
.
setFontHeightInPoints
((
short
)
12
);
// 设置加粗
headWriteFont
.
setBold
(
true
);
// 把字体对象设置到单元格样式对象中
headWriteCellStyle
.
setWriteFont
(
headWriteFont
);
//设置表头居中
headWriteCellStyle
.
setHorizontalAlignment
(
HorizontalAlignment
.
CENTER
);
// 内容——单元格样式对象
WriteCellStyle
contentWriteCellStyle
=
new
WriteCellStyle
();
contentWriteCellStyle
.
setWrapped
(
false
);
// 背景设置为白色,也可设置为其他颜色
contentWriteCellStyle
.
setFillForegroundColor
(
IndexedColors
.
WHITE
.
getIndex
());
contentWriteCellStyle
.
setBorderTop
(
BorderStyle
.
THIN
);
contentWriteCellStyle
.
setBorderBottom
(
BorderStyle
.
THIN
);
contentWriteCellStyle
.
setBorderLeft
(
BorderStyle
.
THIN
);
contentWriteCellStyle
.
setBorderRight
(
BorderStyle
.
THIN
);
// 设置表头字体
WriteFont
contentWriteFont
=
new
WriteFont
();
// 设置字体大小为12
contentWriteFont
.
setFontHeightInPoints
((
short
)
11
);
// 把字体对象设置到单元格样式对象中
contentWriteCellStyle
.
setWriteFont
(
contentWriteFont
);
//设置表头居中
contentWriteCellStyle
.
setHorizontalAlignment
(
HorizontalAlignment
.
CENTER
);
HorizontalCellStyleStrategy
horizontalCellStyleStrategy
=
new
HorizontalCellStyleStrategy
(
headWriteCellStyle
,
contentWriteCellStyle
);
return
horizontalCellStyleStrategy
;
}
}
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