|
@@ -4349,11 +4349,17 @@ public class ApsBlankOrderServiceImpl extends ServiceImpl<ApsBlankOrderDao, ApsB
|
|
|
//将实际完工时间大于明天的作业挪到实际完工时间
|
|
|
this.baseMapper.updateFinishDateAboutProcessEqu(needScheduleDate, tenantId, chongpaiStartDate, chongpaiEndDate);
|
|
|
//错误数据纠正挪动
|
|
|
+ int safeCount = 0;
|
|
|
while (true) {
|
|
|
int updateCount = this.baseMapper.moveErrorProcessEqu(chongpaiEndDate, CXCommonUtils.getCurrentUserFactoryId(currentUser), apsScheduleConfigDo.getWorkshopin(), apsScheduleConfigDo.getWorkshopcross());
|
|
|
if (updateCount <= 0) {
|
|
|
break;
|
|
|
}
|
|
|
+ //安全设置,防止死循环
|
|
|
+ safeCount += 1;
|
|
|
+ if (safeCount >= 50) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
//锁定所有 未锁定的 作业和作业明细
|
|
|
apsProcessOperationProcessEquService.update(new LambdaUpdateWrapper<ApsProcessOperationProcessEquDo>()
|