From ee9f4215d0750a15031bfb89f0f347dadc8c1b70 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期三, 07 十二月 2022 13:10:46 +0800
Subject: [PATCH] 提交

---
 WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs |   85 ++++++++++++++++++++++++++----------------
 1 files changed, 53 insertions(+), 32 deletions(-)

diff --git a/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs
index 20039dd..f33336d 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs
@@ -24,33 +24,44 @@
         #region 璁惧缁翠慨娲惧伐鍗曟煡璇㈠垪琛�
         [Route("Sb_EquipRepairSendWorkBill/GetEquipRepairSendWorkBillList")]
         [HttpGet]
-        public object GetEquipRepairSendWorkBillList(string sWhere)
+        public object GetEquipRepairSendWorkBillList(string sWhere,string user)
         {
             try
             {
-                string sql = "select * from  h_v_Sb_EquipRepairSendWorkBillList where 1=1 ";
-                if (sWhere == "" || sWhere == null)
-                {
-                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipRepairSendWorkBillList");
-                }
-                else
-                {
-                    ds = oCN.RunProcReturn(sql + sWhere, "h_v_Sb_EquipRepairSendWorkBillList");
-                }
-
-                if (ds.Tables[0].Rows.Count == 0 || ds == null)
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairSendWorkBillList", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犺褰�";
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
+                string sql = "select * from  h_v_Sb_EquipRepairSendWorkBillList where 1=1 ";
+                if (sWhere == "" || sWhere == null)
+                {
+                    ds = oCN.RunProcReturn(sql+ " order by hmainid desc ", "h_v_Sb_EquipRepairSendWorkBillList");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn(sql + sWhere+ " order by hmainid desc ", "h_v_Sb_EquipRepairSendWorkBillList");
+                }
+
+                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+                //{
                 objJsonResult.code = "1";
                 objJsonResult.count = ds.Tables[0].Rows.Count;
-                objJsonResult.Message = "Sucess";
+                objJsonResult.Message = "Sucess锛�";
                 objJsonResult.data = ds.Tables[0];
                 return objJsonResult;
+                //}
+                //else
+                //{
+                //objJsonResult.code = "0";
+                //objJsonResult.count = 0;
+                //objJsonResult.Message = "鏃犳暟鎹�";
+                //objJsonResult.data = null;
+                //return objJsonResult;
+                //}
             }
             catch (Exception e)
             {
@@ -98,8 +109,18 @@
 
             int hentryid = int.Parse(sArray[2].ToString());//瀛愯〃鐨勯『搴廼d
             int OperationType = int.Parse(sArray[3].ToString());//鏁版嵁绫诲瀷 1娣诲姞 3淇敼
+            string msg4 = sArray[4].ToString();
             try
             {
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairSendWorkBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 omodel = Newtonsoft.Json.JsonConvert.DeserializeObject<ClsSb_EquipRepairSendWorkBillMain>(msg2);
                 string BillType = "3909";
 
@@ -207,19 +228,19 @@
         #region 璁惧缁翠慨娲惧伐鍗� 鍒犻櫎
         [Route("Sb_EquipRepairSendWorkBill/DeleteWorkBill")]
         [HttpGet]
-        public object MouldDeleteBill(long HInterID, string User, string ModRightNameDelete)
+        public object MouldDeleteBill(long HInterID, string User)
         {
             try
             {
                 //鍒ゆ柇鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, false, User))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairSendWorkBill_Delete", 1, false, User))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
 
                 if (oBill.omodel.HChecker != "")
@@ -263,19 +284,19 @@
         [HttpGet]
         public object EquipAuditBill(int HInterID, int IsAudit, string CurUserName)
         {
-            //    string ModRightNameCheck = ""; 璇ユā鍧楃殑瀹℃牳鍔熻兘
+            string ModRightNameCheck = "Sb_EquipRepairSendWorkBill_Check"; //璇ユā鍧楃殑瀹℃牳鍔熻兘
             DBUtility.ClsPub.CurUserName = CurUserName;//瀛樺偍鐢ㄦ埛鍚�
             try
             {
                 ////鍒ゆ柇鏄惁鏈夊鏍告潈闄�
-                //    if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 if (HInterID <= 0)
                 {

--
Gitblit v1.9.1