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.DesignMscCftEntity;
import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;

public class SlmOrdDesignMscCftDAL extends DBCommon{
	
	/**
	 * 查询质量设计工艺参数
	 * @param strDesignMscCftJSON
	 * @return
	 */
	public CoreReturnObject query(String strDesignMscCftJSON)
	{
		DesignMscCftEntity designMscCftEntity = EntityTool.getEntityByJSONStr(strDesignMscCftJSON, DesignMscCftEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignMscCftDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designMscCftEntity);
		return this.getData(sql);
	}
	
	/**
	 * 通过DESIGN_KEY查询质量设计工艺参数
	 * @param strDesignMscCftJSON
	 * @return
	 */
	public CoreReturnObject queryCraftByDesignKey(String strDesignMscCftJSON)
	{
		DesignMscCftEntity designMscCftEntity = EntityTool.getEntityByJSONStr(strDesignMscCftJSON, DesignMscCftEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignMscCftDAL.queryCraftByDesignKey");
		sql = EntityTool.fillSqlByEntity(sql, designMscCftEntity);
		return this.getData(sql);
	}
}
