From 55ea36856df391168ea5e4032a47584f95eed593 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期二, 02 一月 2024 17:30:40 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Service/LuBaoSevice.cs | 135 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 135 insertions(+), 0 deletions(-) diff --git a/WebAPI/Service/LuBaoSevice.cs b/WebAPI/Service/LuBaoSevice.cs index 0a1eea8..d5f7b02 100644 --- a/WebAPI/Service/LuBaoSevice.cs +++ b/WebAPI/Service/LuBaoSevice.cs @@ -195,7 +195,121 @@ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_IF_Edit_BadReasonList where HItemID= " + HID + " ", "h_v_IF_Edit_BadReasonList"); return dataSet; } + + /// <summary> + /// 涓嶈壇鍚庢灉鏍规嵁id鑾峰彇淇℃伅 + /// </summary> + public static ApiResult<DataSet> GetGy_BadResultBillDetail(string HID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + var dataSet = GetGy_BadResultDb(HID); + if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) + return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄤ笉鑹悗鏋滄暟鎹�" }; + return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; + } + public static DataSet GetGy_BadResultDb(string HID) + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_BadResult where HItemID= " + HID + " ", "h_v_Gy_BadResult"); + return dataSet; + } + /// <summary> + /// 妫�娴嬪�兼牴鎹甶d鑾峰彇淇℃伅 + /// </summary> + public static ApiResult<DataSet> GetGy_InspectValueBillDetail(string HID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + var dataSet = GetGy_InspectValueDb(HID); + if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) + return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄦ娴嬪�兼暟鎹�" }; + return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; + } + + public static DataSet GetGy_InspectValueDb(string HID) + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_InspectValue where HItemID= " + HID + " ", "h_v_Gy_InspectValue"); + return dataSet; + } + + /// <summary> + /// 妫�楠屾柟娉曟牴鎹甶d鑾峰彇淇℃伅 + /// </summary> + public static ApiResult<DataSet> GetGy_InspectMethodBillDetail(string HID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + var dataSet = GetGy_InspectMethodDb(HID); + if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) + return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄦ娴嬫柟娉曟暟鎹�" }; + return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; + } + public static DataSet GetGy_InspectMethodDb(string HID) + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_InspectMethod where HItemID= " + HID + " ", "h_v_Gy_InspectMethod"); + return dataSet; + } + + /// <summary> + /// 璐ㄩ噺鏍囧噯鏍规嵁id鑾峰彇淇℃伅 + /// </summary> + public static ApiResult<DataSet> GetGy_QualityStdBillDetail(string HID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + var dataSet = GetGy_QualityStdDb(HID); + if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) + return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄨ川閲忔爣鍑嗘暟鎹�" }; + return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; + } + public static DataSet GetGy_QualityStdDb(string HID) + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_QualityStd where HItemID= " + HID + " ", "h_v_Gy_QualityStd"); + return dataSet; + } + + /// <summary> + /// 妫�楠屼华鍣ㄦ牴鎹甶d鑾峰彇淇℃伅 + /// </summary> + public static ApiResult<DataSet> GetGy_InspectInstruMentBillDetail(string HID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + var dataSet = GetGy_InspectInstruMentDb(HID); + if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) + return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄦ楠屼华鍣ㄦ暟鎹�" }; + return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; + } + public static DataSet GetGy_InspectInstruMentDb(string HID) + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_InspectInstruMent where HItemID= " + HID + " ", "h_v_Gy_InspectInstruMent"); + return dataSet; + } + + /// <summary> + /// 妫�楠屼緷鎹牴鎹甶d鑾峰彇淇℃伅 + /// </summary> + public static ApiResult<DataSet> GetGy_InspectBasisBillDetail(string HID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + var dataSet = GetGy_InspectBasisDb(HID); + if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) + return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄦ楠屼緷鎹暟鎹�" }; + return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; + } + public static DataSet GetGy_InspectBasisDb(string HID) + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_InspectBasis where HItemID= " + HID + " ", "h_v_Gy_InspectBasis"); + return dataSet; + } /// <summary> /// 璁¢噺鍗曚綅鏍规嵁id鑾峰彇淇℃伅 @@ -277,5 +391,26 @@ return dataSet; } + + /// <summary> + /// 鐗╂枡璁剧疆鏍规嵁id鑾峰彇淇℃伅 + /// </summary> + public static ApiResult<DataSet> GetGy_MaterialBillDetail(string HID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + var dataSet = Gy_MaterialDb(HID); + if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) + return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄦ鐗╂枡鏁版嵁" }; + return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; + } + + public static DataSet Gy_MaterialDb(string HID) + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Edit_Gy_MaterialList where HItemID= " + HID + " ", "h_v_Edit_Gy_MaterialList"); + return dataSet; + } + } } \ No newline at end of file -- Gitblit v1.9.1