From b257f2917a8dfda7542257535c96ef3544b8e27b Mon Sep 17 00:00:00 2001
From: jingh <jingh@LAPTOP-I53VDLOO>
Date: 星期三, 29 九月 2021 00:13:31 +0800
Subject: [PATCH] 不良评审单增加不良数量控制 存储过程
---
DAL/质检管理/ClsQC_NoPassProdCheckBill.cs | 52 ++++++++++++++++++++++++++--------------------------
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs | 6 +++++-
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs | 1 +
3 files changed, 32 insertions(+), 27 deletions(-)
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdCheckBill.cs"
index 8a00be1..eb8d2e8 100644
--- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdCheckBill.cs"
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdCheckBill.cs"
@@ -172,19 +172,19 @@
//鏍规嵁鍐呯爜 鍥炲~瀵瑰簲娴佽浆鍗� 涓嶈壇鍏宠仈鏁伴噺
oCn.RunProc("exec h_p_QC_NoPassProdCheckBillToProcExch " + omodel.HInterID.ToString() + ",1");
//////////////////////////////
- //DataSet Ds;
- //Ds = oCn.RunProcReturn("exec h_p_QC_NoPassProdCheckBillQtyCtrl " + omodel.HInterID.ToString(), "h_p_QC_NoPassProdCheckBillQtyCtrl");
- //if (Ds == null || Ds.Tables[0].Rows.Count == 0)
- //{
- // oCn.RollBack();
- // return false;
- //}
- //if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBack"]) == "2")
- //{
- // sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBackRemark"]);
- // oCn.RollBack();
- // return false;
- //}
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("exec h_p_QC_NoPassProdCheckBill_QtyCtrl " + omodel.HInterID.ToString(), "h_p_QC_NoPassProdCheckBill_QtyCtrl");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ {
+ oCn.RollBack();
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBack"]) == "2")
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
+ }
////////////////////////
@@ -275,19 +275,19 @@
oCn.RunProc("exec h_p_QC_NoPassProdCheckBillToProcExch " + omodel.HInterID.ToString() + ",1");
//
//////////////////////////////
- //DataSet Ds;
- //Ds = oCn.RunProcReturn("exec h_p_QC_NoPassProdCheckBillQtyCtrl " + omodel.HInterID.ToString(), "h_p_QC_NoPassProdCheckBillQtyCtrl");
- //if (Ds == null || Ds.Tables[0].Rows.Count == 0)
- //{
- // oCn.RollBack();
- // return false;
- //}
- //if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBack"]) == "2")
- //{
- // sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBackRemark"]);
- // oCn.RollBack();
- // return false;
- //}
+ DataSet Ds;
+ Ds = oCn.RunProcReturn("exec h_p_QC_NoPassProdCheckBill_QtyCtrl " + omodel.HInterID.ToString(), "h_p_QC_NoPassProdCheckBill_QtyCtrl");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ {
+ oCn.RollBack();
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBack"]) == "2")
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
+ }
////////////////////////
//
diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
index 03dae82..8699de8 100644
--- a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
+++ b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -651,7 +651,11 @@
{
omodel.QC_NoPassProdCheckBill_QtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
}
-
+ //不良品评审单不良数量和不良原因总数必须一致
+ if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_NoPassProdCheckBill_BadReasonQtyCtrl")
+ {
+ omodel.QC_NoPassProdCheckBill_BadReasonQtyCtrl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
+ }
//=======委外发出
//工站或工序先进先出(同上)
if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationEntrustInBill_FIFOCtl")
diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
index c3adadf..def4b5d 100644
--- a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
+++ b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -178,6 +178,7 @@
public string MES_StationOutBill_FirstCheckOut; //出战单判断本道工序是否做首件检验
//不良品评审单
public string QC_NoPassProdCheckBill_QtyCtl; //不良品数不能大于出站单报废数量
+ public string QC_NoPassProdCheckBill_BadReasonQtyCtrl; //不良品评审单不良数量和不良原因总数必须一致
//委外发出
public string MES_StationEntrustInBill_FIFOCtl; //工站或工序先进先出(同上)
public string MES_StationEntrustInBill_FullMoveCtl; //上道完全出站控制(同上)
--
Gitblit v1.9.1