From 690b38aa98631607542835f16af8dc71424ca10e Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 25 六月 2024 13:29:42 +0800
Subject: [PATCH] 1
---
WebAPI/DLL/ClsSc_MESBeginWorkBill.cs | 40 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 39 insertions(+), 1 deletions(-)
diff --git a/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs b/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs
index 565ed59..f8b31cf 100644
--- a/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs
+++ b/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs
@@ -212,6 +212,26 @@
}
//=========================================================
+ //鑾峰彇鏈�杩戠殑涓婃ā鍗� 鎶婂伐鍗曡窡妯″叿杩涜缁戝畾
+ ds = oCn.RunProcReturn(@"select HICMOInterID,HICMOEntryID,HSourceInterID,HSourceEntryID,HSourceID from Sc_ICMOBillStatus_Tmp where HInterID=" + omodel.HMainSourceInterID.ToString(), "Sc_ICMOBillStatus_Tmp");
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ string HICMOInterID = ds.Tables[0].Rows[0]["HICMOInterID"].ToString();
+ string HICMOEntryID = ds.Tables[0].Rows[0]["HICMOEntryID"].ToString();
+ string HSourceInterID = ds.Tables[0].Rows[0]["HSourceInterID"].ToString();
+ string HSourceEntryID = ds.Tables[0].Rows[0]["HSourceEntryID"].ToString();
+ string HSourceID = ds.Tables[0].Rows[0]["HSourceID"].ToString();
+
+ ds = oCn.RunProcReturn(@"select HMouldID from Sc_MouldUpperBillMain a
+inner join Sc_MouldUpperBillSub b on a.HInterID = b.HInterID where HICMOInterID=" + HICMOInterID + " and HICMOEntryID=" + HICMOEntryID + " and HProcExchInterID=" + HSourceInterID + " and HProcExchEntryID=" + HSourceEntryID + " and HSourceID=" + HSourceID + " order by HMakeDate desc", "Sc_MouldUpperBillMain");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ oCn.RunProc("update Sc_ICMOBillStatus_Tmp set HMouldID= " + ds.Tables[0].Rows[0]["HMouldID"].ToString() + " where HInterID=" + omodel.HMainSourceInterID.ToString());
+ }
+
+ }
+
sReturn = omodel.HInterID.ToString();
oCn.Commit();
return true;
@@ -419,7 +439,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
{
@@ -445,6 +465,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