BaoKai_202508_Wms_Jingwang_.../WMS.Business/Base/BussDecSts.cs

136 lines
3.8 KiB
C#
Raw Permalink Normal View History

2025-08-24 21:52:42 +08:00
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WMS.IData;
namespace WMS.Business.Base
{
public class BussDecSts : IBussFactory
{
public DataTable GetDecIPDecData(string pcIp)
{
return DataProvider.Instance.DecStsData.GetDecIPDecData(pcIp);
}
/// <summary>
/// 查询站台模式
/// </summary>
/// <param name="stand"></param>
/// <returns></returns>
public DataTable GetStationRk(string stand)
{
return DataProvider.Instance.DecStsData.GetStationRk(stand);
;
}
public string WriteCayMode(string mode, string decID)
{
if (mode == "1")
{
DataTable tb = DataProvider.Instance.PickingWaveGoods.GetTaskOutCtStand(decID);
if(tb!=null)
{
if (tb.Rows.Count > 0)
{
if (tb.Rows[0]["a"].ToString()!="0")
{
return ErrText = "Out Task ";
}
}
}
}
if (mode == "2")
{
DataTable tb = IBussFactory<BussAutoRk>.Instance().GetFdData("", decID);
if (tb != null)
{
if (tb.Rows.Count > 0)
{
if (tb.Rows[0]["a"].ToString() != "0")
{
return ErrText = "In Task ";
}
}
}
}
DataProvider.Instance.DecStsData.WriteCayMode(mode, decID);
return this.ErrText;
}
///// <summary>
///// 更新输送机模式
///// </summary>
//public void WriteCayMode(string mode, string decID)
//{
// DataProvider.Instance.DecStsData.WriteCayMode(mode, decID);
//}
public int UpdateDecStsSet(string decID, string LedIp, string pcip, string dec, string optype)
{
return DataProvider.Instance.DecStsData.UpdateDecStsSet(decID, LedIp, pcip, dec, optype);
}
/// <summary>
/// 查询所有的输送机任务
/// </summary>
/// <returns></returns>
public DataTable GetDecDataTable()
{
return DataProvider.Instance.DecStsData.GetDecDataTable();
}
public DataTable GetLogError(string STORAGE_ID)
{
return DataProvider.Instance.DecStsData.GetLogError(STORAGE_ID);
}
/// <summary>
/// 查询堆垛机状态
/// </summary>
/// <returns></returns>
public DataTable GetDecStsData()
{
return DataProvider.Instance.DecStsData.GetDecStsData();
}
public DataSet GetDecLocSts(string decid, string row)
{ return DataProvider.Instance.DecStsData.GetDecLocSts(decid, row); }
/// <summary>
///
/// </summary>
/// <param name="decId"></param>
/// <returns></returns>
public DataTable GetDecSts(string decId)
{
return DataProvider.Instance.DecStsData.GetDecSts(decId);
}
public string GetStationErpCong(string desciption)
{
string conStation = "";
DataTable tbStation = new DataTable();
tbStation = DataProvider.Instance.DecStsData.GetStationErpCong(desciption);
if (tbStation != null)
{
if (tbStation.Rows.Count > 0)
{
conStation = tbStation.Rows[0]["ConveyorID"].ToString();
}
}
return conStation;
}
}
}