Exemplo n.º 1
0
        public void CancelTask(string palletCode)
        {
            string      restr  = "";
            ManageModel manage = bllManage.GetModelByPalletCode(palletCode);

            if (manage == null)
            {
                this.View.ShowMessage("信息提示", "获取管理任务失败!");
                return;
            }
            if (manage.Mange_Status != EnumManageTaskStatus.待执行.ToString())
            {
                this.View.ShowMessage("信息提示", "只有待执行的任务可以取消!");
                return;
            }
            if (manage.Mange_Type_ID == "1" || manage.Mange_Type_ID == "6" ||
                manage.Mange_Type_ID == "7")//入库的
            {
                TaskHandleMethod.UpdateCellStatus(manage.Mange_End_Cell_ID, EnumCellStatus.空闲, EnumGSTaskStatus.完成, EnumGSOperate.入库);
                TaskHandleMethod.AddCellOperRecord(manage.Mange_End_Cell_ID, EnumGSOperateType.手动取消任务, "人工手动取消入库任务", ref restr);
            }
            else if (manage.Mange_Type_ID == "5")//移库的
            {
                TaskHandleMethod.UpdateCellStatus(manage.Mange_Start_Cell_ID, EnumCellStatus.满位, EnumGSTaskStatus.完成, EnumGSOperate.出库);
                TaskHandleMethod.UpdateCellStatus(manage.Mange_End_Cell_ID, EnumCellStatus.空闲, EnumGSTaskStatus.完成, EnumGSOperate.入库);
                TaskHandleMethod.AddCellOperRecord(manage.Mange_Start_Cell_ID, EnumGSOperateType.手动取消任务, "人工手动取消移库开始任务", ref restr);
                TaskHandleMethod.AddCellOperRecord(manage.Mange_End_Cell_ID, EnumGSOperateType.手动取消任务, "人工手动取消移库目标任务", ref restr);
            }
            else if (manage.Mange_Type_ID == "2" || manage.Mange_Type_ID == "8" || manage.Mange_Type_ID == "9")//出库的
            {
                TaskHandleMethod.UpdateCellStatus(manage.Mange_Start_Cell_ID, EnumCellStatus.满位, EnumGSTaskStatus.完成, EnumGSOperate.出库);
                TaskHandleMethod.AddCellOperRecord(manage.Mange_Start_Cell_ID, EnumGSOperateType.手动取消任务, "人工手动取消出库任务", ref restr);
            }
            else
            {
                this.View.ShowMessage("信息提示", "任务类型错误!任务编码:" + manage.Mange_Type_ID);
                return;
            }
            bllManage.Delete(manage.Mange_ID);

            this.View.ShowMessage("信息提示", "取消任务成功!");
            this.WmsFrame.WriteLog("任务列表", "", "提示", "手动取消任务:托盘[" + palletCode + "]" + ",任务类型:" + manage.Mange_Type_ID);
            ViewDataManager.TASKLISTDATA.TaskDetailData.Clear();//取消配盘后要将任务详细清楚
            QueryTask(currentDtStart, currentDtEnd, this.currtaskType, this.currtaskStatus);
        }
Exemplo n.º 2
0
 public static bool DeleteManageTask(string manageID)
 {
     return(bllManage.Delete(manageID));
 }