Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
e5de8ed3
Commit
e5de8ed3
authored
Jan 30, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出设置格式
parent
8d1d919b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
WorkTimeOrderMapper.java
...rc/main/java/cn/wisenergy/mapper/WorkTimeOrderMapper.java
+2
-0
WorkUserMapper.java
...per/src/main/java/cn/wisenergy/mapper/WorkUserMapper.java
+5
-0
StatisticsServiceImpl.java
...java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
+6
-2
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/WorkTimeOrderMapper.java
View file @
e5de8ed3
...
@@ -49,6 +49,8 @@ public interface WorkTimeOrderMapper extends BaseMapper<WorkTimeOrder> {
...
@@ -49,6 +49,8 @@ public interface WorkTimeOrderMapper extends BaseMapper<WorkTimeOrder> {
List
<
MonthlyWorkingHoursStatistics
>
statisticsByProjectType
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"currentMonthFirstDay"
)
Date
currentMonthFirstDay
);
List
<
MonthlyWorkingHoursStatistics
>
statisticsByProjectType
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"currentMonthFirstDay"
)
Date
currentMonthFirstDay
);
/**
/**
* 获取用户在某月的工时、工时类型、工单日期
*
* @param year
* @param year
* @param month
* @param month
* @param userIds
* @param userIds
...
...
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/WorkUserMapper.java
View file @
e5de8ed3
...
@@ -28,6 +28,11 @@ public interface WorkUserMapper extends BaseMapper<WorkUser> {
...
@@ -28,6 +28,11 @@ public interface WorkUserMapper extends BaseMapper<WorkUser> {
Integer
updateUserInfo
(
WorkUser
user
);
Integer
updateUserInfo
(
WorkUser
user
);
/**
* 获取用户主键、姓名、部门名称
* @param userIds
* @return
*/
List
<
StatisticsTableDto
>
getStatisticsTableDtos
(
List
<
Integer
>
userIds
);
List
<
StatisticsTableDto
>
getStatisticsTableDtos
(
List
<
Integer
>
userIds
);
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
View file @
e5de8ed3
...
@@ -26,6 +26,7 @@ import com.github.pagehelper.PageHelper;
...
@@ -26,6 +26,7 @@ import com.github.pagehelper.PageHelper;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.hssf.usermodel.*
;
import
org.apache.poi.hssf.usermodel.*
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.HorizontalAlignment
;
import
org.apache.poi.ss.usermodel.HorizontalAlignment
;
import
org.apache.poi.ss.usermodel.VerticalAlignment
;
import
org.apache.poi.ss.usermodel.VerticalAlignment
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -124,7 +125,6 @@ public class StatisticsServiceImpl implements StatisticsService {
...
@@ -124,7 +125,6 @@ public class StatisticsServiceImpl implements StatisticsService {
}
}
}
}
statisticsTableDto
.
setDayWorkTimeAndTypeList
(
dayWorkTimeAndTypes1
);
statisticsTableDto
.
setDayWorkTimeAndTypeList
(
dayWorkTimeAndTypes1
);
}
}
pageInfo
.
setList
(
statisticsTableDtos
);
pageInfo
.
setList
(
statisticsTableDtos
);
return
pageInfo
;
return
pageInfo
;
...
@@ -251,6 +251,7 @@ public class StatisticsServiceImpl implements StatisticsService {
...
@@ -251,6 +251,7 @@ public class StatisticsServiceImpl implements StatisticsService {
// 垂直、水平中心对齐
// 垂直、水平中心对齐
cellStyle
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
cellStyle
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
cellStyle
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
cellStyle
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
cellStyle
.
setWrapText
(
true
);
// 第一列列宽
// 第一列列宽
sheet
.
setColumnWidth
(
1
,
EXCEL_WIDTH
);
sheet
.
setColumnWidth
(
1
,
EXCEL_WIDTH
);
// 创建一行
// 创建一行
...
@@ -288,9 +289,12 @@ public class StatisticsServiceImpl implements StatisticsService {
...
@@ -288,9 +289,12 @@ public class StatisticsServiceImpl implements StatisticsService {
}
else
{
}
else
{
HSSFCell
emptyCell
=
row_i
.
createCell
(
timeAndType
.
getDay
()
+
2
);
HSSFCell
emptyCell
=
row_i
.
createCell
(
timeAndType
.
getDay
()
+
2
);
emptyCell
.
setCellValue
(
timeAndType
.
getType
()
+
timeAndType
.
getWorkTime
().
toString
());
emptyCell
.
setCellValue
(
timeAndType
.
getType
()
+
timeAndType
.
getWorkTime
().
toString
());
emptyCell
.
setCellStyle
(
cellStyle
);
}
}
}
}
// 给该行每个单元格设置单元格样式
for
(
Cell
cell
:
row_i
)
{
cell
.
setCellStyle
(
cellStyle
);
}
// 换行
// 换行
i
++;
i
++;
}
}
...
...
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