Ejemplo n.º 1
0
        /// <summary>
        /// 添加货位操作记录,任务完成时调用
        /// </summary>
        /// <param name="houseName">库房名称</param>
        /// <param name="cellCoord">库存位置</param>
        /// <param name="gsOperType">货位操作类型</param>
        /// <param name="reStr">执行状态描述</param>
        /// <returns>执行状态结果</returns>
        public bool AddGSOperRecord(string houseName, CellCoordModel cellCoord, EnumGSOperateType gsOperType, string operateDetail, ref string reStr)
        {
            StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName);

            if (houseModel == null)
            {
                reStr = "不存在此库房!";
                return(false);
            }
            StockOperRecdModel sorm = new StockOperRecdModel();

            sorm.GoodsSitePos  = cellCoord.Row.ToString() + "-" + cellCoord.Col.ToString() + "-" + cellCoord.Layer.ToString();
            sorm.OPerateTime   = DateTime.Now;
            sorm.OPerateType   = gsOperType.ToString();
            sorm.OperateDetail = operateDetail;
            sorm.StoreHouseID  = houseModel.StoreHouseID;
            long addsta = bllStackOper.Add(sorm);

            if (addsta == 0)
            {
                reStr = "数据添加数据失败!";
                return(false);
            }
            OnUpdateGsStatus();

            return(true);
        }
Ejemplo n.º 2
0
        public static bool AddCellOperRecord(string cellChildID, EnumGSOperateType operType, string operDetail, ref string restr)
        {
            View_CellModel cell = bllViewCell.GetModelByChildCellID(cellChildID);

            if (cell == null)
            {
                restr = "添加Cell操作记录失败,Cell编码错误!";
                return(false);
            }
            WH_Cell_Operate_RecordModel cellOperate = new WH_Cell_Operate_RecordModel();

            cellOperate.WareHouse_ID          = cell.WareHouse_ID;
            cellOperate.WH_Cell_Code          = cell.Cell_Code + ":" + cell.Cell_Chlid_Position;
            cellOperate.WH_Cell_Oper_Datetime = DateTime.Now;
            cellOperate.WH_Cell_Oper_Detail   = operDetail;
            cellOperate.WH_Cell_Oper_Type     = operType.ToString();
            cellOperate.WH_Cell_Oper_RecID    = Guid.NewGuid().ToString();
            return(bllCellOperateRecord.Add(cellOperate));
        }