From 93e3bc91c522547758b282a23a0ecd0633817c71 Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期五, 17 十一月 2023 10:33:24 +0800
Subject: [PATCH] 应付收款单、付款单及其单据列表的增加
---
WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 106 insertions(+), 2 deletions(-)
diff --git a/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs b/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs
index 8d0e535..b02339f 100644
--- a/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs
+++ b/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs
@@ -12,7 +12,7 @@
public ClsSb_EquipDotCheckRuleBill()
{
- base.MvarItemKeySub = "ClsSb_EquipDotCheckRuleBillSub";
+ base.MvarItemKeySub = "Sb_EquipDotCheckRuleBillSub";
base.MvarItemKeySub2 = "";
base.MvarItemKeySub3 = "";
base.MvarItemKeySub4 = "";
@@ -20,6 +20,110 @@
base.MvarReportTitle = "璁惧鐐规瑙勭▼";
base.BillType = "3913";
}
-
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate Sb_EquipDotCheckRuleBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
+ ",HDate='" + omodel.HDate + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HUpDater='" + omodel.HMaker + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+ ",HBeginDate='" + omodel.HBeginDate + "'" +
+ ",HEndDate='" + omodel.HEndDate + "'" +
+ ",HCycleUnit='" + omodel.HCycleUnit+ "'" +
+ ",HCheckCycle='" + omodel.HCheckCycle + "'" +
+ ",HExplanation='" + omodel.HExplanation + "'" +
+ ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ oCn.RunProc("Delete From Sb_EquipDotCheckRuleBillSub where HInterID=" + lngBillKey.ToString());
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ foreach (Models.ClsSb_EquipDotCheckRuleBillSub oSub in DetailColl_Mater)
+ {
+ oCn.RunProc("Insert into Sb_EquipDotCheckRuleBillSub " +
+ " (HInterID,HEntryID," +
+ "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
+ "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
+ "HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," +
+ "HManagerID" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
+ ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
+ "'," + oSub.HManagerID.ToString() +
+ ") ");
+ }
+ sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏂板鍗曟嵁
+ public override bool AddBill(ref string sReturn)
+ {
+ try
+ {
+ //寰楀埌mainid
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCn.BeginTran();
+ //涓昏〃
+ oCn.RunProc("Insert Into Sb_EquipDotCheckRuleBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
+ ",HYear,HPeriod,HRemark" +
+ ",HBeginDate,HEndDate,HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo" +
+ ") " +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
+ "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," +
+ "'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HCycleUnit+ "','" + omodel.HCheckCycle + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" +
+ ") ");
+ //鎻掑叆瀛愯〃
+ foreach (Models.ClsSb_EquipDotCheckRuleBillSub oSub in DetailColl_Mater)
+ {
+ oCn.RunProc("Insert into Sb_EquipDotCheckRuleBillSub " +
+ " (HInterID,HEntryID," +
+ "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
+ "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
+ "HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," +
+ "HManagerID" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
+ ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim +
+ "'," + oSub.HManagerID.ToString() +
+ ") ");
+ }
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏄剧ず鍗曟嵁
}
}
\ No newline at end of file
--
Gitblit v1.9.1