Ejemplo n.º 1
0
 public ActionResult RfidBatchQryApply(string TrayNO)
 {
     //TempData["RfidList"] = "1001;1002;1003;1004;1005;0001;E0040150958A84D5";
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("用户已失效,请重新登录!"));
     }
     if (TempData["RfidList"].ToString() == string.Empty)
     {
         return(Content("RFID不能为空!"));
     }
     try
     {
         StdQuery StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
         StdQuery1.SetParameter("strRFIDs", TempData["RfidList"].ToString());
         DataTable dt = StdQuery1.Execute("RFIDBatchQuery");
         TempData["RfidList"] = string.Empty;
         if (dt != null && dt.Rows.Count > 0)
         {
             return(Content(JsonHelper.ToJson(dt)));
         }
         else
         {
             return(Content("没有发现记录!"));
         }
     }
     catch (Exception ex)
     {
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 2
0
        public ActionResult ValidateCS2AcptCFMTrayNO(string OrderNO, string TrayNO, string Barcode, string isCheck)
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            service   = new RFBase(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);

            try
            {
                StdQuery1.SetParameter("Barcode", Barcode.Trim());
                StdQuery1.SetParameter("OrderNO", OrderNO);
                StdQuery1.SetParameter("TrayNO", TrayNO);
                StdQuery1.SetParameter("isCheck", isCheck);
                DataTable dt = StdQuery1.Execute("RF_CS2AcptCFMGoods");
                if (dt != null && dt.Rows.Count > 0)
                {
                    return(Content(JsonHelper.ToJson(dt)));
                }
                else
                {
                    return(Content("当前订单不存在该商品!"));
                }
            }
            catch (Exception ex)
            {
                Loger.Error(ex);
                return(Content(ex.Message));
            }
        }
Ejemplo n.º 3
0
        public ActionResult RF_QryMovePutGoods(StockMoveTaskModel model)
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }

            StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            try
            {
                StdQuery1.SetParameter("PaperNO", model.PaperNO);
                StdQuery1.SetParameter("NewTrayNO", model.NewTrayNO);
                DataTable dt = StdQuery1.Execute("RF_QryMovePutGoods");
                if (dt != null && dt.Rows.Count > 0)
                {
                    return(Content(JsonHelper.ToJson(dt)));
                }
                else
                {
                    return(Content("数据异常,请重试!"));
                }
            }
            catch (Exception ex)
            {
                //Loger.Error(ex);
                return(Content(ex.Message));
            }
        }
Ejemplo n.º 4
0
 public ActionResult QryLoadPaper(string PaperNO, string LoadNO)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         StdQuery1.SetParameter("PaperNO", PaperNO);
         StdQuery1.SetParameter("LoadNO", LoadNO);
         DataTable dt = StdQuery1.Execute("RFQtyLoadPaper");
         if (dt != null && dt.Rows.Count > 0)
         {
             return(Content(JsonHelper.ToJson(dt)));
         }
         else
         {
             return(null);// Content("null");
         }
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 5
0
        public ActionResult RF_NumChange(double CaseQty, double QtySg, string Barcode, string LoadNO, string TrayNO)
        {
            // 用户登录验证
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            try
            {
                StdQuery1.SetParameter("Barcode", Barcode);
                StdQuery1.SetParameter("LoadNO", LoadNO);
                StdQuery1.SetParameter("TrayNO", TrayNO);

                DataTable dt        = StdQuery1.Execute("RFCaseUnit");
                double    CaseUnits = double.Parse(dt.Rows[0]["nCaseUnits"].ToString());
                double    total     = CaseQty * CaseUnits + QtySg;
                return(Json(new { total = total }));
            }
            catch (Exception ex)
            {
                //Loger.Error(ex);
                return(Json(new { sMessage = ex.Message }));
            }
        }
