| | |
| | | package com.ruoyi.management.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | |
| | | import com.ruoyi.management.domain.dto.ManagementimgVolumeProductionZyVO; |
| | | import com.ruoyi.management.domain.vo.*; |
| | | import com.ruoyi.management.mapper.*; |
| | | import com.ruoyi.management.service.SlStoreManagementService; |
| | | import com.ruoyi.management.service.SlVolumeProductionZyService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.domain.getVolumeProductionRkQuery; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | |
| | | private SlVolumeProductionZyglMapper slVolumeProductionZyglMapper; |
| | | @Resource |
| | | private SlGoodsShelfMapper slGoodsShelfMapper; |
| | | @Autowired |
| | | private SlStoreManagementService service; |
| | | @Override |
| | | public PageDTO<getVolumeProductionzyCodeVO> getVolumeProductionzyCode(VolumeProductionZygCodeQuery volumeProductionZygCodeQuery) { |
| | | |
| | |
| | | |
| | | @Override |
| | | public PageDTO<ManagementimgVolumeProductionZyVO> getSlVolumeProductionZyList(ManagementimgVolumeProductionZyQuery managementimgVolumeProductionZyQuery) { |
| | | |
| | | SlVolumeProductionZygl slVolumeProductionZygl = slVolumeProductionZyglMapper.selectById(managementimgVolumeProductionZyQuery.getVolumeProductionzyglId()); |
| | | |
| | | LambdaQueryWrapper<SlVolumeProductionRk> wrapper2= Wrappers.lambdaQuery(); |
| | | wrapper2.eq(SlVolumeProductionRk::getManagementId,slVolumeProductionZygl.getBmanagementId()); |
| | | wrapper2.eq(SlVolumeProductionRk::getStoreManagementNumber,managementimgVolumeProductionZyQuery.getStoreManagementNumber()); |
| | |
| | | } |
| | | return SlGoodsShelfDTO; |
| | | } |
| | | |
| | | @Override |
| | | public NumberAndShelfVO getNumberAndShelfByManagementId(QueryDTO dto) { |
| | | NumberAndShelfVO numberAndShelfVO = new NumberAndShelfVO(); |
| | | SlStoreManagement byId = service.getById(dto.getManagementId()); |
| | | List<String> number = new ArrayList<>(); |
| | | for (Integer i = 1; i <= byId.getStoreManagementNumber(); i++) { |
| | | switch (i){ |
| | | case 1: |
| | | number.add("一层"); |
| | | break; |
| | | case 2: |
| | | number.add("二层"); |
| | | break; |
| | | case 3: |
| | | number.add("三层"); |
| | | break; |
| | | } |
| | | } |
| | | numberAndShelfVO.setNumber(number); |
| | | QueryWrapper<SlGoodsShelf> eq = new QueryWrapper<SlGoodsShelf>() |
| | | .eq("del_flag", "0") |
| | | .eq("store_management_id", dto.getManagementId()) |
| | | .eq("store_management_number",dto.getManagementNumber()); |
| | | List<SlGoodsShelf> slGoodsShelves = slGoodsShelfMapper.selectList(eq); |
| | | numberAndShelfVO.setGoodsShelfList(slGoodsShelves); |
| | | return numberAndShelfVO; |
| | | } |
| | | } |