package com.ruoyi.demo.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ruoyi.demo.entity.PlanItem;
import com.ruoyi.demo.entity.bo.PlanItemBo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PlanItemMapper extends BaseMapper<PlanItem> {
    Integer selectEquipmentCountByPlanId(@Param("planId") String planId);

    IPage<PlanItemBo> getEuipmentPlanList(IPage<?> pag, @Param(Constants.WRAPPER) Wrapper<PlanItemBo> queryWrapper);

    Integer getEuipmentPlanCont(@Param(Constants.WRAPPER) QueryWrapper<PlanItemBo> queryWrapper);

    //根据设备编号获取所有相关itemId
    List<String> getItemIdsByCode(@Param("equipmentCode") String equipmentCode);
}
