Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李苗
/
Vion-DevOps
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7b7731ff
authored
Jun 21, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[fix] 根据人员统计工单,优化工单完成人的判断逻辑
1 parent
560f01aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
src/main/java/vion/service/impl/TaskServiceImpl.java
src/main/java/vion/service/impl/TaskServiceImpl.java
View file @
7b7731f
...
@@ -441,13 +441,16 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
...
@@ -441,13 +441,16 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
.
list
();
.
list
();
List
<
Store
>
storeList
=
storeService
.
list
();
List
<
Store
>
storeList
=
storeService
.
list
();
Map
<
Long
,
String
>
id2UsernameMap
=
userService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
User:
:
getId
,
User:
:
getUsername
));
Map
<
Long
,
String
>
id2UsernameMap
=
userService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
User:
:
getId
,
User:
:
getUsername
));
List
<
FaultLog
>
logList
=
faultLogService
.
lambdaQuery
().
isNotNull
(
FaultLog:
:
getManHour
).
list
();
List
<
FaultLog
>
logList
=
faultLogService
.
lambdaQuery
().
list
();
Map
<
Long
,
Double
>
taskId2HourMap
=
logList
.
stream
().
collect
(
Collectors
.
groupingBy
(
FaultLog:
:
getTaskId
,
Collectors
.
summingDouble
(
FaultLog:
:
getManHour
)));
Map
<
Long
,
Double
>
taskId2HourMap
=
logList
.
stream
()
.
filter
(
l
->
ObjUtil
.
isNotNull
(
l
.
getManHour
()))
.
collect
(
Collectors
.
groupingBy
(
FaultLog:
:
getTaskId
,
Collectors
.
summingDouble
(
FaultLog:
:
getManHour
)));
// 根据工单日志,判断工单完成人
// 根据工单日志,判断工单完成人
var
faultLogList
=
faultLogService
.
lambdaQuery
().
eq
(
FaultLog:
:
getContent
,
"工单处理完成"
).
list
();
var
user2TaskIdMap
=
logList
.
stream
()
var
user2TaskIdMap
=
faultLogList
.
stream
().
collect
(
Collectors
.
groupingBy
(
FaultLog:
:
getOperator
,
.
filter
(
l
->
StrUtil
.
equals
(
l
.
getContent
(),
"工单处理完成"
))
Collectors
.
mapping
(
FaultLog:
:
getTaskId
,
Collectors
.
toList
())));
.
collect
(
Collectors
.
groupingBy
(
FaultLog:
:
getOperator
,
Collectors
.
mapping
(
FaultLog:
:
getTaskId
,
Collectors
.
toList
())));
// 人 => 工单
// 人 => 工单
Map
<
Long
,
List
<
Task
>>
p2TaskMap
=
taskList
.
stream
().
collect
(
Collectors
.
groupingBy
(
Task:
:
getActiveUser
));
Map
<
Long
,
List
<
Task
>>
p2TaskMap
=
taskList
.
stream
().
collect
(
Collectors
.
groupingBy
(
Task:
:
getActiveUser
));
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment