예제 #1
0
        public void PutawayTask(string palletCode, string houseName, string putawayStationName,
                                bool isAssign, string rowth, string colth, string layerth, string pos)
        {
            string restr = "";

            if (palletCode == "")
            {
                this.View.ShowMessage("信息提示", "请选择托盘条码!");
                return;
            }
            //if(isEmptyPallet == false)//不是空托盘,没有库存判断
            //{
            StockModel stock = bllStock.GetModelByTrayCode(palletCode);

            if (stock == null)
            {
                this.View.ShowMessage("信息提示", "请配盘入库!");
                return;
            }
            //}

            ManageModel manageTemp = bllManage.GetModelByPalletCode(palletCode);

            if (manageTemp != null)
            {
                this.View.ShowMessage("信息提示", "当前托盘已经生成上架任务!");
                return;
            }
            string             manageID   = "";
            EnumManageTaskType manaTask   = EnumManageTaskType.架;
            string             targetCell = rowth + "排" + colth + "列" + layerth + "层-" + pos;
            //if (isEmptyPallet == true)
            //{
            //    manaTask = EnumManageTaskType.空托盘上架;
            //}
            //else
            ////{
            //manaTask = EnumManageTaskType.上架;
            //}
            ReturnObject allowCreateTask = new ReturnObject();

            allowCreateTask.Status = true;

            if (this.AllowPutaway != null)
            {
                WH_WareHouseModel house = bllWareHouse.GetModelByName(houseName);
                if (house == null)
                {
                    this.View.ShowMessage("信息提示", "库房获取失败!");
                    return;
                }
                PutawayParams putwayParams = new PutawayParams();
                putwayParams.WareHouseName = houseName;
                putwayParams.WareHouseCode = house.WareHouse_Code;
                putwayParams.PalletCode    = palletCode;
                allowCreateTask            = this.AllowPutaway(putwayParams);
            }
            if (allowCreateTask.Status == false)
            {
                this.View.ShowMessage("信息提示", allowCreateTask.Describe);
                return;
            }
            if (TaskHandleMethod.CreatePutawayManageTask(palletCode, houseName, putawayStationName, isAssign, targetCell, manaTask, ref manageID, ref restr) == false)
            {
                this.WmsFrame.WriteLog("上架逻辑", "", "提示", "创建管理任务失败:" + restr);
                return;
            }
            //if (TaskHandleMethod.CreatePutawayManageListTask(manageID, palletCode, ref restr) == false)
            //{
            //    this.WmsFrame.WriteLog("上架逻辑", "", "提示", "创建管理任务列表失败:" + restr);
            //    return;
            //}
            this.WmsFrame.WriteLog("上架逻辑", "", "提示", "上架任务下达成功!" + restr);
        }
예제 #2
0
        public void PutawayTask(string palletCode, string houseName, string putawayStationName,
                                bool isAssign, string rowth, string colth, string layerth, string pos)
        {
            string restr = "";

            if (palletCode == "")
            {
                this.View.ShowMessage("信息提示", "请选择托盘条码!");
                return;
            }
            //if(isEmptyPallet == false)//不是空托盘,没有库存判断
            //{
            StockModel stock = bllStock.GetModelByTrayCode(palletCode);

            if (stock == null)
            {
                this.View.ShowMessage("信息提示", "请配盘入库!");
                return;
            }
            //}

            ManageModel manageTemp = bllManage.GetModelByPalletCode(palletCode);

            if (manageTemp != null)
            {
                this.View.ShowMessage("信息提示", "当前托盘已经生成上架任务!");
                return;
            }
            string             manageID   = "";
            EnumManageTaskType manaTask   = EnumManageTaskType.架;
            string             targetCell = rowth + "排" + colth + "列" + layerth + "层-" + pos;
            //if (isEmptyPallet == true)
            //{
            //    manaTask = EnumManageTaskType.空托盘上架;
            //}
            //else
            ////{
            //manaTask = EnumManageTaskType.上架;
            //}
            bool allowCreateTask = true;

            if (this.AllowPutaway != null)
            {
                allowCreateTask = this.AllowPutaway();
            }
            if (allowCreateTask == false)
            {
                this.View.ShowMessage("信息提示", "当前系统不允许下达上架任务!只允许执行一个任务");
                return;
            }
            if (TaskHandleMethod.CreatePutawayManageTask(palletCode, houseName, putawayStationName, isAssign, targetCell, manaTask, ref manageID, ref restr) == false)
            {
                this.WmsFrame.WriteLog("上架逻辑", "", "提示", "创建管理任务失败:" + restr);
                return;
            }
            //if (TaskHandleMethod.CreatePutawayManageListTask(manageID, palletCode, ref restr) == false)
            //{
            //    this.WmsFrame.WriteLog("上架逻辑", "", "提示", "创建管理任务列表失败:" + restr);
            //    return;
            //}
            this.WmsFrame.WriteLog("上架逻辑", "", "提示", "上架任务下达成功!" + restr);
        }