package com.unis.base.server.dao;

import com.unis.base.common.vo.CcsbtzjsmxVO;
import com.unis.base.common.vo.OrganizationInfo;
import com.unis.base.server.entity.CcsbtzjsmxDO;
import com.unis.user.common.vo.org.OrgainzeVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.common.Mapper;

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

/**
 * @Classname CcsbtzjsmxDao
 * @Description TODO
 * @Date 2024/1/2 10:52
 * @Created by rising123sun
 */
@org.apache.ibatis.annotations.Mapper
@Repository
public interface CcsbtzjsmxDao extends Mapper<CcsbtzjsmxDO> {


    List<CcsbtzjsmxDO> selectForHz(CcsbtzjsmxVO ccsbtzjsmxVO);

    String selectTyshxydmByOrgCode(@Param("orgCode")String orgCode);

    OrganizationInfo selectQyjbByOrgCode(@Param("orgCode")String orgCode);

    @Select("select enumid,enumname,parentid from depot_qh.basic_enum where enumname = #{sbyjlb}")
    OrganizationInfo getYjsblbByEnuname(@Param("sbyjlb")String sbyjlb);

    @Select("select enumid,enumname,parentid from depot_qh.basic_enum where enumid = #{enumid}")
    OrganizationInfo getYjsblbByEnumid(@Param("sbyjlb")String sbyjlb);

    List<OrgainzeVO> findByParentCodeAndStateCode(@Param("orgCode") String orgCode, @Param("orgLevel") String orgLevel);

    OrgainzeVO findByOrgCodeAndStateCode(@Param("orgCode") String orgCode);

    @Select("select enumname from depot_qh.basic_enum where parentid = #{sblxCode}")
    List<String> querySbqclb(@Param("sblxCode")String sblxCode);
}
