|
@@ -295,6 +295,7 @@ public class ProductionScheduleServiceImpl implements ProductionScheduleService
|
|
|
solvedBalance.getProcessesList().addAll(hasLocks);
|
|
|
// 退火合并工序排程完拆分
|
|
|
if(otherThproces != null && otherThproces.size()>0){
|
|
|
+ List<ProductionProcesses> otherThproce1 = new ArrayList<>();
|
|
|
for (ProductionProcesses otherThproce : otherThproces) {
|
|
|
if(StrUtil.isNotBlank(otherThproce.getMergeThMainId())){
|
|
|
ProductionProcesses thpro = null;
|
|
@@ -323,18 +324,37 @@ public class ProductionScheduleServiceImpl implements ProductionScheduleService
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- /*if(otherThproce.getPreviousProcesses() != null && otherThproce.getPreviousProcesses().size()>0){
|
|
|
- for (ProductionProcesses previousProcess : otherThproce.getPreviousProcesses()) {
|
|
|
- List<String> nextids = new ArrayList<>();
|
|
|
- nextids.add(otherThproce.getId());
|
|
|
- previousProcess.setNextProcessesIds(nextids);
|
|
|
- }
|
|
|
- }*/
|
|
|
if(thpro.getProcessType().equals("小卷成退")){
|
|
|
thpro.setMinThPcNum(thpro.getMinThPcNum()-otherThproce.getMinThPcNum());
|
|
|
}
|
|
|
+ }else{
|
|
|
+ otherThproce1.add(otherThproce);
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(otherThproce1 != null && otherThproce1.size()>0){
|
|
|
+ for (ProductionProcesses otherThproce : otherThproce1) {
|
|
|
+ if(StrUtil.isNotBlank(otherThproce.getMergeThMainId())){
|
|
|
+ ProductionProcesses thpro = null;
|
|
|
+ for (ProductionProcesses productionProcesses : otherThproces) {
|
|
|
+ if(productionProcesses.getId().equals(otherThproce.getMergeThMainId())){
|
|
|
+ thpro = productionProcesses;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(thpro != null){
|
|
|
+ otherThproce.setStartTime(thpro.getStartTime());
|
|
|
+ otherThproce.setEndTime(thpro.getEndTime());
|
|
|
+ otherThproce.setEquipmentId(thpro.getEquipmentId());
|
|
|
+ otherThproce.setEquipment(thpro.getEquipment());
|
|
|
+ otherThproce.setConflictRoptions(thpro.getConflictRoptions());
|
|
|
|
|
|
+ thpro.setOpeProducePcNum(1);
|
|
|
+ if(thpro.getProcessType().equals("小卷成退")){
|
|
|
+ thpro.setMinThPcNum(thpro.getMinThPcNum()-otherThproce.getMinThPcNum());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|