WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs
@@ -580,6 +580,50 @@
        }
        #endregion
        #region 车间模块  生产日需求模具报表  查询
        [Route("Mes_OrderProcFlowAllReport/getSc_MouldRequirementDay")]
        [HttpGet]
        public object getSc_MouldRequirementDay(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Sc_MouldRequirementDay order by 日期 desc", "h_v_Sc_MouldRequirementDay");
                }
                else
                {
                    string sql1 = "select * from h_v_Sc_MouldRequirementDay where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by 日期 ";
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldRequirementDay");
                }
                //添加列名
                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.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}