From f314ea2477d0c8d439c96f91a4ae3fcada2a7add Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 16 四月 2025 08:35:44 +0800
Subject: [PATCH] spc优化

---
 WebAPI/Controllers/品质管理/质量报表/QC_QualityReportsController.cs | 1576 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 1,573 insertions(+), 3 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 4557d5c..8becd27 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"
@@ -483,12 +483,14 @@
 
                 string HBeginDate = dic["HBeginDate"].ToString();
                 string HEndDate = dic["HEndDate"].ToString();
+                string HDeptID = dic["HDeptID"].ToString();
                 int limit = int.Parse(dic["limit"].ToString());
                 int HQCCheckItemID = int.Parse(dic["HQCCheckItemID"].ToString());
                 int HMaterID = int.Parse(dic["HMaterID"].ToString());
                 string HMouldNum = dic["HMouldNum"].ToString();
+                string HSourceID = dic["HSourceID"].ToString();
 
-                ds = oCN.RunProcReturn("exec h_p_QC_InspectionFormReport '" + HBeginDate + "','" + HEndDate + "'," + limit + "," + HQCCheckItemID + "," + HMaterID + ",'" + HMouldNum + "'", "h_p_QC_InspectionFormReport");
+                ds = oCN.RunProcReturn("exec h_p_QC_InspectionFormReport '" + HBeginDate + "','" + HEndDate + "'," + limit + "," + HQCCheckItemID + "," + HMaterID + ",'" + HMouldNum + "','"+ HSourceID + "','"+ HDeptID + "'", "h_p_QC_InspectionFormReport");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -545,8 +547,13 @@
                 string HMonth = dic["HMonth"].ToString();
                 int HDeptName = int.Parse(dic["HDeptName"].ToString());
                 int HOrgID = int.Parse(dic["HOrgID"].ToString());
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+                string HResult = dic["HResult"].ToString();//鍒ゆ柇缁撴灉
+                string HProcName = dic["HProcName"].ToString();//宸ュ簭鍚嶇О
 
-                ds = oCN.RunProcReturn("exec h_p_QC_QualityStatisticsDailyReport '" + HYear + "','" + HMonth + "'," + HDeptName + "," + HOrgID, "h_p_QC_QualityStatisticsDailyReport");
+                ds = oCN.RunProcReturn("exec h_p_QC_QualityStatisticsDailyReport '" + HYear + "','" + HMonth + "'," + HDeptName + "," + HOrgID+ ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "','" + HResult + "','" + HProcName + "'", "h_p_QC_QualityStatisticsDailyReport");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -603,8 +610,11 @@
                 string HEndDate = dic["HEndDate"].ToString();
                 string HResult = dic["HResult"].ToString();
                 int HSourceID = int.Parse(dic["HSourceID"].ToString());
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
 
-                ds = oCN.RunProcReturn("exec h_p_QC_MoistureContentDataLedger '" + HBeginDate + "','" + HEndDate + "','" + HResult + "'," + HSourceID, "h_p_QC_MoistureContentDataLedger");
+                ds = oCN.RunProcReturn("exec h_p_QC_MoistureContentDataLedger '" + HBeginDate + "','" + HEndDate + "','" + HResult + "'," + HSourceID+ ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_MoistureContentDataLedger");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -632,5 +642,1565 @@
         }
         #endregion
 
