From a09ff1d01aeebae9037118035f10e06c570b092e Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期三, 19 一月 2022 08:46:34 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs |  106 ++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 72 insertions(+), 34 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index c452787..9c96100 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -1423,7 +1423,7 @@
         public object DeltetMouldRepairWorkBill(string HInterID)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
+            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
             //{
             //    objJsonResult.code = "0";
             //    objJsonResult.count = 0;
@@ -1510,7 +1510,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;
@@ -1842,7 +1842,7 @@
         public object DeltetMouldRepairCheckBill(string HInterID)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sc_MouldRepairCheckBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
+            //if (!DBUtility.ClsPub.Security_Log("Sc_MouldRepairCheckBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
             //{
             //    objJsonResult.code = "0";
             //    objJsonResult.count = 0;
@@ -2123,7 +2123,7 @@
         public object DeltetMouldConkBookBill(string HInterID)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
+            //if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
             //{
             //    objJsonResult.code = "0";
             //    objJsonResult.count = 0;
@@ -2394,7 +2394,7 @@
         public object DeltetMouldMaintainPlanBill(string HInterID)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
+            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
             //{
             //    objJsonResult.code = "0";
             //    objJsonResult.count = 0;
@@ -2995,7 +2995,7 @@
         public object DeltetSc_MouldDotCheckBill(string HInterID)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
+            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
             //{
             //    objJsonResult.code = "0";
             //    objJsonResult.count = 0;
@@ -3268,7 +3268,7 @@
         public object DeltetSc_MouldDotCheckPlanBillBill(string HInterID)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
+            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
             //{
             //    objJsonResult.code = "0";
             //    objJsonResult.count = 0;
@@ -3442,7 +3442,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 +3764,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;
@@ -3795,11 +3795,11 @@
             string sql1 = string.Format(@"select * from h_v_Sc_MouldScrapOutHouseBillList where 搴撳瓨缁勭粐='" + Organization + "'");
             if (sWhere == null || sWhere.Equals(""))
             {
-                return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldScrapOutHouseBillList");
+                return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鍒跺崟鏃ユ湡 desc", "h_v_Sc_MouldScrapOutHouseBillList");
             }
             else
             {
-                string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
+                string sql = sql1 + sWhere + "order by 鍒跺崟鏃ユ湡 desc";
                 return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldScrapOutHouseBillList");
             }
         }
@@ -3899,7 +3899,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 +4034,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 +4121,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 +4250,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 +4339,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;
@@ -4370,11 +4370,11 @@
             string sql1 = string.Format(@"select * from h_v_Sc_MouldProdBackBillList where 搴撳瓨缁勭粐='" + Organization + "'");
             if (sWhere == null || sWhere.Equals(""))
             {
-                return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldProdBackBillList");
+                return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鍒跺崟鏃ユ湡 desc", "h_v_Sc_MouldProdBackBillList");
             }
             else
             {
-                string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
+                string sql = sql1 + sWhere + "order by 鍒跺崟鏃ユ湡 desc";
                 return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList");
             }
 
@@ -4414,7 +4414,7 @@
                 {
                     ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,妯″叿浠g爜 HMaterCode,妯″叿鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,鎵规 HBatchNo,
                                                 璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty, 
-                                                鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID, 
+                                                鍗曚环 HPrice, 閲戦 HMoney,鏀舵枡浠撳簱ID HWHID, 鏀舵枡浠撳簱浠g爜 HWHCode, 鏀舵枡浠撳簱 HWHName,HSPID, 
                                                 浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldProdBackBillList"), "h_v_Sc_MouldProdBackBillList");
 
                 }
@@ -4424,7 +4424,7 @@
                     //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark  from Sc_MouldRepairCheckBillSub where 1 = 1 ";
                     string sql1 = string.Format(@"SELECT HMaterID,妯″叿浠g爜 HMaterCode,妯″叿鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,鎵规 HBatchNo,
                                                 璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty, 
-                                                鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID, 
+                                                鍗曚环 HPrice, 閲戦 HMoney,鏀舵枡浠撳簱ID HWHID, 鏀舵枡浠撳簱浠g爜 HWHCode, 鏀舵枡浠撳簱 HWHName,HSPID, 
                                                 浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldProdBackBillList where 1 = 1 ");
                     string sql = sql1 + sqlWhere;
                     ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList");
@@ -4432,8 +4432,8 @@
                 }
                 //鏌ユ眹鎬�
                 ds1 = oCN.RunProcReturn(string.Format(@"select  鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
-                                            HWHSonID,max(鍙戞枡浠撳簱浠g爜)鍙戞枡浠撳簱浠g爜,max(鍙戞枡浠撳簱)鍙戞枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldProdBackBillList 
-                                            where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,HWHSonID,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldProdBackBillList");
+                                            鏀舵枡浠撳簱ID,max(鏀舵枡浠撳簱浠g爜)鏀舵枡浠撳簱浠g爜,max(鏀舵枡浠撳簱)鏀舵枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldProdBackBillList 
+                                            where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,鏀舵枡浠撳簱ID,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldProdBackBillList");
 
                 list.Add(ds.Tables[0]);
                 list.Add(ds1.Tables[0]);
@@ -4474,7 +4474,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 +4612,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 +4689,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 +4777,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;
@@ -4808,11 +4808,11 @@
             string sql1 = string.Format(@"select * from h_v_Sc_MouldProdOutHouseBillList where 搴撳瓨缁勭粐='" + Organization + "'");
             if (sWhere == null || sWhere.Equals(""))
             {
-                return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldProdOutHouseBillList");
+                return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鍒跺崟鏃ユ湡 desc", "h_v_Sc_MouldProdOutHouseBillList");
             }
             else
             {
-                string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
+                string sql = sql1 + sWhere + "order by 鍒跺崟鏃ユ湡 desc";
                 return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdOutHouseBillList");
             }
 
@@ -4912,7 +4912,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 +5037,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 +5085,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 +5159,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;
@@ -5459,7 +5497,7 @@
         public object DeltetMouldLifeChangeBill(string HInterID)
         {
             //缂栬緫鏉冮檺
-            //if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
+            //if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
             //{
             //    objJsonResult.code = "0";
             //    objJsonResult.count = 0;

--
Gitblit v1.9.1