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

public class CraftOrdDesignMscJgDAL extends DBCommon{
	
	/**
	 * 查询接箍
	 * @param strDesignMscJgJSON
	 * @return
	 */
	public CoreReturnObject query(String strDesignMscJgJSON){
		SlmOrdDesignMscJgEntity designMscJgEntity = EntityTool.getEntityByJSONStr(strDesignMscJgJSON, SlmOrdDesignMscJgEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("CraftOrdDesignMscJgDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designMscJgEntity);
		return this.getData(sql);
	}
	
	/**
	 * 通过DESIGN_KEY查询接箍码
	 * @param strDesignMscJgJSON
	 * @return
	 */
	public CoreReturnObject queryCodeJgByDesignKey(String strDesignMscJgJSON){
		SlmOrdDesignMscJgEntity designMscJgEntity = EntityTool.getEntityByJSONStr(strDesignMscJgJSON, SlmOrdDesignMscJgEntity.class);
		String sql = CoreXmlSqlParsersFactory.getSql("CraftOrdDesignMscJgDAL.query");
		sql = EntityTool.fillSqlByEntity(sql, designMscJgEntity);
		return this.getData(sql);
	}
}
