Commit da07192c authored by Tong Li's avatar Tong Li

删除工单

parent 94b84404
...@@ -695,11 +695,12 @@ Integer newMachineId1=newMachineId.intValue(); ...@@ -695,11 +695,12 @@ Integer newMachineId1=newMachineId.intValue();
ScheduleResults.remove(OperationIndex1.getAsInt()); ScheduleResults.remove(OperationIndex1.getAsInt());
} }
int i=0; AtomicInteger globalOpId = new AtomicInteger(0);
for (GlobalOperationInfo globalOp : globalOpList) { globalOpList.forEach(t-> {
globalOp.setGlobalOpId(i);
i++; t.setGlobalOpId(globalOpId.getAndIncrement());
}
});
// chromosome.getOperatRel().remove(GroupId-1); // chromosome.getOperatRel().remove(GroupId-1);
orders.remove(sourceorder); orders.remove(sourceorder);
redecode(chromosome, chromosome.getBaseTime(), globalParam); redecode(chromosome, chromosome.getBaseTime(), globalParam);
...@@ -787,14 +788,16 @@ Integer newMachineId1=newMachineId.intValue(); ...@@ -787,14 +788,16 @@ Integer newMachineId1=newMachineId.intValue();
}else { }else {
if(StringUtils.isBlank(entry.getMainId())) { if(entry.getMainId()!=null&&!entry.getMainId().equals("")) {
//拆分的工序数量补齐到其他的 //拆分的工序数量补齐到其他的
Entry main = entrys.stream(). Entry main = entrys.stream().
filter(t -> t.MainId == entry.getMainId()) filter(t -> t.MainId.equals(entry.getMainId()) &&t.getId()!=entry.getId())
.findFirst() .findFirst()
.orElse(null); .orElse(null);
if (main != null) { if (main != null) {
main.setQuantity(main.getQuantity() + entry.getQuantity()); main.setQuantity(main.getQuantity() + entry.getQuantity());
GlobalOperationInfo operationInfo= globalOpList.stream() GlobalOperationInfo operationInfo= globalOpList.stream()
.filter(i -> i.getOp().getId() == main.getId()) .filter(i -> i.getOp().getId() == main.getId())
.findFirst() .findFirst()
......
...@@ -49,7 +49,7 @@ public class PlanResultServiceTest { ...@@ -49,7 +49,7 @@ public class PlanResultServiceTest {
// maintenanceWindow.setStartTime(LocalDateTime.of(2025, 10, 21, 0, 0, 0)); // maintenanceWindow.setStartTime(LocalDateTime.of(2025, 10, 21, 0, 0, 0));
// maintenanceWindow.setEndTime(LocalDateTime.of(2025, 10, 31, 0, 0, 0)); // maintenanceWindow.setEndTime(LocalDateTime.of(2025, 10, 31, 0, 0, 0));
// planResultService.AddMaintenanceWindow("B6AE363FF5044DDF8DECE32D5FE0F7EA",1245l,maintenanceWindow); // planResultService.AddMaintenanceWindow("B6AE363FF5044DDF8DECE32D5FE0F7EA",1245l,maintenanceWindow);
planResultService.DelOperation("B6AE363FF5044DDF8DECE32D5FE0F7EA",3); planResultService.DelOperation("B6AE363FF5044DDF8DECE32D5FE0F7EA",7);
// planResultService.SpiltOrder("A41D662EE0764D008173C5A0E42B15F6","5f9d5383-b89a-4a4f-8805-2f617c711968",new Double[]{500d, 500d}); // planResultService.SpiltOrder("A41D662EE0764D008173C5A0E42B15F6","5f9d5383-b89a-4a4f-8805-2f617c711968",new Double[]{500d, 500d});
} }
......
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