286 lines
8.6 KiB
C#
286 lines
8.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using WMS.Model.Stock;
|
|
using WMS.IData;
|
|
using WMS.Common;
|
|
using System.Data;
|
|
using WMS.Model.Base;
|
|
using WMS.Model.CK;
|
|
using WMS.Model.RK;
|
|
|
|
namespace WMS.Business.Stock
|
|
{
|
|
public class BussStorageRep : IBussFactory
|
|
{
|
|
#region 获得流水号
|
|
/// <summary>
|
|
/// 获得流水号
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public string GetNextValNum()
|
|
{
|
|
return DataProvider.Instance.StorageRep.GetNextValNum();
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
#region 查主表
|
|
/// <summary>
|
|
/// 获得仓库调拨主表信息
|
|
/// </summary>
|
|
/// <param name="model">仓库调拨Model</param>
|
|
/// <returns></returns>
|
|
public List<StorageRepModel> GetStorageRepData(StorageRepModel model)
|
|
{
|
|
DataTable dt = DataProvider.Instance.StorageRep.GetStorageRepData(model);
|
|
List<StorageRepModel> list = null;
|
|
|
|
if (DataLogErrWrite(dt, "获得仓库间调拨主表数据"))
|
|
{
|
|
list = ConvertHelper<StorageRepModel>.ConvertToList(dt);
|
|
}
|
|
else
|
|
{
|
|
return list;
|
|
}
|
|
return list;
|
|
}
|
|
#endregion
|
|
#region 查明细
|
|
/// <summary>
|
|
/// 仓库间调拨明细表数据
|
|
/// </summary>
|
|
/// <param name="strId">仓库间调拨ID</param>
|
|
/// <returns></returns>
|
|
public List<StorageRepInfoModel> GetStorageRepInfoData(string strId)
|
|
{
|
|
DataTable dt = DataProvider.Instance.StorageRep.GetStorageRepInfoData(strId);
|
|
List<StorageRepInfoModel> list = null;
|
|
|
|
if (DataLogErrWrite(dt, "获得仓库间调拨明细表数据"))
|
|
{
|
|
list = ConvertHelper<StorageRepInfoModel>.ConvertToList(dt);
|
|
}
|
|
else
|
|
{
|
|
return list;
|
|
}
|
|
return list;
|
|
}
|
|
#endregion
|
|
|
|
#region 同时新增 主表明细表数据
|
|
/// <summary>
|
|
/// 同时新增 主表明细表数据
|
|
/// </summary>
|
|
/// <param name="model">主表Model</param>
|
|
/// <param name="list">明细表Model集合</param>
|
|
/// <returns></returns>
|
|
public string InsertStorageRepData(StorageRepModel model, List<StorageRepInfoModel> list )
|
|
{
|
|
|
|
DataProvider.Instance.StorageRep.InsertStorageRepData(model, list);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
|
|
TaCmtOrRak();
|
|
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 同时删除仓库间调拨主表、明细表数据
|
|
/// <summary>
|
|
/// 同时删除仓库间调拨主表明细表数据
|
|
/// </summary>
|
|
/// <param name="strlist">ID集合</param>
|
|
/// <returns></returns>
|
|
public string DeleteStorageRepByID(List<string> strlist)
|
|
{
|
|
//删主表
|
|
DataProvider.Instance.StorageRep.DeleteStorageRepData(strlist);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
|
|
|
|
|
|
TaCmtOrRak();
|
|
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 单独增明细
|
|
/// </summary>
|
|
/// <param name="strlist"></param>
|
|
/// <returns></returns>
|
|
public string Add(List<StorageRepInfoModel> strlist)
|
|
{
|
|
DataProvider.Instance.StorageRep.Add(strlist);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 单独删明细
|
|
/// </summary>
|
|
/// <param name="lsit"></param>
|
|
/// <returns></returns>
|
|
public string Delete(List<StorageRepInfoModel> lsit)
|
|
{
|
|
DataProvider.Instance.StorageRep.Delete(lsit);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
|
|
|
|
|
|
// List<OrdersModel>
|
|
/// <summary>
|
|
/// 单独更新明细数据
|
|
/// </summary>
|
|
/// <param name="upFuc">更新集合</param>
|
|
/// <param name="insertFuc">新增集合</param>
|
|
/// <param name="delFuc">删除集合</param>
|
|
/// <returns></returns>
|
|
public string NewStorageRepInfoFuc(StorageRepModel stM, List<StorageRepInfoModel> upFuc, List<StorageRepInfoModel> insertFuc, List<StorageRepInfoModel> delFuc )
|
|
{
|
|
|
|
DataProvider.Instance.StorageRep.NewStorageRepInfoFuc(stM, upFuc, insertFuc, delFuc);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
//修改规格明细
|
|
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 打印完成
|
|
/// </summary>
|
|
/// <param name="model">移位单</param>
|
|
/// <returns>是否成功</returns>
|
|
public string PrintOK(StorageRepModel model)
|
|
{
|
|
//修改捡货单打印次数
|
|
model.PRINT_COUNT += 1;
|
|
DataProvider.Instance.StorageRep.UpdateStorageRep(model);
|
|
logList.Add(DataProvider.Instance.logData);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
|
|
|
|
TaCmtOrRak();
|
|
return ErrText;
|
|
}
|
|
|
|
|
|
|
|
#region 已废 删主表
|
|
public string DeleteStorageRep(List<StorageRepModel> model)
|
|
{
|
|
DataProvider.Instance.StorageRep.DeleteStorageRep(model);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
#region 已废 删明细
|
|
|
|
public string DeleteStorageRepInfo(List<StorageRepInfoModel> model)
|
|
{
|
|
DataProvider.Instance.StorageRep.DeleteStorageRepInfo(model);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
#region 增主表
|
|
/// <summary>
|
|
/// 增仓库间调拨主表数据
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public string InsertStorageRep(StorageRepModel model)
|
|
{
|
|
DataProvider.Instance.StorageRep.InsertStorageRep(model);
|
|
|
|
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 InsertStorageInfoRep(List<StorageRepInfoModel> list)
|
|
{
|
|
DataProvider.Instance.StorageRep.InsertStorageRepInfo(list);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
#region 改主表
|
|
/// <summary>
|
|
/// 更新仓库间调拨主表数据
|
|
/// </summary>
|
|
/// <param name="model">仓库间调拨Model</param>
|
|
/// <returns></returns>
|
|
public string UpdateStorageRep(StorageRepModel model)
|
|
{
|
|
DataProvider.Instance.StorageRep.UpdateStorageRep(model);
|
|
|
|
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 UpdateStorageRepInfo(List<StorageRepInfoModel> list)
|
|
{
|
|
DataProvider.Instance.StorageRep.UpdateStorageRepInfo(list);
|
|
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
#endregion
|
|
}
|
|
}
|