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

public class SlmOrdDesignStdGicDAL extends DBCommon{
	
	/**
	 * 查询质量设计加工
	 * @param strDesignStdGicJSON
	 * @return
	 */
	public CoreReturnObject query(String strDesignStdGicJSON){
		DesignStdGicEntity designStdGicEntity = EntityTool.getEntityByJSONStr(strDesignStdGicJSON, DesignStdGicEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignStdGicDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designStdGicEntity);
		return this.getData(sql);
	}
	
	/**
	 * 通过DESIGN_KEY查询质量设计加工
	 * @param strDesignStdGicJSON
	 * @return
	 */
	public CoreReturnObject queryGicByDesignKey(String strDesignStdGicJSON){
		DesignStdGicEntity designStdGicEntity = EntityTool.getEntityByJSONStr(strDesignStdGicJSON, DesignStdGicEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignStdGicDAL.queryGicByDesignKey");
		sql = EntityTool.fillSqlByEntity(sql, designStdGicEntity);
		return this.getData(sql);
	}
}
