Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
work_service
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
licc
work_service
Commits
35b86997
Commit
35b86997
authored
Mar 06, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善工时统计
parent
5d7e19ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
StatisticsServiceImpl.java
...java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
+15
-8
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
View file @
35b86997
...
...
@@ -430,6 +430,10 @@ public class StatisticsServiceImpl implements StatisticsService {
row1
.
createCell
(
0
).
setCellValue
(
"序号"
);
row1
.
createCell
(
1
).
setCellValue
(
"部门名称"
);
row1
.
createCell
(
2
).
setCellValue
(
"姓名"
);
row1
.
getCell
(
0
).
setCellStyle
(
cellStyle
);
row1
.
getCell
(
1
).
setCellStyle
(
cellStyle
);
row1
.
getCell
(
2
).
setCellStyle
(
cellStyle
);
for
(
int
i
=
1
;
i
<=
dayCount
;
i
++)
{
HSSFCell
cell
=
row1
.
createCell
(
2
+
i
);
cell
.
setCellValue
(
i
+
"日"
);
...
...
@@ -448,10 +452,13 @@ public class StatisticsServiceImpl implements StatisticsService {
HSSFRow
row_i
=
sheet
.
createRow
(
i
);
// 序号
row_i
.
createCell
(
0
).
setCellValue
(
i
);
row_i
.
getCell
(
0
).
setCellStyle
(
cellStyle
);
// 部门名称
row_i
.
createCell
(
1
).
setCellValue
(
next
.
getDeptName
());
row_i
.
getCell
(
1
).
setCellStyle
(
cellStyle
);
// 姓名
row_i
.
createCell
(
2
).
setCellValue
(
next
.
getUserName
());
row_i
.
getCell
(
2
).
setCellStyle
(
cellStyle
);
// 日期与工时集合
List
<
DayWorkTimeAndType
>
timeAndTypes
=
next
.
getDayWorkTimeAndTypeList
();
// 在excel中对应日期单元格添加工时
...
...
@@ -907,18 +914,18 @@ public class StatisticsServiceImpl implements StatisticsService {
cellStyle
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
cellStyle
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
cellStyle
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
cellStyle
.
setBorderBottom
(
BorderStyle
.
THIN
);
//设置下边框的边框线颜色(颜色和上述的颜色对照表是一样的)
cellStyle
.
setBo
ttomBorderColor
(
IndexedColors
.
SKY_BLUE
.
getIndex
()
);
cellStyle
.
setBo
rderLeft
(
BorderStyle
.
THIN
);
cellStyle
.
setBo
rderBottom
(
BorderStyle
.
THIN
);
cellStyle
.
setBo
ttomBorderColor
(
IndexedColors
.
GREY_80_PERCENT
.
getIndex
()
);
//左边框
cellStyle
.
set
LeftBorderColor
(
IndexedColors
.
SKY_BLUE
.
getIndex
()
);
cellStyle
.
set
BorderTop
(
BorderStyle
.
THIN
);
cellStyle
.
set
BorderLeft
(
BorderStyle
.
THIN
);
cellStyle
.
set
LeftBorderColor
(
IndexedColors
.
GREY_80_PERCENT
.
getIndex
()
);
//上边框
cellStyle
.
set
RightBorderColor
(
IndexedColors
.
SKY_BLUE
.
getIndex
()
);
cellStyle
.
set
BorderRight
(
BorderStyle
.
THIN
);
cellStyle
.
set
BorderTop
(
BorderStyle
.
THIN
);
cellStyle
.
set
RightBorderColor
(
IndexedColors
.
GREY_80_PERCENT
.
getIndex
()
);
//右边框
cellStyle
.
setTopBorderColor
(
IndexedColors
.
SKY_BLUE
.
getIndex
());
cellStyle
.
setBorderRight
(
BorderStyle
.
THIN
);
cellStyle
.
setTopBorderColor
(
IndexedColors
.
GREY_80_PERCENT
.
getIndex
());
// 自动换行
cellStyle
.
setWrapText
(
true
);
return
cellStyle
;
...
...
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