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 CrmZcOutlistServer extends DBCommon {
    /**
     * 查询
     * @param starttime
     * @param endtime
     * @param judgeno
     * @return
     */
    public CoreReturnObject Query(String starttime , String endtime , String judgeno){
        String sql = CoreXmlSqlParsersFactory.getSql("CrmZcOutlistServer.Query1");
        String sql1 = "";
        if(!StringUtils.isEmpty(starttime) && !StringUtils.isEmpty(endtime)){
            sql1 += " AND  T.CREATE_TIME BETWEEN to_date('" + starttime + "','yyyy-MM-dd HH24:MI:SS') AND to_date('" + endtime + "','yyyy-MM-dd HH24:MI:SS')";
        }

        if(!StringUtils.isEmpty(judgeno)){
            sql1 += " AND  T.JUDGE_STOVE_NO = '"+judgeno+"'";
        }

        sql = sql.replace("#someThing#",sql1);
        return this.getData(sql);
    }




}
