duhe
2024-01-09 53e76d08068dcf96d2ade45c08bef31cd09402ea
WebAPI/Controllers/MateOutController.cs
@@ -1988,6 +1988,47 @@
        }
        #endregion
        #region  流转卡未入库报表
        [Route("MaterOutEntryReport/Sc_ProcExchangeNoInReport")]
        [HttpGet]
        public object Sc_ProcExchangeNoInReport(string sWhere, string HBeginDate, string HEndDate)
        {
            try
            {
                string sql = "exec h_p_Sc_ProcExchangeNoInReport '" + sWhere + "','" + HBeginDate + "','" + HEndDate + "'";
                ds = oCN.RunProcReturn(sql, "h_p_Sc_ProcExchangeNoInReport");
                DataTable dt = ds.Tables[0];
                //获取列名
                List<object> columnNameList = new List<object>();
                //添加列名
                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.list = columnNameList;
                objJsonResult.data = dt;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region  生产入库报表
        [Route("MaterOutEntryReport/sc_ICOMRKReport")]
        [HttpGet]