Ejemplo n.º 1
0
        /// <summary>
        /// 效验数量并提交
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        /// 
        public ActionResult ValidateQty(MatchpLatePCModel model)
        {
            GetLoginInfo();
            if (Login_Info == null)
            {
                return Content("<script>location.href='/Home'</script>");
            }
            service = new MatchpLatePCService(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
            try
            {

                service.SetParameter("OldTrayNO", model.OldTrayNO);
                service.SetParameter("TrayNO", model.TrayNO);
                service.SetParameter("Barcode", model.Barcode);
                service.SetParameter("StockBatchNO", model.StockBatchNO);
                service.SetParameter("IsCheckTrayNO", model.IsCheckTrayNO);
                //service.ExecuteBusinessCheck("RF_PastesPartofV2", "*");
                service.ExecuteBusinessProcess("RF_PastesPartofV2");
                DataSet ds = service.GettMatchPlateDtl();
                if (ds.Tables[1].Rows.Count == 0)
                {
                    return Content("error\n" + "操作成功,显示数据失败");
                }
                string strjson = ToJson(ds);
                //string strjson = "{ \"Master\":[{\"Item\":\"1\",\"GoodsInfo\":\"史云生利乐装高级鸡汤【库存单位:盒】\",\"StockBatchNO\":\"2017061320180615\",\"Qty\":\"34.000\"}],\"Detail\":[{\"Item\":\"1\",\"GoodsInfo\":\"史云生利乐装高级鸡汤【库存单位:盒】\",\"StockBatchNO\":\"2017061320180615\",\"Qty\":\"34.000\"}]}";
                return Content(strjson);
            }
            catch (Exception ex)
            {
                Loger.Error(ex);
                return Content("error\n" + ex.Message);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 效验原始出库箱
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 /// 
 public ActionResult ValidateOldTrayNO(MatchpLatePCModel model)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return Content("<script>location.href='/Home'</script>");
     }
     service = new MatchpLatePCService(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         service.SetParameter("OldTrayNO", model.OldTrayNO);
         service.ExecuteBusinessCheck("RF_PastesPartofV2", "OldTrayNO");
         DataTable dt = service.GetOldTrayNOGoods();
         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
 /// <summary>
 /// 效验目标出库箱
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 /// 
 public ActionResult ValidateTrayNO(MatchpLatePCModel model)
 {
     GetLoginInfo();
     if (Login_Info == null)
     {
         return Content("<script>location.href='/Home'</script>");
     }
     service = new MatchpLatePCService(Login_Info.User_ID, Login_Info.User_Name, Login_Info.Token);
     try
     {
         service.SetParameter("OldTrayNO", model.OldTrayNO);
         service.SetParameter("TrayNO", model.TrayNO);
         service.SetParameter("IsCheckTrayNO", model.IsCheckTrayNO);
         service.ExecuteBusinessCheck("RF_PastesPartofV2", "TrayNO");
         return Content("");
     }
     catch (Exception ex)
     {
         Loger.Error(ex);
         return Content(ex.Message);
     }
 }