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

public class SlmOrdDesignStdPicDAL extends DBCommon{
	
	/**
	 * 查询质量设计理化
	 * @param strDesignStdPicJSON
	 * @return
	 */
	public CoreReturnObject query(String strDesignStdPicJSON){
		DesignStdPicEntity designStdPicEntity = EntityTool.getEntityByJSONStr(strDesignStdPicJSON, DesignStdPicEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignStdPicDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designStdPicEntity);
		return this.getData(sql);
	}
	
	/**
	 * 通过DESIGN_KEY查询质量设计理化
	 * @param strDesignStdPicJSON
	 * @return
	 */
	public CoreReturnObject queryPicByDesignKey(String strDesignStdPicJSON){
		DesignStdPicEntity designStdPicEntity = EntityTool.getEntityByJSONStr(strDesignStdPicJSON, DesignStdPicEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignStdPicDAL.queryPicByDesignKey");
		sql = EntityTool.fillSqlByEntity(sql, designStdPicEntity);
		return this.getData(sql);
	}
}
