package com.steering.mes.mcp.Report;

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

import com.steering.comm.db.DBCommon;
import com.steering.mes.mcp.entity.VrpExpandResultEntity;

public class FrmExpandReport extends DBCommon{

	/**
     * 查询旋扩台账
     * @param list
     * @return
     */
    public CoreReturnObject doQueryInfoResult(VrpExpandResultEntity plan,String plinCode,String start,String end) {
       
        String sql = CoreXmlSqlParsersFactory
                .getSql("FrmExpandReport.GetQuery");
        if (!start.equals("")) {
            sql += " AND T.CREATE_TIME >=TO_DATE('"
                    + start
                    + "', 'YYYY-MM-DD HH24:MI:SS')AND T.CREATE_TIME <=TO_DATE('"
                    + end + "', 'YYYY-MM-DD HH24:MI:SS') ";
        }
        sql += " AND T.PLINE_CODE ='" + plinCode + "'";
        if (!plan.getLoadShift().equals("")) {
        sql += " AND T.LOAD_SHIFT ='" + plan.getLoadShift() + "'";
        }
        if (!plan.getLoadGroup().equals("")) {
        sql += " AND T.LOAD_GROUP ='" + plan.getLoadGroup() + "'";
        }
        return this.getData(sql);
    }
	
}
