From 695210233b1f41418602bfb60a5a95f37493b147 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 17 九月 2025 16:55:38 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/品质管理/质量报表/QC_QualityReportsController.cs |   84 ++++++++++++++++++++++++++++++++++++++----
 1 files changed, 76 insertions(+), 8 deletions(-)

diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
index e19df54..8342b19 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
@@ -293,13 +293,19 @@
         /// </summary>
         [Route("QC_Report/QualityTraceability1")]
         [HttpGet]
-        public object QualityTraceability1(string HICMOBillNo, string HType)
+        public object QualityTraceability1(string sWhere, string HType)
         {
             try
             {
                 List<object> columnNameList = new List<object>();
 
-                ds = oCN.RunProcReturn("exec h_p_Sc_QueryQualityByICMOBill '" + HType + "','" + HICMOBillNo + "'", "h_p_Sc_QueryQualityByICMOBill");
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HICMOInterID = dic["HICMOInterID"].ToString();
+                string HICMOEntryID = dic["HICMOEntryID"].ToString();
+                string HICMOBillNo = dic["HICMOBillNo"].ToString();
+
+                ds = oCN.RunProcReturn("exec h_p_Sc_QueryQualityByICMOBill '" + HType + "','" + HICMOBillNo + "','"+ HICMOInterID + "','"+ HICMOEntryID + "'", "h_p_Sc_QueryQualityByICMOBill");
                
 
                 //娣诲姞鍒楀悕
@@ -336,13 +342,20 @@
         /// </summary>
         [Route("QC_Report/QualityTraceability2")]
         [HttpGet]
-        public object QualityTraceability2(string HICMOBillNo, string HType)
+        public object QualityTraceability2(string sWhere, string HType)
         {
             try
             {
                 List<object> columnNameList = new List<object>();
 
-                ds = oCN.RunProcReturn("exec h_p_Sc_QueryQualityByICMOBill '" + HType + "','" + HICMOBillNo + "'", "h_p_Sc_QueryQualityByICMOBill");
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HICMOInterID = dic["HICMOInterID"].ToString();
+                string HICMOEntryID = dic["HICMOEntryID"].ToString();
+                string HICMOBillNo = dic["HICMOBillNo"].ToString();
+
+                ds = oCN.RunProcReturn("exec h_p_Sc_QueryQualityByICMOBill '" + HType + "','" + HICMOBillNo + "','" + HICMOInterID + "','" + HICMOEntryID + "'", "h_p_Sc_QueryQualityByICMOBill");
+
 
 
                 //娣诲姞鍒楀悕
@@ -379,13 +392,18 @@
         /// </summary>
         [Route("QC_Report/QualityTraceability3")]
         [HttpGet]
-        public object QualityTraceability3(string HICMOBillNo, string HType)
+        public object QualityTraceability3(string sWhere, string HType)
         {
             try
             {
                 List<object> columnNameList = new List<object>();
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
 
-                ds = oCN.RunProcReturn("exec h_p_Sc_QueryQualityByICMOBill '" + HType + "','" + HICMOBillNo + "'", "h_p_Sc_QueryQualityByICMOBill");
+                string HICMOInterID = dic["HICMOInterID"].ToString();
+                string HICMOEntryID = dic["HICMOEntryID"].ToString();
+                string HICMOBillNo = dic["HICMOBillNo"].ToString();
+
+                ds = oCN.RunProcReturn("exec h_p_Sc_QueryQualityByICMOBill '" + HType + "','" + HICMOBillNo + "','" + HICMOInterID + "','" + HICMOEntryID + "'", "h_p_Sc_QueryQualityByICMOBill");
 
 
                 //娣诲姞鍒楀悕
@@ -422,13 +440,20 @@
         /// </summary>
         [Route("QC_Report/QualityTraceability4")]
         [HttpGet]
-        public object QualityTraceability4(string HICMOBillNo, string HType)
+        public object QualityTraceability4(string sWhere, string HType)
         {
             try
             {
                 List<object> columnNameList = new List<object>();
 
-                ds = oCN.RunProcReturn("exec h_p_Sc_QueryQualityByICMOBill '" + HType + "','" + HICMOBillNo + "'", "h_p_Sc_QueryQualityByICMOBill");
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HICMOInterID = dic["HICMOInterID"].ToString();
+                string HICMOEntryID = dic["HICMOEntryID"].ToString();
+                string HICMOBillNo = dic["HICMOBillNo"].ToString();
+
+                ds = oCN.RunProcReturn("exec h_p_Sc_QueryQualityByICMOBill '" + HType + "','" + HICMOBillNo + "','" + HICMOInterID + "','" + HICMOEntryID + "'", "h_p_Sc_QueryQualityByICMOBill");
+
 
 
                 //娣诲姞鍒楀悕
@@ -457,6 +482,49 @@
         }
         #endregion
 
+        #region 璐ㄩ噺妯″潡 璐ㄩ噺杩芥函鎶ヨ〃鎶ヨ〃鏌ヨ(宸℃璁板綍鍗�)
+        /// <summary>
+        /// 杩斿洖璐ㄩ噺杩芥函鎶ヨ〃鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_Report/QualityTraceability5")]
+        [HttpGet]
+        public object QualityTraceability5(string HICMOBillNo, string HType)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec h_p_Sc_QueryQualityByICMOBill '" + HType + "','" + HICMOBillNo + "'", "h_p_Sc_QueryQualityByICMOBill");
+
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[2].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[4];
+                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 璐ㄩ噺妯″潡 SPC妫�楠屽崟鍒嗘瀽
         /// <summary>
         /// 杩斿洖鐩撮�氱巼鎶ヨ〃鍒楄〃

--
Gitblit v1.9.1