Esempio n. 1
0
        private static bool CreatePutawayManageListTask(string manageID, EnumOrderType orderType, string palletCode, ref string restr)
        {
            List <View_StockListModel> stockList = bllViewStockList.GetModelListByPalletCode(palletCode, EnumCellType.配盘工位.ToString());

            if (stockList == null)
            {
                restr = "储存为空!";
                return(false);
            }


            foreach (View_StockListModel stock in stockList)
            {
                Manage_ListModel manageListModel = new Manage_ListModel();
                if (orderType == EnumOrderType.计划)
                {
                    Plan_ListModel planList = bllPlanList.GetModel(stock.Plan_List_ID);

                    planList.Plan_List_Ordered_Quantity = stock.Stock_List_Quantity;
                    bllPlanList.Update(planList);
                }



                manageListModel.Manage_List_ID       = Guid.NewGuid().ToString();
                manageListModel.Manage_List_Quantity = stock.Stock_List_Quantity;
                manageListModel.Mange_ID             = manageID;
                manageListModel.Stock_List_ID        = stock.Stock_List_ID;
                bllManageList.Add(manageListModel);
            }
            return(true);
        }
Esempio n. 2
0
        private static bool CreateUnshelveManageListTask(string planCode, string manageID, string palletCode, ref string restr)
        {
            List <View_StockListModel> stockList = bllViewStockList.GetModelListByPalletCode(palletCode, EnumCellType.货位.ToString());

            if (stockList == null)
            {
                restr = "储存为空!";
                return(false);
            }

            foreach (View_StockListModel stock in stockList)
            {
                Manage_ListModel manageListModel = new Manage_ListModel();

                manageListModel.Manage_List_ID = Guid.NewGuid().ToString();
                //PlanMainModel plan = bllPlan.GetModelByPlanCode(planCode);

                //Plan_ListModel planList = bllPlanList.GetModelByPlanIDAndGoodsID(plan.Plan_ID, stock.Goods_ID);

                //if (int.Parse(planList.Plan_List_Quantity) > int.Parse(stock.Stock_List_Quantity))
                //{
                //    this.WmsFrame.WriteLog("下架逻辑", "", "提示", "库存数量不足!");
                //    return false;
                //}
                manageListModel.Manage_List_Quantity = stock.Stock_List_Quantity;
                manageListModel.Mange_ID             = manageID;
                manageListModel.Stock_List_ID        = stock.Stock_List_ID;
                bllManageList.Add(manageListModel);
            }
            return(true);
        }
Esempio n. 3
0
        public bool OutHouseResponse(List <View_PlanListModel> planList, ref string jsonStr, ref string reStr)
        {
            try
            {
                if (planList == null || planList.Count == 0)
                {
                    return(false);
                }
                OutHouseOrderResponse inhouseResponse = new OutHouseOrderResponse();
                inhouseResponse.order_code        = planList[0].Plan_Code;
                inhouseResponse.order_date        = planList[0].Plan_Create_Time.ToString();
                inhouseResponse.order_maker       = planList[0].Plan_Operater;
                inhouseResponse.order_voucherType = planList[0].Plan_List_Resever1;
                inhouseResponse.warehouse_code    = planList[0].Plan_Remark;
                WH_WareHouseModel wareHouse = bllWareHouse.GetModelByCode(planList[0].Plan_Remark);
                if (wareHouse != null)
                {
                    inhouseResponse.warehouse_name = wareHouse.WareHouse_Name;
                }

                List <InventoryInfo>         inventoryList = new List <InventoryInfo>();
                List <View_Manage_CellModel> manageList    = bllViewManageCell.GetListByPlanID(planList[0].Plan_ID);
                foreach (View_Manage_CellModel manage in manageList)
                {
                    InventoryInfo inventInfo = new InventoryInfo();
                    inventInfo.inventory_code = manage.Cell_Code;
                    inventInfo.inventory_name = manage.Cell_Name + "-" + manage.Cell_Chlid_Position;
                    Manage_ListModel manageListModel = bllManageList.GetModelByManageID(manage.Mange_ID);
                    if (manageListModel != null)
                    {
                        inventInfo.quantity = manageListModel.Manage_List_Quantity;
                    }

                    inventoryList.Add(inventInfo);
                }
                inhouseResponse.MaterilaList = inventoryList;

                reStr   = "获取成功!";
                jsonStr = Newtonsoft.Json.JsonConvert.SerializeObject(inhouseResponse);
                return(true);
            }
            catch (Exception ex)
            {
                reStr = ex.StackTrace;
                return(false);
            }
        }
Esempio n. 4
0
        private void UploadInHouseInfoToErp(List <View_PlanListModel> planList)//出库入库都一样
        {
            if (planList == null || planList.Count == 0)
            {
                return;
            }
            InHouseOrderResponse inhouseResponse = new InHouseOrderResponse();

            inhouseResponse.order_code        = planList[0].Plan_Code;
            inhouseResponse.order_date        = planList[0].Plan_Create_Time.ToString();
            inhouseResponse.order_maker       = planList[0].Plan_From_User;
            inhouseResponse.order_voucherType = planList[0].Plan_Type_Name;
            inhouseResponse.warehouse_code    = planList[0].Plan_Remark;
            WH_WareHouseModel wareHouse = bllWareHouse.GetModelByCode(planList[0].Plan_Remark);

            if (wareHouse != null)
            {
                inhouseResponse.warehouse_name = wareHouse.WareHouse_Name;
            }

            List <InventoryInfo>         inventoryList = new List <InventoryInfo>();
            List <View_Manage_CellModel> manageList    = bllViewManageCell.GetListByPlanID(planList[0].Plan_ID);

            foreach (View_Manage_CellModel manage in manageList)
            {
                InventoryInfo inventInfo = new InventoryInfo();
                inventInfo.inventory_code = manage.Cell_Code;
                inventInfo.inventory_name = manage.Cell_Name;
                Manage_ListModel manageListModel = bllManageList.GetModelByManageID(manage.Mange_ID);
                if (manageListModel != null)
                {
                    inventInfo.quantity = manageListModel.Manage_List_Quantity;
                }

                inventoryList.Add(inventInfo);
            }
            inhouseResponse.InventoryList = inventoryList;
        }
Esempio n. 5
0
        private static bool CreateMoveMangeListTask(string cellchildID, string manageID, ref string restr)
        {
            List <View_StockListModel> stockList = bllViewStockList.GetModelListByCellID(cellchildID);

            if (stockList == null)
            {
                restr = "储存为空!";
                return(false);
            }

            foreach (View_StockListModel stock in stockList)
            {
                Manage_ListModel manageListModel = new Manage_ListModel();

                manageListModel.Manage_List_ID = Guid.NewGuid().ToString();

                manageListModel.Manage_List_Quantity = stock.Stock_List_Quantity;
                manageListModel.Mange_ID             = manageID;
                manageListModel.Stock_List_ID        = stock.Stock_List_ID;
                bllManageList.Add(manageListModel);
            }
            return(true);
        }