| | |
| | | @ApiOperation(value = "镜片出入库记录列表") |
| | | @PostMapping(value = "/detailLensList") |
| | | public ApiResult<PageInfo<TLensWarehousingDetailVO>> detailLensList(@RequestBody TWarehousingDetailLensQuery query) { |
| | | if (query.getSeriesId()!=null){ |
| | | TLensSeries series = lensSeriesService.getById(query.getSeriesId()); |
| | | if (series!=null){ |
| | | query.setSeries(series.getName()); |
| | | } |
| | | } |
| | | if (query.getBrandId()!=null){ |
| | | TBrand brand = brandService.getById(query.getBrandId()); |
| | | if (brand!=null){ |
| | | query.setBrand(brand.getName()); |
| | | } |
| | | } |
| | | return ApiResult.success(warehousingService.detailListLens(query)); |
| | | } |
| | | /** |
| | |
| | | List<TFrameWarehousingDetail> list = frameWarehousingDetailService.list(Wrappers.lambdaQuery(TFrameWarehousingDetail.class) |
| | | .eq(TFrameWarehousingDetail::getWarehousingId, id)); |
| | | vo.setFrameWarehousingDetails(list); |
| | | TStore store = storeService.getById(warehousing.getStoreId()); |
| | | if (store!=null){ |
| | | vo.setStoreName(store.getName()); |
| | | } |
| | | // 统计数量 |
| | | vo.setTotalNum(list.stream().mapToInt(TFrameWarehousingDetail::getTotal).sum()); |
| | | return ApiResult.success(vo); |
| | |
| | | BeanUtils.copyProperties(warehousing, vo); |
| | | List<TLensWarehousingDetail> list = lensWarehousingDetailService.list(Wrappers.lambdaQuery(TLensWarehousingDetail.class) |
| | | .eq(TLensWarehousingDetail::getWarehousingId, id)); |
| | | TStore store = storeService.getById(warehousing.getStoreId()); |
| | | if (store!=null){ |
| | | vo.setStoreName(store.getName()); |
| | | } |
| | | vo.setLensWarehousingDetails(list); |
| | | // 统计数量 |
| | | vo.setTotalNum(list.stream().mapToInt(TLensWarehousingDetail::getTotal).sum()); |