package com.engine.organization.mapper.jclorgmap;

import com.engine.organization.entity.map.JclOrgMap;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;

/**
 * @author:dxfeng
 * @createTime: 2022/09/01
 * @version: 1.0
 */
public interface JclOrgMapper {
    int insertMap(JclOrgMap jclOrgMap);

    JclOrgMap getJclOrgMapByObjID(@Param("currentDate") Date currentDate, @Param("fType") String fType, @Param("objId") String objId);

    int deleteMap(@Param("ftype") String ftype, @Param("fobjid") String fobjid, @Param("currentDate") Date currentDate);

    int updateMap(@Param("ftype") String ftype, @Param("fobjid") String fobjid, @Param("currentDate") Date currentDate, @Param("yesterday") Date yesterday);

    JclOrgMap getJclOrgMapByFParentId(@Param("currentDate") Date currentDate, @Param("fparentid") String fparentid);

    JclOrgMap getJclOrgMapById(@Param("currentDate") Date currentDate, @Param("id") String id);

    JclOrgMap getSumPlanAndJobByFParentId(@Param("currentDate") Date currentDate, @Param("fparentid") String fparentid);

    int updateMapById(@Param("id") Integer id,@Param("fplan") Integer fplan,@Param("fonjob") Integer fonjob,@Param("currentDate") Date currentDate);

    List<JclOrgMap> getJclOrgMapByType(@Param("fType") String fType, @Param("currentDate") Date currentDate);

    int deleteAllMap(@Param("currentDate") Date currentDate);

    int updateAllMap(@Param("currentDate") Date currentDate, @Param("yesterday") Date yesterday);

    int insertResToMap(@Param("level") String level, @Param("grade") String grade);

    int insertJobToMap();

    int insertDeptToMap(@Param("level") String level, @Param("grade") String grade);

    int insertSubComToMap();

    int insertComToMap();

    int deleteJobNull(@Param("currentDate") Date currentDate);

    JclOrgMap getResInfo(@Param("level") String level, @Param("grade") String grade, @Param("id") String id);

}
