Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e1423902
authored
Nov 10, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(容量): 改约单如果是当天单子 纳入容量计算
1 parent
295c2b34
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
project-order/src/main/java/com/dituhui/pea/order/scheduler/CalcEngineerCapacityScheduler.java
project-order/src/main/java/com/dituhui/pea/order/scheduler/CalcEngineerCapacityScheduler.java
View file @
e142390
...
...
@@ -31,6 +31,7 @@ import java.time.LocalTime;
import
java.time.ZoneId
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
...
...
@@ -84,8 +85,9 @@ public class CalcEngineerCapacityScheduler {
return
;
}
Set
<
String
>
ss
=
Set
.
of
(
"CANCELED"
,
"RESCHEDULED"
);
List
<
OrderInfoEntity
>
orders
=
orderInfoDao
.
findByDtAndEngineerCode
(
DateUtils
.
localDateFromStr
(
date
),
engineerCode
);
final
LocalDate
nowDate
=
DateUtils
.
localDateFromStr
(
date
);
Set
<
String
>
ss
=
Set
.
of
(
"CANCELED"
);
List
<
OrderInfoEntity
>
orders
=
orderInfoDao
.
findByDtAndEngineerCode
(
nowDate
,
engineerCode
);
// 根据capacity_engineer_calendar和order_info,来确定当天剩下的最大连续时间区块;
EngineerBusinessEntity
businessEntity
=
engineerBusinessDao
.
getByEngineerCode
(
engineerCode
);
// 就算单小时时间段工程师技能已用容量存储至时间切片工程师时间表内
...
...
@@ -95,6 +97,15 @@ public class CalcEngineerCapacityScheduler {
orders
=
Optional
.
ofNullable
(
orders
).
orElse
(
Collections
.
emptyList
())
.
stream
()
.
filter
(
e
->
!
ss
.
contains
(
e
.
getOrderStatus
()))
.
filter
(
order
->
{
if
(!
"RESCHEDULED"
.
equals
(
order
.
getServiceStatus
()))
{
return
true
;
}
if
(
Objects
.
equals
(
nowDate
,
order
.
getPlanStartTime
().
toLocalDate
()))
{
return
true
;
}
return
false
;
})
.
collect
(
Collectors
.
toList
());
initOneEngineerTimeSlot
(
date
,
engineerCode
,
configs
,
orders
);
...
...
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