From 0a667f1827405b9190f7dd0c242126c6f62e6448 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 26 二月 2025 10:32:11 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/BaseSet/Gy_SourceController.cs |   44 ++++++++++++++++++++++++++------------------
 1 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_SourceController.cs b/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
index e5bed9c..2ef78c5 100644
--- a/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_SourceController.cs
@@ -38,14 +38,14 @@
             {
                 List<object> columnNameList = new List<object>();
                 //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
-                //if (!DBUtility.ClsPub.Security_Log("Gy_Source_Query", 1, false, user))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log("Gy_Source_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 if (sWhere == null || sWhere.Equals(""))
                 {
@@ -110,15 +110,15 @@
             string msg1 = sArray[0].ToString();
             string msg2 = sArray[1].ToString();
 
-            ////鏌ョ湅鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Gy_Source_Edit", 1, false, msg2))
-            //{
-            //    objJsonResult.code = "0";
-            //    objJsonResult.count = 0;
-            //    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
-            //    objJsonResult.data = null;
-            //    return objJsonResult;
-            //}
+            //鏌ョ湅鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log("Gy_Source_Edit", 1, false, msg2))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
 
             Int64 HItemID = 0;
             SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -676,7 +676,7 @@
         {
             try
             {
-                string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source"+ sWhere + " order by hnumber");
+                string sql1 = string.Format("select hitemid,hnumber,hname,HUSEORGID from Gy_Source" + sWhere + " order by hnumber");
 
                 ds = oCN.RunProcReturn(sql1, "Gy_Source");
 
@@ -784,6 +784,14 @@
                     objJsonResult.data = null;
                     return objJsonResult; ;
                 }
+                else if (ds.Tables[0].Rows[0]["HCheckEmp"] != null && ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "宸茬粡瀹℃牳涓嶈兘鍒犻櫎锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult; ;
+                }
 
                 oCN.RunProc("delete from  Gy_Source  where HItemID=" + HItemID);
 

--
Gitblit v1.9.1