yusijie
2026-04-20 295a7b215289d78b65e42e8119c5ba1a45f7f592
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -12940,6 +12940,60 @@
        #endregion
        #region  WMS每日运行状态分析(每日制单数量)
        [Route("WEBSController/GetKf_WMSDailyRunStateReport_Json")]
        [HttpGet]
        public object GetKf_WMSDailyRunStateReport_Json(string sWhere, string user)
        {
            try
            {
                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
                string HBeginDate = dic["HBeginDate"].ToString();
                string HEndDate = dic["HEndDate"].ToString();
                List<object> columnNameList = new List<object>();
                ds = oCn.RunProcReturn("exec h_p_Kf_WMSDailyRunStateReport  '" + HBeginDate + "','" + HEndDate + "'", "h_p_Kf_WMSDailyRunStateReport");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion