|
@@ -395,7 +395,7 @@ public class ApsServiceImpl implements ApsService {
|
|
Map<String, Equipment> allEqs = new HashMap<>();
|
|
Map<String, Equipment> allEqs = new HashMap<>();
|
|
// 统一排程开始时间
|
|
// 统一排程开始时间
|
|
List<ApsScheduleConfigDo> apsConfigs = apsScheduleConfigService.list();
|
|
List<ApsScheduleConfigDo> apsConfigs = apsScheduleConfigService.list();
|
|
- Date apsPlanStartDate = new Date();
|
|
|
|
|
|
+ /*Date apsPlanStartDate = new Date();
|
|
if (apsConfigs != null && apsConfigs.size() > 0) {
|
|
if (apsConfigs != null && apsConfigs.size() > 0) {
|
|
ApsScheduleConfigDo apsScheduleConfig = apsConfigs.get(0);
|
|
ApsScheduleConfigDo apsScheduleConfig = apsConfigs.get(0);
|
|
int a = 8;
|
|
int a = 8;
|
|
@@ -408,7 +408,9 @@ public class ApsServiceImpl implements ApsService {
|
|
apsPlanStartDate = DateUtil.date().offset(DateField.HOUR, a);
|
|
apsPlanStartDate = DateUtil.date().offset(DateField.HOUR, a);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- Date finalApsPlanStartDate = apsPlanStartDate;
|
|
|
|
|
|
+ Date finalApsPlanStartDate = apsPlanStartDate;*/
|
|
|
|
+ Date finalApsPlanStartDate = Date.from(
|
|
|
|
+ LocalDateTime.now().plusDays(1).withHour(12).withMinute(0).withSecond(0).atZone(ZoneId.systemDefault()).toInstant());
|
|
if (cdorders != null && cdorders.size() > 0) {
|
|
if (cdorders != null && cdorders.size() > 0) {
|
|
try {
|
|
try {
|
|
apsOrderScheduleApsNew(cdorders, currentUser, allEqs, finalApsPlanStartDate, null, apsType, needUnLockProcessIdList, startTime);
|
|
apsOrderScheduleApsNew(cdorders, currentUser, allEqs, finalApsPlanStartDate, null, apsType, needUnLockProcessIdList, startTime);
|
|
@@ -1788,7 +1790,8 @@ public class ApsServiceImpl implements ApsService {
|
|
processes.setMinThPcNum(processDetail.getPlanprocessrall());
|
|
processes.setMinThPcNum(processDetail.getPlanprocessrall());
|
|
processes.setProducePcNum(preprocess.getPlanprocessrall());
|
|
processes.setProducePcNum(preprocess.getPlanprocessrall());
|
|
}
|
|
}
|
|
- if (apsBlankOrderVo.getPlanhavematerialdate() != null) {
|
|
|
|
|
|
+ if (apsBlankOrderVo.getPlanhavematerialdate() != null
|
|
|
|
+ && apsBlankOrderVo.getPlanhavematerialdate().compareTo(productionScheduleVo.getApsPlanStartDate())>0) {
|
|
// 全局配置
|
|
// 全局配置
|
|
ApsOverallConfig apsOverallConfig = new ApsOverallConfig();
|
|
ApsOverallConfig apsOverallConfig = new ApsOverallConfig();
|
|
Date startDate = apsBlankOrderVo.getPlanhavematerialdate();
|
|
Date startDate = apsBlankOrderVo.getPlanhavematerialdate();
|
|
@@ -1841,7 +1844,8 @@ public class ApsServiceImpl implements ApsService {
|
|
processes.setCancel(true);
|
|
processes.setCancel(true);
|
|
}
|
|
}
|
|
// 全局配置
|
|
// 全局配置
|
|
- if (apsBlankOrderVo.getPlanhavematerialdate() != null) {
|
|
|
|
|
|
+ if (apsBlankOrderVo.getPlanhavematerialdate() != null
|
|
|
|
+ && apsBlankOrderVo.getPlanhavematerialdate().compareTo(productionScheduleVo.getApsPlanStartDate())>0) {
|
|
processes.setApsOverallConfig(apsUtils.apsOverallConfigSet(apsBlankOrderVo,productionScheduleVo));
|
|
processes.setApsOverallConfig(apsUtils.apsOverallConfigSet(apsBlankOrderVo,productionScheduleVo));
|
|
}
|
|
}
|
|
processes.setProducePcNum(processEquDos.size());
|
|
processes.setProducePcNum(processEquDos.size());
|
|
@@ -1899,7 +1903,8 @@ public class ApsServiceImpl implements ApsService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (apsBlankOrderVo.getPlanhavematerialdate() != null) {
|
|
|
|
|
|
+ if (apsBlankOrderVo.getPlanhavematerialdate() != null
|
|
|
|
+ && apsBlankOrderVo.getPlanhavematerialdate().compareTo(productionScheduleVo.getApsPlanStartDate())>0) {
|
|
// 全局配置
|
|
// 全局配置
|
|
ApsOverallConfig apsOverallConfig = new ApsOverallConfig();
|
|
ApsOverallConfig apsOverallConfig = new ApsOverallConfig();
|
|
Date startDate = apsBlankOrderVo.getPlanhavematerialdate();
|
|
Date startDate = apsBlankOrderVo.getPlanhavematerialdate();
|
|
@@ -1958,7 +1963,8 @@ public class ApsServiceImpl implements ApsService {
|
|
processes.setCancel(true);
|
|
processes.setCancel(true);
|
|
}
|
|
}
|
|
// 全局配置
|
|
// 全局配置
|
|
- if (apsBlankOrderVo.getPlanhavematerialdate() != null) {
|
|
|
|
|
|
+ if (apsBlankOrderVo.getPlanhavematerialdate() != null
|
|
|
|
+ && apsBlankOrderVo.getPlanhavematerialdate().compareTo(productionScheduleVo.getApsPlanStartDate())>0) {
|
|
processes.setApsOverallConfig(apsUtils.apsOverallConfigSet(apsBlankOrderVo,productionScheduleVo));
|
|
processes.setApsOverallConfig(apsUtils.apsOverallConfigSet(apsBlankOrderVo,productionScheduleVo));
|
|
}
|
|
}
|
|
processes.setProducePcNum(processEquDos.size());
|
|
processes.setProducePcNum(processEquDos.size());
|
|
@@ -2020,7 +2026,8 @@ public class ApsServiceImpl implements ApsService {
|
|
processes.setCancel(true);
|
|
processes.setCancel(true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (apsBlankOrderVo.getPlanhavematerialdate() != null) {
|
|
|
|
|
|
+ if (apsBlankOrderVo.getPlanhavematerialdate() != null
|
|
|
|
+ && apsBlankOrderVo.getPlanhavematerialdate().compareTo(productionScheduleVo.getApsPlanStartDate())>0) {
|
|
// 全局配置
|
|
// 全局配置
|
|
ApsOverallConfig apsOverallConfig = new ApsOverallConfig();
|
|
ApsOverallConfig apsOverallConfig = new ApsOverallConfig();
|
|
Date startDate = apsBlankOrderVo.getPlanhavematerialdate();
|
|
Date startDate = apsBlankOrderVo.getPlanhavematerialdate();
|
|
@@ -2082,7 +2089,8 @@ public class ApsServiceImpl implements ApsService {
|
|
processes.setCancel(true);
|
|
processes.setCancel(true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (apsBlankOrderVo.getPlanhavematerialdate() != null) {
|
|
|
|
|
|
+ if (apsBlankOrderVo.getPlanhavematerialdate() != null
|
|
|
|
+ && apsBlankOrderVo.getPlanhavematerialdate().compareTo(productionScheduleVo.getApsPlanStartDate())>0) {
|
|
// 全局配置
|
|
// 全局配置
|
|
ApsOverallConfig apsOverallConfig = new ApsOverallConfig();
|
|
ApsOverallConfig apsOverallConfig = new ApsOverallConfig();
|
|
Date startDate = apsBlankOrderVo.getPlanhavematerialdate();
|
|
Date startDate = apsBlankOrderVo.getPlanhavematerialdate();
|