package com.yeejoin.amos.fas.business.dao.mapper;

import com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface FmeaPointInputitemMapper extends BaseMapper {

    void deleteByFmeaIdAndPointInputitemIds(@Param("fmeaId") Long fmeaId,
                                            @Param("pointInputitemIds") List<Long> pointInputitemIds);

    void deleteByFmeaIds(Long[] fmeaIds);

    Long saveBatch(List<FmeaPointInputitem> list);

    Long countByFmeaId(Long fmeaId);

    List<Long> listPointInputitemIdsByPointId(Long pointId);

    List<Map<String, Object>> listByFmeaId(@Param("fmeaId") Long fmeaId,
                                           @Param("offset") Integer offset,
                                           @Param("limit") Integer limit);

    List<FmeaPointInputitem> listByPointIdAndInputItemIds(@Param("pointId") Long pointId,
                                                          @Param("inputIds") List<Long> inputIds);

    List<FmeaPointInputitem> listFmeaByFmeaId(Long fmeaId);

    void updateStateByIds(@Param("state") Integer state,
                          @Param("ids") List<Long> ids);

    List<FmeaPointInputitem> listByPointInputItemId(@Param("pointInputItemId") Long pointInputItemId);
}
