Commit 5cd21818 authored by Tong Li's avatar Tong Li

遗传算法-物料需求

parent 5d00b320
......@@ -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(headers1!=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(headers1==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));
......
......@@ -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<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment