From 02bfe366088dd52dd143239a94ea45a1e3e898fe Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期三, 30 八月 2023 09:02:51 +0800 Subject: [PATCH] 采购订单动态列,物料、工序、工艺路线新增质检方案字段, --- WebAPI/Controllers/WebAPIController.cs | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 169 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index b145b87..ae4f998 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -3379,6 +3379,174 @@ } /// <summary> + /// 鑾峰彇鎶芥牱鏂规鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("Web/GetGy_SampleScheme")] + [HttpGet] + public object GetSampleScheme(string SampleScheme, int OrganizationID) + { + if (SampleScheme != "") + { + sWhere = " and ( 鎶芥牱鏂规浠g爜 like '%" + SampleScheme + "%' or 鎶芥牱鏂规鍚嶇О like '%" + SampleScheme + "%' ) "; + } + try + { + List<object> columnNameList = new List<object>(); + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + string sql = "Select * from h_v_Gy_GetSampleSchemeListView where 1 = 1 " + sWhere + "Order by hmainid "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_GetSampleSchemeListView"); + + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ",娌℃湁鏌ヨ鍒版暟鎹�"; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + objjson.list = columnNameList; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + /// <summary> + /// 鑾峰彇妫�楠屽�煎垪琛� + /// </summary> + /// <returns></returns> + [Route("Web/GetGy_InspectValue")] + [HttpGet] + public object GetInspectValue(string InspectValue, int OrganizationID) + { + if (InspectValue != "") + { + sWhere = " and ( 妫�楠屽�间唬鐮� like '%" + InspectValue + "%' or 妫�楠屽�煎悕绉� like '%" + InspectValue + "%' ) "; + } + try + { + List<object> columnNameList = new List<object>(); + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + string sql = "Select * from h_v_Gy_GetInspectValueList where 1 = 1 " + sWhere + "Order by hmainid "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_GetInspectValueList"); + + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ",娌℃湁鏌ヨ鍒版暟鎹�"; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + objjson.list = columnNameList; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + /// <summary> + /// 鑾峰彇妫�浠櫒鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("Web/GetGy_InspectInstruMent")] + [HttpGet] + public object GetGy_InspectInstruMent(string InspectInstruMent, int OrganizationID) + { + if (InspectInstruMent != "") + { + sWhere = " and ( 妫�楠屼华鍣ㄤ唬鐮� like '%" + InspectInstruMent + "%' or 妫�楠屼华鍣ㄥ悕绉� like '%" + InspectInstruMent + "%' ) "; + } + try + { + List<object> columnNameList = new List<object>(); + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + string sql = "Select * from h_v_Gy_InspectInstruMent where 1 = 1 " + sWhere + "Order by HItemID "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_InspectInstruMent"); + + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ",娌℃湁鏌ヨ鍒版暟鎹�"; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + objjson.list = columnNameList; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + /// <summary> /// 鏍规嵁妫�楠屾柟妗堜富鍐呯爜鑾峰彇妫�楠岄」鐩� /// </summary> /// <returns></returns> @@ -3397,7 +3565,7 @@ try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - string sql = "select c.HItemID HQCCheckItemID,c.HName 妫�楠岄」鐩�,b.HQCStd,b.HQCUnit HUnit from Gy_QCCheckProjectMain a left join Gy_QCCheckProjectSub b on a.HInterID = b.HInterID left join Gy_QCCheckItem c on b.HQCCheckItemID = c.HItemID where a.HInterID = " + CheckProjectID; + string sql = "select * from h_v_Gy_GetQCCheckItemByProject where hmainid = " + CheckProjectID; ds = oCN.RunProcReturn(sql, "Gy_QCCheckProjectMain"); if (ds == null || ds.Tables[0].Rows.Count <= 0) { -- Gitblit v1.9.1