From cee055eb7cdecf5d995cc65d379494e471bde9c8 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 02 四月 2025 10:06:03 +0800
Subject: [PATCH] 合并
---
DBUtility/业务单据/ClsXt_BaseBill.cs | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 110 insertions(+), 4 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 9c0292e..b805e7c 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"
@@ -112,6 +112,7 @@
throw (e);
}
}
+
//鍙嶄綔搴�(鍖呭惈浣滃簾鍚庢帶鍒躲�佸啓鍏ユ棩蹇�) 2025-03-10
public bool AbandonCancelltion(Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn)
{
@@ -140,7 +141,7 @@
}
- //浣滃簾鍚庢帶鍒�
+ //鍙嶄綔搴熷悗鎺у埗
sql = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + sUser + "'";
ds = oCn.RunProcReturn(sql, procName);
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
@@ -201,6 +202,7 @@
throw (e);
}
}
+
//鍙嶅叧闂崟鎹�(鍖呭惈鍐欏叆鏃ュ織) 2024-01-31
public bool CancelClose(Int64 lngBillKey, string HBillNo, string sUser, ref string sReturn)
{
@@ -219,6 +221,62 @@
else
{
oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=1,HCloseType = 0 Where HInterID=" + lngBillKey.ToString());
+ }
+
+ //鍐欏叆鏃ュ織
+ string WorkList = "鍙嶅叧闂崟鎹紝鍗曟嵁鍙凤細" + HBillNo;
+ 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);
+ }
+ }
+
+ //鍙嶅叧闂崟鎹�(鍖呭惈鍙嶅叧闂悗鎺у埗 鍐欏叆鏃ュ織) 2025-03-18
+ public bool CancelClose(Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn)
+ {
+ try
+ {
+ string sql = "";
+ oCn.BeginTran();
+ DataSet ds = oCn.RunProcReturn("select * from " + MvarItemKey + " where HInterID=" + lngBillKey.ToString(), MvarItemKey);
+ if (ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=4,HCloseType = 0 Where HInterID=" + lngBillKey.ToString());
+ }
+ else if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=2,HCloseType = 0 Where HInterID=" + lngBillKey.ToString());
+ }
+ else
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=1,HCloseType = 0 Where HInterID=" + lngBillKey.ToString());
+ }
+
+ //鍙嶅叧闂悗鎺у埗
+ sql = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + sUser + "'";
+ ds = oCn.RunProcReturn(sql, 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;
}
//鍐欏叆鏃ュ織
@@ -466,7 +524,8 @@
string sql1 = "select b.HInterID,b.HCheckItemID from Xt_CheckFlowMain as a " +
"inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " +
"where a.HBillTypeID = '" + this.BillType + "' " +
- "and a.HInterID = " + HCheckFlowID_select + " " +
+ //"and a.HInterID = " + HCheckFlowID_select + " " +
+ "and a.HStandard = 1 " +
"order by b.HFlowNo asc";
DataSet ds1 = oCn.RunProcReturn(sql1, "Xt_CheckFlowMain");
if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
@@ -638,7 +697,7 @@
if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
{
string HBillType = ds.Tables[0].Rows[0]["HBillType"].ToString();
- if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1205" || HBillType == "1250" || HBillType == "1206" || HBillType == "1245" || HBillType == "1239")
+ if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1205" || HBillType == "1250" || HBillType == "1206" || HBillType == "1245" || HBillType == "1239"|| HBillType == "1256")
{
//鍙嶅鏍告洿鏂� 鍙婃椂搴撳瓨琛� 澧炲姞搴撳瓨 1201 1202 1203 1247 1244 1251 1210
//鍙嶅鏍告洿鏂� 鍙婃椂搴撳瓨琛� 鍑忓皯搴撳瓨 1205 1250 1206 1245 1239
@@ -842,7 +901,7 @@
if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
{
string HBillType = ds.Tables[0].Rows[0]["HBillType"].ToString();
- if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1250" || HBillType == "1206" || HBillType == "1245" || HBillType == "1239")
+ if (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1247" || HBillType == "1244" || HBillType == "1251" || HBillType == "1210" || HBillType == "1250" || HBillType == "1206" || HBillType == "1245" || HBillType == "1239" || HBillType == "1256")
{
//瀹℃牳鏇存柊 鍙婃椂搴撳瓨琛� 澧炲姞搴撳瓨 1201 1202 1203 1247 1244 1251 1210
//瀹℃牳鏇存柊 鍙婃椂搴撳瓨琛� 鍑忓皯搴撳瓨 1204 1250 1206 1245 1239
@@ -913,6 +972,53 @@
}
}
+ //鍏抽棴鍗曟嵁(鍖呭惈鍏抽棴鍚庢帶鍒� 鍐欏叆鏃ュ織) 2025-03-18
+ public bool CloseBill(Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn)
+ {
+ try
+ {
+ string sql = "";
+ DataSet ds;
+ oCn.BeginTran();
+ string HCloseMan = sUser;
+ string HCloseDate = ClsPub.GetServerDate(-1);
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "',HBillStatus=3,HCloseType = 1 Where HInterID=" + lngBillKey.ToString());
+
+ //鍏抽棴鍚庢帶鍒�
+ sql = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + sUser + "'";
+ ds = oCn.RunProcReturn(sql, 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;
+ }
+
+ //鍐欏叆鏃ュ織
+ string WorkList = "鍏抽棴鍗曟嵁锛屽崟鎹彿锛�" + HBillNo;
+ 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);
+ }
+ }
+
//琛屽叧闂崟鎹紙琛屽叧闂悗鎺у埗锛�(鍖呭惈鍐欏叆鏃ュ織) 2024-01-31
public bool CloseRow(Int64 lngBillKey, Int64 HEntryID, string HBillNo, string sUser, string procName, ref string sReturn)
{
--
Gitblit v1.9.1