Ejemplo n.º 1
0
 public string SaleOrderInventorySync(string saleOrderCode)
 {
     try
     {
         _log.Info("SaleOrderInventorySync request:saleOrderCode={0}", saleOrderCode);
         _posFacade.SaleOrderInventorySync(saleOrderCode);
         _log.Info("SaleOrderInventorySync request:success");
         return("1");
     }
     catch (Exception ex)
     {
         _log.Error(ex);
         return(ex.Message);
     }
 }
Ejemplo n.º 2
0
        public JsonResult OrderRepair(string saleOrderCodes)
        {
            if (string.IsNullOrEmpty(saleOrderCodes))
            {
                throw new Exception("单据号不能为空");
            }
            var codeArray = saleOrderCodes.Trim('\n').Split('\n');
            var html      = "";

            foreach (var code in codeArray)
            {
                try
                {
                    _posFacade.SaleOrderInventorySync(code);
                    html += string.Format("订单{0},处理成功 </br>", code);
                }
                catch (Exception ex)
                {
                    html += string.Format("订单{0},处理失败{1} </br>", code, ex.Message);
                }
            }

            return(Json(new { success = true, message = html }));
        }