public JsonResult UploadInventoryInfo(Models.Beans.InventoryList data)
        {
            try
            {
                JsonResult jsonResult = new JsonResult();
                Result result;
                if (data == null)
                {
                    jsonResult.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
                    result = new Result( (int)ResultCodeEnum.Error, "参数空",null);
                    jsonResult.Data = result;
                    return jsonResult;                    
                }
                


                ContractMvcWeb.Models.LabelContext db = new LabelContext();
                bool isok = db.UploadInventoryInfo(data);               
                jsonResult.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
                result = new Result(isok ? (int)ResultCodeEnum.Success : (int)ResultCodeEnum.Error, isok ? "上传盘点信息成功" : "上传盘点信息失败", null);
                jsonResult.Data = result;
                return jsonResult;
            }
            catch (Exception ex)
            {
                String msg = ex.Message;
                msg += ex.StackTrace;

                JsonResult jsonResult = new JsonResult();
                jsonResult.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
                Result result = new Result( (int)ResultCodeEnum.Error, "服务端发生错误"+ msg ,null);
                jsonResult.Data = result;
                return jsonResult;
            }

        }
        public JsonResult GetInventoryLabelInfo(string rfid)
        {
            ContractMvcWeb.Models.LabelContext db = new LabelContext();
            Models.Beans.InventoryLabelInfo info = db.GetInventoryLabelInfo(rfid);

            JsonResult jsonResult = new JsonResult();
            jsonResult.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            Result result = new Result(info != null ? (int)ResultCodeEnum.Success : (int)ResultCodeEnum.Error, info != null ? "查询成功" : "查无此标签", info);
            jsonResult.Data = result;
            return jsonResult;

        }
        public JsonResult GetBoxListOfFloor(string floorrfid)
        {
            ContractMvcWeb.Models.LabelContext db = new LabelContext();
            List< Models.Beans.BoxLabel> list = db.GetBoxListOfFloor(floorrfid );

            JsonResult jsonResult = new JsonResult();
            Result result = new Result( (int)ResultCodeEnum.Success , "获取数据成功" , list);
            jsonResult.Data = result;
            return jsonResult;
        }
        public JsonResult UploadBoxListOfFloor(string floorrfid, string boxrfids , bool isadd = false )
        {
            ContractMvcWeb.Models.LabelContext db = new LabelContext();
            bool isok = db.UploadBoxListOfFloor(floorrfid, boxrfids , isadd );
            JsonResult jsonResult = new JsonResult();
            jsonResult.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            Result result = new Result(isok ? (int)ResultCodeEnum.Success : (int)ResultCodeEnum.Error, isok ? "定位成功" : "定位失败", null);
            jsonResult.Data = result;
            return jsonResult;

        }
        public JsonResult ArchiveToBox(List<int> archiveids, int boxid)
        {
            ContractMvcWeb.Models.LabelContext db = new LabelContext();
            bool isok = db.ArchiveToBox(archiveids, boxid);

            JsonResult jsonResult = new JsonResult();
            Result result = new Result(isok ? (int)ResultCodeEnum.Success : (int)ResultCodeEnum.Error, isok ? "归盒操作成功" : "归盒操作失败", null);
            jsonResult.Data = result;
            return jsonResult;
        }