package com.ozs.rpm.mapper;

import java.util.List;

import com.ozs.rpm.dto.chart.ChartClassDTO;
import org.apache.ibatis.annotations.Param;

public interface ChartClassMapper {

	public List<ChartClassDTO> listChartClassByName(@Param("className") String className) throws Exception;

	public ChartClassDTO getChartClassByCode(@Param("classCode") String classCode) throws Exception;

	public void removeChartClassByCode(@Param("classCode") String classCode) throws Exception;

	public int saveChartClass(ChartClassDTO ChartClassDTO) throws Exception;

	public int updateChartClass(ChartClassDTO ChartClassDTO) throws Exception;

	public ChartClassDTO getChartClassByName(@Param("className") String className);

	/**
	 * 根据图表编码，获取分类关联图表数量
	 * 
	 * @param classCode
	 * @return
	 */
	public Integer countChartByClassCode(@Param("classCode") String classCode);

	/**
	 * 修改分类及其子分类Code
	 * 
	 * @param classCode
	 * @param newClassCode
	 */
	public void updateChartClassCode(@Param("classCode") String classCode, @Param("newClassCode") String newClassCode);

}
