|
@@ -4225,7 +4225,7 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void apsScheduleRestart(Integer hour, String chongpaiStartDateStr, String chongpaiEndDateStr, SysUserVo currentUser) {
|
|
|
+ public void apsScheduleRestart(Integer hour, String chongpaiStartDateStr, String chongpaiEndDateStr, SysUserVo currentUser, String blankIds) {
|
|
|
if (currentUser == null) {
|
|
|
currentUser = CXCommonUtils.getCurrentUser();
|
|
|
}
|
|
@@ -4282,10 +4282,14 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
//排程设置
|
|
|
ApsScheduleConfigDo apsScheduleConfigDo = apsScheduleConfigService.getById("1");
|
|
|
try {
|
|
|
+ List<String> blankIdList = null;
|
|
|
+ if (StringUtils.isNotBlank(blankIds)) {
|
|
|
+ blankIdList = new LinkedList<>(Arrays.asList(blankIds.split(",")));
|
|
|
+ }
|
|
|
//冷轧重排
|
|
|
- lenzhaChongpai(chongpaiStartDate, chongpaiEndDate, apsScheduleConfigDo, currentUser);
|
|
|
+ lenzhaChongpai(chongpaiStartDate, chongpaiEndDate, apsScheduleConfigDo, currentUser, blankIdList);
|
|
|
//退火重排
|
|
|
- tuihuoChongpai(chongpaiStartDate, chongpaiEndDate, apsScheduleConfigDo, currentUser);
|
|
|
+ tuihuoChongpai(chongpaiStartDate, chongpaiEndDate, apsScheduleConfigDo, currentUser, blankIdList);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e);
|
|
|
} finally {
|
|
@@ -4549,7 +4553,7 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- apsScheduleRestart(null, needScheduleStartDate, needScheduleEndDate, currentUser);
|
|
|
+ apsScheduleRestart(null, needScheduleStartDate, needScheduleEndDate, currentUser, null);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e);
|
|
|
return "success";
|
|
@@ -4613,10 +4617,10 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void tuihuoChongpai(DateTime chongpaiStartDate, DateTime chongpaiEndDate, ApsScheduleConfigDo apsScheduleConfigDo, SysUserVo currentUser) {
|
|
|
+ private void tuihuoChongpai(DateTime chongpaiStartDate, DateTime chongpaiEndDate, ApsScheduleConfigDo apsScheduleConfigDo, SysUserVo currentUser, List<String> blankIdsList) {
|
|
|
//退火重排
|
|
|
//查询在重排时间段的所有作业明细信息,只包括:成退、中退、小卷成退
|
|
|
- List<ApsProcessOperationProcessEquDo> needScheduleList = this.baseMapper.selectNeedRescheduleEqu2(chongpaiStartDate, chongpaiEndDate, CXCommonUtils.getCurrentUserFactoryId(currentUser), apsScheduleConfigDo.getWorkshopin(), apsScheduleConfigDo.getWorkshopcross());
|
|
|
+ List<ApsProcessOperationProcessEquDo> needScheduleList = this.baseMapper.selectNeedRescheduleEqu2(chongpaiStartDate, chongpaiEndDate, CXCommonUtils.getCurrentUserFactoryId(currentUser), apsScheduleConfigDo.getWorkshopin(), apsScheduleConfigDo.getWorkshopcross(), blankIdsList);
|
|
|
if (needScheduleList.isEmpty()) {
|
|
|
log.info("未查询到退火作业明细,结束排程");
|
|
|
return;
|
|
@@ -4713,9 +4717,9 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
|
|
|
}
|
|
|
|
|
|
- private void lenzhaChongpai(DateTime chongpaiStartDate, DateTime chongpaiEndDate, ApsScheduleConfigDo apsScheduleConfigDo, SysUserVo currentUser) {
|
|
|
+ private void lenzhaChongpai(DateTime chongpaiStartDate, DateTime chongpaiEndDate, ApsScheduleConfigDo apsScheduleConfigDo, SysUserVo currentUser, List<String> blankIdsList) {
|
|
|
//查询需要重排的所有明细信息
|
|
|
- List<ApsProcessOperationProcessEquDo> needScheduleList = this.baseMapper.selectNeedRescheduleEqu3(chongpaiStartDate, chongpaiEndDate, CXCommonUtils.getCurrentUserFactoryId(currentUser), apsScheduleConfigDo.getWorkshopin(), apsScheduleConfigDo.getWorkshopcross());
|
|
|
+ List<ApsProcessOperationProcessEquDo> needScheduleList = this.baseMapper.selectNeedRescheduleEqu3(chongpaiStartDate, chongpaiEndDate, CXCommonUtils.getCurrentUserFactoryId(currentUser), apsScheduleConfigDo.getWorkshopin(), apsScheduleConfigDo.getWorkshopcross(), blankIdsList);
|
|
|
if (needScheduleList.isEmpty()) {
|
|
|
log.info("未查询到冷轧作业明细,结束排程");
|
|
|
return;
|