From d8de78b09da94b54f105bb4a74cf4701128e7bf8 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期一, 22 四月 2024 17:26:23 +0800
Subject: [PATCH] 1.工程项目的编辑页面,增加 工程信息 页签; 页签里 增加字段 项目类别HProjectClassID,状态,建设单位HBuildComp,地点HBuildAddress,任务编号HWorkNo,受理日期HReDate,图纸编号HPicNo,任务下达HWorkTask,项目内容HProjectNote ; 2.仓储流程的测试并完善功能; 分步式调出单-》分布式调入单 直接调拨单 (注意: 源单类型的下拉框 需要 根据数据库 表动态加载, 关联数量 要准确 , 审核 且 未关闭 未行关闭的行 才能下推 ,关联数量超额后,要 反写 关闭 源单 )

---
 WebAPI/DLL/ClsOA_ErrMsgBackBill.cs |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs b/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs
index 6802e1b..397b06f 100644
--- a/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs
+++ b/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs
@@ -10,6 +10,7 @@
         public Models.ClsOA_ErrMsgBackBillMain omodel = new Models.ClsOA_ErrMsgBackBillMain();
         public List<Models.ClsOA_ErrMsgBackBillSub> DetailColl = new List<Models.ClsOA_ErrMsgBackBillSub>();
         public List<Models.ClsOA_ErrMsgBackBillSub2> DetailColl2 = new List<Models.ClsOA_ErrMsgBackBillSub2>();
+        public Models.ClsOA_ErrMsgBackBillSub DetailReply = new Models.ClsOA_ErrMsgBackBillSub();
 
         public ClsOA_ErrMsgBackBill()
         {
@@ -64,7 +65,9 @@
                 ",HDescription='" + omodel.HDescription + "'" +
                 ",HHasten=" + omodel.HHasten.ToString() +
                 ",HQty=" + omodel.HQty.ToString() +
-                
+                ",HRecDeptID=" + omodel.HRecDeptID.ToString() +
+                ",HMaterNumber='" + omodel.HMaterNumber + "'" +
+
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
                 DeleteRelation(ref sReturn, lngBillKey);
@@ -124,7 +127,7 @@
             try
             {
                 //寰楀埌mainid
-                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                //omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 oCn.BeginTran();
                 //涓昏〃
@@ -134,7 +137,7 @@
                 ",HContext,HDeptID,HDescription,HSendMan,HReceiveMan" +
                 ",HCopyMan,HHasten,HLevel,HReTransmitMan,HBillTypeName"+
                 ",HPlanBillNo,HMaterName,HMaterModel,HQty,HSendType"+
-                ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRecDeptID,HMaterNumber" +
+                ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRecDeptID,HMaterNumber,HErrMsgBackTypeID" +
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
@@ -142,7 +145,7 @@
                 ",'" + omodel.HCopyMan + "'," + omodel.HHasten.ToString() + ",'" + omodel.HLevel + "','" + omodel.HReTransmitMan + "','" + omodel.HBillTypeName + "'" +
                 ",'" + omodel.HPlanBillNo + "','" + omodel.HMaterName + "','" + omodel.HMaterModel + "'," + omodel.HQty.ToString() + ",'" + omodel.HSendType + "'" +
                 ",'" + omodel.HMainSourceInterID + "','" + omodel.HMainSourceEntryID + "','" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" +
-                "," + omodel.HRecDeptID + ",'" + omodel.HMaterNumber + "'" +
+                "," + omodel.HRecDeptID + ",'" + omodel.HMaterNumber + "'," + omodel.HErrMsgBackTypeID +
                 ") ");
                 //鎻掑叆瀛愯〃
                 //foreach (Models.ClsOA_ErrMsgBackBillSub oSub in DetailColl)
@@ -193,6 +196,52 @@
             }
         }
 
+        public bool ReplyBill(ref string sReturn)
+        {
+            try
+            {
+               
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCn.BeginTran();
+
+
+                DataSet Ds = oCn.RunProcReturn("select count(HInterID) as num from OA_ErrMsgBackBillSub where HInterID = " + DetailReply.HInterID + " group by HInterID ", "OA_ErrMsgBackBillSub");
+
+                Int64 num = 0;
+
+                if (Ds.Tables[0].Rows.Count == 0)
+                {
+                    num = 1;
+                }
+                else
+                {
+                    num = Convert.ToInt64(Ds.Tables[0].Rows[0]["num"]) + 1;
+                }
+
+                //涓昏〃
+                oCn.RunProc("Insert Into OA_ErrMsgBackBillSub   " +
+                "(HInterID,HEntryID,HRemark,HSendStatus,HSendMan" +
+                ",HDescriptionSub,HDate" +
+                ",HCloseMan,HEntryCloseDate,HCloseType,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+                ") " +
+                " values(" + DetailReply.HInterID + "," + num + ",'" + DetailReply.HRemark + "'," + 1 + ",'" + DetailReply.HSendMan + "'" +
+                ",'" + DetailReply.HDescriptionSub + "','" + DetailReply.HDate + "','" + DetailReply.HCloseMan + "','" + "" + "'" +
+                "," + 0 + "," + DetailReply.HSourceInterID + "," + DetailReply.HSourceEntryID + ",'" + DetailReply.HSourceBillNo + "'" +
+                ",'" + DetailReply.HSourceBillType + "'," + DetailReply.HRelationQty + "," + DetailReply.HRelationMoney +
+                ") ");
+
+                sReturn = omodel.HInterID.ToString();
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
         //鍒犻櫎鍗曟嵁
         public virtual bool DeleteBill(Int64 lngBillKey,string HEntryID, ref string sReturn)
         {

--
Gitblit v1.9.1