From c34e85eda515636993b37a752b52c0f43ae6e17b Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 09 一月 2025 09:17:18 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/CJGL/Sc_OEEReportController.cs | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 102 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Sc_OEEReportController.cs b/WebAPI/Controllers/CJGL/Sc_OEEReportController.cs index e648bcb..9bcb6b8 100644 --- a/WebAPI/Controllers/CJGL/Sc_OEEReportController.cs +++ b/WebAPI/Controllers/CJGL/Sc_OEEReportController.cs @@ -75,5 +75,107 @@ } } #endregion + + #region OEE鎶ヨ〃 鏌ヨ鏄庣粏 + /// <summary> + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Sc_OEEReport/getSc_OEEReportDetailist")] + [HttpGet] + public object getSc_OEEReportDetailist(string HSourceCode, string HDate, string HType, string user) + { + try + { + List<object> columnNameList = new List<object>(); + ////鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Sc_OEEReport", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = "exec h_p_SB_getLatestDataOfOEEDataDetailist '" + HSourceCode + "','" + HDate + "','" + HType + "'"; + ds = oCN.RunProcReturn(sql, "h_p_SB_getLatestDataOfOEEDataDetailist"); + + //娣诲姞鍒楀悕 + 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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + 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 + + #region OEE鎶ヨ〃 鏌ヨ(鐝) + /// <summary> + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Sc_OEEReport/getSc_OEEReport_WorkShift")] + [HttpGet] + public object getSc_OEEReport_WorkShift(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + ////鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Sc_OEEReport", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = "exec h_p_Sc_OEEReport_WorkShift " + sWhere; + ds = oCN.RunProcReturn(sql, "h_p_Sc_OEEReport_WorkShift"); + + //娣诲姞鍒楀悕 + 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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + 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 } } \ No newline at end of file -- Gitblit v1.9.1