¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.warehouse.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.warehouse.mapper.DocumentationMapper; |
| | | import com.ruoyi.warehouse.mapper.WarehouseGoodsShelvesRowcolMapper; |
| | | import com.ruoyi.warehouse.pojo.Documentation; |
| | | import com.ruoyi.warehouse.pojo.WarehouseGoodsShelvesRowcol; |
| | | import com.ruoyi.warehouse.dto.WarehouseGoodsShelvesRowcolDto; |
| | | import com.ruoyi.warehouse.service.WarehouseGoodsShelvesRowcolService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * @author 86151 |
| | | * @description é对表ãwarehouse_goods_shelves_rowcol(ä»åºè´§æ¶å±ï¼å表)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2025-08-13 11:49:02 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class WarehouseGoodsShelvesRowcolServiceImpl extends ServiceImpl<WarehouseGoodsShelvesRowcolMapper, WarehouseGoodsShelvesRowcol> |
| | | implements WarehouseGoodsShelvesRowcolService { |
| | | @Autowired |
| | | private WarehouseGoodsShelvesRowcolMapper warehouseGoodsShelvesRowcolMapper; |
| | | @Autowired |
| | | private DocumentationMapper documentationMapper; |
| | | |
| | | @Override |
| | | public List<WarehouseGoodsShelvesRowcolDto> getList(WarehouseGoodsShelvesRowcol warehouseGoodsShelvesRowcol) { |
| | | List<WarehouseGoodsShelvesRowcolDto> list = warehouseGoodsShelvesRowcolMapper.findList(warehouseGoodsShelvesRowcol); |
| | | for (WarehouseGoodsShelvesRowcolDto dto : list) { |
| | | //è·åå±ids |
| | | Long id = dto.getId(); |
| | | //è·åææ¡£ |
| | | dto.setDocumentationDtoList(documentationMapper.listBywarehouseGoodsShelvesRowcolId(id)); |
| | | } |
| | | return list; |
| | | } |
| | | @Override |
| | | public boolean deleteByIds(List<Long> ids) { |
| | | // 3. æ£æ¥æ¯å¦æåå |
| | | Wrapper<Documentation> queryWrapper = new LambdaQueryWrapper<Documentation>() |
| | | .in(Documentation::getWarehouseGoodsShelvesRowcolId, ids); |
| | | List<Documentation> documentations = documentationMapper.selectList(queryWrapper); |
| | | if (!documentations.isEmpty()) throw new RuntimeException("è´§æ¶ä¸æååï¼ä¸è½å é¤"); |
| | | warehouseGoodsShelvesRowcolMapper.deleteBatchIds(ids); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |