From 100bf842af4b578183cc89b3b3e6dc6ec1221a92 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期三, 30 三月 2022 17:29:25 +0800
Subject: [PATCH] 器具档案批量生成
---
DAL/MES/ClsSc_MESMaterToSourceBill .cs | 43 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/DAL/MES/ClsSc_MESMaterToSourceBill .cs b/DAL/MES/ClsSc_MESMaterToSourceBill .cs
index 83efea5..d13ee07 100644
--- a/DAL/MES/ClsSc_MESMaterToSourceBill .cs
+++ b/DAL/MES/ClsSc_MESMaterToSourceBill .cs
@@ -58,7 +58,7 @@
",HMainSourceBillType=" + omodel.HMainSourceBillType.ToString() +
",HMainSourceInterID=" + omodel.HMainSourceInterID.ToString() +
",HMainSourceEntryID=" + omodel.HMainSourceEntryID.ToString() +
- ",HMainSourceBillNo=" + omodel.HMainSourceBillNo.ToString() +
+ ",HMainSourceBillNo='" + omodel.HMainSourceBillNo.ToString() +"'"+
",HSourceID=" + omodel.HSourceID.ToString() +
",HProcID=" + omodel.HProcID.ToString() +
",HMaterID=" + omodel.HMaterID.ToString() +
@@ -88,7 +88,7 @@
",'" + oSub.HBarCode + "','" + oSub.HBarCode_Pack + "','" + oSub.HBillNo_bak + "'" +
") ");
}
- sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ sReturn = omodel.HInterID.ToString();
oCn.Commit();
return true;
}
@@ -265,6 +265,45 @@
}
}
+ //鍒犻櫎鍗曟嵁
+ public override bool DeleteBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ oCn.BeginTran();
+ //鍒ゆ柇鏄惁鍏佽鍒犻櫎
+ DataSet ds = oCn.RunProcReturn("exec h_p_Sc_MaterToSourceBill_DelCtrl @HInterId=" + lngBillKey + "", "h_p_Sc_MaterToSourceBill_DelCtrl");
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ sReturn = "鏃犻獙璇佹暟鎹紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+
+ //鍒犻櫎鍏宠仈鍏崇郴
+ oCn.RunProc("exec h_p_Sc_MaterToSourceBill_DelRelation @HInterId=" + lngBillKey + "");
+
+ //鍒犻櫎鏄庣粏琛�
+ oCn.RunProc("Delete From " + MvarItemKeySub + " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎涓昏〃
+ oCn.RunProc("Delete From " + MvarItemKey + " where HInterID=" + lngBillKey.ToString());
+
+ sReturn = "鍒犻櫎鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
//瀹℃牳
public bool CheckBill(Int64 lngBillKey, ref string sReturn)
{
--
Gitblit v1.9.1