package com.steering.pss.sale.order.qualityDesign.server.iserver;

import java.sql.Connection;
import java.sql.SQLException;

import com.steering.pss.sale.order.qualityDesign.Dao.factory.FactoryDao;
import com.steering.pss.sale.order.qualityDesign.Dao.imp.DeptSelectDaoImp;
import com.steering.pss.sale.order.qualityDesign.server.imp.DeptSelectImp;

/**
 * 管理科室选择
 * 
 * @author Administrator
 * 
 */
public class IDeptSelect implements DeptSelectImp {
	/**
	 * 验证管理科室
	 * 
	 * @param con
	 *            连接字符串
	 * @param custerNo
	 *            客户Alpha
	 * @param ordLnPk
	 *            合同行号
	 * @return boolean
	 * @throws SQLException
	 */
	public boolean deptSelect(Connection con, String custerNo, String ordLnPk)
			throws SQLException {
		if (custerNo.equals("")) {
			return true;
		} else {
			DeptSelectDaoImp deptSelectDaoImp = FactoryDao
					.getDeptSelectDaoImp();
			String[] depts = deptSelectDaoImp.getDept(con, ordLnPk);
			if (depts == null) {
				return false;
			} else {
				return true;
			}
		}
	}
}
