opt:分配添加锁释放时间
This commit is contained in:
@@ -277,7 +277,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
}
|
||||
|
||||
RLock lock = redissonClient.getLock("all_divTwo");
|
||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||
boolean tryLock = lock.tryLock(0, 60,TimeUnit.SECONDS);
|
||||
try {
|
||||
if (tryLock) {
|
||||
// 用于插入分配明细的集合
|
||||
@@ -800,7 +800,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
if (ObjectUtil.isNotEmpty(taskArr)) {
|
||||
throw new BadRequestException("有任务未完成,不允许强制确认!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 需要更新的库存集合
|
||||
List<JSONObject> needUpdateIvtList = new ArrayList<>();
|
||||
@@ -1638,7 +1638,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
JSONObject jsonTask = taskList.stream()
|
||||
.filter(row -> row.getString("task_id").equals(json.getString("task_code")))
|
||||
.collect(Collectors.toList()).get(0);
|
||||
|
||||
|
||||
|
||||
// 完成
|
||||
if (jsonTask.getString("task_status").equals(TaskStatusEnum.FINISHED.getCode())) {
|
||||
|
||||
Reference in New Issue
Block a user