From 98fdb31018bde24c16598b98cdd1cf526dc1113f Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 31 十二月 2024 10:37:01 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/品质管理/质量报表/QC_QualityReportsController.cs |   36 ++++++++++++++++++++++++------------
 1 files changed, 24 insertions(+), 12 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 7bc9f99..f0eb048 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"
@@ -1606,13 +1606,13 @@
         //鐐瑰嚮涓昏〃鏍肩殑娴佽浆鍗�,鏌ヨ瀛愯〃鏍兼暟鎹�
         [Route("QC_CustomerAppealReport/Get_QC_FiveMenOneRingList_Right")]
         [HttpGet]
-        public object Get_QC_FiveMenOneRingList_Right(string linterid,string SNs, string user)
+        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 + "','" + SNs + "'", "h_p_QC_FiveMenOneRingList_Query");
+                ds = oCN.RunProcReturn("exec h_p_QC_FiveMenOneRingList_Query '" + linterid + "','"+ HProcID + "','" + SNs + "'", "h_p_QC_FiveMenOneRingList_Query");
 
                 // 閬嶅巻鎵�鏈夎〃
                 foreach (DataTable table in ds.Tables)
@@ -1755,7 +1755,7 @@
         /// PPM缁╂晥瓒嬪娍鍥炬姤琛�
         /// </summary>
         /// <returns></returns>
-        [Route("QC_QualityReportsController/GetQC_PPMReport_Json")]
+        [Route("QC_CustomerAppealReport/GetQC_PPMReport_Json")]
         [HttpGet]
         public object GetQC_PPMReport_Json(string sWhere)
         {
@@ -1764,12 +1764,14 @@
                 Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
 
                 string HYear = dic["HYear"].ToString();//骞�
-                string HDeptID = dic["HDeptID"].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 HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+                string HDeptID = dic["HDeptID"].ToString();//閮ㄩ棬
 
-                ds = oCN.RunProcReturn("exec h_p_QC_PPMReport '" + HYear.ToString() + "'," + HDeptID.ToString() + ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_PPMReport");
+                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)
@@ -1811,7 +1813,7 @@
                 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 left join Gy_Process f on b.HProcID = f.HItemID where a.HInterID='"+linterid+ "' and b.HProcID='"+HProcID+"'", "SB_EquipICMOTechParamBillMain");
+                    "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)
                 {
@@ -1842,15 +1844,24 @@
 
         [Route("QC_CustomerAppealReport/Get_TechParamList")]
         [HttpGet]
-        public object Get_TechParamList(string HMaterID, string HProID, string HEquId, string user)
+        public object Get_TechParamList(string HMaterID, string HProID, string HEquId, string HTeachName, string user)
         {
             try
             {
                 List<object> columnNameList = new List<object>();
-
-                ds = oCN.RunProcReturn("select c.HName 宸ヨ壓鍙傛暟,b.HDataForm 閲囬泦鏉ユ簮 from Gy_MaterialTechParamBillMain a " +
+                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 + "' and b.HDataForm='璁惧閲囬泦' ", "SB_EquipICMOTechParamBillMain");
+                    "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)
                 {
@@ -1900,6 +1911,7 @@
                 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();//浜嬩笟閮�
@@ -1907,7 +1919,7 @@
                 string HReceiveMan = dic["HReceiveMan"].ToString();//鎿嶄綔鍛�
                 string HEquipNumber = dic["HEquipNumber"].ToString();//璁惧缂栫爜
 
-                ds = oCN.RunProcReturn("exec h_p_QC_QualityDailyReprot '" + HBeginDate + "','" + HEndDate + "','" + HBatchNo + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "','" + HProcName + "','" + HReceiveMan + "','" + HEquipNumber + "'", "h_p_QC_QualityDailyReprot");
+                ds = oCN.RunProcReturn("exec h_p_QC_QualityDailyReprot '" + HBeginDate + "','" + HEndDate + "','" + HBatchNo + "','" + HBatchNo1 + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "','" + HProcName + "','" + HReceiveMan + "','" + HEquipNumber + "'", "h_p_QC_QualityDailyReprot");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)

--
Gitblit v1.9.1