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

public class SlmOrdDesignStdCicDAL extends DBCommon{
	
	/**
	 * 查询质量设计成分
	 * @param strDesignStdCicJSON
	 * @return
	 */
	public CoreReturnObject query(String strDesignStdCicJSON){
		DesignStdCicEntity designStdCicEntity = EntityTool.getEntityByJSONStr(strDesignStdCicJSON, DesignStdCicEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignStdCicDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designStdCicEntity);
		return this.getData(sql);
	}
	
	/**
	 * 通过DESIGN_KEY查询质量设计成分
	 * @param strDesignStdCicJSON
	 * @return
	 */
	public CoreReturnObject queryCicByDesignKey(String strDesignStdCicJSON){
		DesignStdCicEntity designStdCicEntity = EntityTool.getEntityByJSONStr(strDesignStdCicJSON, DesignStdCicEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignStdCicDAL.queryCicByDesignKey");
		sql = EntityTool.fillSqlByEntity(sql, designStdCicEntity);
		return this.getData(sql);
	}
}
