From e111435d04d84d67b3d7c699876ec34e29ec6cfb Mon Sep 17 00:00:00 2001
From: jhz <jinghz@oceic.com>
Date: 星期二, 14 六月 2022 21:49:54 +0800
Subject: [PATCH] 刷卡自动登录
---
WebAPI/DLL/ClsSc_ICMOReportBill.cs | 93 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 92 insertions(+), 1 deletions(-)
diff --git a/WebAPI/DLL/ClsSc_ICMOReportBill.cs b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
index d42b486..937b973 100644
--- a/WebAPI/DLL/ClsSc_ICMOReportBill.cs
+++ b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
@@ -51,6 +51,11 @@
",HUpDater='" + omodel.HMaker + "'" +
",HUpDateDate=getdate()" +
//========================================
+ ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
+ ",HMainSourceInterID=" + omodel.HMainSourceInterID.ToString() +
+ ",HMainSourceEntryID=" + omodel.HMainSourceEntryID.ToString() +
+ ",HMainSourceBillType=" + omodel.HMainSourceBillType.ToString() +
+
",HDeptID=" + omodel.HDeptID.ToString() +
",HDeptNumber='" + omodel.HDeptNumber +"'"+
",HEmpID=" + omodel.HEmpID.ToString() +
@@ -150,10 +155,12 @@
"(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
",HYear,HPeriod,HRemark,HEmpID,HEmpNumber" +
",HGroupID,HDeptID,HDeptNumber" +
+ ",HMainSourceBillNo,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillType" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker+ "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HEmpID.ToString() + "','" + omodel.HEmpNumber +
- "','" + omodel.HGroupID.ToString() + "'," + omodel.HDeptID.ToString() + ",'" + omodel.HDeptNumber + "'"+
+ "','" + omodel.HGroupID.ToString() + "'," + omodel.HDeptID.ToString() + ",'" + omodel.HDeptNumber +
+ "','" + omodel.HMainSourceBillNo.ToString() + "'," + omodel.HMainSourceInterID.ToString() + ",'" + omodel.HMainSourceEntryID + "','" + omodel.HMainSourceBillType + "'" +
") ");
//鎻掑叆瀛愯〃
foreach (Models.ClsSc_ICMOReportBillSub oSub in DetailColl)
@@ -300,6 +307,90 @@
}
}
+ //瀹℃牳
+ public bool CheckBill(Int64 lngBillKey, ref string sReturn)
+ {
+
+ try
+ {
+ string HChecker = DBUtility.ClsPub.CurUserName;
+ string HCheckDate = DBUtility.ClsPub.GetServerDate(-1);
+ oCn.BeginTran();
+ oCn.RunProc(" Update " + MvarItemKey + " set HBillStatus='2',HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "' Where HInterID=" + lngBillKey.ToString());
+
+ sReturn = "瀹℃牳鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+
+ sReturn = "";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
+ //鍙嶅鏍�
+ public bool AbandonCheck(Int64 lngBillKey, ref string sReturn)
+ {
+
+ try
+ {
+ string HChecker = DBUtility.ClsPub.CurUserName;
+ string HCheckDate = DBUtility.ClsPub.GetServerDate(-1);
+ oCn.BeginTran();
+ //杩樺師鍗曟嵁鐘舵�佷负鏈鏍哥姸鎬�
+ oCn.RunProc(" Update " + MvarItemKey + " set HBillStatus='1',HChecker='',HCheckDate='' Where HInterID=" + lngBillKey.ToString());
+ sReturn = "鍙嶅鏍稿崟鎹垚鍔燂紒";
+ oCn.Commit();
+ sReturn = "";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
+ //鍒犻櫎鍗曟嵁
+ public virtual bool DeleteBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ oCn.BeginTran();
+ //鏌ヨ鐢熶骇姹囨姤鍗曡〃鏁伴噺
+ DataSet ds = oCn.RunProcReturn("select a.HBillNo,b.HSourceInterID,b.HSourceEntryID from Sc_ICMOReportBillMain a inner join Sc_ICMOReportBillSub b on a.HInterID = b.HInterID where a.HInterID = '" + lngBillKey + "'", "Sc_ICMOReportBillMain");
+ string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+ string HSourceInterID = ds.Tables[0].Rows[0]["HSourceInterID"].ToString();
+ string HSourceEntryID = ds.Tables[0].Rows[0]["HSourceEntryID"].ToString();
+ //
+ //鏇存柊浜ч噺姹囨姤涓存椂琛ㄦ槸鍚︽姤妫�鐢宠鐘舵��
+ string sql1 = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set HRelationInterID='0' where HICMOReportBillNo='"+ HBillNo + "' and HICMOInterID='"+ HSourceInterID + "' and HICMOEntryID='"+ HSourceEntryID + "'");
+ oCn.RunProc(sql1);
+
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎鏄庣粏琛�
+ DeleteBillSub(lngBillKey);
+ //鍒犻櫎涓昏〃
+ DeleteBillMain(lngBillKey);
+
+ sReturn = "鍒犻櫎鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+
+
//鎵爜鐢熸垚浜ч噺姹囨姤鍗曪紙鏃犳潯鐮佸嚭鍏ュ簱璁板綍锛�
public bool AddBill_PDA2(ref string sReturn)
{
--
Gitblit v1.9.1