161 lines
4.6 KiB
C#
161 lines
4.6 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using WMS.Model.Base;
|
||
using WMS.IData;
|
||
using System.Data;
|
||
using WMS.Common;
|
||
using System.Reflection;
|
||
|
||
namespace WMS.Business.Base
|
||
{
|
||
public class BussPallet : IBussFactory
|
||
{
|
||
#region 获得容器数据
|
||
/// <summary>
|
||
/// 得到容器数据
|
||
/// </summary>
|
||
/// <param name="model">容器Model</param>
|
||
/// <returns></returns>
|
||
public List<PalletModel> GetPalletList(PalletModel model)
|
||
{
|
||
DataTable dt = DataProvider.Instance.Pallet.GetPalletTable(model);
|
||
|
||
List<PalletModel> list = null;
|
||
|
||
if (DataLogErrWrite(dt, "获取容器资料"))
|
||
{
|
||
list = ConvertHelper<PalletModel>.ConvertToList(dt);
|
||
}
|
||
else
|
||
{
|
||
return list;
|
||
}
|
||
return list;
|
||
}
|
||
#endregion
|
||
|
||
|
||
|
||
public DataTable GetCtl(int barcodetime)
|
||
{
|
||
DataTable dt = DataProvider.Instance.Pallet.GetCtl(barcodetime);
|
||
return dt;
|
||
}
|
||
public DataTable GetCtl2(int barcodetime)
|
||
{
|
||
DataTable dt = DataProvider.Instance.Pallet.GetCtl2(barcodetime);
|
||
return dt;
|
||
}
|
||
|
||
|
||
public void Insert_T_BASE_PALLET(int STORAGE_ID, int BARCODETIME, int SEQID,string BarCode)
|
||
{
|
||
DataProvider.Instance.Pallet.Insert_T_BASE_PALLET(STORAGE_ID, BARCODETIME, SEQID, BarCode);
|
||
Transaction = DataProvider.Instance.TranOracle;
|
||
logList.Add(DataProvider.Instance.logData);
|
||
TaCmtOrRak();
|
||
//return this.ErrText;
|
||
|
||
}
|
||
|
||
#region 操作容器数据 增加 更新
|
||
/// <summary>
|
||
/// 修改容器数据
|
||
/// </summary>
|
||
/// <param name="model">容器Model</param>
|
||
/// <param name="opeflag"> 1:修改</param>
|
||
/// <returns></returns>
|
||
public string OperatePallet(PalletModel model, int opeflag)
|
||
{
|
||
DataProvider.Instance.Pallet.OperatePallet(model, opeflag);
|
||
Transaction = DataProvider.Instance.TranOracle;
|
||
logList.Add(DataProvider.Instance.logData);
|
||
TaCmtOrRak();
|
||
return this.ErrText;
|
||
}
|
||
|
||
|
||
|
||
/// <summary>
|
||
/// 批量新增容器数据
|
||
/// </summary>
|
||
/// <param name="list">容器Model集合</param>
|
||
/// <param name="opeflag">0:新增</param>
|
||
/// <returns></returns>
|
||
public string OperatePallet(List<PalletModel> list, int opeflag)
|
||
{
|
||
DataProvider.Instance.Pallet.OperatePallet(list, opeflag);
|
||
Transaction = DataProvider.Instance.TranOracle;
|
||
logList.Add(DataProvider.Instance.logData);
|
||
TaCmtOrRak();
|
||
return this.ErrText;
|
||
}
|
||
#endregion
|
||
|
||
|
||
|
||
#region 删除容器数据
|
||
/// <summary>
|
||
/// 批量删除容器数据
|
||
/// </summary>
|
||
/// <param name="list">容器Model集合</param>
|
||
/// <returns></returns>
|
||
public string PalletDel(List<PalletModel> list)
|
||
{
|
||
|
||
DataProvider.Instance.Pallet.PalletDel(list);
|
||
|
||
Transaction = DataProvider.Instance.TranOracle;
|
||
logList.Add(DataProvider.Instance.logData);
|
||
return this.ErrText;
|
||
|
||
}
|
||
#endregion
|
||
|
||
|
||
|
||
|
||
#region 删除数据写入到备份表
|
||
/// <summary>
|
||
/// 删除数据写入到备份表
|
||
/// </summary>
|
||
/// <param name="list">容器Model集合</param>
|
||
/// <returns>错误日志</returns>
|
||
public string InsertPalletBack(List<PalletModel> list)
|
||
{
|
||
//先写入
|
||
DataProvider.Instance.Pallet.InsertPalletBack(list);
|
||
Transaction = DataProvider.Instance.TranOracle;
|
||
logList.Add(DataProvider.Instance.logData);
|
||
//在删除
|
||
DataProvider.Instance.Pallet.PalletDel(list);
|
||
Transaction = DataProvider.Instance.TranOracle;
|
||
logList.Add(DataProvider.Instance.logData);
|
||
|
||
TaCmtOrRak();
|
||
return this.ErrText;
|
||
}
|
||
|
||
#endregion
|
||
|
||
/// <summary>
|
||
/// 批量修改容器资料
|
||
/// </summary>
|
||
/// <param name="list"></param>
|
||
/// <param name="Flag"></param>
|
||
/// <returns></returns>
|
||
public string OperatePalletList(List<PalletModel> list, int Flag)
|
||
{
|
||
DataProvider.Instance.Pallet.OperatePallet(list, Flag);
|
||
Transaction = DataProvider.Instance.TranOracle;
|
||
logList.Add(DataProvider.Instance.logData);
|
||
TaCmtOrRak();
|
||
return this.ErrText;
|
||
|
||
}
|
||
}
|
||
|
||
}
|