From 80a5123df7536f035addadf2b3fe879ee45b1317 Mon Sep 17 00:00:00 2001
From: 陈雯静 <1134865194@qq.com>
Date: 星期一, 04 三月 2024 15:20:41 +0800
Subject: [PATCH] 1
---
DBUtility/业务单据/ClsXt_BaseBill.cs | 79 +++++++++++++++++++++++++++++++++++++++
1 files changed, 78 insertions(+), 1 deletions(-)
diff --git "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs" "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
index c98eef1..f21f2eb 100644
--- "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
+++ "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
@@ -178,6 +178,43 @@
throw (e);
}
}
+ //琛屽弽鍏抽棴鍗曟嵁(鍖呭惈鍐欏叆鏃ュ織) 2024-01-31
+ public bool CancelRow(Int64 lngBillKey,Int64 HEntryID, string HBillNo, string sUser, ref string sReturn)
+ {
+ try
+ {
+ oCn.BeginTran();
+ string sql = "select * from " + MvarItemKeySub + " where HInterID=" + lngBillKey.ToString() + " and HEntryID = " + HEntryID;
+ DataSet ds = oCn.RunProcReturn(sql, MvarItemKeySub);
+ if(ds==null || ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "琛岃褰曚笉瀛樺湪锛�";
+ return false;
+ }
+ else
+ {
+ sql = " Update " + MvarItemKeySub + " set HCloseMan='',HEntryCloseDate='',HCloseType=0 Where HInterID=" + lngBillKey.ToString() + " and HEntryID = " + HEntryID;
+ oCn.RunProc(sql);
+ }
+
+ //鍐欏叆鏃ュ織
+ string WorkList = "琛屽弽鍏抽棴锛屽崟鎹彿锛�" + HBillNo + "锛涘瓙琛ㄥ唴鐮侊細" + HEntryID;
+ string SystemName = "LMES-" + MvarReportTitle + "妯″潡";
+ oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
+ "(getdate(),'" + sUser + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','琛屽弽鍏抽棴')"
+ );
+
+ sReturn = "琛屽弽鍏抽棴鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
//鍙嶅鏍�
public bool AbandonCheck(Int64 lngBillKey, ref string sReturn)
{
@@ -367,7 +404,7 @@
{
string HCloseMan = ClsPub.CurUserName;
string HCloseDate = ClsPub.GetServerDate(-1);
- oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "',HBillStatus=3 Where HInterID=" + lngBillKey.ToString());
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "',HBillStatus=3,HCloseType = 1 Where HInterID=" + lngBillKey.ToString());
sReturn = "";
return true;
}
@@ -405,6 +442,46 @@
throw (e);
}
}
+ //琛屽叧闂崟鎹�(鍖呭惈鍐欏叆鏃ュ織) 2024-01-31
+ public bool CloseRow(Int64 lngBillKey,Int64 HEntryID, string HBillNo, string sUser, ref string sReturn)
+ {
+ DataSet ds;
+ try
+ {
+ oCn.BeginTran();
+ string HCloseMan = sUser;
+ string HEntryCloseDate = ClsPub.GetServerDate(-1);
+ //鍙樻洿琛屽叧闂姸鎬�
+ string sql = " Update " + MvarItemKeySub + " set HCloseMan='" + HCloseMan + "',HEntryCloseDate='" + HEntryCloseDate + "',HCloseType=1 Where HInterID=" + lngBillKey.ToString() + " and HEntryID = " + HEntryID;
+ oCn.RunProc(sql);
+
+ //妫�鏌ュ崟鎹瓙琛ㄦ墍鏈夎鏄惁閮藉叧闂紝鑻ラ兘鍏抽棴鍒欒嚜鍔ㄥ叧闂崟鎹�
+ //sql = "select * from " + MvarItemKeySub + " where HInterID=" + lngBillKey + " and HCloseMan=''";
+ //ds = oCn.RunProcReturn(sql, MvarItemKeySub);
+ //if(ds!=null && ds.Tables[0].Rows.Count == 0)
+ //{
+ // sql = " Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate=getdate(),HBillStatus=3,HCloseType = 0 Where HInterID=" + lngBillKey.ToString();
+ // oCn.RunProc(sql);
+ //}
+
+ //鍐欏叆鏃ュ織
+ string WorkList = "琛屽叧闂紝鍗曟嵁鍙凤細" + HBillNo + "锛涘瓙琛ㄥ唴鐮侊細" + HEntryID;
+ string SystemName = "LMES-" + MvarReportTitle + "妯″潡";
+ oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
+ "(getdate(),'" + sUser + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','琛屽叧闂�')"
+ );
+
+ sReturn = "琛屽叧闂垚鍔燂紒";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
//浣滃簾
public bool Cancelltion(Int64 lngBillKey, ref string sReturn)
{
--
Gitblit v1.9.1