+        #region 璐ㄩ噺妯″潡    鍚勫伐搴忚川閲忚秼鍔垮浘 鏌ヨ
+
+        [Route("QC_CustomerAppealReport/getSc_StationOutBill_HProc")]
+        [HttpGet]
+        public object getSc_HMaterYieldStatistics(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+                string HProcName = dic["HProcName"].ToString();
+                string HMaterName = dic["HMaterName"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDeptID = dic["HDeptID"].ToString();//閮ㄩ棬
+
+
+                ds = oCN.RunProcReturn("exec h_p_Sc_StationOutBillQuery_HProc '" + HYear + "','" + HMonth + "','" + HDivisionName + "','" + HProcName + "','" + HMaterName + "','" + HProject + "','" + HBatchWork + "','"+ HDeptID + "'", "h_p_SB_EquipICMOTechParamBillList");
+
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/Get_EquipList")]
+        [HttpGet]
+        public object Get_EquipList(string HProcExchBillNo,string HProcID, string user)
+        {
+            try
+            {   
+                List<object> columnNameList = new List<object>();
+                    
+                ds = oCN.RunProcReturn("select  isnull(c.HInterID,0)璁惧id,isnull(c.HEquipFileNumber,'') 璁惧浠g爜,isnull(c.HName,'') 璁惧鍚嶇О,b.HRelBeginDate 寮�濮嬫椂闂�,b.HRelEndDate 缁撴潫鏃堕棿 from Sc_ProcessExchangeBillMain a " +
+                        " inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID" +
+                        " left join Gy_EquipFileBillMain c on b.HSourceID=c.HSourceID" +
+                        "  where a.HBillNo='" + HProcExchBillNo + "'and b.HProcID='"+ HProcID + "'  and b.HSourceID !=0 ", "Sc_ProcessExchangeBillMain");
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/SB_EquipICMOTechParamList")]
+        [HttpGet]
+        public object SB_EquipICMOTechParamList(string sWhere, string user,string Type)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();                
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HProcExchBillNo = dic["HProcExchBillNo"].ToString();
+                string HProcID = dic["HProcID"].ToString();
+                string HTechParamName = dic["HTechParamName"].ToString();               
+                string HEquipID = dic["HEquipID"].ToString();
+                string HBeginDate = dic["HBeginDate"].ToString();
+                string HEndDate = dic["HEndDate"].ToString();
+
+                if ((HProcExchBillNo == null || HProcExchBillNo == "")&&(HProcID == null || HProcID == "") && (HTechParamName == null || HTechParamName == "") && (HEquipID == null || HEquipID == ""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                ds = oCN.RunProcReturn("exec h_p_SB_EquipICMOTechParamBillList '" + HProcExchBillNo + "','" + HProcID + "','" + HTechParamName + "','"+ HEquipID + "','" + HBeginDate + "','" + HEndDate + "','" + Type+"'", "h_p_SB_EquipICMOTechParamBillList");
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/GtetQc_TechnologyParameterClassList")]
+        [HttpGet]
+        public object GtetQc_TechnologyParameterClassList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HProcExchBillNo = dic["HProcExchBillNo"].ToString();
+                string HProcName = dic["HProcName"].ToString();
+                string HTechParamClass = dic["HTechParamName"].ToString();
+                string HEquipName = dic["HEquipName"].ToString();
+
+                if ((HProcExchBillNo == null || HProcExchBillNo == "") && (HProcName == null || HProcName == "") && (HTechParamClass == null || HTechParamClass == "") && (HEquipName == null || HEquipName == ""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                ds = oCN.RunProcReturn("exec h_p_SB_EquipICMOTechParamBillList_Class '" + HProcExchBillNo + "','" + HProcName + "','" + HTechParamClass + "'," + HEquipName, "h_p_SB_EquipICMOTechParamBillList_Class");
+
+                //娣诲姞鍒楀悕
+                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 璐ㄩ噺妯″潡 鎬ц兘鎶ュ簾鍙拌处
+        /// <summary>
+        /// 杩斿洖鐩撮�氱巼鎶ヨ〃鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_CustomerAppealReport/QC_PerformanceScrapLedger")]
+        [HttpGet]
+        public object QC_PerformanceScrapLedger(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere == null || sWhere == "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+
+                string HBeginDate = dic["HBeginDate"].ToString();
+                string HEndDate = dic["HEndDate"].ToString();
+                string HBatchNo = dic["HBatchNo"].ToString();
+                int HMaterID = int.Parse(dic["HMaterID"].ToString());
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                ds = oCN.RunProcReturn("exec h_p_QC_PerformanceScrapLedger '" + HBeginDate + "','" + HEndDate + "','" + HMaterID + "','" + HBatchNo+ "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_PerformanceScrapLedger");
+
+                //娣诲姞鍒楀悕
+                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 璐ㄩ噺妯″潡 閫佹祴鐧昏鏁版嵁鍙拌处
+        /// <summary>
+        /// 杩斿洖鐩撮�氱巼鎶ヨ〃鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_CustomerAppealReport/QC_RegistrationForTestingReport")]
+        [HttpGet]
+        public object QC_RegistrationForTestingReport(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere == null || sWhere == "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+
+                string HBeginDate = dic["HBeginDate"].ToString();
+                string HEndDate = dic["HEndDate"].ToString();
+                string HBatchNo = dic["HBatchNo"].ToString();
+                int HMaterID = int.Parse(dic["HMaterID"].ToString());
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                ds = oCN.RunProcReturn("exec h_p_QC_RegistrationForTestingReport '" + HBeginDate + "','" + HEndDate + "','" + HMaterID + "','" + HBatchNo + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_RegistrationForTestingReport");
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/getQC_ProcessPerformanceFirstPass")]
+        [HttpGet]
+        public object getQC_ProcessPerformanceFirstPass(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();//骞�
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HMaterNumber = dic["HMaterNumber"].ToString();//鐗╂枡浠g爜
+                string HMaterName = dic["HMaterName"].ToString();//鐗╂枡鍚嶇О
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                ds = oCN.RunProcReturn("exec h_p_QC_ProcessPerformanceFirstPassList   '" + HYear + "','" + HProject + "','" + HMaterNumber + "','" + HMaterName + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ProcessPerformanceFirstPassList");
+              
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/getQC_ProcessPerformancePass")]
+        [HttpGet]
+        public object getQC_ProcessPerformancePass(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+               
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();//骞�
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HMaterNumber = dic["HMaterNumber"].ToString();//鐗╂枡浠g爜
+                string HMaterName = dic["HMaterName"].ToString();//鐗╂枡鍚嶇О
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                ds = oCN.RunProcReturn("exec h_p_QC_ProcessPerformancePassList  '" + HYear + "','" + HProject + "','" + HMaterNumber + "','" + HMaterName + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ProcessPerformancePassList");
+
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/getOA_ErrMsgBackBillList_Query")]
+        [HttpGet]
+        public object getOA_ErrMsgBackBillList_Query(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_OA_ErrMsgBackBillList_Query order by 鏃ユ湡 desc", "h_v_OA_ErrMsgBackBillList_Query");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_OA_ErrMsgBackBillList_Query where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鏃ユ湡 desc ";
+                    ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackBillList_Query");
+                }
+
+                //娣诲姞鍒楀悕
+                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 璐ㄩ噺妯″潡 寮傚父绠$悊鍙拌处
+        /// <summary>
+        /// 杩斿洖寮傚父绠$悊鍙拌处
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_CustomerAppealReport/QC_ErrManagerLedgerReport")]
+        [HttpGet]
+        public object QC_ErrManagerLedgerReport(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere == null || sWhere == "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+
+                string HBeginDate = dic["HBeginDate"].ToString();
+                string HEndDate = dic["HEndDate"].ToString();
+                int HDeptID = int.Parse(dic["HDeptID"].ToString());
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport '" + HBeginDate + "','" + HEndDate + "'," + HDeptID + ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ErrManagerLedgerReport");
+
+                //娣诲姞鍒楀悕
+                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 璐ㄩ噺妯″潡 涓嶈壇鍝佸彴璐�
+        /// <summary>
+        /// 杩斿洖寮傚父绠$悊鍙拌处
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_CustomerAppealReport/QC_BadProductsReport")]
+        [HttpGet]
+        public object QC_BadProductsReport(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere == null || sWhere == "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+
+                string HBeginDate = dic["HBeginDate"].ToString();
+                string HEndDate = dic["HEndDate"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+                string HMaterNumber = dic["HMaterNumber"].ToString();//鐗╂枡浠g爜
+                string HMaterName = dic["HMaterName"].ToString();//鐗╂枡鍚嶇О
+                string HBatchNo = dic["HBatchNo"].ToString();//鎵规鍙�
+                string HProjectNum = dic["HProjectNum"].ToString();//椤圭洰鍙�
+                string HProcName = dic["HProcName"].ToString();//宸ュ簭鍚嶇О
+
+                ds = oCN.RunProcReturn("exec h_p_QC_BadProductsReport '" + HBeginDate + "','" + HEndDate + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "','" + HMaterNumber + "','" + HMaterName + "','" + HBatchNo + "','" + HProjectNum + "','"+ HProcName + "'", "h_p_QC_BadProductsReport");
+
+                //娣诲姞鍒楀悕
+                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 璐ㄩ噺妯″潡 绾垮埆寮傚父绠$悊鍙拌处
+        /// <summary>
+        /// 杩斿洖绾垮埆寮傚父绠$悊鍙拌处
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_CustomerAppealReport/QC_ErrManagerLedgerReport_Source")]
+        [HttpGet]
+        public object QC_ErrManagerLedgerReport_Source(string sWhere, string user)
+        {
+            try
+            {
+
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_Source '" + HYear + "','" + HMonth + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ErrManagerLedgerReport_Source");
+
+                //娣诲姞鍒楀悕
+                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 璐ㄩ噺妯″潡 寮傚父绠$悊鍙拌处鏁�
+        /// <summary>
+        /// 杩斿洖寮傚父绠$悊鍙拌处鏁�
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_CustomerAppealReport/QC_ErrManagerLedgerReport_Issue")]
+        [HttpGet]
+        public object QC_ErrManagerLedgerReport_Issue(string sWhere, string user)
+        {
+            try
+            {
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_Issue '" + HYear + "','" + HMonth + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ErrManagerLedgerReport_Issue");
+
+                //娣诲姞鍒楀悕
+                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 璐ㄩ噺妯″潡 寮傚父闂鏉ユ簮
+        /// <summary>
+        /// 杩斿洖寮傚父闂鏉ユ簮
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_CustomerAppealReport/QC_ErrManagerLedgerReport_SourceOfTheProblem")]
+        [HttpGet]
+        public object QC_ErrManagerLedgerReport_SourceOfTheProblem(string sWhere, string user)
+        {
+            try
+            {
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_SourceOfTheProblem '" + HYear + "','" + HMonth + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ErrManagerLedgerReport_SourceOfTheProblem");
+
+                //娣诲姞鍒楀悕
+                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 璐ㄩ噺妯″潡 璁惧TOP3闂
+        /// <summary>
+        /// 杩斿洖璁惧TOP3闂
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_CustomerAppealReport/QC_ErrManagerLedgerReport_EquipTop3Issue")]
+        [HttpGet]
+        public object QC_ErrManagerLedgerReport_EquipTop3Issue(string sWhere,  string user)
+        {
+            try
+            {
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_EquipTop3Issue '" + HYear + "','" + HMonth + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ErrManagerLedgerReport_EquipTop3Issue");
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/Get_QC_EquipMentCollectionTechParamList")]
+        [HttpGet]
+        public object Get_QC_EquipMentCollectionTechParamList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HEquipNumber = dic["HEquipNumber"].ToString();//璁惧缂栫爜
+                string HTechParamName = dic["HTechParamName"].ToString();//宸ヨ壓浜ф暟
+                string HDate = dic["HDate"].ToString();//閲囬泦鏃ユ湡
+                string HDate1 = dic["HDate1"].ToString();//閲囬泦鏃ユ湡
+                string HEquipType = dic["HEquipType"].ToString();//鏌ヨ绫诲瀷
+
+                ds = oCN.RunProcReturn("exec h_p_Sb_EquipMentCollectionTechParam '"+ HEquipNumber + "','"+ HTechParamName + "','"+ HDate + "','"+ HDate1 + "','"+ HEquipType + "'", "h_p_Sb_EquipMentCollectionTechParam");
+
+                //娣诲姞鍒楀悕
+                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 璐ㄩ噺妯″潡 鍏ㄧ▼璐ㄩ噺杩芥函    
+        //SN鐮佽拷婧�
+        [Route("QC_CustomerAppealReport/Get_QC_FiveMenOneRingList")]
+        [HttpGet]
+        public object Get_QC_FiveMenOneRingList(string SN, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec h_p_QC_FiveMenOneRingList '" + SN + "'", "h_p_QC_FiveMenOneRingList");
+                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ゆ潯鐮佹煡鏃犳暟鎹�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                // 閬嶅巻鎵�鏈夎〃
+                foreach (DataTable table in ds.Tables)
+                {
+                    List<object> tableColumnList = new List<object>();
+
+                    // 娣诲姞鍒楀悕
+                    foreach (DataColumn col in table.Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        tableColumnList.Add(JsonConvert.DeserializeObject(ColmString));
+                    }
+
+                    // 灏嗘瘡涓〃鐨勫垪鍚嶅垪琛ㄦ坊鍔犲埌鎬诲垪鍚嶅垪琛�
+                    columnNameList.Add(new { TableName = table.TableName, Columns = tableColumnList });
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds;
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        //榛戠櫧鏍囨煡璇�
+        [Route("QC_CustomerAppealReport/Get_QC_FiveMenOneRingList_HB")]
+        [HttpGet]
+        public object Get_QC_FiveMenOneRingList_HB(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("select * from h_v_QC_FiveMenOneRingList_HB where 1=1 "+sWhere+" order by 鏃ユ湡 desc", "h_v_QC_FiveMenOneRingList_HB");
+
+                // 閬嶅巻鎵�鏈夎〃
+                foreach (DataTable table in ds.Tables)
+                {
+                    List<object> tableColumnList = new List<object>();
+
+                    // 娣诲姞鍒楀悕
+                    foreach (DataColumn col in table.Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        tableColumnList.Add(JsonConvert.DeserializeObject(ColmString));
+                    }
+
+                    // 灏嗘瘡涓〃鐨勫垪鍚嶅垪琛ㄦ坊鍔犲埌鎬诲垪鍚嶅垪琛�
+                    columnNameList.Add(new { TableName = table.TableName, Columns = tableColumnList });
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds;
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        //闀洉鐮侀〉绛�-娴佽浆鍗″彿鏌ヨ杩斿洖娴佽浆鍗d
+        [Route("QC_CustomerAppealReport/Get_QC_FiveMenOneRingList_HProcHBillNoID")]
+        [HttpGet]
+        public object Get_QC_FiveMenOneRingList_HProcHBillNoID(string HProcHBillNo, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("select top 1 hmainid from h_v_Sc_ProcessExchangeBillList_Query where 鍗曟嵁鍙�= '"+ HProcHBillNo +"'", "h_v_Sc_ProcessExchangeBillList_Query");
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        //鐐瑰嚮涓昏〃鏍肩殑娴佽浆鍗�,鏌ヨ瀛愯〃鏍兼暟鎹�
+        [Route("QC_CustomerAppealReport/Get_QC_FiveMenOneRingList_Right")]
+        [HttpGet]
+        public object Get_QC_FiveMenOneRingList_Right(string linterid,string HProcID,string SNs, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec h_p_QC_FiveMenOneRingList_Query '" + linterid + "','"+ HProcID + "','" + SNs + "'", "h_p_QC_FiveMenOneRingList_Query");
+
+                // 閬嶅巻鎵�鏈夎〃
+                foreach (DataTable table in ds.Tables)
+                {
+                    List<object> tableColumnList = new List<object>();
+
+                    // 娣诲姞鍒楀悕
+                    foreach (DataColumn col in table.Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        tableColumnList.Add(JsonConvert.DeserializeObject(ColmString));
+                    }
+
+                    // 灏嗘瘡涓〃鐨勫垪鍚嶅垪琛ㄦ坊鍔犲埌鎬诲垪鍚嶅垪琛�
+                    columnNameList.Add(new { TableName = table.TableName, Columns = tableColumnList });
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds;
+                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 璐ㄩ噺妯″潡 鍒剁▼闄烽槺娴嬭瘯瓒嬪娍鍥炬姤琛�
+
+        /// <summary>
+        /// 鍒剁▼闄烽槺娴嬭瘯瓒嬪娍鍥炬姤琛�
+        /// </summary>
+        /// <returns></returns>
+        [Route("QC_QualityReportsController/GetQC_SkillExamMonthSumReport_Json")]
+        [HttpGet]
+        public object GetQC_SkillExamMonthSumReport_Json(string sWhere)
+        {
+            try
+            {
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();//骞�
+                string HDeptID = dic["HDeptID"].ToString();//閮ㄩ棬
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                ds = oCN.RunProcReturn("exec h_p_QC_SkillExamMonthSumReport '" + HYear.ToString() + "'," + HDeptID.ToString()+",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_SkillExamMonthSumReport");
+                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 = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+                //}
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "杩斿洖鎶ヨ〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 璐ㄩ噺妯″潡 鍒剁▼璐ㄩ噺闂ㄩ�冮�歌秼鍔垮浘鎶ヨ〃
+
+        /// <summary>
+        /// 鍒剁▼璐ㄩ噺闂ㄩ�冮�歌秼鍔垮浘鎶ヨ〃
+        /// </summary>
+        /// <returns></returns>
+        [Route("QC_QualityReportsController/GetQC_QualityMonthSumReport_Json")]
+        [HttpGet]
+        public object GetQC_QualityMonthSumReport_Json(string sWhere)
+        {
+            try
+            {
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();//骞�
+                string HDeptID = dic["HDeptID"].ToString();//閮ㄩ棬
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                ds = oCN.RunProcReturn("exec h_p_QC_QualityMonthSumReport '" + HYear.ToString() + "'," + HDeptID.ToString() + ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_QualityMonthSumReport");
+                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 = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+                //}
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "杩斿洖鎶ヨ〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 璐ㄩ噺妯″潡 PPM缁╂晥瓒嬪娍鍥炬姤琛�
+
+        /// <summary>
+        /// PPM缁╂晥瓒嬪娍鍥炬姤琛�
+        /// </summary>
+        /// <returns></returns>
+        [Route("QC_CustomerAppealReport/GetQC_PPMReport_Json")]
+        [HttpGet]
+        public object GetQC_PPMReport_Json(string sWhere)
+        {
+            try
+            {
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();//骞�
+                string HMonth = dic["HMonth"].ToString();//鏈�
+                string HSupID = dic["HSupID"].ToString();//渚涘簲鍟�            
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDeptID = dic["HDeptID"].ToString();//閮ㄩ棬
+
+                ds = oCN.RunProcReturn("exec h_p_QC_PPMReport  '" + HYear + "','" + HMonth + "','" + HDivisionName + "','" + HProject + "','" + HBatchWork + "','" + HDeptID + "','" + HSupID + "'", "h_p_QC_PPMReport");
+                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 = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+                //}
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "杩斿洖鎶ヨ〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 璐ㄩ噺妯″潡    鍏ㄧ▼璐ㄩ噺杩芥函 鏍规嵁鍏ㄧ▼杩芥函鎶ヨ〃 娉� 鑾峰彇鐗╂枡+娴佽浆鍗�+璁惧+宸ュ簭
+
+        [Route("QC_CustomerAppealReport/Get_EquipICMOTechParamList")]
+        [HttpGet]
+        public object Get_EquipICMOTechParamList(string linterid, string HProcID, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("select a.HBillNo 宸ュ簭娴佽浆鍗″彿,e.HInterID 璁惧id,e.HEquipFileNumber 璁惧浠g爜,e.HName 璁惧鍚嶇О,d.HName 鐢熶骇璧勬簮,a.HMaterID 鐗╂枡id,c.HName 鐗╂枡鍚嶇О,b.HProcID 宸ュ簭id,f.HName 宸ュ簭鍚嶇О,b.HRelBeginDate 寮�濮嬫椂闂�,b.HRelEndDate 缁撴潫鏃堕棿 " +
+                    "from Sc_ProcessExchangeBillMain a inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID " +
+                    "left join Gy_Material c on a.HMaterID = c.HItemID  left join Gy_Source d on b.HSourceID = d.HItemID " +
+                    "left join Gy_EquipFileBillMain e on b.HSourceID = e.HSourceID and b.HSourceID<>0 left join Gy_Process f on b.HProcID = f.HItemID where a.HInterID='" + linterid+ "' and b.HProcID='"+HProcID+"'", "SB_EquipICMOTechParamBillMain");
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/Get_TechParamList")]
+        [HttpGet]
+        public object Get_TechParamList(string HMaterID, string HProID, string HEquId, string HTeachName, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (HTeachName=="")
+                {
+                    ds = oCN.RunProcReturn("select c.HName 宸ヨ壓鍙傛暟,b.HDataForm 閲囬泦鏉ユ簮 from Gy_MaterialTechParamBillMain a " +
+                    "inner join Gy_MaterialTechParamBillSub b on a.HInterID = b.HInterID " +
+                    "left join Gy_TechnologyParameter c on b.HTechParamID = c.HItemID where a.HMaterID='" + HMaterID + "' and a.HProcID='" + HProID + "' and a.HEquipID='" + HEquId + "'", "SB_EquipICMOTechParamBillMain");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("select c.HName 宸ヨ壓鍙傛暟,b.HDataForm 閲囬泦鏉ユ簮 from Gy_MaterialTechParamBillMain a " +
+                    "inner join Gy_MaterialTechParamBillSub b on a.HInterID = b.HInterID " +
+                    "left join Gy_TechnologyParameter c on b.HTechParamID = c.HItemID where a.HMaterID='" + HMaterID + "' and a.HProcID='" + HProID + "' and a.HEquipID='" + HEquId + "' and c.HName ='" + HTeachName + "'", "SB_EquipICMOTechParamBillMain");
+                }                
+                
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/GetQC_QualityDailyReprot")]
+        [HttpGet]
+        public object GetQC_QualityDailyReprot(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere == null || sWhere == "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+
+                string HBeginDate = dic["HBeginDate"].ToString();
+                string HEndDate = dic["HEndDate"].ToString();
+                string HBatchNo = dic["HBatchNo"].ToString();//鎵规鍙�
+                string HBatchNo1 = dic["HBatchNo1"].ToString();//ID鍙�
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+                string HProcName = dic["HProcName"].ToString();//宸ュ簭鍚嶇О
+                string HReceiveMan = dic["HReceiveMan"].ToString();//鎿嶄綔鍛�
+                string HEquipNumber = dic["HEquipNumber"].ToString();//璁惧缂栫爜
+                string HMaterName = dic["HMaterName"].ToString();//鐗╂枡鍚嶇О
+                string HBachNO_BCP = dic["HBachNO_BCP"].ToString();//鍗婃垚鍝佹壒娆�
+                string HBachNO_CP = dic["HBachNO_CP"].ToString();//鎴愬搧鎵规
+
+                ds = oCN.RunProcReturn("exec h_p_QC_QualityDailyReprot '" + HBeginDate + "','" + HEndDate + "','" + HBatchNo + "','" + HBatchNo1 + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "','" + HProcName + "','" + HReceiveMan + "','" + HEquipNumber + "','" + HMaterName + "','" + HBachNO_BCP + "','" + HBachNO_CP + "'", "h_p_QC_QualityDailyReprot");
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/GetQC_QualityDailyReprot_Sum")]
+        [HttpGet]
+        public object GetQC_QualityDailyReprot_Sum(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere == null || sWhere == "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潯浠讹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+
+                string HBeginDate = dic["HBeginDate"].ToString();
+                string HEndDate = dic["HEndDate"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+                string HProcName = dic["HProcName"].ToString();//宸ュ簭鍚嶇О
+
+                ds = oCN.RunProcReturn("exec h_p_QC_QualityDailyReprot_Sum '" + HBeginDate + "','" + HEndDate + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "','" + HProcName + "'", "h_p_QC_QualityDailyReprot_Sum");
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/GetQC_QualityMonthReportList")]
+        [HttpGet]
+        public object GetQC_QualityMonthReportList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+
+
+                ds = oCN.RunProcReturn("exec h_p_QC_QualityMonthReport '" + HYear + "','" + HMonth + "','" + HDivisionName + "','" + HProject + "','" + HBatchWork + "'", "h_p_QC_QualityMonthReport");
+
+
+                //娣诲姞鍒楀悕
+                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 璐ㄩ噺妯″潡 璁惧TOP3闂
+        /// <summary>
+        /// 杩斿洖璁惧TOP3闂
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_CustomerAppealReport/GetQC_BadReasonTop3ReportList")]
+        [HttpGet]
+        public object GetQC_BadReasonTop3ReportList(string sWhere, string user)
+        {
+            try
+            {
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec h_p_QC_BadReasonTop3Report '" + HYear + "','" + HMonth + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_BadReasonTop3Report");
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/getQC_TechParamReport")]
+        [HttpGet]
+        public object getQC_TechParamReport(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HBeginDate = dic["HBeginDate"].ToString();
+                string HEndDate = dic["HEndDate"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HProcId = dic["HProcId"].ToString(); //宸ュ簭
+                string Frequency = dic["Frequency"].ToString();//棰戞
+                string HSourceID= dic["HSourceID"].ToString();//鐢熶骇璧勬簮
+
+                ds = oCN.RunProcReturn("exec h_p_TechParamReportList '" + Frequency + "','" + HProject + "','" + HProcId + "','" + HBeginDate + "','" + HEndDate + "','"+ HSourceID + "'", "h_p_TechParamReportList");
+
+
+                //娣诲姞鍒楀悕
+                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("QC_CustomerAppealReport/getQC_BackWorkReport")]
+        [HttpGet]
+        public object getQC_BackWorkReport(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HBeginDate = dic["HBeginDate"].ToString();
+                string HEndDate = dic["HEndDate"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+                string HMaterName = dic["HMaterName"].ToString();//鐗╂枡鍚嶇О
+                string HProcName = dic["HProcName"].ToString();//宸ュ簭鍚嶇О
+                string HBadReasonID = dic["HBadReasonID"].ToString();//涓嶈壇鍘熷洜
+
+
+                ds = oCN.RunProcReturn("exec h_p_QC_BackWorkReport '" + HBeginDate + "','" + HEndDate + "','" + HProject + "','" + HDivisionName + "','" + HBatchWork + "','" + HMaterName + "','" + HProcName + "','" + HBadReasonID + "'", "h_p_QC_BackWorkReport");
+
+
+                //娣诲姞鍒楀悕
+                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
+
+
     }
 }

--
Gitblit v1.9.1