public void SetGsStatus(long gsID, bool status) { string reStr = ""; bllGs.UpdateGSEnabledStatusByID(gsID, status); GoodsSiteModel gsm = bllGs.GetModel(gsID); if (gsm == null) { return; } StoreHouseModel house = bllStoreHouse.GetModel(gsm.StoreHouseID); if (house == null) { return; } if (status == true) { this.view.AddLog("库存看板", "货位《" + gsm.GoodsSiteName + "》启用!", EnumLoglevel.提示); this.iStorageManage.AddGSOperRecord(house.StoreHouseName, new CellCoordModel(gsm.GoodsSiteRow, gsm.GoodsSiteColumn, gsm.GoodsSiteLayer) , EnumGSOperateType.手动启用货位, "手动启用货位", ref reStr); } else { this.iStorageManage.AddGSOperRecord(house.StoreHouseName, new CellCoordModel(gsm.GoodsSiteRow, gsm.GoodsSiteColumn, gsm.GoodsSiteLayer) , EnumGSOperateType.手动禁用货位, "手动禁用货位", ref reStr); this.view.AddLog("库存看板", "货位《" + gsm.GoodsSiteName + "》禁用!", EnumLoglevel.提示); } }
/// <summary> /// 更新货位启用状态 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="cellCoord">货位位置</param> /// <param name="enabledStatus">货位禁用状态</param> /// <param name="reStr">执行状态描述</param> /// <returns>执行状态</returns> public bool UpdateGsEnabledStatus(string houseName, CellCoordModel cellCoord, EnumGSEnabledStatus enabledStatus, ref string reStr) { StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { return(false); } GoodsSiteModel gsm = bllGoodsSite.GetModelByRCL(houseModel.StoreHouseID, cellCoord.Row, cellCoord.Col, cellCoord.Layer); if (gsm == null) { return(false); } bool gsEnabledSta = false; if (enabledStatus == EnumGSEnabledStatus.启用) { gsEnabledSta = true; } else { gsEnabledSta = false; } bool updateStatus = bllGoodsSite.UpdateGSEnabledStatusByID(gsm.GoodsSiteID, gsEnabledSta); if (updateStatus == true) { OnUpdateGsStatus(); //string operateStr = "库房:" + houseName + ",货位:" + cellCoord.Row + "排" + cellCoord.Col + "列" + cellCoord.Layer + "层," + "货位启用状态更改为:" + enabledStatus.ToString(); //AddGSOperRecord(houseName, cellCoord, EnumGSOperateType.系统修改状态, operateStr, ref reStr); reStr = "货位更新成功!"; return(true); } else { reStr = "货位更新失败!"; return(false); } }
public void SetGsUseStatus(List <string> stockIDList, bool status) { string reStr = ""; if (stockIDList == null) { return; } for (int i = 0; i < stockIDList.Count; i++) { string stockID = stockIDList[i]; View_StockGSModel stockGs = bllViewStockGs.GetModelByStockID(long.Parse(stockID)); if (stockGs == null) { continue; } bllGs.UpdateGSEnabledStatusByID(stockGs.GoodsSiteID, status); if (status == true) { this.iStorageManager.AddGSOperRecord(stockGs.StoreHouseName, new CellCoordModel(stockGs.GoodsSiteRow, stockGs.GoodsSiteColumn, stockGs.GoodsSiteLayer) , EnumGSOperateType.手动启用货位, "手动启用货位", ref reStr); this.view.AddLog("库存列表", "手动启用货位" + stockGs.GoodsSiteName, LogInterface.EnumLoglevel.提示); } else { this.iStorageManager.AddGSOperRecord(stockGs.StoreHouseName, new CellCoordModel(stockGs.GoodsSiteRow, stockGs.GoodsSiteColumn, stockGs.GoodsSiteLayer) , EnumGSOperateType.手动禁用货位, "手动禁用货位", ref reStr); this.view.AddLog("库存列表", "手动禁用货位" + stockGs.GoodsSiteName, LogInterface.EnumLoglevel.提示); } } //出完后库要再次查询防止重复出库 QueryStock(this.currHouseName, this.currHouseArea, this.currRowth, this.currColth, this.currLayerth, this.gsStatus, this.gsTaskSta, this.currProBatch); this.view.RefreshStorageView(); }