package com.engine.organization.mapper.resource;


import com.engine.organization.entity.hrmresource.po.HrmResourcePO;
import com.engine.organization.entity.hrmresource.vo.HrmResourceVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author weaver_cl
 * @Description:
 * @Date 2022/6/28
 * @Version V1.0
 **/
public interface ResourceMapper {

    List<HrmResourceVO> listAll(@Param("ids") List<Long> ids);

    List<HrmResourceVO> listDetachAll(@Param("ids") List<Long> ids, @Param("companyIds") List<Long> companyIds);

    List<HrmResourcePO> getResourceListByJobId(@Param("jobId") Long jobId);

    int updateResourceJob(@Param("originalJobId") Long originalJobId, @Param("targetJobId") Long targetJobId, @Param("parentComp") Integer parentComp, @Param("parentDept") Integer parentDept, @Param("ecCompany") Integer ecCompany, @Param("ecDepartment") Integer ecDepartment);

    HrmResourcePO getResourceById(@Param("id") String id);

    List<HrmResourcePO> listByNo(@Param("workCode") String workCode);

    Long getMaxShowOrder();

    /**
     * 根据所选关键字段查询ID
     *
     * @param keyField
     * @param keyFieldValue
     * @return
     */
    List<Long> getIdByKeyField(@Param("keyField") String keyField, @Param("keyFieldValue") String keyFieldValue);


}
