From d63f8f7e40ec07a1f4f24de07d9f631f7e7a823d Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 11 七月 2024 12:51:24 +0800
Subject: [PATCH] spc 报表优化

---
 WebAPI/Controllers/品质管理/质量报表/QC_QualityReportsController.cs |    3 ++-
 Model/车间管理/ClsSc_ProcessExchangeBillMain.cs                 |    1 +
 WebAPI/Controllers/QC_ManagementController.cs               |   27 +++++++++++++++++++++++++++
 Model/基础资料/其他基础资料/ClsGy_QCCheckProjectSub.cs                |    2 ++
 DAL/车间管理/ClsSc_ProcessExchangeBill.cs                       |    5 ++++-
 DAL/基础资料/其他基础资料/ClsGy_QCCheckProjectMain.cs                 |    7 ++++---
 6 files changed, 40 insertions(+), 5 deletions(-)

diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_QCCheckProjectMain.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_QCCheckProjectMain.cs"
index 86b90bd..271a850 100644
--- "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_QCCheckProjectMain.cs"
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_QCCheckProjectMain.cs"
@@ -40,9 +40,6 @@
                 //鏇存柊涓昏〃
                 oCn.RunProc("UpDate Gy_QCCheckProjectMain set  " +
                 " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
-                ",HDate='" + omodel.HDate + "'" +
-                ",HYear='" + omodel.HYear.ToString() + "'" +
-                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                 ",HBillStatus='" + omodel.HBillStatus + "'" +
                 ",HRemark='" + omodel.HRemark + "'" +
                 //",HBacker='"+omodel.HBacker+"'"+
@@ -92,6 +89,7 @@
                       ",HDownLimitKey,HUpOffSetKey,HDownOffSetKey,HTargetValQ,HUpLimitQ,HDownLimitQ" +
                       ",HUpOffSetQ,HDownOffSetQ,HTargetValB,HUpLimitB,HDownLimitB,HUpOffSetB" +
                       ",HDownOffSetB,HTargetValTxt,HUpLimitTxt,HDownLimitTxt,HUpOffSetTxt,HDownOffSetTxt" +
+                      ",HControlUpperLimit,HControlLowerLimit" +
                       ") values("
                       + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                       ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() +
@@ -105,6 +103,7 @@
                       "," + oSub.HUpOffSetQ + "," + oSub.HDownOffSetQ + "," + oSub.HTargetValB + "," + oSub.HUpLimitB + "," + oSub.HDownLimitB +
                       "," + oSub.HUpOffSetB + "," + oSub.HDownOffSetB + ",'" + oSub.HTargetValTxt + "','" + oSub.HUpLimitTxt + "','" + oSub.HDownLimitTxt
                       + "','" + oSub.HUpOffSetTxt + "','" + oSub.HDownOffSetTxt + "'" +
+                      ","+ oSub.HControlUpperLimit + ","+ oSub.HControlLowerLimit +
                       ") ");
                 }
 
@@ -166,6 +165,7 @@
                       ",HDownLimitKey,HUpOffSetKey,HDownOffSetKey,HTargetValQ,HUpLimitQ,HDownLimitQ" +
                       ",HUpOffSetQ,HDownOffSetQ,HTargetValB,HUpLimitB,HDownLimitB,HUpOffSetB" +
                       ",HDownOffSetB,HTargetValTxt,HUpLimitTxt,HDownLimitTxt,HUpOffSetTxt,HDownOffSetTxt" +
+                      ",HControlUpperLimit,HControlLowerLimit" +
                       ") values("
                       + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                       ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() +
@@ -179,6 +179,7 @@
                       "," + oSub.HUpOffSetQ + "," + oSub.HDownOffSetQ + "," + oSub.HTargetValB + "," + oSub.HUpLimitB + "," + oSub.HDownLimitB + 
                       "," + oSub.HUpOffSetB + "," + oSub.HDownOffSetB + ",'" + oSub.HTargetValTxt + "','" + oSub.HUpLimitTxt + "','" + oSub.HDownLimitTxt 
                       + "','" + oSub.HUpOffSetTxt + "','" + oSub.HDownOffSetTxt + "'" +
+                      ","+ oSub.HControlUpperLimit + "," +oSub.HControlLowerLimit +
                       ") ");
                 }
                 
diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
index 186e9a3..cfebe96 100644
--- "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
+++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
@@ -82,6 +82,7 @@
                 ",HPRDORGID='" + omodel.HPRDORGID.ToString() + "'" +
                 ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                 ",HRemark='" + omodel.HRemark + "'" +
+                ",HMouldNum='" + omodel.HMouldNum + "'" +
                 ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
                 ",HUpDateDate=getdate()" +
                 ",HMainSourceBillSubType='" + omodel.HMainSourceBillSubType + "'" +
@@ -377,7 +378,8 @@
                ", HRoutingBillID,HMaterModel,HWidth,HWeight,HAuxQty,HAuxUnit,HAuxQty2,HAuxUnit2,HSplitNo" +
                ",HHeight,HInches,HAl1Long,HDensity,HTela,HUnderTela,HSizing,HSellDate" +
                ",HRemark2,HRemark3,HEmpID,HCusID,HColorRemark,HSplitSumQty,HSplitColorQty,HMachineLine" +
