fix:修复虚拟货位生成只到100的问题
This commit is contained in:
@@ -20,6 +20,7 @@ import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.common.utils.RedissonUtils;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.FileUtil;
|
||||
@@ -1591,7 +1592,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RedissonUtils.lock(a->{
|
||||
//查询生成和未分配完的明细
|
||||
JSONArray dtls = WQL.getWO("QST_IVT_CHECKOUTBILL")
|
||||
.addParam("flag", "2")
|
||||
@@ -1604,12 +1605,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (ObjectUtil.isEmpty(dtls)) {
|
||||
throw new BadRequestException("当前订单无可分配出库明细");
|
||||
}
|
||||
|
||||
RLock lock = redissonClient.getLock("all_divOne");
|
||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||
|
||||
try {
|
||||
if (tryLock) {
|
||||
//定义需要更新的仓位集合
|
||||
HashMap<String, JSONObject> Struct_map = new HashMap<String, JSONObject>();
|
||||
for (int i = 0; i < dtls.size(); i++) {
|
||||
@@ -1827,14 +1822,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
storPublicService.updateStructAndPoint(from_start);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException("其他出库单当前正在分配货位,请等待几秒再进行操作!");
|
||||
}
|
||||
} finally {
|
||||
if (lock.isLocked() && lock.isHeldByCurrentThread()) {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},"all_divOne",whereJson);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user