131 lines
4.4 KiB
C#
131 lines
4.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using WMS.Model.RK;
|
|
using System.Data;
|
|
using WMS.IData;
|
|
using WMS.Common;
|
|
|
|
namespace WMS.Business.RK
|
|
{
|
|
public class BussReceve : IBussFactory
|
|
{
|
|
/// <summary>
|
|
/// 增加一条数据
|
|
/// </summary>
|
|
public string Add(ReceivingModel model,List<ReceivingInfoModel> listmodel,ref string docId)
|
|
{
|
|
docId = IBussFactory<WMS.Business.Base.BussDocumentTable>.Instance().GetDocumentStream("收货单");
|
|
if (model != null)
|
|
{
|
|
DataProvider.Instance.Receve.AddReciveGoods(model);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
model.RECE_ID = docId;
|
|
foreach (ReceivingInfoModel m in listmodel)
|
|
{
|
|
m.RECE_ID = docId;
|
|
DataProvider.Instance.Receve.AddGodsInfodList(m);
|
|
logList.Add(DataProvider.Instance.logData);
|
|
}
|
|
TaCmtOrRak();
|
|
}
|
|
|
|
return this.ErrText;
|
|
}
|
|
/// <summary>
|
|
/// 更新一条数据
|
|
/// </summary>
|
|
public string Update(ReceivingModel model)
|
|
{
|
|
DataProvider.Instance.Receve.Update(model);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
/// <summary>
|
|
/// 更新一条数据
|
|
/// </summary>
|
|
public string Update(ReceivingModel model, List<ReceivingInfoModel> listmodel)
|
|
{
|
|
DataProvider.Instance.Receve.Update(model, listmodel);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除一条数据
|
|
/// </summary>
|
|
public string Delete(ReceivingModel model, List<ReceivingInfoModel> listmodel,bool flag)
|
|
{
|
|
DataProvider.Instance.Receve.Delete(model, listmodel, flag);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 作废一条数据
|
|
/// </summary>
|
|
public string Cancel(ReceivingModel model)
|
|
{
|
|
DataProvider.Instance.Receve.Cancel(model);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
logList.Add(DataProvider.Instance.logData);
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获得收货记录
|
|
/// </summary>
|
|
public List<ReceivingModel> GetList(ReceivingModel modle)
|
|
{
|
|
DataTable dt = DataProvider.Instance.Receve.GetList(modle);
|
|
List<ReceivingModel> list = ConvertHelper<ReceivingModel>.ConvertToList(dt);
|
|
return list;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获得收货记录
|
|
/// </summary>
|
|
public List<ReceivingInfoModel> GetInfoList(string id)
|
|
{
|
|
DataTable dt = DataProvider.Instance.Receve.GetInfoList(id);
|
|
List<ReceivingInfoModel> list = ConvertHelper<ReceivingInfoModel>.ConvertToList(dt);
|
|
return list;
|
|
}
|
|
/// <summary>
|
|
/// 获取流水号
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public string GetSerialNum()
|
|
{
|
|
return DataProvider.Instance.Receve.GetSerialNum();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 更新入库明细
|
|
/// </summary>
|
|
/// <param name="upFuc"></param>
|
|
/// <param name="insertFuc"></param>
|
|
/// <param name="delFuc"></param>
|
|
/// <returns></returns>
|
|
public string newReceivingInfoFuc(List<ReceivingInfoModel> upFuc, List<ReceivingInfoModel> insertFuc, List<ReceivingInfoModel> delFuc,ReceivingModel model)
|
|
{
|
|
|
|
DataProvider.Instance.Receve.newReceivingInfoFuc(upFuc, insertFuc, delFuc);
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|
DataProvider.Instance.Receve.Update(model,new List<ReceivingInfoModel>());
|
|
TaCmtOrRak();
|
|
return this.ErrText;
|
|
}
|
|
}
|
|
}
|