From 55c64d855c964da4a8fbede789abb198107cadca Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 16 八月 2023 11:07:42 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/WebAPIController.cs | 172 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 170 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 7b98846..02166d4 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 c.HItemID HQCCheckItemID,c.HName 妫�楠岄」鐩�,b.HQCStd,b.HQCUnit HUnit,b.HAnalysisMethod,b.HStatus HResult 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;
ds = oCN.RunProcReturn(sql, "Gy_QCCheckProjectMain");
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
@@ -4149,7 +4317,7 @@
string[] sArray = msg.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string HMakeName = sArray[1].ToString();
string saveData = sArray[0].ToString();
- string HTypes = sArray[1].ToString();
+ string HTypes = sArray[2].ToString();
List<SaveDefineMenu> saveDataList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SaveDefineMenu>>(saveData);
//澹版槑鏁版嵁搴撴搷浣滃伐鍏�
--
Gitblit v1.9.1