Beispiel #1
0
        /// <summary>
        /// 新建装载复核的复核单号
        /// </summary>
        /// <param name="LoadNO"></param>
        /// <returns></returns>
        public ActionResult NewPaperNO(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);
            try
            {
                service.ClearParameter();
                // 获取操作员的装载复核单号
                service.SetParameter("LoadNO", LoadNO);
                service.ExecuteBusinessProcess("LoadCheckAdd");

                // 获取商店编码、复核单号、商店名称、配送类型信息
                string PaperNO    = service.GetParameter("PaperNO").ToString();
                string StoreNO    = service.GetParameter("StoreNO").ToString();
                string StoreDesc  = service.GetParameter("StoreDesc").ToString();
                string ProvTypeID = service.GetParameter("ProvTypeID").ToString();
                string TrayNum    = service.GetParameter("TrayNum").ToString();
                //string finish = service.GetParameter("finish").ToString();
                // return Content(ProvTypeID);
                return(Json(new { isSuccess = true, PaperNO = PaperNO, ProvTypeID = ProvTypeID, StoreNO = StoreNO, StoreDesc = StoreDesc, TrayNum = TrayNum }));
                //   return Content("[{\"isSuccess\":\"1\",\"sMessage\":\"\"," + "\"PaperNO\":\"" + service.GetParameter("PaperNO").ToString() + "\"}]");
            }
            catch (Exception ex)
            {
                return(Json(new { isSuccess = false, sMessage = ex.Message.Replace("\"", "'") }));
            }
        }
Beispiel #2
0
 /// <summary>
 /// 处理跳过
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ActionResult RF_MoveStoragSkip(StockMoveTaskModel model)
 {
     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);
     try
     {
         service.SetParameter("PaperNO", model.PaperNO);
         service.SetParameter("GoodsID", model.GoodsID);
         service.SetParameter("ProductDate", model.ProductDate);
         service.SetParameter("FromStorageNO", model.FromStorageNO);
         service.SetParameter("TrayNO", model.TrayNO);
         service.SetParameter("PickQty", model.PickQty);
         service.SetParameter("StockBatchNO", model.StockBatchNO);
         service.SetParameter("NewTrayNO", model.NewTrayNO);
         service.ExecuteBusinessProcess("RF_MoveStoragSkip");
         return(Content(""));
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
        /// <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));
            }
        }
Beispiel #4
0
        /// <summary>
        /// 检查托盘上的货物是否齐全
        /// </summary>
        /// <param name="PaperNO">复核单号</param>
        /// <param name="LoadNO">装载号</param>
        /// <param name="TrayNO">出库箱号</param>
        /// <param name="GoodsID">商品ID</param>
        /// <param name="CheckQty">实际检查箱数</param>
        /// <returns></returns>
        public ActionResult RF_LoadGoodsCheck(string PaperNO, string LoadNO, string TrayNO, string Barcode, string CheckQty, string condition)
        {
            // 登录验证
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            // fit 业务服务调用初始化
            service = new RFBase(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            // 业务流程开始
            try
            {
                // fit参数设置
                service.SetParameter("PaperNO", PaperNO);
                service.SetParameter("LoadNO", LoadNO);
                service.SetParameter("TrayNO", TrayNO);
                service.SetParameter("Barcode", Barcode);
                service.SetParameter("CheckQty", CheckQty);
                service.SetParameter("condition", condition);
                // 商品编码与出货箱匹配的业务检查
                service.ExecuteBusinessCheck("LoadGoodsCheck", "LoadNO");
                // 新增记录执行
                service.ExecuteBusinessProcess("LoadGoodsCheck");

                string finish    = service.GetParameter("finish").ToString();
                string Allfinish = service.GetParameter("Allfinish").ToString();

                return(Json(new { finish = finish, Allfinish = Allfinish, sMessage = "" }));
            }
            catch (Exception ex)
            {
                return(Json(new { sMessage = ex.Message.Replace("\"", "'") }));
            }
        }
Beispiel #5
0
 /// <summary>
 /// 移仓上架
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ActionResult RF_MoveStoragePut(StockMoveTaskModel model)
 {
     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);
     try
     {
         service.SetParameter("PaperNO", model.PaperNO);
         service.SetParameter("ToStorageNO", model.ToStorageNO);
         service.SetParameter("ToLocationNO", model.ToLocationNO);
         service.SetParameter("NewTrayNO", model.NewTrayNO);
         service.ExecuteBusinessCheck("RF_MoveStoragePut", model.ParamName);
         if (model.ParamName == "ToLocationNO")
         {
             service.ExecuteBusinessProcess("RF_MoveStoragePut");
         }
         return(Content(""));
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
 /// <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));
     }
 }
