Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HYH.APSJ
Project
Project
Details
Activity
Releases
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
佟礼
HYH.APSJ
Commits
c11b1563
Commit
c11b1563
authored
Dec 23, 2025
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
遗传算法-物料需求
parent
4d1991b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
23 deletions
+20
-23
MaterialRequirementService.java
...com/aps/service/Algorithm/MaterialRequirementService.java
+3
-10
RoutingDataService.java
...in/java/com/aps/service/Algorithm/RoutingDataService.java
+16
-12
PlanResultServiceTest.java
src/test/java/com/aps/demo/PlanResultServiceTest.java
+1
-1
No files found.
src/main/java/com/aps/service/Algorithm/MaterialRequirementService.java
View file @
c11b1563
...
...
@@ -261,17 +261,10 @@ if(routingIds.size()==0)
}
}
else
{
Long
routingIds1
=
headers1
.
getId
().
longValue
();
routingIds
=
headers1
.
getId
().
longValue
();
routingsupportings1
=
routingsupportings
.
stream
()
.
filter
(
t
->
t
.
getRoutingHeaderId
().
equals
(
routingIds1
))
.
collect
(
Collectors
.
toList
());
List
<
String
>
routingsupportingids
=
routingsupportings
.
stream
()
.
map
(
Routingsupporting:
:
getStrId
)
.
distinct
()
.
collect
(
Collectors
.
toList
());
routingsupportingreplaces1
=
routingsupportingreplaces
.
stream
()
.
filter
(
t
->
routingsupportingids
.
contains
(
t
.
getStrsupid
())).
collect
(
Collectors
.
toList
());
}
if
(
headers1
==
null
)
{
...
...
src/main/java/com/aps/service/Algorithm/RoutingDataService.java
View file @
c11b1563
...
...
@@ -246,10 +246,13 @@ public class RoutingDataService {
.
collect
(
Collectors
.
toList
());
List
<
Machine
>
machines
=
new
ArrayList
<>();
List
<
PlanResource
>
PlanResources
=
_PlanResourceService
.
lambdaQuery
()
.
eq
(
PlanResource:
:
getIsdeleted
,
0
)
.
list
();
for
(
Long
id
:
MachineIds
)
{
Machine
machine
=
new
Machine
();
machine
.
setId
(
id
);
machines
.
add
(
machine
);
}
//节假日
...
...
@@ -258,9 +261,7 @@ public class RoutingDataService {
LambdaQueryWrapper
<
ProdEquipSpecialCal
>
ProdEquipSpecialCalWrapper
=
new
LambdaQueryWrapper
<>();
ProdEquipSpecialCalWrapper
.
eq
(
ProdEquipSpecialCal:
:
getSceneId
,
SceneId
);
List
<
PlanResource
>
PlanResources
=
_PlanResourceService
.
lambdaQuery
()
.
eq
(
PlanResource:
:
getIsdeleted
,
0
)
.
list
();
...
...
@@ -297,13 +298,13 @@ public class RoutingDataService {
shifts1
.
add
(
shift
);
}
}
List
<
PlanResource
>
PlanResources1
=
PlanResources
.
stream
()
.
filter
(
t
->
t
.
get
Reference
Id
()
==
machine
.
getId
())
.
collect
(
Collectors
.
toList
()
);
if
(
PlanResource
s1
!=
null
&&
PlanResources1
.
size
()>
0
)
PlanResource
PlanResource
=
PlanResources
.
stream
()
.
filter
(
t
->
t
.
getId
()
==
machine
.
getId
())
.
findFirst
().
orElse
(
null
);
if
(
PlanResource
!=
null
)
{
for
(
PlanResource
PlanResource
:
PlanResources1
)
{
machine
.
setCode
(
PlanResource
.
getCode
());
machine
.
setName
(
PlanResource
.
getTitle
());
List
<
MesShiftWorkSched
>
ShiftWorkScheds
=
MesShiftWorkScheds
.
stream
()
.
filter
(
t
->
(
long
)
t
.
getWeekWorkSchedId
()
==
PlanResource
.
getWorkSchedId
())
.
collect
(
Collectors
.
toList
());
...
...
@@ -315,10 +316,13 @@ public class RoutingDataService {
shift
.
setEndDate
(
LocalDateTime
.
of
(
2000
,
1
,
1
,
0
,
0
,
0
));
shifts1
.
add
(
shift
);
}
}
}
}
if
(
shifts1
==
null
)
{
throw
new
RuntimeException
(
String
.
format
(
"设备%s没有工作日历"
,
machine
.
getCode
().
concat
(
"_"
).
concat
(
machine
.
getName
()))
);
}
machine
.
setShifts
(
shifts1
);
List
<
ProdEquipSpecialCal
>
Holidays
=
ProdEquipSpecialCals
.
stream
()
...
...
src/test/java/com/aps/demo/PlanResultServiceTest.java
View file @
c11b1563
...
...
@@ -26,7 +26,7 @@ public class PlanResultServiceTest {
@Test
public
void
testExecute
()
{
planResultService
.
execute2
(
"
6AF8001449FC4D20A3C9992EC24CBF05
"
);
planResultService
.
execute2
(
"
1D233450774C420B9165A6AE6E616F67
"
);
// LocalDateTime t= LocalDateTime.of(2025, 11, 15, 6, 51, 11);
// List<Integer> opids=new ArrayList<>();
...
...
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