7 天以前 5bce6fa4728a9fb62b95e94828fddf8f3134a409
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/route/MesProRouteProductBomServiceImpl.java
@@ -13,6 +13,7 @@
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import java.util.Collection;
import java.util.List;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
@@ -21,7 +22,7 @@
/**
 * MES 工艺路线产品 BOM Service 实现类
 *
 * @author 芋道源码
 * @author 超级管理员
 */
@Service
@Validated
@@ -132,4 +133,17 @@
        routeProductBomMapper.deleteByRouteIdAndProductId(routeId, productId);
    }
    @Override
    public List<MesProRouteProductBomDO> getRouteProductBomListByRouteIdAndProductId(Long routeId, Long productId) {
        return routeProductBomMapper.selectListByRouteIdAndProductId(routeId, productId);
    }
    @Override
    public List<MesProRouteProductBomDO> getRouteProductBomListByProductIds(Long routeId, Collection<Long> productIds) {
        if (CollUtil.isEmpty(productIds)) {
            return java.util.Collections.emptyList();
        }
        return routeProductBomMapper.selectListByProductIds(routeId, productIds);
    }
}