From 380127b84c3fa9cfc8c9753d8ffed5b20e927720 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期三, 16 十月 2024 15:49:00 +0800 Subject: [PATCH] 出门确认单 --- WebAPI/Controllers/MateOutController.cs | 255 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 255 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs index 6ac5fcf..49f11f2 100644 --- a/WebAPI/Controllers/MateOutController.cs +++ b/WebAPI/Controllers/MateOutController.cs @@ -2726,6 +2726,261 @@ } #endregion + + #region 鍒舵垚鐜囨槑缁嗘姤琛� + [Route("MaterOutEntryReport/Sc_ProductedRateReport")] + [HttpGet] + public object Sc_ProductedRateReport(string HBeginDate,string HEndDate,string sWhere,double HRate_BeyondICMOQty, string user) + { + try + { + if (!DBUtility.ClsPub.Security_Log("Sc_ProductedRateReport", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = "exec h_p_Sc_ProductedRateReport '" + HBeginDate + "','" + HEndDate + "','" + sWhere + "'," + HRate_BeyondICMOQty; + + ds = oCN.RunProcReturn(sql, "h_p_Sc_ProductedRateReport"); + + DataTable dt = ds.Tables[0]; + + //鑾峰彇鍒楀悕 + 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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.list = columnNameList; + objJsonResult.data = ds.Tables; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 婊炵暀鏃堕棿鎶ヨ〃 + [Route("MaterOutEntryReport/Sc_RetentionTimeReport")] + [HttpGet] + public object Sc_RetentionTimeReport(string HBeginDate,string HEndDate,string sWhere, string user) + { + try + { + if (!DBUtility.ClsPub.Security_Log("Sc_RetentionTimeReport", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = "exec h_p_Sc_RetentionTimeReport '" + HBeginDate + "','" + HEndDate + "','" + sWhere + "'"; + + ds = oCN.RunProcReturn(sql, "h_p_Sc_RetentionTimeReport"); + + DataTable dt = ds.Tables[0]; + + //鑾峰彇鍒楀悕 + 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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.list = columnNameList; + objJsonResult.data = ds.Tables; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 閿�鍞环鏍煎姣旀姤琛� + [Route("MaterOutEntryReport/Sc_CompareOrderToSelloutReport")] + [HttpGet] + public object Sc_CompareOrderToSelloutReport(string HBeginDate, string HEndDate, string sWhere, string user) + { + try + { + if (!DBUtility.ClsPub.Security_Log("Sc_CompareOrderToSelloutReport", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = "exec h_p_Sc_CompareOrderToSelloutReport '" + HBeginDate + "','" + HEndDate + "','" + sWhere + "'"; + + ds = oCN.RunProcReturn(sql, "h_p_Sc_CompareOrderToSelloutReport"); + + DataTable dt = ds.Tables[0]; + + //鑾峰彇鍒楀悕 + 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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.list = columnNameList; + objJsonResult.data = ds.Tables; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 閿�鍞帓鍚嶆姤琛� + [Route("MaterOutEntryReport/Xs_SellOutMoneyRangeReport")] + [HttpGet] + public object Xs_SellOutMoneyRangeReport(string sWhere, string user) + { + try + { + if (!DBUtility.ClsPub.Security_Log("Xs_SellOutMoneyRangeReport", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + List<object> columnNameList = new List<object>(); + + if (sWhere == null || sWhere.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤"; + return objJsonResult; + } + else + { + ds = oCN.RunProcReturn("exec h_p_Xs_SellOutMoneyRangeReport '" + sWhere + "'", "h_p_Xs_SellOutMoneyRangeReport"); + } + + //娣诲姞鍒楀悕 + 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 閿�鍞鍗曟潯鐮佸嚭鍏ュ簱璇︽儏 + [Route("MaterOutEntryReport/Xs_SeOrderBarCodeInAndOutStockDetailReport")] + [HttpGet] + public object Xs_SeOrderBarCodeInAndOutStockDetailReport(string sWhere, string user) + { + try + { + if (!DBUtility.ClsPub.Security_Log("Xs_SeOrderBarCodeInAndOutStockDetailReport", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = "select * from h_v_Xs_SeOrderBarCodeInAndOutStockDetailReport_Query where 1=1 " + sWhere; + ds = oCN.RunProcReturn(sql, "h_v_Xs_SeOrderBarCodeInAndOutStockDetailReport_Query"); + + DataTable dt = ds.Tables[0]; + + //鑾峰彇鍒楀悕 + 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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.list = columnNameList; + objJsonResult.data = ds.Tables; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion #endregion } -- Gitblit v1.9.1