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
baad04c0
Commit
baad04c0
authored
Feb 24, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善工时统计
parent
bbb3d606
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
WorkTypeManagerMapper.xml
...apper/src/main/resources/mapper/WorkTypeManagerMapper.xml
+1
-1
MonthlyWorkingHoursStatistics.java
...cn/wisenergy/model/dto/MonthlyWorkingHoursStatistics.java
+2
-2
StatisticsServiceImpl.java
...java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
+4
-2
No files found.
wisenergy-mapper/src/main/resources/mapper/WorkTypeManagerMapper.xml
View file @
baad04c0
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<select
id=
"getListByManagerId"
resultType=
"cn.wisenergy.model.app.WorkTypeManager"
>
<select
id=
"getListByManagerId"
resultType=
"cn.wisenergy.model.app.WorkTypeManager"
>
select id,
name,
dept_id,manager_id,type
select id,dept_id,manager_id,type
from work_type_manager
from work_type_manager
where manager_id = #{userId}
where manager_id = #{userId}
</select>
</select>
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/dto/MonthlyWorkingHoursStatistics.java
View file @
baad04c0
...
@@ -41,13 +41,13 @@ public class MonthlyWorkingHoursStatistics implements Serializable ,Comparable{
...
@@ -41,13 +41,13 @@ public class MonthlyWorkingHoursStatistics implements Serializable ,Comparable{
* 填报次数
* 填报次数
*/
*/
@ApiModelProperty
(
name
=
"count"
,
value
=
"填报次数"
)
@ApiModelProperty
(
name
=
"count"
,
value
=
"填报次数"
)
private
int
count
;
private
Integer
count
;
/**
/**
* 填报工时
* 填报工时
*/
*/
@ApiModelProperty
(
name
=
"workTime"
,
value
=
"合计填报工时"
)
@ApiModelProperty
(
name
=
"workTime"
,
value
=
"合计填报工时"
)
private
int
workTime
;
private
Integer
workTime
;
@Override
@Override
public
int
compareTo
(
Object
o
)
{
public
int
compareTo
(
Object
o
)
{
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/StatisticsServiceImpl.java
View file @
baad04c0
...
@@ -183,15 +183,17 @@ public class StatisticsServiceImpl implements StatisticsService {
...
@@ -183,15 +183,17 @@ public class StatisticsServiceImpl implements StatisticsService {
Integer
notCompletedCount1
=
workTimeOrderMapper
.
getCountByCondition
(
map
);
Integer
notCompletedCount1
=
workTimeOrderMapper
.
getCountByCondition
(
map
);
// 查询用户负责审批的除项目合商机的其余类型
// 查询用户负责审批的除项目合商机的其余类型
Integer
notCompletedCount2
=
0
;
List
<
WorkTypeManager
>
workTypeManagers
=
workTypeManagerMapper
.
getListByManagerId
(
userId
);
List
<
WorkTypeManager
>
workTypeManagers
=
workTypeManagerMapper
.
getListByManagerId
(
userId
);
if
(
CollectionUtil
.
isNotEmpty
(
workTypeManagers
))
{
if
(
CollectionUtil
.
isNotEmpty
(
workTypeManagers
))
{
map
.
remove
(
"projectIdList"
);
map
.
remove
(
"projectIdList"
);
List
<
Integer
>
type
=
workTypeManagers
.
stream
().
map
(
WorkTypeManager:
:
getType
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
type
=
workTypeManagers
.
stream
().
map
(
WorkTypeManager:
:
getType
).
collect
(
Collectors
.
toList
());
map
.
put
(
"typeList"
,
type
);
map
.
put
(
"typeList"
,
type
);
map
.
put
(
"deptId"
,
user
.
getDeptId
());
map
.
put
(
"deptId"
,
user
.
getDeptId
());
}
// 其余类型为审批的条数
// 其余类型为审批的条数
Integer
notCompletedCount2
=
workTimeOrderMapper
.
getCountByCondition
(
map
);
notCompletedCount2
=
workTimeOrderMapper
.
getCountByCondition
(
map
);
}
//所有查询结果封装进对象
//所有查询结果封装进对象
ApprovalStatistics
approvalStatistics
=
new
ApprovalStatistics
();
ApprovalStatistics
approvalStatistics
=
new
ApprovalStatistics
();
...
...
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