yxj
2023-05-25 582f385e30e0d1d7fd3f1ac6452ba70bc0ff7e98
新增产品工艺路线展开报表调用方法
1个文件已修改
38 ■■■■■ 已修改文件
WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs
@@ -359,6 +359,44 @@
        #endregion
        #region 产品工艺路线展开报表 查询
        [Route("Mes_OrderProcFlowAllReport/RoutingBillMulLevBOMReportList")]
        [HttpGet]
        public object RoutingBillMulLevBOMReportList(string sWhere)
        {
            try
            {
                //反序列化传递的值
                ds = oCN.RunProcReturn($"exec h_p_Sc_RoutingBillMulLevBOMReport " + sWhere + "", "h_p_Sc_RoutingBillMulLevBOMReport");
                List<object> listCol = new List<object>();
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string str = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    listCol.Add(JsonConvert.DeserializeObject(str));
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = listCol;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}