From c3b14901031d985ef750027d4952264369a1d7b0 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 02 三月 2026 10:26:21 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs |  108 +++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 83 insertions(+), 25 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs
index fe44422..839a384 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs
@@ -19,13 +19,23 @@
         public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill();
         DataSet ds;
 
-        #region 宸ュ簭娲惧伐鍗曞垪琛�
+        #region 宸ュ簭娴佽浆鍗℃淳宸ュ崟鍒楄〃
         [Route("Sc_ProcExchSendWorkBill/Sc_ProcExchSendWorkBillList")]
         [HttpGet]
         public object Sc_ProcExchSendWorkBillList(string sWhere, string user)
         {
             try
             {
+                //鍒ゆ柇鏄惁鏈夋潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchSendWorkBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 List<object> columnNameList = new List<object>();               
 
                 string sql1 = "select * from h_v_Sc_ProcExchSendWorkBillList where 1 = 1  ";
@@ -59,7 +69,47 @@
         }
         #endregion
 
-        #region 宸ュ簭娲惧伐鍗曞垪琛�(鑱屽憳鏌ョ湅鑷繁浠诲姟)
+        #region 宸ュ簭娴佽浆鍗℃淳宸ュ崟缂栬緫鍥炴樉
+        [Route("Sc_ProcExchSendWorkBill/Sc_ProcExchSendWorkBillEdit")]
+        [HttpGet]
+        public object Sc_ProcExchSendWorkBillEdit(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                string sql1 = "select * from h_v_Sc_ProcExchSendWorkBillEdit where 1 = 1  ";
+                string sql = sql1 + sWhere + " order by hmainid desc";
+                ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcExchSendWorkBillEdit");
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.list = columnNameList;
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 宸ュ簭娴佽浆鍗℃淳宸ュ崟鍒楄〃(鑱屽憳鏌ョ湅鑷繁浠诲姟)
         [Route("Sc_ProcExchSendWorkBill/Sc_ProcExchSendWorkBillListByEmp")]
         [HttpGet]
         public object Sc_ProcExchSendWorkBillListByEmp(string sWhere, string user,int HEmpID)
@@ -98,23 +148,14 @@
         }
         #endregion
 
-        #region 宸ュ簭娲惧伐 鍒犻櫎锛堝瓙琛級鐢ㄤ簬鍙栨秷娲惧崟
+        #region 宸ュ簭娴佽浆鍗℃淳宸� 鍒犻櫎锛堝瓙琛級鐢ㄤ簬鍙栨秷娲惧崟
         [Route("Sc_ProcExchSendWorkBill/DelProcessSendWork_Sec")]
         [HttpGet]
         public object DelProcessSendWork_Sec(string HInterID, string HEntryID, string User)
         {
             try
             {
-                //鍒犻櫎鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log_second("Cg_PODemandPlanConfigBill_Drop", 1, false, User))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鏃犳潈闄愬垹闄わ紒";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
-
+    
                 ds = oCN.RunProcReturn("select a.* from Sc_ProcExchSendWorkBillMain a left join Sc_ProcExchSendWorkBillSub b on b.HInterID= a.HInterID where 1=1 and a.HInterID=" + HInterID, "Sc_ProcExchSendWorkBillMain");
 
                 if (ds.Tables[0].Rows.Count > 0)
@@ -279,9 +320,9 @@
         }
         #endregion
 
-        #region 宸ュ簭娲惧伐鍗� 淇濆瓨/缂栬緫
+        #region 宸ュ簭娴佽浆鍗℃淳宸ュ崟 淇濆瓨/缂栬緫
         /// <summary>
-        /// 宸ュ簭娲惧伐鍗� 淇濆瓨
+        /// 宸ュ簭娴佽浆鍗℃淳宸ュ崟 淇濆瓨
         /// </summary>
         /// <param name="msg"></param>
         /// <returns></returns>
@@ -295,7 +336,17 @@
             string msg2 = sArray[0].ToString();
             string msg3 = sArray[1].ToString();
             string msg4 = sArray[2].ToString();
+            string msg5 = sArray[3].ToString();
 
+            //鍒ゆ柇鏄惁鏈夋潈闄�
+            if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchSendWorkBill_Edit", 1, false, msg5))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犳潈闄愪繚瀛�!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
 
             string UserName = "";
             ListModels oListModels = new ListModels();
@@ -344,10 +395,6 @@
                     oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                     oItemSub.HCloseType = false;   //鍏抽棴绫诲瀷
                     //oItemSub.HRemark = "";         //澶囨敞
-                    oItemSub.HSourceInterID = oItemSub.HSourceInterID;     // 婧愬崟涓诲唴鐮�
-                    oItemSub.HSourceEntryID = oItemSub.HSourceEntryID;   //婧愬崟瀛愬唴鐮�
-                    oItemSub.HSourceBillNo = oItemSub.HSourceBillNo;  //婧愬崟鍗曞彿
-                    oItemSub.HSourceBillType = oItemSub.HSourceBillType; //婧愬崟绫诲瀷
                     oItemSub.HRelationQty = 0;     //鍏宠仈鏁伴噺
             
                     oBill.DetailColl.Add(oItemSub);
@@ -393,13 +440,24 @@
         }
         #endregion
 
-        #region 宸ュ簭娲惧伐鍗� 鍒犻櫎
+        #region 宸ュ簭娴佽浆鍗℃淳宸ュ崟 鍒犻櫎
         [Route("Sc_ProcExchSendWorkBill/DelProcessSendWork")]
         [HttpGet]
         public object DelProcessSendWork(string HInterID, string user)
         {
             Int64 lngBillKey = 0;
             lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+
+            //鍒ゆ柇鏄惁鏈夋潈闄�
+            if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchSendWorkBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犳潈闄愬垹闄�!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
             if (lngBillKey == 0)
             {
                 objJsonResult.code = "0";
@@ -483,15 +541,15 @@
         }
         #endregion
 
-        #region 宸ュ簭娲惧伐鍗曞鏍�/鍙嶅鏍稿姛鑳�
+        #region 宸ュ簭娴佽浆鍗℃淳宸ュ崟瀹℃牳/鍙嶅鏍稿姛鑳�
         [Route("Sc_ProcExchSendWorkBill/CheckSc_ProcExchSendWorkBill")]
         [HttpGet]
         public object CheckSc_ProcExchSendWorkBill(string HInterID, int Type, string user)
         {
             try
             {
-                //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
-                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessSendWork_Check", 1, false, user))
+                //鍒ゆ柇鏄惁鏈夋潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchSendWorkBill_Check", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -648,7 +706,7 @@
         }
         #endregion
 
-        #region 宸ュ簭娲惧伐鍗曞叧闂�/鍙嶅叧闂姛鑳�
+        #region 宸ュ簭娴佽浆鍗℃淳宸ュ崟鍏抽棴/鍙嶅叧闂姛鑳�
         [Route("Sc_ProcExchSendWorkBill/CloseSc_ProcExchSendWorkBill")]
         [HttpGet]
         public object CloseSc_ProcExchSendWorkBill(string HInterID, int Type, string user)
@@ -656,7 +714,7 @@
             try
             {
                 //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
-                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessSendWork_Close", 1, false, user))
+                if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchSendWorkBill_Close", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;

--
Gitblit v1.9.1