-               ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HOrderLevID,HWidth_New,HRemark_New,HWeight_New,HPlanOrderProcNo) " +
+               ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HOrderLevID,HWidth_New,HRemark_New,HWeight_New,HPlanOrderProcNo" +
+               ",HMouldNum) " +
                 " values('" + this.BillType + "','" + omodel.HBillSubType + "','" + (omodel.HMainSourceBillSubType==null?"": omodel.HMainSourceBillSubType) + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()," + "" + (omodel.HPrevMainSourceInterID == 0 ? omodel.HInterID : omodel.HPrevMainSourceInterID) +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HBatchNo + "'," + omodel.HMainMaterID.ToString() + "," + omodel.HKeyMaterID.ToString() + "," + omodel.HNo.ToString() + ",'" + omodel.HOrderProcNO + "'" +
                 "," + omodel.HWWOrderInterID.ToString() + "," + omodel.HWWOrderEntryID.ToString() + ",'" + omodel.HWWOrderBillNo + "'," + omodel.HICMOInterID.ToString() + "," + omodel.HEquipMentID.ToString() +
@@ -393,6 +395,7 @@
                 ",'" + omodel.HHeight + "','" + omodel.HInches + "','" + omodel.HAl1Long + "','" + omodel.HDensity + "','" + omodel.HTela + "','" + omodel.HUnderTela + "','" + omodel.HSizing + "','" + omodel.HSellDate + "'" +
                 ",'"+ omodel.HRemark2 + "','"+ omodel.HRemark3 + "',"+ omodel.HEmpID + "," + omodel.HCusID + ",'"+ omodel.HColorRemark + "',"+ omodel.HSplitSumQty + ","+ omodel.HSplitColorQty + ",'"+ omodel.HMachineLine + "'" +
                 ","+ omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HOrderLevID + "'," + omodel.HWidth_New + ",'" + omodel.HRemark_New + "'," + omodel.HWeight_New + ",'" + omodel.HPlanOrderProcNo + "'" +
+                ",'"+ omodel.HMouldNum + "'" +
                 ")");
                 sErr = sErr + "1;";
                 //鎻掑叆瀛愯〃
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_QCCheckProjectSub.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_QCCheckProjectSub.cs"
index b5e03db..4ad9c14 100644
--- "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_QCCheckProjectSub.cs"
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_QCCheckProjectSub.cs"
@@ -41,6 +41,8 @@
         public Decimal HDownLimitQ;
         public Decimal HUpOffSetQ;
         public Decimal HDownOffSetQ;
+        public Decimal HControlUpperLimit;
+        public Decimal HControlLowerLimit;
         public Int64 HTargetValB;
         public Int64 HUpLimitB;
         public Int64 HDownLimitB;
diff --git "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs" "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs"
index 04ad9a6..597d240 100644
--- "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs"
+++ "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs"
@@ -112,5 +112,6 @@
         public string HMaterModel2;         //varchar(100)  产品规格
 
         public string HPlanOrderProcNo; //订单跟踪号
+        public string HMouldNum; //穴号
     }
 }
diff --git a/WebAPI/Controllers/QC_ManagementController.cs b/WebAPI/Controllers/QC_ManagementController.cs
index 72a832c..45c8822 100644
--- a/WebAPI/Controllers/QC_ManagementController.cs
+++ b/WebAPI/Controllers/QC_ManagementController.cs
@@ -947,6 +947,33 @@
         }
         #endregion
 
+        #region 妫�楠屾柟妗堟煡璇�
+        [Route("QC_Management/MES_QC_CheckProjectListProjectDetaiList")]
+        [HttpGet]
+        public object MES_QC_CheckProjectListProjectDetaiList(string sWhere,string user)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                ds = oCN.RunProcReturn(string.Format(@"select * from h_v_Gy_QCCheckProjectList_Edit where 1=1 " + sWhere), "h_v_Gy_QCCheckProjectList_Edit");
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+                objJsonResult.data = null;
+            }
+            return objJsonResult;
+        }
+        #endregion
+
         #region 妫�楠屾柟妗堢紪杈戞椂鑾峰彇琛ㄤ綋鏁版嵁
         [Route("QC_Management/MES_QC_CheckProjectListProjectDetai")]
         [HttpGet]
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 4d9a36f..9f7174a 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"
@@ -486,8 +486,9 @@
                 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();
 
-                ds = oCN.RunProcReturn("exec h_p_QC_InspectionFormReport '" + HBeginDate + "','" + HEndDate + "'," + limit + "," + HQCCheckItemID + "," + HMaterID, "h_p_QC_InspectionFormReport");
+                ds = oCN.RunProcReturn("exec h_p_QC_InspectionFormReport '" + HBeginDate + "','" + HEndDate + "'," + limit + "," + HQCCheckItemID + "," + HMaterID + ",'" + HMouldNum + "'", "h_p_QC_InspectionFormReport");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)

--
Gitblit v1.9.1