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

public class SlmOrdDesignMscDAL extends DBCommon{
	
	/**
	 * 查询质量设计MSC
	 * @param strDesignMscJSON
	 * @return
	 */
	public CoreReturnObject query(String strDesignMscJSON){
		DesignMscEntity designMscEntity = EntityTool.getEntityByJSONStr(strDesignMscJSON, DesignMscEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignMscDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designMscEntity);
		return this.getData(sql);
	}
	
	/**
	 * 通过DESIGN_KEY查询MSC
	 * @return
	 */
	public CoreReturnObject queryMscByDesignKey(String strDesignMscJSON){
		DesignMscEntity designMscEntity = EntityTool.getEntityByJSONStr(strDesignMscJSON, DesignMscEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("SlmOrdDesignMscDAL.queryMscByDesignKey");
		sql = EntityTool.fillSqlByEntity(sql, designMscEntity);
		return this.getData(sql);
	}
}
