134 lines
3.6 KiB
C#
134 lines
3.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using WMS.Model.Stock;
|
|
using WMS.Model.CK;
|
|
using System.Data;
|
|
using WMS.IData;
|
|
using WMS.Common;
|
|
|
|
namespace WMS.Business.Stock
|
|
{
|
|
public class BussMIPackStock : IBussFactory
|
|
{
|
|
|
|
/// <summary>
|
|
/// 增加一条记录
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public string Add(MIPackStockModel model)
|
|
{
|
|
DataProvider.Instance.MIPackStock.Add(model);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
|
|
return this.ErrText;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 增加记录集合
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public string AddList(List<MIPackStockModel> MIPackStocklist)
|
|
{
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
|
|
foreach (MIPackStockModel MIPackStockmodel in MIPackStocklist)
|
|
{
|
|
DataProvider.Instance.MIPackStock.Add(MIPackStockmodel);
|
|
logList.Add(DataProvider.Instance.logData);
|
|
}
|
|
|
|
TaCmtOrRak();
|
|
|
|
return this.ErrText;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 修改一条记录
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public string Update(MIPackStockModel model)
|
|
{
|
|
DataProvider.Instance.MIPackStock.Update(model);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
|
|
return this.ErrText;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除一条记录
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public string Delete(MIPackStockModel model)
|
|
{
|
|
DataProvider.Instance.MIPackStock.Delete(model);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
|
|
return this.ErrText;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除记录集合
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public string DeleteList(List<MIPackStockModel> modellist)
|
|
{
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
|
|
foreach (MIPackStockModel MIPackStockmodel in modellist)
|
|
{
|
|
DataProvider.Instance.MIPackStock.Delete(MIPackStockmodel);
|
|
logList.Add(DataProvider.Instance.logData);
|
|
}
|
|
|
|
TaCmtOrRak();
|
|
|
|
return this.ErrText;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取集合
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public List<MIPackStockModel> GetList(MIPackStockModel model)
|
|
{
|
|
DataTable table = DataProvider.Instance.MIPackStock.GetList(model);
|
|
List<MIPackStockModel> CountingModelList = ConvertHelper<MIPackStockModel>.ConvertToList(table);
|
|
|
|
if (DataLogErrWrite(table, "获取包装库存单"))
|
|
{
|
|
return CountingModelList;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取商品重量
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public string GetWeight(string EXPRESSNO)
|
|
{
|
|
return DataProvider.Instance.MIPackStock.GetWeight(EXPRESSNO);
|
|
}
|
|
}
|
|
}
|