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.
219 lines
6.2 KiB
219 lines
6.2 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using ICSSoft.Frame.Data.DAL;
|
|
using System.Data;
|
|
using ICSSoft.Frame.Data.Entity;
|
|
|
|
namespace ICSSoft.Frame.Data.BLL
|
|
{
|
|
public static class StockBarCodeBLL
|
|
{
|
|
public static void stackMOPicking(string barStr, Rd11Context Context, string MoNo)
|
|
{
|
|
try
|
|
{
|
|
StockBarCodeDAL.stackMOPicking(barStr,Context, MoNo);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public static void ImportData(List<InitialInvtory> list,string erpName)
|
|
{
|
|
try
|
|
{
|
|
StockBarCodeDAL.ImportData(list, erpName);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public static void update(ICSStockBarCode carton)
|
|
{
|
|
StockBarCodeDAL.update(carton);
|
|
}
|
|
|
|
public static int getMaxNO(string conn)
|
|
{
|
|
DataTable dt = StockBarCodeDAL.getMaxNO(conn);
|
|
string dateNow = DateTime.Now.ToString("yyyyMMdd");
|
|
if (dt != null && dt.Rows.Count > 0 && dt.Rows[0][0].ToString() != "")
|
|
{
|
|
if (dt.Rows[0][0].ToString().Substring(1, 8) == dateNow)
|
|
{
|
|
return int.Parse(dt.Rows[0][0].ToString().Substring(10));
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
public static DataTable Stockquery(string cartonNo)
|
|
{
|
|
try
|
|
{
|
|
return StockBarCodeDAL.Stockquery(cartonNo);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public static DataTable StockQuerys(string cartonNo)
|
|
{
|
|
try
|
|
{
|
|
return StockBarCodeDAL.StockQuerys(cartonNo);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public static DataTable findBySerial(string cartonNo)
|
|
{
|
|
return StockBarCodeDAL.findBySerial(cartonNo);
|
|
}
|
|
|
|
public static DataTable querys(string erpName,string cartonNo)
|
|
{
|
|
return StockBarCodeDAL.querys(erpName, cartonNo);
|
|
}
|
|
|
|
public static DataTable queryInfo( string cartonNo)
|
|
{
|
|
return StockBarCodeDAL.queryInfo(cartonNo);
|
|
}
|
|
|
|
public static DataTable queryByNo(string cartonNo)
|
|
{
|
|
return StockBarCodeDAL.queryByNo(cartonNo);
|
|
}
|
|
|
|
public static DataTable outQuery(string cartonNo)
|
|
{
|
|
return StockBarCodeDAL.outQuery(cartonNo);
|
|
}
|
|
|
|
public static void search(List<string> guidList1, string appstr)
|
|
{
|
|
try
|
|
{
|
|
StockBarCodeDAL.search(guidList1, appstr);
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 箱号条码生成
|
|
/// </summary>
|
|
/// <param name="guidQtyList"></param>
|
|
/// <param name="AppConnStr"></param>
|
|
public static void CreatebarCode(List<StockBarCodeDAL.CartonNoCreat> guidQtyList, string batch, decimal sumPack,string PSerial, string AppConnStr)
|
|
{
|
|
try
|
|
{
|
|
StockBarCodeDAL.CreatebarCode(guidQtyList, AppConnStr, PSerial, sumPack);
|
|
//StockBarCodeDAL.UpdateLotPack(batch, sumPack, AppConnStr, PSerial);
|
|
}
|
|
catch (Exception ex)
|
|
{ throw ex; }
|
|
}
|
|
/// <summary>
|
|
/// 分箱
|
|
/// </summary>
|
|
/// <param name="list"></param>
|
|
/// <param name="NewQty"></param>
|
|
/// <param name="Appcon"></param>
|
|
public static void CartonOpenOri(List<string> list,string NewQty,string Appcon)
|
|
{
|
|
try
|
|
{
|
|
StockBarCodeDAL.CartonOpenOri(list, NewQty, Appcon);
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 分箱
|
|
/// </summary>
|
|
/// <param name="list"></param>
|
|
/// <param name="Serial"></param>
|
|
/// <param name="NewCartonNo"></param>
|
|
/// <param name="NewQty"></param>
|
|
/// <param name="Appcon"></param>
|
|
public static void CartonOpenNew(List<string> list,string barCode, string NewCartonNo, decimal NewQty, string Appcon)
|
|
{
|
|
try
|
|
{
|
|
StockBarCodeDAL.CartonOpenNew(list,barCode, NewCartonNo, NewQty, Appcon);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 合箱
|
|
/// </summary>
|
|
/// <param name="guidList"></param>
|
|
/// <param name="AppConnStr"></param>
|
|
public static void CartonClose(List<StockBarCodeDAL.CartonNoCreat> guidList, List<StockBarCodeDAL.CartonNoCreat> delguid,string AppConnStr)
|
|
{
|
|
try
|
|
{
|
|
StockBarCodeDAL.CartonClose(guidList, delguid,AppConnStr);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 修改箱号
|
|
/// </summary>
|
|
/// <param name="Serial"></param>
|
|
/// <param name="Collect"></param>
|
|
/// <param name="APPStr"></param>
|
|
public static void CartonNoModify(string Serial, string Collect,string APPStr)
|
|
{
|
|
try
|
|
{
|
|
StockBarCodeDAL.CartonNoModify(Serial, Collect, APPStr);
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 删除箱号
|
|
/// </summary>
|
|
/// <param name="Guidlist"></param>
|
|
/// <param name="AppStr"></param>
|
|
public static List<string> CartonNoDel(List<KeyValuePair<string, string>> Guidlist, string AppStr)
|
|
{
|
|
try
|
|
{
|
|
return StockBarCodeDAL.CartonNoDel(Guidlist, AppStr);
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|