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

public class SlmOrdDesignMscPlPrcDAL extends DBCommon{
	
	/**
	 * 查询质量设计工序
	 * @param strDesignMscPlPrcJSON
	 * @return
	 */
	public CoreReturnObject query(String strDesignMscPlPrcJSON){
		DesignMscPlPrcEntity designMscPlPrcEntity = EntityTool.getEntityByJSONStr(strDesignMscPlPrcJSON, DesignMscPlPrcEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignMscPlPrcDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designMscPlPrcEntity);
		return this.getData(sql);
	}
	
	/**
	 * 通过DESIGN_KEY查询质量设计工序
	 * @param strDesignMscPlPrcJSON
	 * @return
	 */
	public CoreReturnObject queryProcessByDesignKey(String strDesignMscPlPrcJSON){
		DesignMscPlPrcEntity designMscPlPrcEntity = EntityTool.getEntityByJSONStr(strDesignMscPlPrcJSON, DesignMscPlPrcEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignMscPlPrcDAL.queryProcessByDesignKey");
		sql = EntityTool.fillSqlByEntity(sql, designMscPlPrcEntity);
		return this.getData(sql);
	}
}
