You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
153 lines
6.8 KiB
153 lines
6.8 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using MESClassLibrary.BLL.Log;
|
|
using MESClassLibrary.DAL.PunchAndWeld;
|
|
|
|
namespace MESClassLibrary.BLL.PunchAndWeld
|
|
{
|
|
public class PunchPartBLL
|
|
{
|
|
PunchPartDAL da=new PunchPartDAL();
|
|
|
|
public DataTable SearchPunchPart(string deviceNo)
|
|
{
|
|
try
|
|
{
|
|
return da.SearchPunchPart(deviceNo);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
//public List<List<string>> SearchForExcel(string partNo)
|
|
//{
|
|
// try
|
|
// {
|
|
// List<List<string>> list = new List<List<string>>();
|
|
|
|
// string jsonStr = "[]";
|
|
// int total = 0;//总行数
|
|
// List<tb_Product> listProduct = db.SearchAllInfo();
|
|
|
|
// if (!String.IsNullOrEmpty(stockNo))
|
|
// {
|
|
// listProduct = listProduct.Where(p => p.StockNo != null && p.StockNo.Contains(stockNo)).ToList();
|
|
// }
|
|
// if (!String.IsNullOrEmpty(productTypeID))
|
|
// {
|
|
// listProduct = listProduct.Where(p => p.ProductTypeID.Equals(productTypeID)).ToList();
|
|
// }
|
|
// if (!String.IsNullOrEmpty(productName))
|
|
// {
|
|
// listProduct = listProduct.Where(p => p.ProductName != null && p.ProductName.Contains(productName)).ToList();
|
|
// }
|
|
// if (!String.IsNullOrEmpty(partNo))
|
|
// {
|
|
// listProduct = listProduct.Where(p => p.PartNo != null && p.PartNo.Contains(partNo)).ToList();
|
|
// }
|
|
// List<ProductModel> modelList = new List<ProductModel>();
|
|
// #region 联查
|
|
// BasicBLL<tb_ProductType> s_db = new BasicBLL<tb_ProductType>();
|
|
// BasicBLL<tb_CarType> carTypeDB = new BasicBLL<tb_CarType>();
|
|
// var s_list = s_db.SearchAllInfo();
|
|
// var carTypeList = carTypeDB.SearchAllInfo();
|
|
|
|
// foreach (var item in listProduct)
|
|
// {
|
|
// ProductModel dm = Tool.Mapper<ProductModel, tb_Product>(item);
|
|
// var info = s_list.FirstOrDefault(p => p.ProductTypeID == item.ProductTypeID);
|
|
// var cartype = carTypeList.FirstOrDefault(p => p.ID == item.CarTypeID);
|
|
// if (info != null)
|
|
// {
|
|
// dm.ProductTypeName = info.ProductTypeName;
|
|
// }
|
|
// if (cartype != null)
|
|
// {
|
|
// dm.CarTypeName = cartype.CarTypeName;
|
|
// }
|
|
// modelList.Add(dm);
|
|
// }
|
|
// #endregion
|
|
|
|
// if (modelList != null && modelList.Count() > 0)
|
|
// {
|
|
// List<string> title_ = new List<string>();
|
|
// title_.Add("类别名称");
|
|
// title_.Add("存货代码");
|
|
// title_.Add("车型");
|
|
// title_.Add("是否进口");
|
|
// title_.Add("产品名称");
|
|
// title_.Add("颜色名称");
|
|
// title_.Add("零件号");
|
|
// title_.Add("行数");
|
|
// title_.Add("列数");
|
|
// title_.Add("层数");
|
|
// title_.Add("描述");
|
|
// title_.Add("标准包装量");
|
|
// title_.Add("开机报废数");
|
|
// title_.Add("Q等级");
|
|
// title_.Add("可喷涂次数");
|
|
// title_.Add("客户编号");
|
|
// title_.Add("车型编号");
|
|
// title_.Add("颜色编号");
|
|
// title_.Add("打印单个标签");
|
|
// title_.Add("直供件");
|
|
// title_.Add("打印装箱单");
|
|
// title_.Add("一模多具");
|
|
// title_.Add("是否左右");
|
|
// title_.Add("喷涂");
|
|
// list.Add(title_);
|
|
|
|
|
|
// List<string> titleList = new List<string>();
|
|
|
|
// foreach (var item in modelList)
|
|
// {
|
|
// List<string> rowList = new List<string>();
|
|
// rowList.Add(item.ProductTypeName == null ? "" : item.ProductTypeName);
|
|
// rowList.Add(item.StockNo == null ? "" : item.StockNo);
|
|
// rowList.Add(item.CarTypeName == null ? "" : item.CarTypeName);
|
|
// rowList.Add(item.isImport == 0 ? "否" : "是");
|
|
// rowList.Add(item.ProductName == null ? "" : item.ProductName);
|
|
// rowList.Add(item.ColorName == null ? "" : item.ColorName);
|
|
// rowList.Add(item.PartNo == null ? "" : item.PartNo);
|
|
// rowList.Add(item.Rows == null ? "0" : item.Rows.ToString());
|
|
// rowList.Add(item.Cols == null ? "0" : item.Cols.ToString());
|
|
// rowList.Add(item.Layers == null ? "0" : item.Layers.ToString());
|
|
// rowList.Add(item.Des == null ? "" : item.Des);
|
|
// rowList.Add(item.PackCount == null ? "0" : item.PackCount.ToString());
|
|
// rowList.Add(item.OpenFailNum == null ? "0" : item.OpenFailNum.ToString());
|
|
// rowList.Add(item.QLevel == null ? "" : item.QLevel);
|
|
// rowList.Add(item.BackPlatingNum == null ? "0" : item.BackPlatingNum.ToString());
|
|
// rowList.Add(item.CustomerNo == null ? "" : item.CustomerNo);
|
|
// rowList.Add(item.CarModelCode == null ? "" : item.CarModelCode);
|
|
// rowList.Add(item.ColorCodeB == null ? "" : item.ColorCodeB);
|
|
// rowList.Add(item.IsPrintOneTag == "0" ? "否" : "是");
|
|
// rowList.Add(item.IsSupply == "0" ? "否" : "是");
|
|
// rowList.Add(item.IsPrintPackList == "0" ? "否" : "是");
|
|
// rowList.Add(item.IsOneMore == "0" ? "否" : "是");
|
|
// rowList.Add(item.IsSame == 0 ? "否" : "是");
|
|
// rowList.Add(item.IsPlating == "0" ? "否" : "是");
|
|
// list.Add(rowList);
|
|
// }
|
|
// }
|
|
// return list;
|
|
|
|
// }
|
|
// catch (Exception ex)
|
|
// {
|
|
// LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
// return null;
|
|
// }
|
|
|
|
|
|
//}
|
|
}
|
|
}
|
|
|