| | |
| | | #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 |
| | | |
| | | |
| | | #region 工序异常过站报表 |
| | | /// <summary> |
| | | /// 工序异常过站报表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Mes_OrderProcFlowAllReportController/GetSc_ProcessErrStationReport_Json")] |
| | | [HttpGet] |
| | | public object GetSc_ProcessErrStationReport_Json(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ProcessErrStationReport", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProcessErrStationReport " + sWhere, "h_p_Sc_ProcessErrStationReport"); |
| | | 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 = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "成功!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询工序异常过站报表信息失败!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |