public void ModifyGsStatus(string houseName, long gsID, string gsStatus, string gsTaskStatus) { string reStr = ""; StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (null == house) { return; } GoodsSiteModel oldgsm = bllGs.GetModel(gsID); if (oldgsm == null) { return; } if (oldgsm.GsEnabled == false) { this.view.AddLog("库存看板", "被禁用的货位不允许修改状态!", LogInterface.EnumLoglevel.提示); return; } bllGs.UpdateGSStatusByRCL(houseName, oldgsm.GoodsSiteRow, oldgsm.GoodsSiteColumn, oldgsm.GoodsSiteLayer, (EnumCellStatus)Enum.Parse(typeof(EnumCellStatus), gsStatus)); bllGs.UpdateGsTaskStatusByRCL(houseName, oldgsm.GoodsSiteRow, oldgsm.GoodsSiteColumn, oldgsm.GoodsSiteLayer, (EnumGSTaskStatus)Enum.Parse(typeof(EnumGSTaskStatus), gsTaskStatus)); string operteDetail = "[" + oldgsm.GoodsSiteName + "]货位状态由《" + oldgsm.GoodsSiteStatus + "》变更为《" + gsStatus + "》;" + "货位任务状态由《" + oldgsm.GoodsSiteTaskStatus + "》变更为《" + gsTaskStatus + "》"; this.iStorageManage.AddGSOperRecord(houseName, new CellCoordModel(oldgsm.GoodsSiteRow, oldgsm.GoodsSiteColumn, oldgsm.GoodsSiteLayer), EnumGSOperateType.手动修改状态, operteDetail, ref reStr); this.view.AddLog("库存看板", operteDetail, LogInterface.EnumLoglevel.提示); RefreshPos(houseName, oldgsm.GoodsSiteRow); }
public void AddStockList(long gsID, string boxCodeList) { GoodsSiteModel gsm = bllGs.GetModel(gsID); if (gsm == null) { return; } if (gsm.GoodsSiteStatus == EnumCellStatus.空料框.ToString()) { this.view.ShowMessage("空料框状态不允许修改库存信息,若需求更改库存请更改货位状态为非空料框状态!"); return; } List <View_StockModel> stockView = bllViewStock.GetModelListByGSID(gsID); char[] splitArr = { ',', ',' }; string[] stockListStr = boxCodeList.Split(splitArr); long stockID = 0; if (stockView == null || stockView.Count == 0)//没有增加stock { StockModel stock = new StockModel(); stock.GoodsSiteID = gsID; stock.IsFull = true; stockID = bllStock.Add(stock); } else//更新原有stock { stockID = stockView[0].StockID; } for (int i = 0; i < stockListStr.Length; i++) { StockListModel slm = new StockListModel(); slm.StockID = stockID; slm.MeterialboxCode = stockListStr[i]; slm.InHouseTime = DateTime.Now; bllStockList.Add(slm); } string reStr = ""; this.iStorageManage.AddGSOperRecord(this.currHouseName, new CellCoordModel(gsm.GoodsSiteRow, gsm.GoodsSiteColumn, gsm.GoodsSiteLayer), EnumGSOperateType.手动增加库存, "手动增加或者修改库存信息!", ref reStr); GetGSDetail(gsID); }