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); } /// /// 查询站台模式 /// /// /// 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.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; } ///// ///// 更新输送机模式 ///// //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); } /// /// 查询所有的输送机任务 /// /// public DataTable GetDecDataTable() { return DataProvider.Instance.DecStsData.GetDecDataTable(); } public DataTable GetLogError(string STORAGE_ID) { return DataProvider.Instance.DecStsData.GetLogError(STORAGE_ID); } /// /// 查询堆垛机状态 /// /// public DataTable GetDecStsData() { return DataProvider.Instance.DecStsData.GetDecStsData(); } public DataSet GetDecLocSts(string decid, string row) { return DataProvider.Instance.DecStsData.GetDecLocSts(decid, row); } /// /// /// /// /// 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; } } }