You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
4.2 KiB
C#
130 lines
4.2 KiB
C#
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 TerminalKPSNService
|
|
{
|
|
TerminalKPSNDal dal = new TerminalKPSNDal(RemotingProxyProvider._remotingProxy);
|
|
|
|
|
|
/// <summary>
|
|
/// 客户产线集合
|
|
/// </summary>
|
|
///// <returns>数据集</returns>
|
|
//public ArrayList GetCustPDLineName()
|
|
//{
|
|
// return dal.GetCustPDLineName();
|
|
//}
|
|
|
|
|
|
/// <summary>
|
|
/// 根据分页条件获取分页菜单数据
|
|
/// </summary>
|
|
/// <param name="PartMasterName"></param>
|
|
/// <param name="pager"></param>
|
|
/// <param name="direction"></param>
|
|
/// <param name="sort"></param>
|
|
/// <returns></returns>
|
|
public Hashtable getTerminalKPSNByPage(String txtStartTime, String txtEndTime, String kPartNo, String cbTerminalName, Pager pager)
|
|
{
|
|
Hashtable result = new Hashtable();
|
|
String strWhere = "1=1";
|
|
|
|
//开始结束时间
|
|
if (!string.IsNullOrEmpty(txtStartTime) && !string.IsNullOrEmpty(txtEndTime))
|
|
{
|
|
strWhere += " AND a.create_ymd +' '+ a.create_hms between '" + txtStartTime + "' and '" + txtEndTime + "'";
|
|
}
|
|
|
|
//if (!string.IsNullOrEmpty(SN))
|
|
//{
|
|
// strWhere += " and (a.serial_number= '" + SN + "' OR a.kpsn= '" + SN + "') ";
|
|
//}
|
|
if (!string.IsNullOrEmpty(kPartNo))
|
|
{
|
|
strWhere += " and d.part_no= '" + kPartNo + "'";
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(cbTerminalName))
|
|
{
|
|
strWhere += " and a.terminal_id= '" + cbTerminalName + "'";
|
|
}
|
|
result = dal.getTerKPSNByPage(pager, strWhere);
|
|
return result;
|
|
}
|
|
|
|
|
|
|
|
//获取工位名称
|
|
public ArrayList GetTerminalName()
|
|
{
|
|
return dal.GetTerminalName();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据分页条件获取分页菜单数据(导出时使用)
|
|
/// </summary>
|
|
/// <param name="ModelPartName"></param>
|
|
/// <param name="pager"></param>
|
|
/// <param name="direction"></param>
|
|
/// <param name="sort"></param>
|
|
/// <returns></returns>
|
|
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;
|
|
}
|
|
|
|
public DataTable getTeKPSN(String txtStartTime, String txtEndTime,String kPartNo, String cbTerminalName, Pager pager, ref int totalCount)
|
|
{
|
|
String strWhere = "1=1";
|
|
|
|
//开始结束时间
|
|
if (!string.IsNullOrEmpty(txtStartTime) && !string.IsNullOrEmpty(txtEndTime))
|
|
{
|
|
strWhere += " AND a.create_ymd +' '+ a.create_hms between '" + txtStartTime + "' and '" + txtEndTime + "'";
|
|
}
|
|
|
|
//if (!string.IsNullOrEmpty(SN))
|
|
//{
|
|
// strWhere += " and (a.serial_number= '" + SN + "' OR a.kpsn= '" + SN + "') ";
|
|
//}
|
|
if (!string.IsNullOrEmpty(kPartNo))
|
|
{
|
|
strWhere += " and d.part_no= '" + kPartNo + "'";
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(cbTerminalName))
|
|
{
|
|
strWhere += " and a.terminal_id= '" + cbTerminalName + "'";
|
|
}
|
|
|
|
return dal.getTerKPSN(strWhere, pager, ref totalCount);
|
|
}
|
|
}
|
|
|
|
|
|
}
|