package com.steering.pss.plnsaleord.report;

import java.util.ArrayList;
import java.util.List;

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

import com.steering.comm.db.DBCommon;

/**
 * 接箍合同综合信息
 * 
 * @author peng
 * 
 */
public class FrmJGInformation extends DBCommon {
	public CoreReturnObject queryJgInformation(String rollMonth,
			String orderNo, String status) {
		String sql = CoreXmlSqlParsersFactory
				.getSql("FrmJGInformation.queryJgInformation");
		List<String> param = new ArrayList<String>();
		if (rollMonth.length() > 0) {
			param.add(rollMonth);
			sql += " and t.roll_month=? ";
		}
		if (orderNo.length() > 0) {
			param.add(orderNo);
			sql += " and (jg.ORDER_NO||'/'||JG.ORDER_SEQ) like '%'||?||'%' ";
		}
		if (status.length() > 0) {
			param.add(status);
			sql += " and t.PORDERSTATUS=? ";
		}
		return this.getData(sql, param.toArray());
	}
}
