public void ModifyGsStatus(string cellChildID, string cellStatus, string cellTaskStatus) { string restr = ""; WH_Cell_ChildrenModel oldgsm = bllChildCell.GetModel(cellChildID); if (oldgsm == null) { return; } if (oldgsm.Cell_Child_Flag != "1") { this.WmsFrame.WriteLog("库存看板", "", "提示", "被禁用的货位不允许修改状态!"); return; } View_CellModel cellModel = bllViewCell.GetModelByChildCellID(cellChildID); string operteDetail = cellModel.WareHouse_Name + ":[" + cellModel.Cell_Name + "]货位状态由[" + oldgsm.Cell_Child_Status + "]变更为[" + cellStatus + "];" + "货位任务状态由[" + oldgsm.Cell_Child_Run_Status + "]变更为[" + cellTaskStatus + "]"; oldgsm.Cell_Child_Status = cellStatus; oldgsm.Cell_Child_Run_Status = cellTaskStatus; bllChildCell.Update(oldgsm); TaskHandleMethod.AddCellOperRecord(cellChildID, EnumGSOperateType.手动修改状态, operteDetail, ref restr); this.View.RefreshData(); }
public bool DeleteCell(string cellID) { WH_CellModel cellModel = bllCell.GetModel(cellID); if (cellModel == null) { this.View.ShowMessage("信息提示", "不存在此工位"); return(false); } if (bllCell.Delete(cellID) == false) { this.View.ShowMessage("信息提示", "删除工位失败(数据库操作)!"); return(false); } WH_Cell_ChildrenModel childCellModel = bllChildCell.GetModel(cellID); if (childCellModel != null) { if (bllChildCell.Delete(cellID) == false) { this.View.ShowMessage("信息提示", "删除工位失败(数据库操作)!"); return(false); } } return(true); }
public void ModifyGsStatus(string cellChildID, string cellStatus, string cellTaskStatus) { string restr = ""; WH_Cell_ChildrenModel oldgsm = bllChildCell.GetModel(cellChildID); if (oldgsm == null) { return; } if (oldgsm.Cell_Child_Flag != "1") { this.WmsFrame.WriteLog("库存看板", "", "提示", "被禁用的货位不允许修改状态!"); return; } View_CellModel cellModel = bllViewCell.GetModelByChildCellID(cellChildID); string operteDetail = cellModel.WareHouse_Name + ":[" + cellModel.Cell_Name + "]货位状态由[" + oldgsm.Cell_Child_Status + "]变更为[" + cellStatus + "];" + "货位任务状态由[" + oldgsm.Cell_Child_Run_Status + "]变更为[" + cellTaskStatus + "]"; oldgsm.Cell_Child_Status = cellStatus; oldgsm.Cell_Child_Run_Status = cellTaskStatus; bllChildCell.Update(oldgsm); TaskHandleMethod.AddCellOperRecord(cellChildID, EnumGSOperateType.手动修改状态, operteDetail, ref restr); if (cellStatus == EnumCellStatus.空闲.ToString() && cellTaskStatus == EnumGSTaskStatus.完成.ToString()) { if (this.View.AskMessage("询问", "您确定要清空此货位么?清空后货位的库存物料信息也将清空!") == 0) { TaskHandleMethod.DeleteStockByCellChildID(cellModel.Cell_Chlid_ID); } } this.View.RefreshData(); }
public static bool UpdateCellStatus(string childCellID, EnumCellStatus cellStatus, EnumGSTaskStatus cellRunStatus, EnumGSOperate gsoperate) { WH_Cell_ChildrenModel childCell = bllCellChild.GetModel(childCellID); if (childCell == null) { return(false); } childCell.Cell_Child_Status = cellStatus.ToString(); childCell.Cell_Child_Run_Status = cellRunStatus.ToString(); childCell.Cell_Child_Operate_Type = gsoperate.ToString(); bllCellChild.Update(childCell); return(true); }
private bool UpateCellStatus(string palletCode, EnumGSOperate cellOperStatus, EnumGSTaskStatus taskStatus) { View_StockListModel stockModel = bllViewStockList.GetModelByPalletCode(palletCode, EnumCellType.货位.ToString()); if (stockModel == null) { this.WmsFrame.WriteLog("下架逻辑", "", "提示", "更新货位状态时,没有找到所选物料库存!"); return(false); } WH_Cell_ChildrenModel cellChildModel = bllCellChild.GetModel(stockModel.Cell_Child_ID); if (cellChildModel == null) { this.WmsFrame.WriteLog("下架逻辑", "", "提示", "更新货位状态时,没有找到所选物料货位!"); return(false); } cellChildModel.Cell_Child_Run_Status = taskStatus.ToString(); cellChildModel.Cell_Child_Operate_Type = cellOperStatus.ToString(); bllCellChild.Update(cellChildModel); this.WmsFrame.WriteLog("下架逻辑", "", "提示", "更新货位状态成功!"); return(true); }
private bool AddRecord(string cellID, EnumCellStatus cellStatus, EnumGSTaskStatus cellTaskStatus, ref string restr) { WH_Cell_ChildrenModel oldgsm = bllChildCell.GetModel(cellID); if (oldgsm == null) { return(false); } if (oldgsm.Cell_Child_Flag != "1") { this.WmsFrame.WriteLog("库存看板", "", "提示", "被禁用的货位不允许修改状态!"); return(false); } View_CellModel cellModel = bllViewCell.GetModelByChildCellID(cellID); string operteStatusDetail = cellModel.WareHouse_Name + ":[" + cellModel.Cell_Name + "]货位状态由[" + oldgsm.Cell_Child_Status + "]变更为[空闲];" + "货位任务状态由[" + oldgsm.Cell_Child_Run_Status + "]变更为[完成]"; oldgsm.Cell_Child_Status = cellStatus.ToString(); oldgsm.Cell_Child_Run_Status = cellTaskStatus.ToString(); bllChildCell.Update(oldgsm); TaskHandleMethod.AddCellOperRecord(cellID, EnumGSOperateType.手动修改状态, operteStatusDetail, ref restr); return(true); }
public bool AddCellModel(WHCell cell) { WH_Cell_ChildrenModel childModel = new WH_Cell_ChildrenModel(); WH_AreaModel area = bllArea.GetModelByCode("11001", cell.AreaID); if (area == null) { return(false); } WH_CellModel cellModel = bllCell.GetModel(cell.CellID); if (cellModel != null) { this.View.ShowMessage("信息提示", "此工位编号已存在!"); return(false); } cellModel = new WH_CellModel(); cellModel.Cell_ID = cell.CellID; cellModel.Area_ID = area.Area_ID; cellModel.Cell_Code = cell.CellCode; cellModel.Cell_InOut = cell.CellInOut; cellModel.Cell_Name = cell.CellName; cellModel.Cell_Type = cell.CellType; cellModel.Device_Code = cell.CellID; cellModel.Cell_Row = 1; cellModel.Cell_Column = 1; cellModel.Cell_Layer = 1; if (bllCell.Add(cellModel)) { childModel.Cell_Child_Flag = "1"; childModel.Cell_Chlid_ID = cellModel.Cell_ID; childModel.Cell_ID = cellModel.Cell_ID; return(bllCellChild.Add(childModel)); } return(false); }
private bool CreateCell(string houseDeviceID, string areaID, int rowth, int colth, int layerth, string shelfType) { WH_CellModel cell = new WH_CellModel(); cell.Area_ID = areaID; cell.Cell_Code = rowth.ToString() + "-" + colth.ToString() + "-" + layerth.ToString(); cell.Cell_Column = colth; cell.Cell_ID = Guid.NewGuid().ToString(); cell.Cell_InOut = "出入"; cell.Cell_Layer = layerth; cell.Cell_Name = rowth.ToString() + "排" + colth.ToString() + "列" + layerth.ToString() + "层"; cell.Cell_Row = rowth; cell.Cell_Type = "货位"; cell.Device_Code = houseDeviceID; cell.Shelf_Type = shelfType; bllCell.Add(cell); if (shelfType == EnumShelfType.双深.ToString()) { for (int i = 0; i < 2; i++) { WH_Cell_ChildrenModel cellChild = new WH_Cell_ChildrenModel(); cellChild.Cell_Child_Flag = "1"; cellChild.Cell_Child_InOut = "出入"; cellChild.Cell_Child_Model = "大"; cellChild.Cell_Child_Run_Status = EnumGSTaskStatus.完成.ToString(); cellChild.Cell_Child_Status = EnumCellStatus.空闲.ToString(); cellChild.Cell_Chlid_ID = Guid.NewGuid().ToString(); if (i == 0) { cellChild.Cell_Child_Order = 1; cellChild.Cell_Chlid_Position = EnumCellPos.前.ToString(); } else { cellChild.Cell_Child_Order = 2; cellChild.Cell_Chlid_Position = EnumCellPos.后.ToString(); } cellChild.Cell_ID = cell.Cell_ID; bllCellChild.Add(cellChild); } } else { WH_Cell_ChildrenModel cellChild = new WH_Cell_ChildrenModel(); cellChild.Cell_Child_Flag = "1"; cellChild.Cell_Child_InOut = "出入"; cellChild.Cell_Child_Model = "大"; cellChild.Cell_Child_Run_Status = EnumGSTaskStatus.完成.ToString(); cellChild.Cell_Child_Status = EnumCellStatus.空闲.ToString(); cellChild.Cell_Chlid_ID = Guid.NewGuid().ToString(); cellChild.Cell_Child_Order = 1; cellChild.Cell_Chlid_Position = EnumCellPos.前.ToString(); cellChild.Cell_ID = cell.Cell_ID; bllCellChild.Add(cellChild); } return(true); }