Ejemplo n.º 6
0
 public ActionResult QryRfidReplaceGoods(string ShipperNO, string Barcode)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     try
     {
         StdQuery StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
         StdQuery1.SetParameter("ShipperNO", StringUtil.GetTextID(ShipperNO));
         StdQuery1.SetParameter("Barcode", Barcode);
         DataTable dt = StdQuery1.Execute("QryRfidReplaceGoods");
         if (dt.Rows.Count != 0)
         {
             return(Content(dt.ToJson()));
         }
         else
         {
             return(Content("商品条码不存在!"));
         }
     }
     catch (Exception ex)
     {
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 7
0
        /// <summary>
        /// 查询商品可拣货批次明细
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult RF_QtyMoveGoodsDtl(StockMoveTaskModel model)
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }

            StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            try
            {
                StdQuery1.SetParameter("PaperNO", model.PaperNO);
                StdQuery1.SetParameter("GoodsID", model.GoodsID);
                StdQuery1.SetParameter("ProductDate", model.ProductDate);
                StdQuery1.SetParameter("FromStorageNO", model.FromStorageNO);
                DataTable dt = StdQuery1.Execute("RF_QtyMoveGoodsDtl");
                if (dt != null && dt.Rows.Count > 0)
                {
                    return(Content(JsonHelper.ToJson(dt)));
                }
                else
                {
                    return(Content("没有拣货批次库存,请刷新重试!"));
                }
            }
            catch (Exception ex)
            {
                //Loger.Error(ex);
                return(Content(ex.Message));
            }
        }
Ejemplo n.º 8
0
 /// <summary>
 /// 校验储位
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ActionResult ValidateLocationNO(LocationCollectionModels model)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     try
     {
         StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
         StdQuery1.SetParameter("LocationNO", model.LocationNO);
         DataTable dt = StdQuery1.Execute("RF_QryLCLocation");
         if (dt != null && dt.Rows.Count > 0)
         {
             return(Content(JsonHelper.ToJson(dt)));
         }
         else
         {
             return(Content("储位编码无效!"));
         }
     }
     catch (Exception ex)
     {
         Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 9
0
        /// <summary>
        /// 采集保存
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult Save(LocationCollectionModels model)
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }

            try
            {
                service = new RFBase(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
                service.SetParameter("LocationNO", model.LocationNO);
                service.SetParameter("TrayNO", model.TrayNO);
                service.SetParameter("DealQty", model.DealQty);
                service.SetParameter("StorageTypeID", model.StorageTypeID);
                service.SetParameter("Barcode", model.Barcode);
                service.SetParameter("StockBatchNO", model.StockBatchNO);
                service.SetParameter("GoodsID", model.GoodsID);
                service.ExecuteBusinessProcess("RF_LCAdd");
                StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
                string ResultValue = service.GetParameter("ResultValue").ToString();
                return(Content(ResultValue));
            }
            catch (Exception ex)
            {
                return(Content("error" + ex.Message));
            }
        }
