From 8d93e394cab1861b6b5bd3ec0d95fa64f84b5b3e Mon Sep 17 00:00:00 2001 From: jhz <jinghz@oceic.com> Date: 星期四, 04 五月 2023 23:04:38 +0800 Subject: [PATCH] 工序报表 --- WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs | 196 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 195 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs b/WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs index 00411ab..6d09fc3 100644 --- a/WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs +++ b/WebAPI/Controllers/CJGL/Mes_OrderProcFlowAllReportController.cs @@ -130,7 +130,8 @@ } #endregion - #region 涓嶈壇鏄庣粏鑹巼鎶ヨ〃 鏌ヨ + + #region 杞﹂棿鐢熶骇姹囨姤缁熻琛� 鏌ヨ [Route("Mes_OrderProcFlowAllReport/StationOutSumReportList")] [HttpGet] public object StationOutSumReportList(string sWhere) @@ -166,5 +167,198 @@ } } #endregion + + + #region 璁′欢宸ヨ祫鎶ヨ〃 鏌ヨ + [Route("Mes_OrderProcFlowAllReport/EmployeePiecePayReport")] + [HttpGet] + public object EmployeePiecePayReport(string sWhere) + { + try + { + //鍙嶅簭鍒楀寲浼犻�掔殑鍊� + + ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePiecePayReport " + sWhere + "", "h_p_Sc_EmployeePiecePayReport"); + + 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 璁′欢宸ヨ祫姹囨�绘姤琛� 鏌ヨ + [Route("Mes_OrderProcFlowAllReport/EmployeePiecePaySumReport")] + [HttpGet] + public object EmployeePiecePaySumReport(string sWhere) + { + try + { + //鍙嶅簭鍒楀寲浼犻�掔殑鍊� + + ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePiecePaySumReport " + sWhere + "", "h_p_Sc_EmployeePiecePaySumReport"); + + 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 宸ヨ祫姹囨姤鏃ユ姤琛� 鏌ヨ + [Route("Mes_OrderProcFlowAllReport/EmployeePieceWorkReport")] + [HttpGet] + public object EmployeePieceWorkReport(string sWhere) + { + try + { + //鍙嶅簭鍒楀寲浼犻�掔殑鍊� + + ds = oCN.RunProcReturn("exec h_p_Sc_EmployeePieceWorkReport " + sWhere + "", "h_p_Sc_EmployeePieceWorkReport"); + + 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 鐢熶骇杞﹂棿宸ュ簭鎶ヨ〃 鏌ヨ + [Route("Mes_OrderProcFlowAllReport/WorkShopProcessWIPReport")] + [HttpGet] + public object WorkShopProcessWIPReport(string sWhere) + { + try + { + //鍙嶅簭鍒楀寲浼犻�掔殑鍊� + + ds = oCN.RunProcReturn("exec h_p_Sc_WorkShopProcessWIPReport " + sWhere + "", "h_p_Sc_WorkShopProcessWIPReport"); + + 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 宸ュ簭鍦ㄥ埗鍝佹姤琛� 鏌ヨ + [Route("Mes_OrderProcFlowAllReport/WorkShopProcessWIPSumReport")] + [HttpGet] + public object WorkShopProcessWIPSumReport(string sWhere) + { + try + { + //鍙嶅簭鍒楀寲浼犻�掔殑鍊� + + ds = oCN.RunProcReturn("exec h_p_Sc_WorkShopProcessWIPSumReport " + sWhere + "", "h_p_Sc_WorkShopProcessWIPSumReport"); + + 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 + + + } } \ No newline at end of file -- Gitblit v1.9.1