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 c1ead991
authored
Nov 06, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(容量):最大空闲时间 计算不能直接取对应枚举
1 parent
aae7ca0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
project-order/src/main/java/com/dituhui/pea/order/common/CapacityUtils.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/CapacityQueryServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/common/CapacityUtils.java
View file @
c1ead99
...
...
@@ -246,7 +246,7 @@ public class CapacityUtils {
long
engineerMaxDuration
=
Optional
.
ofNullable
(
timeSlots
).
orElse
(
Collections
.
emptyList
())
.
stream
()
.
mapToLong
(
OccupyInfoDetail:
:
getDuration
)
.
mapToLong
(
t1
->
Duration
.
between
(
t1
.
getBeginTime
(),
t1
.
getEndTime
()).
abs
().
toMinutes
()
)
.
sum
();
engineerMaxDurationList
.
add
(
engineerMaxDuration
);
});
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/CapacityQueryServiceImpl.java
View file @
c1ead99
...
...
@@ -118,16 +118,18 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
}
//分站、网点ID
List
<
String
>
groupIdList
=
mapBlockInBlockIdsList
.
stream
().
map
(
MapBlockInfoEntity:
:
getGroup
Id
).
distinct
()
List
<
String
>
teamIdList
=
mapBlockInBlockIdsList
.
stream
().
map
(
MapBlockInfoEntity:
:
getTeam
Id
).
distinct
()
.
collect
(
Collectors
.
toList
());
final
String
groupId
=
groupIdList
.
get
(
0
);
List
<
String
>
groupList
=
mapBlockInBlockIdsList
.
stream
().
map
(
MapBlockInfoEntity:
:
getGroupId
).
distinct
()
.
collect
(
Collectors
.
toList
());
final
String
teamId
=
teamIdList
.
get
(
0
);
//3. 查询分站下拥有对应技能的工程师(排重) 技能码转换为对应的技能汉字
List
<
SkillInfoEntity
>
querySkillGroup
=
new
ArrayList
<>();
Set
<
EngineerInfoEntity
>
allFulfillEngineer
=
Sets
.
newConcurrentHashSet
();
for
(
CapacityQueryDTO
.
Service
service
:
services
)
{
Set
<
EngineerInfoEntity
>
engineerInfoEntities
=
engineerInfoDao
.
listByBrandAndTypeAndSkillAnd
Group
Id
(
service
.
getBrand
(),
service
.
getProductType
(),
service
.
getServiceType
(),
group
Id
);
Set
<
EngineerInfoEntity
>
engineerInfoEntities
=
engineerInfoDao
.
listByBrandAndTypeAndSkillAnd
Team
Id
(
service
.
getBrand
(),
service
.
getProductType
(),
service
.
getServiceType
(),
team
Id
);
//查询对应的技能信息
SkillInfoEntity
skillInfo
=
skillInfoDao
.
getByBrandAndTypeAndSkill
(
service
.
getBrand
(),
...
...
@@ -154,7 +156,7 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
LocalDate
currentDate
=
beginDate
;
//定义返回值
CapacityQueryDTO
.
Result
result
=
new
CapacityQueryDTO
.
Result
();
result
.
setGroupId
(
group
Id
);
result
.
setGroupId
(
group
List
.
get
(
0
)
);
result
.
setTakeTime
(
totalTakeTime
);
final
int
corePoolSize
=
Runtime
.
getRuntime
().
availableProcessors
();
...
...
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