Beispiel #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="LoadNO"></param>
 /// <param name="TrayNO"></param>
 /// <param name="Barcode"></param>
 /// <returns></returns>
 public ActionResult RF_IndentifyBar(string LoadNO, string TrayNO, string Barcode, 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);
     try
     {
         // 调用fit业务过程
         service.SetParameter("LoadNO", LoadNO);
         service.SetParameter("TrayNO", TrayNO);
         service.SetParameter("Barcode", Barcode);
         service.SetParameter("PaperNO", PaperNO);
         service.ExecuteBusinessCheck("LoadGoodsDet", "Barcode");
         service.ExecuteBusinessProcess("LoadGoodsDet");
         string GoodsDesc = service.GetParameter("GoodsDesc").ToString();
         return(Json(new { GoodsDesc = GoodsDesc, sMessage = "" }));
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Json(new { sMessage = ex.Message }));
     }
 }
Beispiel #8
0
        /// <summary>
        /// 新增装载复核明细
        /// </summary>
        /// <param name="PaperNO"></param>
        /// <param name="LoadNO"></param>
        /// <param name="TrayNO"></param>
        /// <param name="StoreNO"></param>
        /// <returns></returns>
        public ActionResult RF_LoadCheckTrayAdd(string PaperNO, string LoadNO, string TrayNO, string StoreNO)
        {
            // 登录验证
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            // fit 业务服务调用初始化
            service = new RFBase(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            try
            {
                // fit参数设置
                service.SetParameter("PaperNO", PaperNO);
                service.SetParameter("LoadNO", LoadNO);
                service.SetParameter("TrayNO", TrayNO);
                service.SetParameter("StoreNO", StoreNO);
                // 装载号与出货箱匹配的业务检查
                service.ExecuteBusinessCheck("LoadCheckTray", "TrayNO");
                // 新增记录执行
                service.ExecuteBusinessProcess("LoadCheckTray");
                int    finish    = int.Parse(service.GetParameter("finish").ToString());
                string Allfinish = service.GetParameter("Allfinish").ToString();
                switch (finish)
                {
                // 0 为只有一个商品,并且数量等于箱规
                case 0: return(Json(new { finish = finish, Allfinish = Allfinish, sMessage = "" })); break;

                // 1 为只有一个商品,但是数量不等于箱规
                case 1:
                {
                    string Barcode   = service.GetParameter("sBarcode").ToString();
                    string GoodsDesc = service.GetParameter("sGoodsDesc").ToString();
                    return(Json(new { finish = finish, Barcode = Barcode, GoodsDesc = GoodsDesc, sMessage = "" }));
                }
                break;

                // 2 为多个商品并且商品不是一步越库,还是必须全部扫
                case 2: return(Json(new { finish = finish, sMessage = "" })); break;

                // 3 为多个商品而且是一步越库,可以允许他不逐个扫描,带入默认值
                case 3: return(Json(new { finish = finish, sMessage = "" })); break;

                default: break;
                }
                return(Json(new { finish = finish, sMessage = "请检查finish的值" }));
            }
            catch (Exception ex)
            {
                return(Json(new { sMessage = ex.Message.Replace("\"", "'") }));
            }
        }
 /// <summary>
 /// 采集提交
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ActionResult Post(LocationCollectionModels model)
 {
     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);
     try
     {
         service.ExecuteBusinessProcess("RF_LCPost");
         return(Content(""));
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Beispiel #10
0
 public ActionResult ValidatePaperNO(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);
     try
     {
         service.SetParameter("PaperNO", PaperNO);
         service.ExecuteBusinessProcess("RF_TruckLoadPaperVal");
         return(Content(""));
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Beispiel #11
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="LoadNO"></param>
 /// <returns></returns>
 public ActionResult NewPaperNO(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);
     try
     {
         service.SetParameter("LoadNO", LoadNO);
         service.ExecuteBusinessProcess("RF_LoadNewPaperNO");
         return(Content("[{\"isSuccess\":\"1\",\"sMessage\":\"" + service.GetParameter("PaperNO").ToString() + "\"}]"));
     }
     catch (Exception ex)
     {
         //Loger.Error(ex);
         //return Content(ex.Message);
         return(Content("[{\"isSuccess\":\"-1\",\"sMessage\":\"" + ex.Message.Replace("\"", "'") + "\"}]"));
     }
 }
Beispiel #12
0
        public ActionResult PrintTaskAdd()
        {
            string LoadNO = Request.Form["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);
            try
            {
                service.SetParameter("LoadNO", LoadNO.Trim());
                service.ExecuteBusinessProcess("PrintTaskAdd");
                return(Content(""));
            }
            catch (Exception ex)
            {
                Loger.Error(ex.Message, ex);
                return(Content(ex.Message));
            }
        }
Beispiel #13
0
        public ActionResult Over()
        {
            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);
            string OrderNO = Request.Form["OrderNO"];

            try
            {
                service.SetParameter("OrderNO", OrderNO);
                service.ExecuteBusinessProcess("RF_CS2AcptCMFOver");
                return(Content(""));
            }
            catch (Exception ex)
            {
                Loger.Error(ex.Message, ex);
                return(Content(ex.Message));
            }
        }
Beispiel #14
0
        public ActionResult ValidateDistTray(string OldTrayNO)
        {
            RFBase service1;

            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            service1 = new RFBase(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            try
            {
                service1.SetParameter("OldTrayNO", OldTrayNO);
                service1.ExecuteBusinessProcess("RF_ValidateDistTray");
                return(Content("[{\"isSuccess\":\"1\",\"sMessage\":\"" + service1.GetParameter("ShipperNO").ToString() + "\"}]"));
            }
            catch (Exception ex)
            {
                //Loger.Error(ex);
                //return Content(ex.Message);
                return(Content("[{\"isSuccess\":\"-1\",\"sMessage\":\"" + ex.Message.Replace("\"", "'") + "\"}]"));
            }
        }
Beispiel #15
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);
     }
 }
