From 82e9899d7d6070e52052d366bcbbb8a323b1d344 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 24 六月 2024 15:50:01 +0800
Subject: [PATCH] 斯莫尔优化
---
WebAPI/DLL/ClsSc_MESStopWorkBill.cs | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/WebAPI/DLL/ClsSc_MESStopWorkBill.cs b/WebAPI/DLL/ClsSc_MESStopWorkBill.cs
index 754dcf3..49e3695 100644
--- a/WebAPI/DLL/ClsSc_MESStopWorkBill.cs
+++ b/WebAPI/DLL/ClsSc_MESStopWorkBill.cs
@@ -83,6 +83,7 @@
",HDeptID=" + omodel.HDeptID.ToString() +
",HEmpID=" + omodel.HEmpID.ToString() +
",HStopReason='" + omodel.HStopReason + "'" +
+ ",HStopType='" + omodel.HStopType + "'" +
",HReportType='" + omodel.HReportType + "'" +
",HBarCode='" + omodel.HBarCode + "'" +
",HAddr='" + omodel.HAddr + "'" +
@@ -176,7 +177,7 @@
",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStopBeginWorkTime,HStopEndWorkTime,HSourceID" +
",HGroupID,HDeptID,HEmpID,HStopReason,HReportType,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" +
",HSourceInterID_Main,HSourceEntryID_Main,HSourceBillNo_Main,HSourceBillType_Main" +
- ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
+ ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HStopType" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",getdate(),'" + omodel.HMaker + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
@@ -184,7 +185,7 @@
",'" + omodel.HProcExchBillNo + "'," + omodel.HMaterID.ToString() + "," + omodel.HProcID.ToString() + "," + omodel.HICMOQty.ToString() + "," + omodel.HPlanQty.ToString() + ",getdate(),'" + omodel.HStopEndWorkTime.ToShortDateString() + "'," + omodel.HSourceID.ToString() +
"," + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HStopReason + "','" + omodel.HReportType + "','" + omodel.HBarCode + "','" + omodel.HAddr + "','" + omodel.HBarCodeMaker + "',getdate()" +
"," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType + "'" +
- "," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType + "'" +
+ "," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType + "','"+ omodel.HStopType + "'" +
") ");
//鍐嶆楠岃瘉 淇濆瓨鏄惁 鍚堢悊
@@ -422,7 +423,7 @@
}
//鍒犻櫎鍗曟嵁
- public override bool DeleteBill(Int64 lngBillKey, ref string sReturn)
+ public bool DeleteBill(Int64 lngBillKey, string HBillNo, string procName, string user, ref string sReturn)
{
try
{
@@ -448,6 +449,24 @@
//鍒犻櫎涓昏〃
oCn.RunProc("Delete From " + MvarItemKey + " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍚庢帶鍒�==================================================================================
+ string sql2 = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + user + "'";
+ ds = oCn.RunProcReturn(sql2, procName);
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+
+ sReturn = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ oCn.RollBack();
+ return false;
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ sReturn = "鍒犻櫎澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
+ oCn.RollBack();
+ return false;
+ }
+ //==============================================================================================
+
sReturn = "鍒犻櫎鍗曟嵁鎴愬姛锛�";
oCn.Commit();
return true;
--
Gitblit v1.9.1