|
@@ -788,9 +788,12 @@ public class ApsServiceImpl implements ApsService {
|
|
|
logger.info("排程数据:" + JSONUtil.toJsonStr(apsProductionSchedule, jsonConfig));
|
|
|
// APS平台排程接口调用
|
|
|
ProductionScheduleRetVo productionScheduleRetVo;
|
|
|
- if (apsType.getConstraintMode() != null && apsType.getConstraintMode().equals("lz")) {
|
|
|
+ if (apsType.getConstraintMode() != null && apsType.getConstraintMode().equals("lz") && "dd".equals(apsType.getScheduleType())) {
|
|
|
productionScheduleRetVo = rwApsServer.productionLzDdSchedule(apsProductionSchedule);
|
|
|
- } else {
|
|
|
+ }else if("dd".equals(apsType.getScheduleType()) && "thMergeBf".equals(apsType.getThMergeMode())){
|
|
|
+// productionScheduleRetVo = rwApsServer.productionThDdSchedule(apsProductionSchedule);
|
|
|
+ productionScheduleRetVo = rwApsServer.productionSchedule(apsProductionSchedule);
|
|
|
+ }else {
|
|
|
productionScheduleRetVo = rwApsServer.productionSchedule(apsProductionSchedule);
|
|
|
}
|
|
|
saveRes(productionScheduleRetVo,
|
|
@@ -1246,14 +1249,17 @@ public class ApsServiceImpl implements ApsService {
|
|
|
List<ApsEquipmentCalendarDo> baseEquipmentCalendarList) {
|
|
|
// 当前工序排程开始时间
|
|
|
Date apsPlanStartDate = productionScheduleVo.getApsPlanStartDate();
|
|
|
- if (productionScheduleVo.getProcesses() != null && productionScheduleVo.getProcesses().size() > 0) {
|
|
|
- List<ProductionProcesses> bsProcess = productionScheduleVo.getProcesses().stream().filter(v -> v.getBsProcessesId().get(0).equals(operationDo.getId())).collect(Collectors.toList());
|
|
|
- if (bsProcess != null && bsProcess.size() > 0) {
|
|
|
- if (bsProcess.get(0).getApsOverallConfig() != null && bsProcess.get(0).getApsOverallConfig().getStartTime() != null) {
|
|
|
- apsPlanStartDate = Date.from(bsProcess.get(0).getApsOverallConfig().getStartTime().atZone(ZoneId.systemDefault()).toInstant());
|
|
|
+ if(!"dd".equals(apsType.getScheduleType())){
|
|
|
+ if (productionScheduleVo.getProcesses() != null && productionScheduleVo.getProcesses().size() > 0) {
|
|
|
+ List<ProductionProcesses> bsProcess = productionScheduleVo.getProcesses().stream().filter(v -> v.getBsProcessesId().get(0).equals(operationDo.getId())).collect(Collectors.toList());
|
|
|
+ if (bsProcess != null && bsProcess.size() > 0) {
|
|
|
+ if (bsProcess.get(0).getApsOverallConfig() != null && bsProcess.get(0).getApsOverallConfig().getStartTime() != null) {
|
|
|
+ apsPlanStartDate = Date.from(bsProcess.get(0).getApsOverallConfig().getStartTime().atZone(ZoneId.systemDefault()).toInstant());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
String apsPlanStartDateStr = DateUtil.formatDateTime(apsPlanStartDate);
|
|
|
// 设备列表
|
|
|
List<String> optionalEquipments = new ArrayList<>();
|