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 560f01aa
authored
Jun 21, 2024
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[fix] 根据人员统计工单,修改工单完成人的判断逻辑
1 parent
76aea466
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
src/main/java/vion/service/impl/TaskServiceImpl.java
src/main/java/vion/service/impl/TaskServiceImpl.java
View file @
560f01a
...
@@ -444,6 +444,11 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
...
@@ -444,6 +444,11 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
List
<
FaultLog
>
logList
=
faultLogService
.
lambdaQuery
().
isNotNull
(
FaultLog:
:
getManHour
).
list
();
List
<
FaultLog
>
logList
=
faultLogService
.
lambdaQuery
().
isNotNull
(
FaultLog:
:
getManHour
).
list
();
Map
<
Long
,
Double
>
taskId2HourMap
=
logList
.
stream
().
collect
(
Collectors
.
groupingBy
(
FaultLog:
:
getTaskId
,
Collectors
.
summingDouble
(
FaultLog:
:
getManHour
)));
Map
<
Long
,
Double
>
taskId2HourMap
=
logList
.
stream
().
collect
(
Collectors
.
groupingBy
(
FaultLog:
:
getTaskId
,
Collectors
.
summingDouble
(
FaultLog:
:
getManHour
)));
// 根据工单日志,判断工单完成人
var
faultLogList
=
faultLogService
.
lambdaQuery
().
eq
(
FaultLog:
:
getContent
,
"工单处理完成"
).
list
();
var
user2TaskIdMap
=
faultLogList
.
stream
().
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
));
var
resList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
var
resList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
...
@@ -452,7 +457,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
...
@@ -452,7 +457,7 @@ public class TaskServiceImpl extends MPJBaseServiceImpl<TaskMapper, Task> implem
var
inList
=
list
.
stream
().
filter
(
v
->
v
.
getStatus
().
equals
(
2
)).
toList
();
var
inList
=
list
.
stream
().
filter
(
v
->
v
.
getStatus
().
equals
(
2
)).
toList
();
var
expList
=
inList
.
stream
().
filter
(
v
->
v
.
getExpDate
().
after
(
new
Date
())).
toList
();
var
expList
=
inList
.
stream
().
filter
(
v
->
v
.
getExpDate
().
after
(
new
Date
())).
toList
();
var
finishList
=
list
.
stream
().
filter
(
v
->
v
.
getStatus
().
equals
(
3
)).
toList
();
var
finishList
=
taskList
.
stream
().
filter
(
t
->
user2TaskIdMap
.
getOrDefault
(
p
,
List
.
of
()).
contains
(
t
.
getId
()
)).
toList
();
var
storeIdSet
=
list
.
stream
().
map
(
Task:
:
getStoreId
).
collect
(
Collectors
.
toSet
());
var
storeIdSet
=
list
.
stream
().
map
(
Task:
:
getStoreId
).
collect
(
Collectors
.
toSet
());
var
storeNameList
=
storeList
.
stream
().
filter
(
v
->
storeIdSet
.
contains
(
v
.
getId
())).
distinct
().
map
(
Store:
:
getName
).
collect
(
Collectors
.
joining
(
","
));
var
storeNameList
=
storeList
.
stream
().
filter
(
v
->
storeIdSet
.
contains
(
v
.
getId
())).
distinct
().
map
(
Store:
:
getName
).
collect
(
Collectors
.
joining
(
","
));
Map
<
String
,
Object
>
cntMap
=
Map
.
of
(
"person"
,
id2UsernameMap
.
get
(
p
),
Map
<
String
,
Object
>
cntMap
=
Map
.
of
(
"person"
,
id2UsernameMap
.
get
(
p
),
...
...
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