Pārlūkot izejas kodu

调度排程优化

fangpy 5 mēneši atpakaļ
vecāks
revīzija
5247ce6e98

+ 8 - 3
rw-aps-server/src/main/java/com/rongwei/rwapsserver/aps/service/impl/ProductionScheduleServiceImpl.java

@@ -50,7 +50,7 @@ public class ProductionScheduleServiceImpl implements ProductionScheduleService
      */
     @Override
     public ProductionScheduleRetVo productionSchedule(ProductionScheduleVo productionScheduleVo) throws Exception{
-        /*List<ProductionProcesses> collect = productionScheduleVo.getProcesses().stream().filter(v -> "3e8e9b6d500b4d04b91d9222071367d1".equals(v.getProduceOrder().get(0).getId())).collect(Collectors.toList());
+        /*List<ProductionProcesses> collect = productionScheduleVo.getProcesses().stream().filter(v -> "e4cbc5836d88414792a206d52faaf2b7".equals(v.getProduceOrder().get(0).getId())).collect(Collectors.toList());
         productionScheduleVo.setProcesses(collect);*/
 
         log.info("*************** 排程开始:"+productionScheduleVo.getProductionScheduleId()+" *******************");
@@ -129,7 +129,12 @@ public class ProductionScheduleServiceImpl implements ProductionScheduleService
             return null;
         }*/
         // 退火合并
-        List<ProductionProcesses> thList = apsService.thProcessMerge(productionScheduleVo,apsSolution,otherThproces);
+        List<ProductionProcesses> thList = null;
+        if("dd".equals(productionScheduleVo.getScheduleType().getScheduleType())){
+            thList = apsSolution.getProcessesList();
+        }else{
+            thList = apsService.thProcessMerge(productionScheduleVo,apsSolution,otherThproces);
+        }
         apsSolution.setProcessesList(thList);
 
         List<ProductionProcesses> processesList = null;
@@ -1654,7 +1659,7 @@ public class ProductionScheduleServiceImpl implements ProductionScheduleService
             List<ProductionProcesses> noTimes = processesList1.stream().filter(v -> v.getRooprocess() == null || v.getRooprocess().getStartTime() == null).collect(Collectors.toList());
             if(noTimes == null && noTimes.size() == 0){
                 List<ProductionProcesses> noTimes1 = processesList1.stream().filter(v -> v.getRooprocess() == null || v.getRooprocess().getStartTime() == null).collect(Collectors.toList());
-                if(noTimes1 != null && noTimes1.size()>0){
+                if(noTimes1 != null && noTimes1.size()>0 && processesList1.size()>noTimes1.size()){
                     int n = 1;
                 }
                 // 按照铸轧开始时间排序