无关风月
2025-01-08 364e21d175d91ad58cbc65642bfc036780192374
bug修改
2个文件已修改
40 ■■■■ 已修改文件
manage/src/main/java/com/jilongda/manage/controller/TInventoryController.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/java/com/jilongda/manage/controller/TInventoryController.java
@@ -134,29 +134,30 @@
                .eq(getCurrentByParam.getBrandId()!=null,TModel::getBrandId,getCurrentByParam.getBrandId())
                .list().stream().map(TModel::getId).collect(Collectors.toList());
        if (collect.isEmpty())collect.add(-1);
        TFrameGoods one = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect)
        List<TFrameGoods> one = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect)
                .eq(TFrameGoods::getStoreId,getCurrentByParam.getStoreId())
                .eq(TFrameGoods::getColor, getCurrentByParam.getColor()).one();
        if (one!=null){
            return ApiResult.success(one.getTotal());
        }
        return ApiResult.success(0);
                .eq(TFrameGoods::getColor, getCurrentByParam.getColor()).list();
        if (one.isEmpty())return ApiResult.success(0);
        Integer temp = one.stream()
                .mapToInt(TFrameGoods::getTotal)
                .sum();
        return ApiResult.success(temp);
    }
    @ApiOperation(value = "镜片-根据品牌id、型号名称、色号名称、材质id查询当前库存")
    @PostMapping(value = "/getCurrentByParamLens")
    public ApiResult<Integer> getCurrentByParamLens(@RequestBody GetCurrentByParamLens dto) {
        TLensGoods one = lensGoodsService.lambdaQuery().in(TLensGoods::getSeriesId, dto.getSeriesId())
        List<TLensGoods> one = lensGoodsService.lambdaQuery().in(TLensGoods::getSeriesId, dto.getSeriesId())
                .eq(dto.getLensType()!=null,TLensGoods::getLensType, dto.getLensType())
                .eq(StringUtils.hasLength(dto.getRefractiveIndex()),TLensGoods::getRefractiveIndex, dto.getRefractiveIndex())
                .eq(StringUtils.hasLength(dto.getBallMirror()),TLensGoods::getBallMirror, dto.getBallMirror())
                .eq(StringUtils.hasLength(dto.getColumnMirror()),TLensGoods::getColumnMirror, dto.getColumnMirror())
                .eq(dto.getStoreId()!=null,TLensGoods::getStoreId, dto.getStoreId())
                .one();
        if (one!=null){
            return ApiResult.success(one.getTotal());
        }
        return ApiResult.success(0);
                .list();
        if (one.isEmpty())return ApiResult.success(0);
        Integer temp = one.stream()
                .mapToInt(TLensGoods::getTotal)
                .sum();
        return ApiResult.success(temp);
    }
    @ApiOperation(value = "查看详情")
    @GetMapping(value = "/getDetailById")
manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java
@@ -81,13 +81,14 @@
                .eq(Objects.nonNull(getCurrentByParam.getBrandId()),TModel::getBrandId,getCurrentByParam.getBrandId())
                .list().stream().map(TModel::getId).collect(Collectors.toList());
        if (collect.isEmpty())collect.add(-1);
        TFrameGoods one = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect)
        List<TFrameGoods> one = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect)
                .eq(TFrameGoods::getColor, getCurrentByParam.getColor())
                .eq(TFrameGoods::getStoreId, getCurrentByParam.getStoreId()).one();
        if (one!=null){
            return ApiResult.success(one.getTotal());
        }
        return ApiResult.success(0);
                .eq(TFrameGoods::getStoreId, getCurrentByParam.getStoreId()).list();
        if (one.isEmpty())return ApiResult.success(0);
        Integer temp = one.stream()
                .mapToInt(TFrameGoods::getTotal)
                .sum();
        return ApiResult.success(temp);
    }
    @ApiOperation(value = "镜片-根据系列id、球/非球、品牌id、折射率、ballMirror、columnMirror查询当前库存")
    @PostMapping(value = "/getCurrentByParamLens")