package com.steering.mes.zgmil.report;

import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;

import com.steering.comm.converter.CoreConverter;
import com.steering.comm.db.DBCommon;

public class FrmRepInspection extends DBCommon {

	/**
	 *查询探伤
	 */
	public CoreReturnObject queryMinResult(String date, String endDate,
			String bc, String bz,String pline, String[] plineCodes,String judge) {
		String sql = "";
		String sqlstr = "";
		if (pline.equals("C010")) {
			sql = CoreXmlSqlParsersFactory
					.getSql("FrmRepInspection.queryMinResult168");
		} else {
			sql = CoreXmlSqlParsersFactory
					.getSql("FrmRepInspection.queryMinResult");
		}
		if(!bc.equals(""))
		{
			sqlstr += " AND T.COL_SHIFT = '" + bc + "' ";
		}
		if(!bz.equals(""))
		{
			sqlstr += " AND T.COL_GROUP = '" + bz + "' ";
		}
		if(!judge.equals(""))
		{
			sqlstr += " AND T.JUDGE_STOVE_NO LIKE '%" + judge + "%' ";
		}
		sqlstr += CoreConverter.toSqlConditionString("T.PLINE_CODE", plineCodes);
		sql = sql.replace("#someThing#", sqlstr);
		return this.getData(sql, new Object[] { date, endDate });
	}
}
