From 4f8c739e923aa7ee53932c55e58eb30d2581e768 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 08 十一月 2023 09:04:40 +0800
Subject: [PATCH] 1
---
WebAPI/DLL/ClsSc_ICMOReportBill.cs | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 107 insertions(+), 3 deletions(-)
diff --git a/WebAPI/DLL/ClsSc_ICMOReportBill.cs b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
index d42b486..476118b 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,16 @@
"(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
",HYear,HPeriod,HRemark,HEmpID,HEmpNumber" +
",HGroupID,HDeptID,HDeptNumber" +
+ ",HMainSourceBillNo,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillType" +
+ ",HChecker,HCheckDate,HUpDater,HUpDateDate,HDeleteMan,HDeleteDate,HPrintQty,HCheckType" +
+ ",HERPInterID,HERPBillType,HPRDORGID" +
") " +
" 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 + "','" + omodel.HChecker + "','" + omodel.HCheckDate + "','" + omodel.HUpDater +
+ "','" + omodel.HUpDateDate + "','" + omodel.HDeleteMan + "','" + omodel.HDeleteDate + "'," + omodel.HPrintQty +
+ ",'" + omodel.HCheckType + "'," + omodel.HERPInterID + ",'" + omodel.HERPBillType + "'," + omodel.HPRDORGID +
") ");
//鎻掑叆瀛愯〃
foreach (Models.ClsSc_ICMOReportBillSub oSub in DetailColl)
@@ -166,14 +177,23 @@
"HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
",HICMOInterID,HICMOBillNo,HBarCode" +
+ ",HOWNERTYPEID,HISENTRUST,HSTOCKINORGID,HOWNERID,HCHECKPRODUCT,HQAIP,HCOSTRATE,HISBACKFLUSH" +
+ ",HREQSRC,HREQBILLNO,HREQBILLID,HREQENTRYSEQ,HREQENTRYID,HMOMAINENTRYID,HSTOCKINQUASELQTY" +
+ ",HPRODUCTTYPE,HPROJECTNO,HICMOENTRYSEQ,HSEQ,HPRODUCEDATE,HEXPIRYDATE,HBASEUNITID,HDEPTID" +
+ ",HGroupID,HDESCRIPTION" +
+ ",HSourceNumber,HQPQty,HICMOEntryID" +
+ ",HWhID,HSPID,HBatChNo,HAuxPropID,HMTONo,HPlanMode,HERPInterID,HERPEntryID" +
") values("
+ omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber + "'" +
"," + oSub.HQty.ToString() + "," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HTimes.ToString() + "," + oSub.HSourceID.ToString() +
"," + oSub.HQtyMust.ToString() + "," + oSub.HWorkerID.ToString() + ",'" + oSub.HWorkerNumber + "'," + oSub.HBadCount.ToString() + "," + oSub.HWasterQty.ToString() +
",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
- "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HSourceInterID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
"," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
- "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "','" + oSub.HBarCode + "'" +
+ "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "','" + oSub.HBarCode + "','" + oSub.HOWNERTYPEID + "'," +
+ oSub.HISENTRUST + "," + oSub.HSTOCKINORGID + "," + oSub.HOWNERID + "," + oSub.HCHECKPRODUCT + ",'" + oSub.HQAIP + "'," +
+ oSub.HCOSTRATE + "," + oSub.HISBACKFLUSH + ",'" + oSub.HREQSRC + "','" + oSub.HREQBILLNO + "'," + oSub.HREQBILLID + "," +
+ oSub.HREQENTRYSEQ + "," + oSub.HREQENTRYID + "," + oSub.HMOMAINENTRYID + "," + oSub.HSTOCKINQUASELQTY + "," + oSub.HPRODUCTTYPE + ",'" + oSub.HPROJECTNO + "'," + oSub.HICMOENTRYSEQ + "," + oSub.HSEQ + ",'" + oSub.HPRODUCEDATE + "','" + oSub.HEXPIRYDATE + "'," + oSub.HBASEUNITID + "," + oSub.HDEPTID + "," + oSub.HGroupID + ",'" + oSub.HDESCRIPTION + "','" + oSub.HSourceNumber + "'," + oSub.HQPQty + "," + oSub.HSourceEntryID + "," + oSub.HICMOEntryID + "," + oSub.HWhID + "," + oSub.HSPID + ",'" + oSub.HBatChNo + "'," + oSub.HAuxPropID + ",'" + oSub.HMTONo + "'," + oSub.HPlanMode + "," + oSub.HERPInterID + "," + oSub.HERPEntryID +
") ");
}
//
@@ -300,6 +320,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