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

public class SlmOrdDesignStdDicDAL extends DBCommon{
	
	/**
	 * 查询质量设计探伤
	 * @param strDesignStdDicJSON
	 * @return
	 */
	public CoreReturnObject query(String strDesignStdDicJSON){
		DesignStdDicEntity designStdDicEntity = EntityTool.getEntityByJSONStr(strDesignStdDicJSON, DesignStdDicEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignStdDicDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designStdDicEntity);
		return this.getData(sql);
	}
	
	/**
	 * 通过DESIGN_KEY查询质量设计探伤
	 * @param strDesignStdDicJSON
	 * @return
	 */
	public CoreReturnObject queryDicByDesignKey(String strDesignStdDicJSON){
		DesignStdDicEntity designStdDicEntity = EntityTool.getEntityByJSONStr(strDesignStdDicJSON, DesignStdDicEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignStdDicDAL.queryDicByDesignKey");
		sql = EntityTool.fillSqlByEntity(sql, designStdDicEntity);
		return this.getData(sql);
	}
}
