package com.steering.ydm.bc;

import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;

import com.steering.comm.db.DBCommon;
import com.steering.comm.tools.StringTool;

public class ComLgValidDataPurviewIds extends DBCommon{

	
	/**
     * 根据科室ID查询对应的部门信息
     * @param section 科室
     * @return obj
     */
    public CoreReturnObject getDeptBySection(String section){
        Object[] params = new Object[]{section};
        return this.getDataBySqlID("ComLgValidDataPurviewIds.getDepartmentBySectionID", params);
    }
    
    /**
     * 根据部门表的ID获取对应的描述
     * @param id
     * @return
     */
    public CoreReturnObject getDepartDescByDepartId(String id){
    	String sql = CoreXmlSqlParsersFactory.getSql("ComLgValidDataPurviewIds.getDepartDescByDepartId");
    	sql = StringTool.ReplaceAll(sql, "#DEPARTID#", id);
    	
    	return this.getData(sql);
    }
}
