无关风月
2024-12-20 6818ba08ca3d242bbccde602d5b8fa71ee6d3b94
代码
1个文件已修改
1个文件已添加
60 ■■■■■ 已修改文件
manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/java/com/jilongda/manage/vo/TLensGoodsDetailVO.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java
@@ -58,6 +58,10 @@
    private TModelService modelService;
    @Autowired
    private TLensSeriesService lensSeriesService;
    @Autowired
    private TStoreService storeService;
    @Autowired
    private TBrandService brandService;
    /**
     * 通过型号查询色号列表
     */
@@ -127,11 +131,38 @@
    /**
     * 库存明细记录列表
     */
    @ApiOperation(value = "镜片库存明细记录列表")
    @ApiOperation(value = "镜片库存明细记录列表--库存详情")
    @PostMapping(value = "/detailLensList")
    public ApiResult<PageInfo<TLensWarehousingDetailVO>> detailLensList(@RequestBody TWarehousingDetailLensQuery query) {
        PageInfo<TLensWarehousingDetailVO> frameWarehousingDetailVOPageInfo = warehousingService.detailListLens(query);
        return ApiResult.success(frameWarehousingDetailVOPageInfo);
    public ApiResult<TLensGoodsDetailVO> detailLensList(Integer id) {
        TLensGoodsDetailVO tLensGoodsDetailVO = new TLensGoodsDetailVO();
        TLensGoods byId = lensGoodsService.getById(id);
        TStore byId1 = storeService.getById(byId.getStoreId());
        if (byId1!=null){
            tLensGoodsDetailVO.setStoreName(byId1.getName());
        }
        TLensSeries byId2 = lensSeriesService.getById(byId.getSeriesId());
        if (byId2!=null){
            Integer brandId = byId2.getBrandId();
            TBrand byId3 = brandService.getById(brandId);
            String t1 = "";
            switch (byId.getLensType()){
                case 1:
                    t1="球面";
                    break;
                case 2:
                    t1="非球面";
                    break;
                case 3:
                    t1="双非";
                    break;
            }
            tLensGoodsDetailVO.setTitle(byId3.getName()+byId2.getName()+t1+" "+byId.getRefractiveIndex());
        }
        // 查询这个商品的库存明细
        List<TLensWarehousingDetail> list = lensWarehousingDetailService.lambdaQuery().eq(TLensWarehousingDetail::getSeriesId, byId.getSeriesId())
                .eq(TLensWarehousingDetail::getRefractiveIndex, byId.getRefractiveIndex()).list();
        tLensGoodsDetailVO.setList(list);
        return ApiResult.success(tLensGoodsDetailVO);
    }
    /**
manage/src/main/java/com/jilongda/manage/vo/TLensGoodsDetailVO.java
New file
@@ -0,0 +1,21 @@
package com.jilongda.manage.vo;
import com.jilongda.manage.model.TLensGoods;
import com.jilongda.manage.model.TLensWarehousingDetail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "镜片库存详情VO")
public class TLensGoodsDetailVO{
    @ApiModelProperty(value = "品牌名称+系列名称+球/飞球+折射率")
    private String title;
    @ApiModelProperty(value = "门店名称")
    private String storeName;
    @ApiModelProperty(value = "库存数据")
    private List<TLensWarehousingDetail> list;
}