Beispiel #16
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));
     }
 }
Beispiel #17
0
        /// <summary>
        /// 确认收货
        /// </summary>
        /// <returns></returns>
        public ActionResult CS2AcptConfirm()
        {
            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);
            string OrderNO       = Request.Form["OrderNO"];
            string TrayNO        = Request.Form["TrayNO"];
            string GoodsID       = Request.Form["GoodsID"];
            string isCheck       = Request.Form["isCheck"];
            string Barcode       = Request.Form["Barcode"];
            string ProductDate   = Request.Form["ProductDate"];
            string shelfLife     = Request.Form["shelfLife"];
            string EffectiveDate = Request.Form["EffectiveDate"];

            // string Qty = Request.Form["Qty"];
            //  string TrayTag = null;
            try
            {
                service.SetParameter("isCheck", isCheck);
                service.SetParameter("OrderNO", OrderNO);
                service.SetParameter("Barcode", Barcode);
                service.SetParameter("GoodsID", GoodsID);
                service.SetParameter("TrayNO", TrayNO);
                service.SetParameter("ProductDate", ProductDate);
                service.SetParameter("shelfLife", shelfLife);
                service.SetParameter("EffectiveDate", EffectiveDate);
                // acpt.SetParameter("Qty", Qty);
                // acpt.ExecuteBusinessCheck("RF_CS2Acpt2Modify", "*");

                //DataTable dt = acpt.QueryOnlyAllowBoxAcpt();
                //if (dt != null && dt.Rows.Count > 0)
                //{
                //    TrayTag = dt.Rows[0]["Tag"].ToString();

                //}
                //if(TrayTag == "")


                service.ExecuteBusinessProcess("RF_CS2Acpt2CMF");
                //*************20140724**********************
                //acpt.paras.Clear();
                //acpt.SetParameter("Barcode", Barcode.Trim());
                //acpt.SetParameter("OrderNO", OrderNO);
                //DataTable dt = acpt.QueryDcacptQty();
                //if (dt != null && dt.Rows.Count > 0)
                //{
                //return Content(JsonHelper.ToJson(dt));
                //}
                //*******************************************
                if (service.paras["Complete"].Value.ToString() != "true")
                {
                    return(Content("0"));
                }
                else
                {
                    return(Content(""));
                }
            }
            catch (Exception ex)
            {
                Loger.Error(ex.Message, ex);
                return(Content(ex.Message));
            }
        }