using System; using System.Collections.Generic; using System.Linq; using System.Web; using Estsh.Web.Dal; using Estsh.Web.Util; using System.Collections; using System.Data; namespace Estsh.Core.Services { public class PdlineOffineQueryService { PdlineOffineQueryDal dal = new PdlineOffineQueryDal(RemotingProxyProvider._remotingProxy); /// /// 客户产线集合 /// ///// 数据集 //public ArrayList GetCustPDLineName() //{ // return dal.GetCustPDLineName(); //} /// /// 根据分页条件获取分页菜单数据 /// /// /// /// /// /// public ArrayList getShippingListByPage(String txtStartTime, String txtEndTime, string cbPdline) { //Hashtable result = new Hashtable(); //String strWhere = "1=1"; //if (string.IsNullOrEmpty(shipping_sn) && string.IsNullOrEmpty(txtStartTime) && string.IsNullOrEmpty(txtEndTime)) //{ // return null; //} //开始结束时间 //if (!string.IsNullOrEmpty(txtStartTime) && !string.IsNullOrEmpty(txtEndTime)) //{ // strWhere += " AND a.create_ymd +' '+ a.create_ymd between '" + txtStartTime + "' and '" + txtEndTime + "'"; //} //if (!string.IsNullOrEmpty(shipping_sn)) //{ // strWhere += " and a.serial_number= '" + shipping_sn + "'"; //} //if (!string.IsNullOrEmpty(cbPdline)) //{ // strWhere += " and c.pdline_desc= '" + cbPdline + "'"; //} DataTable dt = dal.getShippingListByPage( txtStartTime, txtEndTime, cbPdline); return DataTypeConvert.NewObject.DataTableToArrayList(dt); } //判断是否生产 // if (!(string.IsNullOrEmpty(ifProduct))) // { // if (ifProduct == "-1") // { strWhere += " and a.remark is NULL "; } // else if (ifProduct == "0") // { strWhere += " and a.remark='工步解锁' "; } // } // result = dal.getShippingListByPage(pager, strWhere); // return result; //} //获取工位名称 public ArrayList GetPdline() { return dal.GetPdline(); } /// /// 根据分页条件获取分页菜单数据(导出时使用) /// /// /// /// /// /// public DataTable getShippingExport(string txtStartTime, string txtEndTime, String shipping_sn, Pager pager) { DataTable result = null; string strWhere = " 1=1 "; //开始结束时间 if (!string.IsNullOrEmpty(txtStartTime) && !string.IsNullOrEmpty(txtEndTime)) { strWhere += " AND a.create_ymd +' '+ a.create_ymd between '" + txtStartTime + "' and '" + txtEndTime + "'"; } if (!string.IsNullOrEmpty(shipping_sn)) { strWhere += " and a.serial_number= " + shipping_sn + "'"; } result = dal.getShippingExport(pager.pageSize, pager.pageNo, strWhere); return result; } } }