package com.steering.pss.crm.server;

import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;
import CoreFS.Util.StringUtils;
import com.steering.comm.db.DBCommon;

public class CrmYdmZcChangBelongServer extends DBCommon {

    public CoreReturnObject Query(String judgeStoveNo, String startDate, String endDate) {
        String sql = CoreXmlSqlParsersFactory.getSql("CrmYdmZcChangBelongServer.Query");
        if (!StringUtils.isEmpty(judgeStoveNo)) {
            sql += " AND T.JUDGE_STOVE_NO ='" + judgeStoveNo + "'";
        }
        if (!StringUtils.isEmpty(startDate) && !StringUtils.isEmpty(endDate)) {
            sql += " AND T.CREATE_TIME BETWEEN to_date('" + startDate + "','yyyy-MM-dd HH24:MI:SS') AND to_date('" + endDate + "','yyyy-MM-dd HH24:MI:SS')";
        }
        sql += " ORDER BY T.CREATE_TIME";
        return this.getData(sql);
    }

}
