yangys
2024-04-18 85bb45834b1a2fd993d9f8653c48d14efc12a59e
smart-man-boot/src/main/java/com/qianwen/smartman/modules/cps/service/impl/StockOutTypeServiceImpl.java
@@ -63,14 +63,7 @@
        long codeCountDisable = count(Lambda.eq(StockOutType::getCode, code)
                .eq(StockOutType::getStatus, CommonConstant.ENABLE)
                .ne(Func.isNotEmpty(id), StockOutType::getId, id));
        /*
        long codeCountDisable = count(((ExtraLambdaQueryWrapper) Lambda.eq((v0) -> {
            return v0.getCode();
        }, code).eq((v0) -> {
            return v0.getStatus();
        }, CommonConstant.ENABLE)).ne(Func.isNotEmpty(id), (v0) -> {
            return v0.getId();
        }, id));*/
        ThrowFun.isTrue(codeCountDisable > 0).throwMessage(MessageUtils.message("cps.stock.out.type.code.unable.already.exists", new Object[0]));
        long nameCount = count(Lambda.eq(StockOutType::getName, name)
                .ne(Func.isNotEmpty(id), StockOutType::getId, id));