Ejemplo n.º 10
0
 /// <summary>
 /// 查询储位未采集的托盘数
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ActionResult QryMissTray(LocationCollectionModels model)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     try
     {
         StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
         DataTable dt = StdQuery1.Execute("RF_QryMissTray");
         if (dt != null && dt.Rows.Count > 0)
         {
             if (dt.Rows[0]["ResultValue"].ToString() != "0")
             {
                 return(Content(JsonHelper.ToJson(dt)));
             }
             else
             {
                 service = new RFBase(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
                 service.ExecuteBusinessProcess("RF_LCPost");
                 return(Content(""));
             }
         }
         else
         {
             return(Content("没有要提交的货架采集单!"));
         }
     }
     catch (Exception ex)
     {
         Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 11
0
 public ActionResult ValidateLoadNO(string PaperNO, string LoadNO)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         //return Redirect("/Home");
         return(Content("<script>location.href='/Home'</script>"));
     }
     service   = new RFBase(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         service.SetParameter("PaperNO", PaperNO);
         service.SetParameter("LoadNO", LoadNO);
         service.ExecuteBusinessCheck("RF_TruckLoadAdd", "LoadNO");
         StdQuery1.SetParameter("PaperNO", PaperNO);
         StdQuery1.SetParameter("LoadNO", LoadNO);
         DataTable dt = StdQuery1.Execute("RFQryTruckLoadingDtl");
         if (dt != null && dt.Rows.Count > 0)
         {
             return(Content(JsonHelper.ToJson(dt)));
         }
         else
         {
             return(Content(""));
         }
     }
     catch (Exception ex)
     {
         Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 12
0
 public ActionResult ValidateTrayNO(string TrayNO)
 {
     TempData["RfidList"] = string.Empty;
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     try
     {
         service = new RfidReplace(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
         service.SetParameter("TrayNO", TrayNO);
         service.ExecuteBusinessCheck("RFAcptRfidModify", "TrayNO");
         StdQuery StdQuery2 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
         StdQuery2.SetParameter("TrayNO", TrayNO);
         DataTable dt = StdQuery2.Execute("RFAcptRfidsTray");
         //service.ExecuteBusinessProcess("RFAcptRfidsTray");
         //string result = "[{{\"Shipper\":\"{0}\",\"Barcode\":\"{1}\",\"GoodsName\":\"{2}\",\"ProductDate\":\"{3}\",\"StockQty\":\"{4}\",\"PaperNO\":\"{5}\",\"AcptQty\":\"{6}\",\"RfidQty\":\"{7}\",\"DiffQty\":\"{8}\"}}]";
         //result = string.Format(result, service.GetParameter("Shipper").ToString(), service.GetParameter("Barcode").ToString(),
         //            service.GetParameter("GoodsName").ToString(), service.GetParameter("ProductDate").ToString(),
         //            service.GetParameter("StockQty").ToString());
         return(Content(JsonHelper.ToJson(dt)));
     }
     catch (Exception ex)
     {
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 查询显示移仓任务
 /// </summary>
 /// <returns></returns>
 public ActionResult RF_QryMoveTask()
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         DataTable dt = StdQuery1.Execute("RF_QryMoveTask");
         if (dt != null && dt.Rows.Count > 0)
         {
             return(Content(JsonHelper.ToJson(dt)));
         }
         else
         {
             return(Content("没有拣货任务,请刷新重试!"));
         }
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 14
0
 public ActionResult RFOutBoxCheck(string TrayNO)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         StdQuery1.SetParameter("TrayNO", TrayNO);
         DataTable dt = StdQuery1.Execute("RFOutBoxQuery");
         if (dt != null && dt.Rows.Count > 0)
         {
             return(Content(JsonHelper.ToJson(dt)));
         }
         else
         {
             return(Content("没有发现记录!"));
         }
     }
     catch (Exception ex)
     {
         Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 15
0
        public ActionResult ValidateTrayNO(string TrayNo, string isAutoLocationNO)
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            try
            {
                // service = new CS2MoveService(Login_Info.User_ID, Login_Info.User_Name,
                //Login_Info.Token);
                // service.SetParameter("TrayNO", TrayNo);
                // service.SetParameter("LocationNO", LocationNO);
                // service.ValidateTrayNO();
                service = new CS2MoveService(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
                service.SetParameter("TrayNO", TrayNo);
                service.ExecuteBusinessCheck("RF_CS2MoveAdd", "TrayNO");

                StdQuery StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
                StdQuery1.SetParameter("TrayNO", TrayNo);
                // StdQuery1.SetParameter("LocationNO", isAutoLocationNO);
                DataTable dt = StdQuery1.Execute("RF_CS2Goods");

                if (dt != null && dt.Rows.Count > 0)
                {
                    if (isAutoLocationNO != "0" && isAutoLocationNO != "")
                    {
                        service = new CS2MoveService(Login_Info.User_ID, Login_Info.User_Name,
                                                     Login_Info.Token);

                        service.SetParameter("PaperNO", dt.Rows[0]["PaperNO"].ToString());
                        service.SetParameter("TrayNO", TrayNo);
                        service.SetParameter("ToLocationNO", isAutoLocationNO);
                        service.SetParameter("CS2PaperNO", dt.Rows[0]["ResNO"].ToString());
                        service.SetParameter("ShipperNO", dt.Rows[0]["ShipperNO"].ToString());
                        service.SetParameter("OldLocationNO", dt.Rows[0]["LocationNO"].ToString());
                        service.Accept();
                        StdQuery StdQuery2 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
                        StdQuery2.SetParameter("TrayNo", TrayNo);
                        dt = StdQuery2.Execute("RF_CS2Goods");
                        //return Content("");
                    }
                    return(Content(JsonHelper.ToJson(dt)));
                }
                else
                {
                    return(Content("原托盘输入有误!"));
                }


                //return Content("");
            }
            catch (Exception ex)
            {
                Loger.Error(ex);
                return(Content(ex.Message));
            }
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 校验托盘
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult ValidateTrayNO(LocationCollectionModels model)
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            try
            {
                StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
                StdQuery1.SetParameter("LocationNO", model.LocationNO);
                StdQuery1.SetParameter("TrayNO", model.TrayNO);
                DataTable dt = StdQuery1.Execute("RF_QryLCTray");

                if (dt != null && dt.Rows.Count > 0)
                {
                    if (dt.Rows[0]["LocationNO"].ToString() != "")
                    {
                        if (dt.Rows[0]["Barcode"].ToString() != "")
                        {
                            return(Content(JsonHelper.ToJson(dt)));
                        }
                        else
                        {
                            return(Content("托盘不属于该储位!"));
                        }
                    }
                    else
                    {
                        return(Content("储位无效!"));
                    }
                }
                else
                {
                    if (dt.Columns.Count == 1)
                    {
                        return(Content("托盘无效!"));
                    }
                    return(Content("储位无效!"));
                }
            }
            catch (Exception ex)
            {
                Loger.Error(ex.Message, ex);
                return(Content(ex.Message));
            }
        }
Ejemplo n.º 17
0
        public ActionResult ValidateCS2AcptCFMBarCode()
        {
            string Barcode = Request.Form["Barcode"];
            string OrderNO = Request.Form["OrderNO"];
            string TrayNO  = Request.Form["TrayNO"];
            string isCheck = Request.Form["isCheck"];

            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            acpt = new DcAccept(Login_Info.User_ID, Login_Info.User_Name,
                                Login_Info.Token);
            StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            service   = new RFBase(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            try
            {
                ///0001201306070001
                //service.SetParameter("Barcode", Barcode.Trim());
                //service.SetParameter("OrderNO", OrderNO);
                //service.SetParameter("TrayNO", TrayNO);
                //service.SetParameter("isCheck", isCheck);
                //service.ExecuteBusinessCheck("RF_CS2Acpt2CMF", "Barcode");

                StdQuery1.SetParameter("Barcode", Barcode.Trim());
                StdQuery1.SetParameter("OrderNO", OrderNO);
                StdQuery1.SetParameter("TrayNO", TrayNO);
                StdQuery1.SetParameter("isCheck", isCheck);
                DataTable dt = StdQuery1.Execute("RF_CS2AcptCFMGoods");
                if (dt != null && dt.Rows.Count > 0)
                {
                    return(Content(JsonHelper.ToJson(dt)));
                }
                else
                {
                    return(Content("当前订单不存在该商品!"));
                }
            }
            catch (Exception ex)
            {
                Loger.Error(ex.Message, ex);
                return(Content(ex.Message));
            }
        }
Ejemplo n.º 18
0
 /// <summary>
 /// 执行完托盘检查通过后,显示
 /// </summary>
 /// <param name="TrayNO"></param>
 /// <returns></returns>
 public ActionResult ShowTrayRFID(string TrayNO)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         StdQuery1.ClearParameter();
         StdQuery1.SetParameter("TrayNO", TrayNO);
         DataTable dt = StdQuery1.Execute("QryTrayRfidGoods");//查询集货标签商品复检情况
         return(Content(dt.ToJson()));
     }
     catch (Exception ex)
     {
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 19
0
 public ActionResult Detail(string PaperNO)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         StdQuery1.SetParameter("PaperNO", PaperNO);
         DataTable dt = StdQuery1.Execute("RF_QryMoveGoods");
         ViewBag.data = dt;
         return(View());
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 20
0
        public ActionResult Index(string id)
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }

            StdQuery  StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            DataTable dt        = StdQuery1.Execute("RF_AutoLocationNO");

            if (dt != null && dt.Rows.Count > 0)
            {
                ViewData["isAutoLocationNO"] = dt.Rows[0]["isAutoLocationNO"].ToString();
            }
            else
            {
                ViewData["isAutoLocationNO"] = "0";//CS2越库移仓是否要自动录入新储位0为手动
            }
            //ViewData["ToDay"] = DateTime.Today;
            return(View());
        }
Ejemplo n.º 21
0
 /// <summary>
 /// 商品拣货任务
 /// </summary>
 /// <param name="PaperNO"></param>
 /// <returns></returns>
 public ActionResult Detail(string PaperNO)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         StdQuery1.SetParameter("PaperNO", PaperNO);
         DataTable dt = StdQuery1.Execute("RFQryItlPickGoods");
         ViewBag.data = dt;
         return(View());
         //if (dt != null && dt.Rows.Count > 0)
         //{
         //    ViewData["PaperNO"] = dt.Rows[0]["PaperNO"].ToString();
         //    ViewData["OutShipper"] = dt.Rows[0]["OutShipper"].ToString();
         //    ViewData["InShipper"] = dt.Rows[0]["InShipper"].ToString();
         //    ViewData["GoodsID"] = dt.Rows[0]["GoodsID"].ToString();
         //    ViewData["GoodsNO"] = dt.Rows[0]["GoodsNO"].ToString();
         //    ViewData["GoodsDesc"] = dt.Rows[0]["GoodsDesc"].ToString();
         //    ViewData["ProductDate"] = dt.Rows[0]["ProductDate"].ToString();
         //    ViewData["ApplyQty"] = dt.Rows[0]["ApplyQty"].ToString();
         //    ViewData["SaleQty"] = dt.Rows[0]["SaleQty"].ToString();
         //    return View();
         //}
         //else
         //{
         //    return Content("没有拣货任务,请刷新重新!");
         //}
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 22
0
        /// <summary>
        /// 加载货主下拉选择项
        /// </summary>
        public void LoadShipper()
        {
            string   DefaultShipper = Request.Cookies["DefaultShipper"] == null ? "" : Request.Cookies["DefaultShipper"].Value;
            string   options        = "";
            StdQuery StdQuery1      = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);

            StdQuery1.SetParameter("ShipperNO", "%");
            StdQuery1.SetParameter("ShipperDesc", "%");
            DataTable dt = StdQuery1.Execute("SelUserShipper");

            foreach (DataRow dr in dt.Rows)
            {
                if (dr["ShipperNO"].ToString() == StringUtil.GetTextID(DefaultShipper))
                {
                    options += "<option selected = 'selected'>" + dr["ShipperNO"] + "." + dr["ShipperDesc"] + "</option>";
                }
                else
                {
                    options += "<option>" + dr["ShipperNO"] + "." + dr["ShipperDesc"] + "</option>";
                }
            }
            ViewBag.selShipper = options;
        }
Ejemplo n.º 23
0
 /// <summary>
 /// 装载审核完成
 /// </summary>
 /// <param name="PaperNO"></param>
 /// <returns></returns>
 public ActionResult RF_LoadCheckOver(string PaperNO, string LoadNO)
 {
     // 用户登录验证
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     service   = new RFBase(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         // 查询结果为空,即所有装载号完成复核,提交修改标志
         StdQuery1.SetParameter("PaperNO", PaperNO);
         StdQuery1.SetParameter("LoadNO", LoadNO);
         DataTable dt = StdQuery1.Execute("RFQtyLoadCheckFinish");
         // 返回值为0 即完成所有扫描
         if (dt.Rows[0]["ResultValue"].ToString().Equals("0"))
         {
             // 调用fit业务过程
             service.SetParameter("PaperNO", PaperNO);
             service.ExecuteBusinessCheck("LoadCheckOver", "PaperNO");
             service.ExecuteBusinessProcess("LoadCheckOver");
             return(Content(""));
         }
         else
         {
             return(Json(new{ sMessage = dt.Rows[0]["ResultValue"].ToString(), other = false }));
         }
     }
     catch (Exception ex)
     {
         return(Json(new { sMessage = ex.Message, other = true }));
         //Loger.Error(ex);
         //return Content(ex.Message);
     }
 }
Ejemplo n.º 24
0
 // 点击继续按钮后继续插入
 public ActionResult RF_LoadCheckContinue(string PaperNO)
 {
     // 用户登录验证
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     service   = new RFBase(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         // 调用fit业务过程
         service.SetParameter("PaperNO", PaperNO);
         service.ExecuteBusinessCheck("LoadCheckOver", "PaperNO");
         service.ExecuteBusinessProcess("LoadCheckOver");
         return(Content(""));
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 25
0
 public ActionResult Detail(string PaperNO)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         StdQuery1.SetParameter("PaperNO", PaperNO);
         StdQuery1.SetParameter("LoadNO", "");
         DataTable dt  = StdQuery1.Execute("RFQtyLoadPaper");
         DataTable dt2 = StdQuery1.Execute("RFQtyLoadTrayCount");
         ViewData["LoadTrayCount"] = dt2.Rows[0]["LoadTrayCount"].ToString();
         ViewBag.data = dt;
         return(View());
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 26
0
        /// <summary>
        /// 读取设备数据
        /// </summary>
        /// <returns></returns>
        public ActionResult ReadRfid(string TrayNO)
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            StdQuery1 = new StdQuery(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            int ReadCount = 1; //控制是否继续读取,大于2不读

            try
            {
                string  strData   = "";
                int     iret      = 0;
                Byte    gFlg      = 0x00;//0x00 从头开始读;0x01连续读;
                UIntPtr dnhReport = UIntPtr.Zero;
                while (ReadCount <= 2)
                {
                    ReadCount++;
                    iret = RFIDLIB.rfidlib_reader.RDR_BuffMode_FetchRecords(hreader, gFlg); // send command to device
                    if (iret == 0)                                                          //取数据
                    {
                        // Get records from dll buffer memory
                        dnhReport = RFIDLIB.rfidlib_reader.RDR_GetTagDataReport(hreader, RFIDLIB.rfidlib_def.RFID_SEEK_FIRST);
                        while (dnhReport != UIntPtr.Zero)// 有数据
                        {
                            ReadCount = 1;
                            Byte[] byData = new Byte[32];
                            UInt32 len    = (UInt32)byData.Length;
                            if (RFIDLIB.rfidlib_reader.RDR_ParseTagDataReportRaw(dnhReport, byData, ref len) == 0)
                            {
                                if (len > 0)
                                {
                                    string RFID = ";" + BitConverter.ToString(byData, 0, (int)len).Replace("-", string.Empty);
                                    if (!strData.Contains(RFID))
                                    {
                                        strData += RFID;
                                    }
                                }
                            }
                            dnhReport = RFIDLIB.rfidlib_reader.RDR_GetTagDataReport(hreader, RFIDLIB.rfidlib_def.RFID_SEEK_NEXT);
                        }
                        gFlg = 0x01;  // if received ok ,get next records from device
                    }
                }
                strData = strData == "" ? "" : strData.Substring(1);
                //strData = "123;456;9999";
                if (strData != "")
                {
                    CratesRfidReading(TrayNO, strData); //循环写入标签
                }
                StdQuery1.ClearParameter();
                StdQuery1.SetParameter("TrayNO", TrayNO);
                DataTable dt = StdQuery1.Execute("QryTrayRfidGoods");//查询集货标签商品复检情况
                return(Content(dt.ToJson()));
            }
            catch (Exception ex)
            {
                return(Content(ex.Message));
            }
        }