From 4d6176db486fad5f3ab162a8075ba7d4ee95c25b Mon Sep 17 00:00:00 2001 From: zzr99 <1940172413@qq.com> Date: 星期三, 06 七月 2022 15:50:52 +0800 Subject: [PATCH] 修改直接调拨、销售出库、其他出库、其他入库上传保存成功返回提示+其他入库改成动态加载列 --- WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs | 70 ++++++++++++++++++++++------------- 1 files changed, 44 insertions(+), 26 deletions(-) diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs index 494ec2a..e394350 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs @@ -25,10 +25,18 @@ /// <returns></returns> [Route("Sb_EquipMaintainBill/GetEquipMaintainBillList")] [HttpGet] - public object GetEquipMaintainBillList(string sWhere) + public object GetEquipMaintainBillList(string sWhere,string user) { try { + if (!DBUtility.ClsPub.Security_Log("Sb_EquipMaintainBillList", 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_Sc_EquipMaintain " + sWhere + " order by hmainid desc", "h_v_Sc_EquipMaintain"); @@ -39,22 +47,23 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipMaintain"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ + objJsonResult.code = "1"; + objJsonResult.count = 1; + 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 ex) { @@ -91,11 +100,20 @@ 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("Sb_EquipMaintainBill_Edit", 1, false, msg5)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } DAL.ClsSb_EquipMaintainBill oBill = new DAL.ClsSb_EquipMaintainBill(); List<Model.ClsSb_EquipMaintainBillMain> lsmain = new List<Model.ClsSb_EquipMaintainBillMain>(); msg2 = msg2.Replace("\\", ""); @@ -240,17 +258,17 @@ /// <returns></returns> [Route("Sb_EquipMaintainBill/DeltetEquipMaintainBillList")] [HttpGet] - public object DeltetEquipMaintainBillList(string HInterID) + public object DeltetEquipMaintainBillList(string HInterID,string user) { //缂栬緫鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName)) - //{ - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; - // objJsonResult.data = null; - // return objJsonResult; - //} + if (!DBUtility.ClsPub.Security_Log("Sb_EquipMaintainBill_Delete", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } Int64 lngBillKey = 0; -- Gitblit v1.9.1