package com.engine.organization.mapper.hrmresource;


import com.engine.organization.entity.TreeData;
import com.engine.organization.entity.hrmresource.po.ResourceItemClassPO;
import com.engine.organization.entity.hrmresource.po.ResourceItemPO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @Author weaver_cl
 * @Description:
 * @Date 2022/8/24
 * @Version V1.0
 **/
public interface ResourceBasicInfoMapper {

    ArrayList<TreeData> getTreeData();

    @MapKey("id")
    List<Map<String, Object>> browserDatas(@Param("ids") Collection<Long> ids);


    ResourceItemPO getResourceItemByFid(@Param("fid") Integer fid);

    List<ResourceItemPO> selectItemByIds(@Param("ids") Collection<Long> ids);

    int deleteByIds(@Param("ids") Collection<Long> ids);

    int recoverByIds(@Param("ids") Collection<Long> ids);

    /**
     * delete语句，删除人员信息
     *
     * @param ids
     * @return
     */
    int deleteItemByIds(@Param("ids") Collection<Integer> ids);

    List<ResourceItemPO> selectItemByFNo(@Param("fno") String fno, @Param("fclassid") Integer fclassid);

    int insertIgnoreNull(ResourceItemPO resourceItemPO);

    int update(ResourceItemPO resourceItemPO);

    ResourceItemClassPO getResourceItemClassByFid(@Param("fid") Integer fid);

    List<ResourceItemClassPO> selectItemClassByFNo(@Param("fno") String fno, @Param("fid") Integer fid);

    int saveResourceItemClass(ResourceItemClassPO itemClassPO);

    int updateResourceItemClass(ResourceItemClassPO itemClassPO);

    int deleteResourceItemClass(@Param("fid") Integer fid);

    List<ResourceItemPO> getItemByClassId(@Param("fclassid") Integer fclassid, @Param("fdelete") Integer fdelete);

}
