package com.steering.pss.sale.order.DAL;

import com.steering.comm.db.DBCommon;
import com.steering.comm.tools.EntityTool;
import com.steering.pss.sale.order.model.DesignMscPlGzEntity;
import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;

public class CraftOrdDesignMscPlGzDAL extends DBCommon{
	
	/**
	 * 查询质量设计钢种
	 * @param strDesignMscPlGzJSON
	 * @return
	 */
	public CoreReturnObject query(String strDesignMscPlGzJSON){
		DesignMscPlGzEntity designMscPlGzEntity = EntityTool.getEntityByJSONStr(strDesignMscPlGzJSON, DesignMscPlGzEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("CraftOrdDesignMscPlGzDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designMscPlGzEntity);
		return this.getData(sql);
	}
	
	/**
	 * 通过DESIGN_KEY查询质量设计钢种
	 * @param strDesignMscPlGzJSON
	 * @return
	 */
	public CoreReturnObject queryGradeByDesignKey(String strDesignMscPlGzJSON){
		DesignMscPlGzEntity designMscPlGzEntity = EntityTool.getEntityByJSONStr(strDesignMscPlGzJSON, DesignMscPlGzEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("CraftOrdDesignMscPlGzDAL.queryGradeByDesignKey");
		sql = EntityTool.fillSqlByEntity(sql, designMscPlGzEntity);
		return this.getData(sql);
	}
}
