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
5cd21818
Commit
5cd21818
authored
Dec 22, 2025
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
遗传算法-物料需求
parent
5d00b320
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
MaterialRequirementService.java
...com/aps/service/Algorithm/MaterialRequirementService.java
+12
-4
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 @
5cd21818
...
...
@@ -103,7 +103,10 @@ public class MaterialRequirementService {
.
map
(
Entry:
:
getRoutingId
)
.
distinct
()
.
collect
(
Collectors
.
toList
());
if
(
routingIds
.
size
()==
0
)
{
return
null
;
}
LambdaQueryWrapper
<
RoutingHeader
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
RoutingHeader:
:
getId
,
routingIds
)
.
eq
(
RoutingHeader:
:
getIsDeleted
,
0
)
...
...
@@ -232,7 +235,7 @@ public class MaterialRequirementService {
.
eq
(
RoutingHeader:
:
getIsDeleted
,
0
)
.
eq
(
RoutingHeader:
:
getApprovalStatus
,
1
);
// 添加 is_deleted=0 过滤条件
headers1
=
routingHeaderMapper
.
selectOne
(
wrapper
);
if
(
headers
!=
null
)
{
if
(
headers
1
!=
null
)
{
headers
.
add
(
headers1
);
routingIds
=
headers1
.
getId
().
longValue
();
...
...
@@ -270,7 +273,7 @@ public class MaterialRequirementService {
routingsupportingreplaces1
=
routingsupportingreplaces
.
stream
()
.
filter
(
t
->
routingsupportingids
.
contains
(
t
.
getStrsupid
())).
collect
(
Collectors
.
toList
());
}
if
(
headers
==
null
)
if
(
headers
1
==
null
)
{
return
null
;
}
...
...
@@ -540,9 +543,14 @@ public class MaterialRequirementService {
childorder
.
setDueDate
(
forder
.
getDueDate
());
childorder
.
setPriority
(
forder
.
getPriority
());
childorder
.
setActualPriority
(
forder
.
getActualPriority
());
_childorders
.
add
(
childorder
);
Map
<
Integer
,
Object
>
list
=
CreateChild
(
childorder
,
material
.
getId
());
if
(
list
==
null
)
{
continue
;
}
_childorders
.
add
(
childorder
);
List
<
Entry
>
newentrys
=(
List
<
Entry
>)
list
.
get
(
1
);
_newEntrys
.
addAll
(
newentrys
);
_newMachines
.
addAll
((
List
<
Machine
>)
list
.
get
(
2
));
...
...
src/test/java/com/aps/demo/PlanResultServiceTest.java
View file @
5cd21818
...
...
@@ -26,7 +26,7 @@ public class PlanResultServiceTest {
@Test
public
void
testExecute
()
{
planResultService
.
execute2
(
"
B571EF6682DB463AB2977B1055A74112
"
);
planResultService
.
execute2
(
"
6AF8001449FC4D20A3C9992EC24CBF05
"
);
// 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