From 0e86ae3692dc5e5c1dca33615d76660b589a8fd5 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期四, 10 三月 2022 15:04:59 +0800
Subject: [PATCH] 快速生成条码模块

---
 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs |  448 +++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 346 insertions(+), 102 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 87f6567..d2ee9e2 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -183,10 +183,18 @@
         /// <returns></returns>
         [Route("Sc_MouldMaintainBill/GetMouldMaintainBillList")]
         [HttpGet]
-        public object GetMouldMaintainBillList(string sWhere)
+        public object GetMouldMaintainBillList(string sWhere,string user)
         {
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 ds = Sc_MouldMaintainBillList_s(sWhere);
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -244,10 +252,18 @@
         /// <returns></returns>
         [Route("Sc_MouldDotCheckPlanBill/GetMouldDotCheckPlanBillList")]
         [HttpGet]
-        public object GetMouldDotCheckPlanBillList(string sWhere)
+        public object GetMouldDotCheckPlanBillList(string sWhere,string user)
         {
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckPlanBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 ds = Sc_MouldDotCheckPlanBillList_s(sWhere);
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -292,11 +308,18 @@
         /// <returns></returns>
         [Route("Sc_MouldDotCheckBill/GetMouldDotCheckBillList")]
         [HttpGet]
-        public object GetMouldDotCheckBillList(string sWhere)
+        public object GetMouldDotCheckBillList(string sWhere,string user)
         {
             try
             {
-
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 ds = Sc_MouldDotCheckBillList_s(sWhere);
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
                 {
@@ -390,10 +413,18 @@
         /// <returns></returns>
         [Route("Sc_MouldMaintainPlanBill/GetMouldMaintainPlanBillList")]
         [HttpGet]
-        public object GetMouldMaintainPlanBillList(string sWhere)
+        public object GetMouldMaintainPlanBillList(string sWhere,string user)
         {
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 ds = Sc_MouldMaintainPlanBillList_s(sWhere);
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -439,10 +470,18 @@
         /// <returns></returns>
         [Route("Sc_MouldConkBookBill/GetMouldConkBookBillList")]
         [HttpGet]
-        public object GetMouldConkBookBillList(string sWhere)
+        public object GetMouldConkBookBillList(string sWhere,string user)
         {
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 ds = Sc_MouldConkBookBillList_s(sWhere);
                 objJsonResult.code = "1";
@@ -489,10 +528,19 @@
         /// <returns></returns>
         [Route("Sc_MouldRepairCheckBill/GetMouldRepairCheckBillList")]
         [HttpGet]
-        public object GetMouldRepairCheckBillList(string sWhere)
+        public object GetMouldRepairCheckBillList(string sWhere,string user)
         {
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairCheckBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 ds = Sc_MouldRepairCheckBillList_s(sWhere);
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
@@ -595,10 +643,18 @@
         /// <returns></returns>
         [Route("Sb_MouldRepairWorkBill/GetMouldRepairWorkBillList")]
         [HttpGet]
-        public object GetMouldRepairWorkBillList(string sWhere)
+        public object GetMouldRepairWorkBillList(string sWhere,string user)
         {
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 ds = Sc_MouldRepairWorkBillList_s(sWhere);
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -751,10 +807,20 @@
         /// <returns></returns>
         [Route("Kf_MoveStockBill/GetMoveStockBillList")]
         [HttpGet]
-        public object GetMoveStockBillList(string sWhere)
+        public object GetMoveStockBillList(string sWhere,string user)
         {
             try
             {
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Kf_MoveStockBillQuery", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 if (sWhere == null || sWhere.Equals(""))
                 {
                     ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockBillList order by 鏃ユ湡 desc", "h_v_IF_MoveStockBillList");
@@ -797,10 +863,19 @@
         /// <returns></returns>
         [Route("Kf_SellOutBill/GetSellOutBillList")]
         [HttpGet]
-        public object GetSellOutBillList(string sWhere)
+        public object GetSellOutBillList(string sWhere,string user)
         {
             try
             {
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Kf_SellOutBillQuery", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏌ヨ鏉冮檺!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 ds = Sc_GetSellOutBillList(sWhere);
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -875,10 +950,20 @@
         /// <returns></returns>
         [Route("Kf_OtherOutBill/GetOtherOutBillList")]
         [HttpGet]
-        public object GetOtherOutBillList(string sWhere)
+        public object GetOtherOutBillList(string sWhere,string user)
         {
             try
             {
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Kf_OtherOutBillQuery", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 if (sWhere == null || sWhere.Equals(""))
                 {
                     ds = oCN.RunProcReturn("select * from h_v_Kf_OtherOutBillList where 1=1 order by 鏃ユ湡 desc", "h_v_Kf_OtherOutBillList");
@@ -1022,10 +1107,20 @@
         /// <returns></returns>
         [Route("Kf_ProductInBill/GetProductInBill")]
         [HttpGet]
-        public object GetProductInBill(string sWhere)
+        public object GetProductInBill(string sWhere,string user)
         {
             try
             {
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Kf_ProductInBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
 
                 if (sWhere == null || sWhere.Equals(""))
                 {
@@ -1102,10 +1197,19 @@
         /// <returns></returns>
         [Route("Kf_OtherInBill/GetOtherInBill")]
         [HttpGet]
-        public object GetOtherInBill(string sWhere)
+        public object GetOtherInBill(string sWhere,string user)
         {
             try
             {
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Kf_OtherInBillQuery", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 if (sWhere == null || sWhere.Equals(""))
                 {
@@ -1149,10 +1253,19 @@
         /// <returns></returns>
         [Route("Kf_EntrustInBill/GetEntrustInBill")]
         [HttpGet]
-        public object GetEntrustInBill(string sWhere)
+        public object GetEntrustInBill(string sWhere,string user)
         {
             try
             {
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Kf_EntrustInBillQuery", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 if (sWhere == null || sWhere.Equals(""))
                 {
                     ds = oCN.RunProcReturn("select * from h_v_Kf_EntrustInBillList where 1=1", "h_v_Kf_EntrustInBillList");
@@ -1235,12 +1348,22 @@
             string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
             string msg2 = sArray[0].ToString();
             string msg3 = sArray[1].ToString();
+            string msg4 = sArray[2].ToString();
 
 
             string UserName = "";
             ListModels oListModels = new ListModels();
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 DAL.ClsSb_MouldRepairWorkBill oBill = new DAL.ClsSb_MouldRepairWorkBill();
                 List<Model.ClsSb_MouldRepairWorkBillMain> lsmain = new List<Model.ClsSb_MouldRepairWorkBillMain>();
                 msg2 = msg2.Replace("\\", "");
@@ -1420,17 +1543,17 @@
         /// <returns></returns>
         [Route("Sb_MouldRepairWorkBill/DeltetMouldRepairWorkBill")]
         [HttpGet]
-        public object DeltetMouldRepairWorkBill(string HInterID)
+        public object DeltetMouldRepairWorkBill(string HInterID,string user)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
-            //{
-            //    objJsonResult.code = "0";
-            //    objJsonResult.count = 0;
-            //    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
-            //    objJsonResult.data = null;
-            //    return objJsonResult;
-            //}
+            if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
 
 
             Int64 lngBillKey = 0;
@@ -1510,7 +1633,7 @@
             try
             {
                 //瀹℃牳鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -1656,6 +1779,15 @@
             ListModels oListModels = new ListModels();
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairCheckBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 DLL.ClsSc_MouldRepairCheckBill oBill = new DLL.ClsSc_MouldRepairCheckBill();
                 List<Model.ClsSc_MouldRepairCheckBillMain> lsmain = new List<Model.ClsSc_MouldRepairCheckBillMain>();
                 msg2 = msg2.Replace("\\", "");
@@ -1839,17 +1971,17 @@
         /// <returns></returns>
         [Route("Sc_MouldRepairCheckBill/DeltetMouldRepairCheckBill")]
         [HttpGet]
-        public object DeltetMouldRepairCheckBill(string HInterID)
+        public object DeltetMouldRepairCheckBill(string HInterID,string user)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sc_MouldRepairCheckBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
-            //{
-            //    objJsonResult.code = "0";
-            //    objJsonResult.count = 0;
-            //    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
-            //    objJsonResult.data = null;
-            //    return objJsonResult;
-            //}
+            if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairCheckBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
 
 
             Int64 lngBillKey = 0;
@@ -1917,7 +2049,7 @@
 
         #region 妯″叿鏁呴殰鐧昏琛ㄤ繚瀛�/缂栬緫
         /// <summary>
-        /// 淇濆瓨妯″叿缁翠慨鍗�
+        /// 淇濆瓨鏁呴殰鐧昏琛�
         /// </summary>
         /// <param name="msg"></param>
         /// <returns></returns>
@@ -1930,12 +2062,20 @@
             string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
             string msg2 = sArray[0].ToString();
             string msg3 = sArray[1].ToString();
-
+            string msg4 = sArray[2].ToString();
 
             string UserName = "";
             ListModels oListModels = new ListModels();
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 DAL.ClsSc_MouldConkBookBill oBill = new DAL.ClsSc_MouldConkBookBill();
                 List<Model.ClsSc_MouldConkBookBillMain> lsmain = new List<Model.ClsSc_MouldConkBookBillMain>();
                 msg2 = msg2.Replace("\\", "");
@@ -2115,22 +2255,22 @@
 
         #region [妯″叿鏁呴殰鐧昏琛ㄥ垹闄ゅ姛鑳絔
         /// <summary>
-        /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
+        /// 妯″叿鏁呴殰鐧昏琛ㄥ垹闄ゅ姛鑳�
         /// </summary>
         /// <returns></returns>
         [Route("Sc_MouldConkBookBill/DeltetMouldConkBookBill")]
         [HttpGet]
-        public object DeltetMouldConkBookBill(string HInterID)
+        public object DeltetMouldConkBookBill(string HInterID,string user)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
-            //{
-            //    objJsonResult.code = "0";
-            //    objJsonResult.count = 0;
-            //    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
-            //    objJsonResult.data = null;
-            //    return objJsonResult;
-            //}
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
 
 
             Int64 lngBillKey = 0;
@@ -2212,12 +2352,22 @@
             string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
             string msg2 = sArray[0].ToString();
             string msg3 = sArray[1].ToString();
+            string msg4 = sArray[2].ToString();
 
 
             string UserName = "";
             ListModels oListModels = new ListModels();
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 DAL.ClsSc_MouldMaintainPlanBill oBill = new DAL.ClsSc_MouldMaintainPlanBill();
                 List<Model.ClsSc_MouldMaintainPlanBillMain> lsmain = new List<Model.ClsSc_MouldMaintainPlanBillMain>();
                 msg2 = msg2.Replace("\\", "");
@@ -2391,17 +2541,17 @@
         /// <returns></returns>
         [Route("Sc_MouldMaintainPlanBill/DeltetMouldMaintainPlanBill")]
         [HttpGet]
-        public object DeltetMouldMaintainPlanBill(string HInterID)
+        public object DeltetMouldMaintainPlanBill(string HInterID,string user)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
-            //{
-            //    objJsonResult.code = "0";
-            //    objJsonResult.count = 0;
-            //    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
-            //    objJsonResult.data = null;
-            //    return objJsonResult;
-            //}
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
 
 
             Int64 lngBillKey = 0;
@@ -2484,11 +2634,21 @@
             string msg2 = sArray[0].ToString();
             string msg3 = sArray[1].ToString();
             string msg4 = sArray[2].ToString();
+            string msg5 = sArray[3].ToString();
 
             string UserName = "";
             ListModels oListModels = new ListModels();
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBill_Edit", 1, false, msg5))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 DAL.ClsSc_MouldMaintainBill oBill = new DAL.ClsSc_MouldMaintainBill();
                 List<Model.ClsSc_MouldMaintainBillMain> lsmain = new List<Model.ClsSc_MouldMaintainBillMain>();
                 msg2 = msg2.Replace("\\", "");
@@ -2732,8 +2892,17 @@
         /// <returns></returns>
         [Route("Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill")]
         [HttpGet]
-        public object DeltetSc_MouldMaintainBill(string HInterID)
+        public object DeltetSc_MouldMaintainBill(string HInterID,string user)
         {
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
             Int64 lngBillKey = 0;
             lngBillKey = DBUtility.ClsPub.isLong(HInterID);
             if (lngBillKey == 0)
@@ -2813,12 +2982,21 @@
             string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
             string msg2 = sArray[0].ToString();
             string msg3 = sArray[1].ToString();
-
+            string msg4 = sArray[2].ToString();
 
             string UserName = "";
             ListModels oListModels = new ListModels();
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 DAL.ClsSc_MouldDotCheckBill oBill = new DAL.ClsSc_MouldDotCheckBill();
                 List<Model.ClsSc_MouldDotCheckBillMain> lsmain = new List<Model.ClsSc_MouldDotCheckBillMain>();
                 msg2 = msg2.Replace("\\", "");
@@ -2987,22 +3165,22 @@
 
         #region [妯″叿鐐规璁板綍琛ㄥ垹闄ゅ姛鑳絔
         /// <summary>
-        /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
+        /// 妯″叿鐐规璁板綍鍒犻櫎鍔熻兘
         /// </summary>
         /// <returns></returns>
         [Route("Sc_MouldDotCheckBill/DeltetSc_MouldDotCheckBill")]
         [HttpGet]
-        public object DeltetSc_MouldDotCheckBill(string HInterID)
+        public object DeltetSc_MouldDotCheckBill(string HInterID,string user)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
-            //{
-            //    objJsonResult.code = "0";
-            //    objJsonResult.count = 0;
-            //    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
-            //    objJsonResult.data = null;
-            //    return objJsonResult;
-            //}
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
 
 
             Int64 lngBillKey = 0;
@@ -3085,12 +3263,22 @@
             string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
             string msg2 = sArray[0].ToString();
             string msg3 = sArray[1].ToString();
+            string msg4 = sArray[2].ToString();
 
 
             string UserName = "";
             ListModels oListModels = new ListModels();
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckPlanBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 DAL.ClsSc_MouldDotCheckPlanBill oBill = new DAL.ClsSc_MouldDotCheckPlanBill();
                 List<Model.ClsSc_MouldDotCheckPlanBillMain> lsmain = new List<Model.ClsSc_MouldDotCheckPlanBillMain>();
                 msg2 = msg2.Replace("\\", "");
@@ -3265,17 +3453,17 @@
         /// <returns></returns>
         [Route("Sc_MouldDotCheckPlanBill/DeltetSc_MouldDotCheckPlanBillBill")]
         [HttpGet]
-        public object DeltetSc_MouldDotCheckPlanBillBill(string HInterID)
+        public object DeltetSc_MouldDotCheckPlanBillBill(string HInterID,string user)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
-            //{
-            //    objJsonResult.code = "0";
-            //    objJsonResult.count = 0;
-            //    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
-            //    objJsonResult.data = null;
-            //    return objJsonResult;
-            //}
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckPlanBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
 
 
             Int64 lngBillKey = 0;
@@ -3426,7 +3614,7 @@
         /// <returns></returns>
         [Route("Sc_MouldScrapInHouseBill/SaveGetMouldScrapInHouseBillList")]
         [HttpPost]
-        public object fSaveGetMouldScrapInHouseBillList([FromBody] JObject msg)
+        public object SaveGetMouldScrapInHouseBillList([FromBody] JObject msg)
         {
             var _value = msg["msg"].ToString();
             string msg1 = _value.ToString();
@@ -3442,7 +3630,7 @@
             try
             {
                 //缂栬緫鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapRequestBill_Edit", 1, true, msg4))
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapRequestBill_Edit", 1, false, msg4))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -3764,7 +3952,7 @@
             try
             {
                 //缂栬緫鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBillList", 1, true, user))
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBillList", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -3899,7 +4087,7 @@
             try
             {
                 //缂栬緫鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Edit", 1, true, msg4))
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Edit", 1, false, msg4))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -4034,7 +4222,7 @@
         public object DeltetMouldScrapOutHouseBill(string HInterID, string user)
         {
             //缂栬緫鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Delete", 1, true, user))
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Delete", 1, false, user))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
@@ -4121,7 +4309,7 @@
         //    try
         //    {
         //        //瀹℃牳鏉冮檺
-        //        if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
+        //        if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
         //        {
         //            objJsonResult.code = "0";
         //            objJsonResult.count = 0;
@@ -4250,7 +4438,7 @@
         {
             //flag=1 瀹℃牳锛�  flag=2 鍙嶅鏍�
             //缂栬緫鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapOutBill_Check", 1, true, user))
+            if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapOutBill_Check", 1, false, user))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
@@ -4339,7 +4527,7 @@
         {
             try
             {
-                if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBillList", 1, true, user))
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBillList", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -4474,7 +4662,7 @@
             ListModels oListModels = new ListModels();
             try
             {
-                if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Edit", 1, true, msg4))
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Edit", 1, false, msg4))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -4612,7 +4800,7 @@
         public object DeltetMouldProdBackBill(string HInterID, string user)
         {
             //缂栬緫鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Delete", 1, true, user))
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Delete", 1, false, user))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
@@ -4689,7 +4877,7 @@
         {
             //flag=1 瀹℃牳锛�  flag=2 鍙嶅鏍�
             //缂栬緫鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdBackBill_Check", 1, true, user))
+            if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdBackBill_Check", 1, false, user))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
@@ -4777,7 +4965,7 @@
         {
             try
             {
-                if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBillList", 1, true, user))
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBillList", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -4912,7 +5100,8 @@
             ListModels oListModels = new ListModels();
             try
             {
-                if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Edit", 1, true, msg4))
+                //妯″潡鍚嶏紝鍐欏叆鏃ュ織锛屾姤閿欐锛岀敤鎴峰悕
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Edit", 1, false, msg4))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -5036,6 +5225,44 @@
         }
         #endregion
 
+        //鍒ゆ柇鐢ㄦ埛鏉冮檺
+        #region
+        [Route("Sc_MouldProdOutBill/QueryUserRight")]
+        [HttpPost]
+        public object QueryUserRight(string UserName)
+        {   
+            try
+            {
+                //妯″潡鍚嶏紝鍐欏叆鏃ュ織锛屾姤閿欐锛岀敤鎴峰悕
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Edit", 1, false, UserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏌ヨ鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鏈夋潈闄�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch(Exception e1)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁鏌ヨ鏉冮檺锛�" + e1.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
         #region [妯″叿澶勭悊棰嗙敤鍗曞垹闄ゅ姛鑳絔
         /// <summary>
         /// 妯″叿澶勭悊棰嗙敤鍗曞垹闄ゅ姛鑳�
@@ -5046,7 +5273,7 @@
         public object DeltetMouldProdOutBill(string HInterID, string user)
         {
             //鍒犻櫎鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Delete", 1, true, user))
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Delete", 1, false, user))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
@@ -5120,10 +5347,9 @@
         [Route("Sc_MouldProdOutBill/AuditMouldProdOutBill")]
         [HttpGet]
         public object AuditMouldProdOutBill(string HInterID, string user, int flag)
-        {
-            //flag=1 瀹℃牳锛�  flag=2 鍙嶅鏍�
+        { 
             //缂栬緫鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdOutBill_Check", 1, true, user))
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Check", 1, false, user))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
@@ -5207,10 +5433,18 @@
 
         [Route("Sc_MouldLifeChangeBill/GetMouldLifeChangeBill")]
         [HttpGet]
-        public object GetMouldLifeChangeBill(string sWhere)
+        public object GetMouldLifeChangeBill(string sWhere,string user)
         {
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 ds = Sc_GetMouldLifeChangeBill(sWhere);
                 objJsonResult.code = "1";
@@ -5329,12 +5563,22 @@
             string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
             string msg2 = sArray[0].ToString();
             string msg3 = sArray[1].ToString();
+            string msg4 = sArray[2].ToString();
 
 
             string UserName = "";
             ListModels oListModels = new ListModels();
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 DLL.ClsSc_MouldLifeChangeBill oBill = new DLL.ClsSc_MouldLifeChangeBill();
                 List<Model.ClsSc_MouldLifeChangeBillMain> lsmain = new List<Model.ClsSc_MouldLifeChangeBillMain>();
                 msg2 = msg2.Replace("\\", "");
@@ -5456,17 +5700,17 @@
         /// <returns></returns>
         [Route("Sc_MouldLifeChangeBill/DeltetMouldLifeChangeBill")]
         [HttpGet]
-        public object DeltetMouldLifeChangeBill(string HInterID)
+        public object DeltetMouldLifeChangeBill(string HInterID,string user)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
-            //{
-            //    objJsonResult.code = "0";
-            //    objJsonResult.count = 0;
-            //    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
-            //    objJsonResult.data = null;
-            //    return objJsonResult;
-            //}
+            if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
 
 
             Int64 lngBillKey = 0;

--
Gitblit v1.9.1