Ejemplo n.º 1
0
 /// <summary>
 /// 提交处理补货上架过程
 /// </summary>
 /// <returns></returns>
 ///
 public ActionResult SubmitRepShelves(ReplenishViewModel model)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     service = new ReplenishService(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         service.SetParameter("TrayNO", model.TrayNO);
         service.SetParameter("Barcode", model.Barcode);
         service.SetParameter("PickBarcode", model.PickBarcode);
         service.SetParameter("PaperNO", model.PaperNO);
         service.SetParameter("ToLocationNO", model.ToLocationNO);
         service.SetParameter("CheckLocationNO", model.CheckLocationNO);
         service.ExecuteBusinessCheck("RF_RepRetailShelves", "*");
         service.ExecuteBusinessProcess("RF_RepRetailShelves");
         return(Content(""));
     }
     catch (Exception ex)
     {
         Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 补货上架页面视图
        /// </summary>
        /// <returns></returns>
        ///
        public ActionResult RepShelves()
        {
            object TrayNO = Request.QueryString["TrayNO"];

            if ((TrayNO == null) || (TrayNO.ToString() == ""))
            {
                return(Content("<script>location.href='/Replenish/RepInputTray'</script>"));
            }
            else
            {
                GetLoginInfo();
                if (Login_Info == null)
                {
                    return(Content("<script>location.href='/Home'</script>"));
                }
                service = new ReplenishService(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
                service.SetParameter("TrayNO", TrayNO.ToString());
                DataTable dt = service.SubmitMiddleTrayNO("RF_RepRetailGoods");
                if (dt != null && dt.Rows.Count > 0) //
                {
                    ViewData["PaperNO"]      = dt.Rows[0]["PaperNO"].ToString();
                    ViewData["Barcode"]      = dt.Rows[0]["Barcode"].ToString();
                    ViewData["GoodsDesc"]    = dt.Rows[0]["GoodsDesc"].ToString();
                    ViewData["CaseUnits"]    = dt.Rows[0]["CaseUnits"].ToString();
                    ViewData["CaseQty"]      = dt.Rows[0]["CaseQty"].ToString();
                    ViewData["ToLocationNO"] = dt.Rows[0]["ToLocationNO"].ToString();
                    ViewData["TrayNO"]       = dt.Rows[0]["TrayNO"].ToString();
                    return(View(""));
                }
                else
                {
                    return(Content("<script>alert('没有补货数据,确认后返回!');location.href='/Replenish/RepInputTray'</script>;"));
                }
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 提交中间托盘检查是否有未上架数据
 /// </summary>
 /// <returns></returns>
 ///
 public ActionResult SubmitMiddleTrayNO(ReplenishViewModel model)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     service = new ReplenishService(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         service.SetParameter("TrayNO", model.TrayNO);
         DataTable dt = service.SubmitMiddleTrayNO("RF_RepRetailGoods");
         if (dt != null && dt.Rows.Count > 0) //
         {
             return(Content(""));
         }
         else
         {
             return(Content("托盘无效,请重新输入"));
         }
     }
     catch (Exception ex)
     {
         Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 提交业务过程处理拣货到中间托盘
 /// </summary>
 public ActionResult PickGoods(ReplenishViewModel model)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return(Content("<script>location.href='/Home'</script>"));
     }
     service = new ReplenishService(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         service.SetParameter("FromTrayNO", model.FromTrayNO);
         service.SetParameter("CheckFromTrayNO", model.CheckFromTrayNO);
         service.SetParameter("FromLocationNO", model.FromLocationNO);
         service.SetParameter("CheckLocationNO", model.CheckLocationNO);
         service.SetParameter("TrayNO", model.TrayNO);
         service.SetParameter("ToDoNO", model.ToDoNO);
         service.SetParameter("PaperNO", model.PaperNO);
         service.SetParameter("GrpTypeID", model.GrpTypeID);
         service.ExecuteBusinessCheck("RF_RepRetailPick", "*");
         service.ExecuteBusinessProcess("RF_RepRetailPick");
         return(Content(""));
     }
     catch (Exception ex)
     {
         Loger.Error(ex);
         return(Content(ex.Message));
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 箱拣位补货
        /// </summary>
        /// <returns></returns>
        public ActionResult BoxRep()
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            service = new ReplenishService(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);

            service.SetParameter("Type", "rep_pick_t");//箱补/托拣
            DataTable dt = service.GetRF_Assignment();

            if (dt != null && dt.Rows.Count > 0)
            {
                string sAssignTypeID = dt.Rows[0]["AssignTypeID"].ToString();
                ViewData["StoreDesc"]  = dt.Rows[0]["StoreNO"].ToString() + "." + dt.Rows[0]["StoreDesc"].ToString();
                ViewData["Barcode"]    = dt.Rows[0]["Barcode"].ToString();
                ViewData["GoodsDesc"]  = dt.Rows[0]["GoodsDesc"].ToString();
                ViewData["CaseUnits"]  = dt.Rows[0]["CaseUnits"].ToString();
                ViewData["LocationNO"] = dt.Rows[0]["LocationNO"].ToString();
                //ViewData["SrcQty"] = dt.Rows[0]["SrcQty"].ToString();
                ViewData["FromLocationNO"] = dt.Rows[0]["FromLocationNO"].ToString(); //拣货储位
                ViewData["FromTrayNO"]     = dt.Rows[0]["FromTrayNO"].ToString();     //拣货托盘
                ViewData["ToDoNO"]         = dt.Rows[0]["ToDoNO"].ToString();
                ViewData["PaperNO"]        = dt.Rows[0]["PaperNO"].ToString();
                //ViewData["AssignTypeID"] = sAssignTypeID;// dt.Rows[0]["AssignTypeID"].ToString();
                //ViewData["ShowPickQty"] = dt.Rows[0]["ShowPickQty"].ToString();//提示拣货数量
                ViewData["Unit"] = dt.Rows[0]["Unit"].ToString();
                //ViewData["MinSrcQty"] = dt.Rows[0]["MinSrcQty"].ToString();
                //ViewData["LocationTypeID"] = dt.Rows[0]["LocationTypeID"].ToString();
                //ViewData["GrpTypeID"] = dt.Rows[0]["GrpTypeID"].ToString();
                ViewData["Spec"]    = dt.Rows[0]["Spec"].ToString();
                ViewData["CaseQty"] = dt.Rows[0]["CaseQty"].ToString();
                if (sAssignTypeID == "2") // 进入托拣的箱补任务,跳到托拣界面
                {
                    return(Redirect("/PICK?AssignTypeID=2"));
                }
                else
                {
                    return(View(""));
                }
            }
            else //无指令执行
            {
                //return View("NoReplenish");
                return(Redirect("/PICK?AssignTypeID=2"));
            }
        }
Ejemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //创建ResponseHandler实例
        ResponseHandler resHandler = new ResponseHandler(Context);

        resHandler.setKey(TenpayUtil.tenpay_key);

        //判断签名
        if (resHandler.isTenpaySign())
        {
            ///通知id
            string notify_id = resHandler.getParameter("notify_id");
            //商户订单号
            string out_trade_no = resHandler.getParameter("out_trade_no");
            //财付通订单号
            string transaction_id = resHandler.getParameter("transaction_id");
            //金额,以分为单位
            string total_fee = resHandler.getParameter("total_fee");
            //如果有使用折扣券,discount有值,total_fee+discount=原请求的total_fee
            string discount = resHandler.getParameter("discount");
            //支付结果
            string trade_state = resHandler.getParameter("trade_state");
            //交易模式,1即时到账,2中介担保
            string trade_mode = resHandler.getParameter("trade_mode");

            if ("1".Equals(trade_mode))
            {       //即时到账
                if ("0".Equals(trade_state))
                {
                    MsgFeeService      mfDal = new MsgFeeService();
                    IList <MsgFeeInfo> list  = mfDal.GetAllFee();
                    ReplenishInfo      info  = new ReplenishInfo();
                    info.AddDate   = DateTime.Now;
                    info.Count     = list.Where(o => (int)(o.TotalPrice * 100) == int.Parse(total_fee)).ToList()[0].MsgCount;
                    info.EndDate   = DateTime.Now.AddMinutes(1);
                    info.Id        = Guid.NewGuid();
                    info.ServiceId = "234454";
                    info.SellerUid = Request.Cookies["nick"].Value;
                    ReplenishService rlDal = new ReplenishService();
                    rlDal.InsertInfo(info);
                    new PaiPaiShopService().UpdateMsgCount(info.SellerUid, info.Count);

                    Response.Write("即时到帐付款成功");
                    //给财付通系统发送成功信息,财付通系统收到此结果后不再进行后续通知
                    Response.Write("<a target=\"self\" href=\"/huiyuan.aspx\">" + "立即查看" + "</a>");
                }
                else
                {
                    Response.Write("即时到账支付失败");
                }
            }
            else if ("2".Equals(trade_mode))
            {    //中介担保
                if ("0".Equals(trade_state))
                {
                    Response.Write("中介担保付款成功");
                    //给财付通系统发送成功信息,财付通系统收到此结果后不再进行后续通知
                }
                else
                {
                    Response.Write("trade_state=" + trade_state);
                }
            }
        }
        else
        {
            Response.Write("认证签名失败");
        }

        //获取debug信息,建议把debug信息写入日志,方便定位问题
        string debuginfo = resHandler.getDebugInfo();

        DataHelp.LogInfo.Add("财付通充值日志", debuginfo);
        //Response.Write("<br/>debuginfo:" + debuginfo + "<br/>");
    }
Ejemplo n.º 7
0
        //零拣位补货
        public ActionResult Index()
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return(Content("<script>location.href='/Home'</script>"));
            }
            service = new ReplenishService(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            //<!--AssignTypeID=2.托拣;3.箱拣;4.零拣;5.自动补货;6.手工移仓;7.全仓补货-->
            //<!--GrpTypeID=1.箱拣位零拣补货;2.地堆/存储位零拣补货-->
            //只处理补货指令
            object GrpTypeID = Request.QueryString["GrpTypeID"];
            string sType     = GrpTypeID.ToString();

            switch (sType)
            {
            case "1":
                sType = "rep_x2l";    //箱拣位零补
                break;

            case "2":
                sType = "rep_c2l";    //存储位零补
                break;

            default:
                sType = "";
                break;
            }
            if (sType == "")
            {
                return(Redirect("/Menu"));
            }
            service.SetParameter("Type", sType);
            DataTable dt = service.GetRF_Assignment();

            if (dt != null && dt.Rows.Count > 0)
            {
                string sAssignTypeID = dt.Rows[0]["AssignTypeID"].ToString();
                ViewData["StoreDesc"]  = dt.Rows[0]["StoreNO"].ToString() + "." + dt.Rows[0]["StoreDesc"].ToString();
                ViewData["Barcode"]    = dt.Rows[0]["Barcode"].ToString();
                ViewData["GoodsDesc"]  = dt.Rows[0]["GoodsDesc"].ToString();
                ViewData["CaseUnits"]  = dt.Rows[0]["CaseUnits"].ToString();
                ViewData["LocationNO"] = dt.Rows[0]["LocationNO"].ToString();
                //ViewData["SrcQty"] = dt.Rows[0]["SrcQty"].ToString();
                ViewData["FromLocationNO"] = dt.Rows[0]["FromLocationNO"].ToString(); //拣货储位
                ViewData["FromTrayNO"]     = dt.Rows[0]["FromTrayNO"].ToString();     //拣货托盘
                ViewData["ToDoNO"]         = dt.Rows[0]["ToDoNO"].ToString();
                ViewData["PaperNO"]        = dt.Rows[0]["PaperNO"].ToString();
                ViewData["AssignTypeID"]   = sAssignTypeID;// dt.Rows[0]["AssignTypeID"].ToString();
                //ViewData["ShowPickQty"] = dt.Rows[0]["ShowPickQty"].ToString();//提示拣货数量
                ViewData["Unit"] = dt.Rows[0]["Unit"].ToString();
                //ViewData["MinSrcQty"] = dt.Rows[0]["MinSrcQty"].ToString();
                ViewData["LocationTypeID"] = dt.Rows[0]["LocationTypeID"].ToString();
                ViewData["GrpTypeID"]      = dt.Rows[0]["GrpTypeID"].ToString();
                ViewData["CaseSrcQty"]     = dt.Rows[0]["CaseSrcQty"].ToString();
                if (sAssignTypeID == "2") // 进入托拣的箱补任务,跳到托拣界面
                {
                    return(Redirect("/PICK?AssignTypeID=2"));
                }
                else
                {
                    return(View(""));
                }
            }
            else //无指令执行
            {
                return(View("NoReplenish"));
            }
        }