Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
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
hlcm
leaf-hlcm
Commits
3a81b600
Commit
3a81b600
authored
Sep 01, 2020
by
liyuan.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对账单修改
parent
989e2f6a
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
591 additions
and
588 deletions
+591
-588
ConExportServiceImpl.java
...hand/hls/hlcm/cont/service/impl/ConExportServiceImpl.java
+65
-66
ExcelFormatUtil.java
...ain/java/com/hand/hls/hlcm/cont/util/ExcelFormatUtil.java
+56
-92
ConExportMapper.xml
...sources/com/hand/hls/hlcm/cont/mapper/ConExportMapper.xml
+188
-167
atm_update.lwm
src/main/webapp/WEB-INF/classes/rpt/RPT5090/atm_update.lwm
+148
-132
atm_update_month.lwm
...n/webapp/WEB-INF/classes/rpt/RPT5090/atm_update_month.lwm
+134
-131
No files found.
src/main/java/com/hand/hls/hlcm/cont/service/impl/ConExportServiceImpl.java
View file @
3a81b600
This diff is collapsed.
Click to expand it.
src/main/java/com/hand/hls/hlcm/cont/util/ExcelFormatUtil.java
View file @
3a81b600
...
...
@@ -19,11 +19,6 @@ import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
/**
* excle样式工具类
* @author linry
*
*/
public
class
ExcelFormatUtil
{
/**
* 设置报表头样式
...
...
@@ -31,26 +26,15 @@ public class ExcelFormatUtil {
* @return
*/
public
static
CellStyle
headSytle
(
SXSSFWorkbook
workbook
){
// 设置style1的样式,此样式运用在第二行
CellStyle
style1
=
workbook
.
createCellStyle
();
// cell样式
// 设置单元格背景色,设置单元格背景色以下两句必须同时设置
/*style1.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);// 设置填充样式
style1.setFillForegroundColor(HSSFColor.GREY_25_PERCENT.index);// 设置填充色*/
// 设置单元格上、下、左、右的边框线
/*style1.setBorderBottom(HSSFCellStyle.BORDER_THIN);
style1.setBorderLeft(HSSFCellStyle.BORDER_THIN);
style1.setBorderRight(HSSFCellStyle.BORDER_THIN);
style1.setBorderTop(HSSFCellStyle.BORDER_THIN);*/
Font
font1
=
workbook
.
createFont
();
// 创建一个字体对象
CellStyle
style1
=
workbook
.
createCellStyle
();
Font
font1
=
workbook
.
createFont
();
font1
.
setBold
(
true
);
//font1.setBoldweight((short) 16);// 设置字体的宽度
font1
.
setFontHeightInPoints
((
short
)
16
);
// 设置字体的高度
font1
.
setFontName
(
"等线"
);
//font1.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);// 粗体显示
style1
.
setFont
(
font1
);
// 设置style1的字体
style1
.
setWrapText
(
true
);
// 设置自动换行
style1
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
// 设置单元格字体显示居中(左右方向)
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
// 设置单元格字体显示居中(上下方向)
font1
.
setFontHeightInPoints
((
short
)
16
);
font1
.
setFontName
(
"黑体"
);
style1
.
setFont
(
font1
);
style1
.
setWrapText
(
true
);
style1
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
return
style1
;
}
/**
...
...
@@ -58,89 +42,69 @@ public class ExcelFormatUtil {
* @param wb
* @return
*/
// 黑体加粗居左显示
public
static
CellStyle
contentBpStyle
(
SXSSFWorkbook
wb
){
CellStyle
style1
=
wb
.
createCellStyle
();
Font
font1
=
wb
.
createFont
();
font1
.
setBold
(
true
);
font1
.
setFontName
(
"黑体"
);
style1
.
setFont
(
font1
);
//style1.setBorderBottom(BorderStyle.THIN);
style1
.
setWrapText
(
true
);
style1
.
setAlignment
(
HorizontalAlignment
.
LEFT
);
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
return
style1
;
}
// 黑体居左显示
public
static
CellStyle
contentStyle
(
SXSSFWorkbook
wb
){
// 设置style1的样式,此样式运用在第二行
CellStyle
style1
=
wb
.
createCellStyle
();
// cell样式
// 设置单元格上、下、左、右的边框线
/*style1.setBorderBottom(HSSFCellStyle.BORDER_THIN);
style1.setBorderLeft(HSSFCellStyle.BORDER_THIN);
style1.setBorderRight(HSSFCellStyle.BORDER_THIN);
style1.setBorderTop(HSSFCellStyle.BORDER_THIN);*/
//style1.setWrapText(true);// 设置自动换行
style1
.
setAlignment
(
HorizontalAlignment
.
LEFT
);
// 设置单元格字体显示居中(左右方向)
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
// 设置单元格字体显示居中(上下方向)
CellStyle
style1
=
wb
.
createCellStyle
();
Font
font1
=
wb
.
createFont
();
font1
.
setFontName
(
"黑体"
);
style1
.
setFont
(
font1
);
//style1.setWrapText(true);
style1
.
setAlignment
(
HorizontalAlignment
.
LEFT
);
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
return
style1
;
}
public
static
CellStyle
contentStyleLine
(
SXSSFWorkbook
wb
){
// 设置style1的样式,此样式运用在第二行
CellStyle
style1
=
wb
.
createCellStyle
();
// cell样式
// 设置单元格上、下、左、右的边框线
style1
.
setBorderBottom
(
BorderStyle
.
THIN
);
/* style1.setBorderBottom(HSSFCellStyle.BORDER_THIN);
style1.setBorderLeft(HSSFCellStyle.BORDER_THIN);
style1.setBorderRight(HSSFCellStyle.BORDER_THIN);
style1.setBorderTop(HSSFCellStyle.BORDER_THIN);*/
style1
.
setWrapText
(
true
);
// 设置自动换行
style1
.
setAlignment
(
HorizontalAlignment
.
LEFT
);
// 设置单元格字体显示居中(左右方向)
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
// 设置单元格字体显示居中(上下方向)
// 黑体居中显示
public
static
CellStyle
contentCenterStyle
(
SXSSFWorkbook
wb
){
CellStyle
style1
=
wb
.
createCellStyle
();
Font
font1
=
wb
.
createFont
();
font1
.
setFontName
(
"黑体"
);
style1
.
setFont
(
font1
);
style1
.
setWrapText
(
true
);
style1
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
return
style1
;
}
public
static
CellStyle
contentTableStyle
(
SXSSFWorkbook
wb
){
// 设置style1的样式,此样式运用在第二行
CellStyle
style1
=
wb
.
createCellStyle
();
// cell样式
// 设置单元格上、下、左、右的边框线
// 黑体加下边框线显示
public
static
CellStyle
contentStyleLine
(
SXSSFWorkbook
wb
){
CellStyle
style1
=
wb
.
createCellStyle
();
Font
font1
=
wb
.
createFont
();
font1
.
setFontName
(
"黑体"
);
style1
.
setFont
(
font1
);
style1
.
setBorderBottom
(
BorderStyle
.
THIN
);
style1
.
setBorderLeft
(
BorderStyle
.
THIN
);
style1
.
setBorderRight
(
BorderStyle
.
THIN
);
style1
.
setBorderTop
(
BorderStyle
.
THIN
);
style1
.
setWrapText
(
true
);
// 设置自动换行
style1
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
// 设置单元格字体显示居中(左右方向)
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
// 设置单元格字体显示居中(上下方向)
//style1.setWrapText(true);
style1
.
setAlignment
(
HorizontalAlignment
.
LEFT
);
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
return
style1
;
}
/**
* 设置报表标题样式
* @param workbook
* @return
*/
public
static
HSSFCellStyle
titleSytle
(
HSSFWorkbook
workbook
,
short
color
,
short
fontSize
){
// 设置style1的样式,此样式运用在第二行
HSSFCellStyle
style1
=
workbook
.
createCellStyle
();
// cell样式
// 设置单元格背景色,设置单元格背景色以下两句必须同时设置
//style1.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);// 设置填充样式
//short fcolor = color;
// 设置单元格上、下、左、右的边框线
// 列表维持原等线字体
public
static
CellStyle
contentTableStyle
(
SXSSFWorkbook
wb
){
CellStyle
style1
=
wb
.
createCellStyle
();
Font
font1
=
wb
.
createFont
();
font1
.
setFontName
(
"等线"
);
style1
.
setFont
(
font1
);
style1
.
setBorderBottom
(
BorderStyle
.
THIN
);
style1
.
setBorderLeft
(
BorderStyle
.
THIN
);
style1
.
setBorderRight
(
BorderStyle
.
THIN
);
style1
.
setBorderTop
(
BorderStyle
.
THIN
);
HSSFFont
font1
=
workbook
.
createFont
();
// 创建一个字体对象
font1
.
setBold
(
true
);
font1
.
setFontHeightInPoints
(
fontSize
);
// 设置字体的高度
style1
.
setFont
(
font1
);
// 设置style1的字体
style1
.
setWrapText
(
true
);
// 设置自动换行
style1
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
// 设置单元格字体显示居中(左右方向)
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
// 设置单元格字体显示居中(上下方向)
style1
.
setWrapText
(
true
);
style1
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
return
style1
;
}
/**
*设置表头
* @param sheet
*/
public
static
void
initTitleEX
(
SXSSFSheet
sheet
,
CellStyle
header
,
String
title
[],
int
titleLength
[])
{
SXSSFRow
row0
=
sheet
.
createRow
(
0
);
row0
.
setHeight
((
short
)
800
);
for
(
int
j
=
0
;
j
<
title
.
length
;
j
++)
{
SXSSFCell
cell
=
row0
.
createCell
(
j
);
//设置每一列的字段名
cell
.
setCellValue
(
title
[
j
]);
cell
.
setCellStyle
(
header
);
sheet
.
setColumnWidth
(
j
,
titleLength
[
j
]);
}
}
/**
*设置表头
...
...
src/main/resources/com/hand/hls/hlcm/cont/mapper/ConExportMapper.xml
View file @
3a81b600
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/classes/rpt/RPT5090/atm_update.lwm
View file @
3a81b600
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/classes/rpt/RPT5090/atm_update_month.lwm
View file @
3a81b600
This diff is collapsed.
Click to expand it.
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