/// <summary> /// 从第一排第一列第一层开始查找 /// </summary> /// <param name="logicAreaID">逻辑区域ID</param> /// <param name="gsStoreStatus">存储状态</param> /// <param name="gsType">货位类型</param> /// <returns></returns> public GoodsSiteModel GetGoodsSite(int logicAreaID, EnumGSStoreStatus gsStoreStatus , EnumGSRunStatus gsRunStatus, EnumGSType gsType) { GoodsSiteModel goodsSite = null; //bool isFind = false; //int rows = 0; //int columns = 0; //int layers = 0; //GetRowColumnLayer(logicAreaID, out rows, out columns, out layers); //for (int i = 1; i < rows + 1; i++) //{ // if (isFind == true) // { // break; // } // for (int j = 1; j < columns + 1; j++) // { // if (isFind == true) // { // break; // } // for (int k = 1; k < layers + 1; k++) // { // string wereStr = "GoodsSiteRow=" + i + " and GoodsSiteColumn =" + j + " and GoodsSiteLayer =" + k // + " and LogicStoreAreaID=" + logicAreaID + " and GoodsSiteStoreStatus ='" // + gsStoreStatus.ToString() + "' and GoodsSiteType ='" + gsType.ToString() + "'" // + "and GoodsSiteRunStatus = '" + gsRunStatus.ToString() +"'"; // //string wereStr = "GoodsSiteRow=" + i + " and GoodsSiteColumn =" + j // // + " and LogicStoreAreaID=" + logicAreaID + " and GoodsSiteStoreStatus ='" // // + gsStoreStatus.ToString() + "' and GoodsSiteType ='" + gsType.ToString() + "'"; // List<ECAMSDataAccess.GoodsSiteModel> goodsSiteList = GetModelList(wereStr); // if (goodsSiteList.Count > 0) // { // goodsSite = goodsSiteList[0]; // isFind = true; // break; // } // } // } //} string wereStr = "LogicStoreAreaID=" + logicAreaID + " and GoodsSiteStoreStatus ='" + gsStoreStatus.ToString() + "' and GoodsSiteRunStatus = '" + gsRunStatus.ToString() + "' and GoodsSiteType ='" + gsType.ToString() + "'order by GoodsSiteColumn asc," + "GoodsSiteRow asc,GoodsSiteLayer asc"; List <ECAMSDataAccess.GoodsSiteModel> goodsSiteList = GetModelList(wereStr); if (goodsSiteList.Count > 0) { goodsSite = goodsSiteList[0]; } return(goodsSite); }
/// <summary> /// 作者:np /// 时间:2014年4月16日 /// 内容:通过货位状态获取货位模型 /// </summary> public View_QueryStockListModel GetOutHouseModel(int goodsSiteID, EnumGSStoreStatus gsStoreStatus, EnumGSRunStatus gsRunStatus) { return(dal.GetOutHouseModel(goodsSiteID, gsStoreStatus.ToString(), gsRunStatus.ToString())); }
/// <summary> /// 得到一个对象实体 /// </summary> public GoodsSiteModel GetOutHouseModel(int GoodsSiteID, EnumGSStoreStatus gsStoreStatus, EnumGSRunStatus gsRunStatus) { return(dal.GetOutHouseModel(GoodsSiteID, gsStoreStatus.ToString(), gsRunStatus.ToString())); }