private ReturnObject AllowUnShelve(UnShelveParams param) { ReturnObject reObject = new ReturnObject(); List <ManageModel> taskList = bllManage.GetWaitRunTaskListByType("8");//下架任务 if (taskList == null) { reObject.Status = false; reObject.Describe = "当前系统不允许下达下架任务!只允许执行一个任务"; return(reObject); } if (taskList != null && taskList.Count > 0) { reObject.Status = false; reObject.Describe = "当前系统不允许下达下架任务!只允许执行一个任务"; return(reObject); } //View_Plan_StockListModel planStock = bllViewPlanStockList.GetModelByPalletCode(param.PalletCode); //if (planStock != null) //{ // if ( param.WareHouseCode != planStock.Plan_Remark)//不等于计划的上架库房返回false // { // reObject.Status = false; // reObject.Describe = "下架库房与计划的下架架库房不符,请选择计划的下架库房,计划下架的库房为:" + planStock.Plan_Remark; // return reObject; // } //} reObject.Status = true; reObject.Describe = ""; return(reObject); }
public void UnShelveTask(string palletCode, string houseName, string unshelveStationName) { string planCode = "-1"; //查看当前是否已经有此托盘条码的上架管理任务 View_Manage_ListModel manageWait = bllViewManageList.GetModelByPalletCodeAndTaskType(palletCode, EnumManageTaskType.架.ToString(), EnumManageTaskStatus.待执行.ToString()); View_Manage_ListModel manageRun = bllViewManageList.GetModelByPalletCodeAndTaskType(palletCode, EnumManageTaskType.架.ToString(), EnumManageTaskStatus.执行中.ToString()); if (manageWait != null || manageRun != null) { //this.WmsFrame.WriteLog("下架逻辑", "", "提示", "当前托盘下架任务已经下发!"); this.View.ShowMessage("信息提示", "当前托盘下架任务已经下发!"); return; } string restr = ""; string manageID = ""; //if(CheckMaterialNum(ref restr) == false)//先不加个数校验 //{ // this.View.ShowMessage("信息提示", restr); // return ; //} ReturnObject allowCreateTask = new ReturnObject(); allowCreateTask.Status = true; if (this.allowUnShelve != null) { UnShelveParams unshelveParams = new UnShelveParams(); allowCreateTask = this.allowUnShelve(unshelveParams); } if (allowCreateTask.Status == false) { this.View.ShowMessage("信息提示", allowCreateTask.Describe); return; } if (CommonMoudle.TaskHandleMethod.CreateUnshelveManageTask(planCode, palletCode, houseName, unshelveStationName, ref manageID, ref restr) == false) { this.WmsFrame.WriteLog("下架逻辑", "", "提示", restr); return; } //下架管理任务生成完毕后需要更新货位状态,计划状态根据管理任务状态更新 if (UpateCellStatus(palletCode, EnumGSOperate.出库, EnumGSTaskStatus.锁定) == false) { return; } this.WmsFrame.WriteLog("下架逻辑", "", "提示", restr); }
public void UnShelveTask(string planCode, string planlistCode, string num, string palletCode, string houseName, string unshelveStationName) { //查看当前是否已经有此托盘条码的上架管理任务 View_Manage_ListModel manage = bllViewManageList.GetModelByPalletCodeAndTaskType(palletCode, EnumManageTaskType.架.ToString(), EnumManageTaskStatus.待执行.ToString()); if (manage != null) { //this.WmsFrame.WriteLog("下架逻辑", "", "提示", "当前托盘下架任务已经下发!"); this.View.ShowMessage("信息提示", "当前托盘下架任务已经下发!"); return; } if (CommonMoudle.TaskHandleMethod.IsOrderNumBiggerThanPlan(planlistCode, num) == true) { if (this.View.AskMessage("询问?", "当前计划物料下达数量已经大于计划数量,您确定还要下达吗?") != 0) { return; } } string restr = ""; string manageID = ""; //if(CheckMaterialNum(ref restr) == false)//先不加个数校验 //{ // this.View.ShowMessage("信息提示", restr); // return ; //} ReturnObject allowCreateTask = new ReturnObject(); allowCreateTask.Status = true; if (this.allowUnShelve != null) { WH_WareHouseModel house = bllWareHouse.GetModelByName(houseName); if (house == null) { this.View.ShowMessage("信息提示", "库房获取失败!"); return; } UnShelveParams unshelveParams = new UnShelveParams(); unshelveParams.WareHouseCode = house.WareHouse_Code; unshelveParams.PalletCode = palletCode; allowCreateTask = this.allowUnShelve(unshelveParams); } if (allowCreateTask.Status == false) { this.View.ShowMessage("信息提示", allowCreateTask.Describe); return; } if (CommonMoudle.TaskHandleMethod.CreateUnshelveManageTask(planCode, palletCode, houseName, unshelveStationName, ref manageID, ref restr) == false) { this.WmsFrame.WriteLog("下架逻辑", "", "提示", restr); return; } if (CommonMoudle.TaskHandleMethod.UpdatePlanOrderedNum(manageID) == false) { this.WmsFrame.WriteLog("下架逻辑", "", "提示", "更新计划下达数据数量失败:计划编码:" + planCode + ",托盘号:" + palletCode); return; } //下架管理任务生成完毕后需要更新货位状态,计划状态根据管理任务状态更新 if (UpateCellStatus(palletCode, EnumGSOperate.出库, EnumGSTaskStatus.锁定) == false) { return; } this.WmsFrame.WriteLog("下架逻辑", "", "提示", restr); QueryPlan(this.currPlanCode); }