155 lines
4.8 KiB
C#
155 lines
4.8 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 BussCodeDisk : IBussFactory
|
|||
|
|
{
|
|||
|
|
#region 获取码盘信息
|
|||
|
|
/// <summary>
|
|||
|
|
/// 码盘完成更改码盘状态
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="orderId"></param>
|
|||
|
|
/// <param name="barcode"></param>
|
|||
|
|
/// <param name="goodsId"></param>
|
|||
|
|
public void UpBoxCodeSts(string orderId, string barcode, string goodsId)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
/// <summary>
|
|||
|
|
/// 获取码盘信息
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="model"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public List<CodeDiskModel> GetCodeDisk(CodeDiskModel model)
|
|||
|
|
{
|
|||
|
|
DataTable dt = DataProvider.Instance.CodeDisk.GetCodeDisk(model);
|
|||
|
|
List<CodeDiskModel> list = ConvertHelper<CodeDiskModel>.ConvertToList(dt);
|
|||
|
|
return list;
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region 新增或修改码盘
|
|||
|
|
public string DelCiskCtlGoodsId(string ctl, string orderId, string goodsId)
|
|||
|
|
{
|
|||
|
|
DataProvider.Instance.CodeDisk.DelCiskCtlGoodsId(ctl, orderId, goodsId);
|
|||
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|||
|
|
logList.Add(DataProvider.Instance.logData);
|
|||
|
|
TaCmtOrRak();
|
|||
|
|
return ErrText;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
public int AddZCtlData(CodeDiskModel modele)
|
|||
|
|
{
|
|||
|
|
DataProvider.Instance.CodeDisk.AddZpData(modele);
|
|||
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|||
|
|
logList.Add(DataProvider.Instance.logData);
|
|||
|
|
DataProvider.Instance.WareNoticeTab.UpBoxCodeSts(modele.Warehousing_id, modele.BarCode);
|
|||
|
|
//DataProvider.Instance.Pallet.SetPalletSts(modele.Pallet_id, "1", "worktype001");
|
|||
|
|
|
|||
|
|
logList.Add(DataProvider.Instance.logData);
|
|||
|
|
TaCmtOrRak();
|
|||
|
|
DataTable tb = DataProvider.Instance.WareNoticeTab.GetWareNoticeCt(modele.Warehousing_id);
|
|||
|
|
if (tb != null)
|
|||
|
|
{
|
|||
|
|
if (tb.Rows.Count > 0)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
return int.Parse(tb.Rows[0]["a"].ToString());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
return 0;
|
|||
|
|
}
|
|||
|
|
public string AddZpData(List<CodeDiskModel> list_model)
|
|||
|
|
{
|
|||
|
|
for (int i = 0; i < list_model.Count; i++)
|
|||
|
|
{
|
|||
|
|
CodeDiskModel modele = list_model[i];
|
|||
|
|
DataProvider.Instance.CodeDisk.AddZpData(modele);
|
|||
|
|
if (i == 0)
|
|||
|
|
{
|
|||
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|||
|
|
logList.Add(DataProvider.Instance.logData);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
TaCmtOrRak();
|
|||
|
|
|
|||
|
|
return this.ErrText;
|
|||
|
|
}
|
|||
|
|
/// <summary>
|
|||
|
|
/// 新增或修改码盘
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="model"></param>
|
|||
|
|
/// <param name="flg">0 新增,1 修改</param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public string ExecCodeDIskUpdate(CodeDiskModel model)
|
|||
|
|
{
|
|||
|
|
DataProvider.Instance.CodeDisk.ExecCodeDIskUpdate(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 int DelCodeDisk(CodeDiskModel model)
|
|||
|
|
{
|
|||
|
|
return DataProvider.Instance.CodeDisk.DelCodeDisk(model);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 根据托盘
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="ctl"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public string DelCiskCtl(string ctl)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
DataProvider.Instance.CodeDisk.DelCiskCtl(ctl);
|
|||
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|||
|
|
logList.Add(DataProvider.Instance.logData);
|
|||
|
|
DataProvider.Instance.Pallet.SetPalletSts(ctl, "0","");
|
|||
|
|
logList.Add(DataProvider.Instance.logData);
|
|||
|
|
TaCmtOrRak();
|
|||
|
|
return this.ErrText;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
public string UpdateCtl(string ctl)
|
|||
|
|
{
|
|||
|
|
DataProvider.Instance.Pallet.SetPalletSts(ctl, "1", "");
|
|||
|
|
logList.Add(DataProvider.Instance.logData);
|
|||
|
|
TaCmtOrRak();
|
|||
|
|
return this.ErrText;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
public string UpdateDiskPallet(string ctl,string newCtl)
|
|||
|
|
{
|
|||
|
|
DataProvider.Instance.CodeDisk.UpdateDiskPallet(ctl, newCtl);
|
|||
|
|
Transaction = DataProvider.Instance.TranOracle;
|
|||
|
|
logList.Add(DataProvider.Instance.logData);
|
|||
|
|
TaCmtOrRak();
|
|||
|
|
return this.ErrText;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|