| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.dto.WarehouseDto; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesDto; |
| | | import com.ruoyi.warehouse.dto.WarehouseTreeDto; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper; |
| | |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesService; |
| | | import com.ruoyi.warehouse.service.WarehouseService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.sql.Array; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper, Warehouse> |
| | | implements WarehouseService { |
| | | @Autowired |
| | | private WarehouseMapper warehouseMapper; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesService warehouseGoodsShelvesService; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesMapper warehouseGoodsShelvesMapper; |
| | | @Autowired |
| | | private WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; |
| | | @RequiredArgsConstructor |
| | | public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper, Warehouse> implements WarehouseService { |
| | | private final WarehouseMapper warehouseMapper; |
| | | private final WarehouseGoodsShelvesService warehouseGoodsShelvesService; |
| | | private final WarehouseGoodsShelvesMapper warehouseGoodsShelvesMapper; |
| | | private final WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; |
| | | |
| | | @Override |
| | | public boolean deleteByIds(List<Long> ids) { |
| | |
| | | private WarehouseTreeDto convertToShelfTreeDto(WarehouseGoodsShelves shelf) { |
| | | WarehouseTreeDto dto = new WarehouseTreeDto(); |
| | | copyProperties(shelf, dto); |
| | | dto.setLabel(shelf.getGoodsShelvesName()); |
| | | // dto.setLabel(shelf.getGoodsShelvesName()); |
| | | dto.setLabel(shelf.getName()); |
| | | dto.setChildren(new ArrayList<>()); |
| | | return dto; |
| | | } |
| | |
| | | private WarehouseTreeDto convertToRowcolTreeDto(WarehouseGoodsShelvesRowcol rowcol) { |
| | | WarehouseTreeDto dto = new WarehouseTreeDto(); |
| | | copyProperties(rowcol, dto); |
| | | dto.setLabel(rowcol.getStorey() + "-" + rowcol.getArrange()); |
| | | // dto.setLabel(rowcol.getStorey() + "-" + rowcol.getArrange()); |
| | | dto.setLabel(rowcol.getRow() + "-" + rowcol.getCol()); |
| | | dto.setChildren(new ArrayList<>()); |
| | | return dto; |
| | | } |