无关风月
2024-12-30 d69ee0edbb5df260ac6b872357b88499d7914610
manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java
@@ -33,6 +33,7 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
@@ -75,12 +76,13 @@
        // 根据型号名称 查询型号列表ids
        List<Integer> collect = modelService.lambdaQuery()
                .eq(StringUtils.hasLength(getCurrentByParam.getModel()),TModel::getName, getCurrentByParam.getModel())
                .eq(getCurrentByParam.getMaterialId()!=null,TModel::getMaterialId,getCurrentByParam.getMaterialId())
                .eq(Objects.nonNull(getCurrentByParam.getMaterialId()),TModel::getMaterialId,getCurrentByParam.getMaterialId())
                .eq(StringUtils.hasLength(getCurrentByParam.getColor()),TModel::getColor,getCurrentByParam.getColor())
                .eq(getCurrentByParam.getBrandId()!=null,TModel::getBrandId,getCurrentByParam.getBrandId())
                .eq(Objects.nonNull(getCurrentByParam.getBrandId()),TModel::getBrandId,getCurrentByParam.getBrandId())
                .list().stream().map(TModel::getId).collect(Collectors.toList());
        TFrameGoods one = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect)
                .eq(TFrameGoods::getColor, getCurrentByParam.getColor()).one();
                .eq(TFrameGoods::getColor, getCurrentByParam.getColor())
                .eq(TFrameGoods::getStoreId, getCurrentByParam.getStoreId()).one();
        if (one!=null){
            return ApiResult.success(one.getTotal());
        }
@@ -94,6 +96,7 @@
                .eq(dto.getRefractiveIndex()!=null,TLensGoods::getRefractiveIndex, dto.getRefractiveIndex())
                .eq(dto.getBallMirror()!=null,TLensGoods::getBallMirror, dto.getBallMirror())
                .eq(dto.getColumnMirror()!=null,TLensGoods::getColumnMirror, dto.getColumnMirror())
                .eq(dto.getStoreId()!=null,TLensGoods::getStoreId, dto.getStoreId())
                .one();
        if (one!=null){
            return ApiResult.success(one.getTotal());