From 6818ba08ca3d242bbccde602d5b8fa71ee6d3b94 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 20 十二月 2024 14:59:37 +0800 Subject: [PATCH] 代码 --- manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java | 39 +++++++++++++++++++++++++++++++++++---- 1 files changed, 35 insertions(+), 4 deletions(-) diff --git a/manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java b/manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java index b983a81..61366b1 100644 --- a/manage/src/main/java/com/jilongda/manage/controller/TWarehousingController.java +++ b/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); } /** -- Gitblit v1.7.1