cl
15 小时以前 8943a4e9f5ee1455c56ac4af60d941fa23731051
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java
@@ -207,8 +207,15 @@
            if (barcodeToUse == null && !existTasks.isEmpty()) {
                barcodeToUse = existTasks.get(0).getBarcode();
                if (StringUtils.isNotBlank(barcodeToUse)) {
                    locService.update(new LambdaUpdateWrapper<Loc>().eq(Loc::getId, loc.getId())
                            .set(Loc::getBarcode, barcodeToUse).set(Loc::getUpdateBy, loginUserId).set(Loc::getUpdateTime, new Date()));
                    Task refTask = existTasks.get(0);
                    LambdaUpdateWrapper<Loc> locUw = new LambdaUpdateWrapper<Loc>().eq(Loc::getId, loc.getId())
                            .set(Loc::getBarcode, barcodeToUse)
                            .set(Loc::getUpdateBy, loginUserId)
                            .set(Loc::getUpdateTime, new Date());
                    if (refTask.getWeight() != null) {
                        locUw.set(Loc::getWeight, refTask.getWeight());
                    }
                    locService.update(locUw);
                }
            }
            if (barcodeToUse == null) {
@@ -456,7 +463,8 @@
            throw new CoolException("目标库位不存在!!");
        }
        targetLoc.setUseStatus(LocStsType.LOC_STS_TYPE_S.type);
        targetLoc.setUseStatus(LocStsType.LOC_STS_TYPE_S.type)
                .setWeight(orgLoc.getWeight());
        if (!locService.updateById(targetLoc)) {
            throw new CoolException("目标库位预约失败!!");