|
@@ -1,6 +1,7 @@
|
|
|
package com.rongwei.bscommon.sys.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.collection.ListUtil;
|
|
|
import cn.hutool.core.date.DateField;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
@@ -156,6 +157,10 @@ public class ApsServiceImpl implements ApsService {
|
|
|
List<String> repcIds = fbNotLock.stream().map(v -> v.getId()).collect(Collectors.toList());
|
|
|
logger.info("解锁重排订单:" + repcIds);
|
|
|
}
|
|
|
+ // redis缓存正在排程的ID
|
|
|
+ List<String> bids = apsBlankOrders.stream().map(ApsBlankOrderVo::getId).collect(Collectors.toList());
|
|
|
+ String bidsStr = CollUtil.join(bids, ",");
|
|
|
+ redisService.redisCatchInit("aps-blankids-" + tenantId, bidsStr, 3600 * 24);
|
|
|
// 冷轧连续性问题重排
|
|
|
if (apsType != null && StrUtil.isNotBlank(apsType.getScheduleType()) && "dd".equals(apsType.getScheduleType())) {
|
|
|
lzlxOrderSchedule(apsBlankOrders, currentUser, apsType, needUnLockProcessIdList, scheduleStartDate, startTime);
|
|
@@ -174,6 +179,8 @@ public class ApsServiceImpl implements ApsService {
|
|
|
throw e;
|
|
|
} finally {
|
|
|
rLock.forceUnlock();
|
|
|
+ // 清空redis缓存
|
|
|
+ redisService.getRedisTemplate().delete("aps-blankids-" + tenantId);
|
|
|
System.out.println("解锁....");
|
|
|
logger.info("解锁....");
|
|
|
}
|