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

public class SlmOrdDesignStdWicDAL extends DBCommon{
	
	/**
	 * 查询质量设计水压
	 * @param strDesignStdWicJSON
	 * @return
	 */
	public CoreReturnObject query(String strDesignStdWicJSON){
		DesignStdWicEntity designStdWicEntity = EntityTool.getEntityByJSONStr(strDesignStdWicJSON, DesignStdWicEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignStdWicDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designStdWicEntity);
		return this.getData(sql);
	}
	
	/**
	 * 通过DESIGN_KEY查询质量设计水压
	 * @param strDesignStdWicJSON
	 * @return
	 */
	public CoreReturnObject queryWicByDesignKey(String strDesignStdWicJSON){
		DesignStdWicEntity designStdWicEntity = EntityTool.getEntityByJSONStr(strDesignStdWicJSON, DesignStdWicEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignStdWicDAL.queryWicByDesignKey");
		sql = EntityTool.fillSqlByEntity(sql, designStdWicEntity);
		return this.getData(sql);
	}
}
