From 9167264eeb081fdbb94d8a1d2f76f35a6ccdd5fe Mon Sep 17 00:00:00 2001 From: 王 垚 <1402714037@qq.com> Date: 星期三, 06 四月 2022 11:02:33 +0800 Subject: [PATCH] nothing --- WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 846 +++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 566 insertions(+), 280 deletions(-) diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs index 738a9a5..a90c3b5 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Data; using System.Web.Http; +using ViewAPI; using WebAPI.Models; namespace WebAPI.Controllers { @@ -183,28 +184,37 @@ /// <returns></returns> [Route("Sc_MouldMaintainBill/GetMouldMaintainBillList")] [HttpGet] - public object GetMouldMaintainBillList(string sWhere) + public object GetMouldMaintainBillList(string sWhere,string user) { try { - - ds = Sc_MouldMaintainBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) + if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBillList", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; objJsonResult.data = null; return objJsonResult; } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + ds = Sc_MouldMaintainBillList_s(sWhere); + + //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) { @@ -223,12 +233,12 @@ { if (sWhere == null || sWhere.Equals("")) { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintain order by 鏃ユ湡 desc", "h_v_Sc_MouldMaintain"); + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintain order by hmainid desc", "h_v_Sc_MouldMaintain"); } else { string sql1 = "select * from h_v_Sc_MouldMaintain where 1 = 1 "; - string sql = sql1 + sWhere + "order by 鏃ユ湡 desc"; + string sql = sql1 + sWhere + "order by hmainid desc"; return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldMaintain"); } @@ -244,28 +254,37 @@ /// <returns></returns> [Route("Sc_MouldDotCheckPlanBill/GetMouldDotCheckPlanBillList")] [HttpGet] - public object GetMouldDotCheckPlanBillList(string sWhere) + public object GetMouldDotCheckPlanBillList(string sWhere,string user) { try { - - ds = Sc_MouldDotCheckPlanBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) + if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckPlanBillList", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; objJsonResult.data = null; return objJsonResult; } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + ds = Sc_MouldDotCheckPlanBillList_s(sWhere); + + //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) { @@ -282,7 +301,7 @@ public static DataSet Sc_MouldDotCheckPlanBillList_s(string sWhere) { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckPlanBillList order by 鏃ユ湡 desc", "h_v_Sc_MouldDotCheckPlanBillList"); + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckPlanBillList where 1=1 "+sWhere+ " order by hmainid desc", "h_v_Sc_MouldDotCheckPlanBillList"); } #endregion @@ -292,28 +311,36 @@ /// <returns></returns> [Route("Sc_MouldDotCheckBill/GetMouldDotCheckBillList")] [HttpGet] - public object GetMouldDotCheckBillList(string sWhere) + public object GetMouldDotCheckBillList(string sWhere,string user) { try { - - ds = Sc_MouldDotCheckBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) + if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBillList", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; objJsonResult.data = null; return objJsonResult; } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + ds = Sc_MouldDotCheckBillList_s(sWhere); + + //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) { @@ -330,7 +357,7 @@ public static DataSet Sc_MouldDotCheckBillList_s(string sWhere) { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList where 1=1 " + sWhere + "order by 鏃ユ湡 desc", "h_v_Sc_MouldDotCheckBillList"); + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList where 1=1 " + sWhere + "order by hmainid desc", "h_v_Sc_MouldDotCheckBillList"); } #endregion @@ -390,28 +417,37 @@ /// <returns></returns> [Route("Sc_MouldMaintainPlanBill/GetMouldMaintainPlanBillList")] [HttpGet] - public object GetMouldMaintainPlanBillList(string sWhere) + public object GetMouldMaintainPlanBillList(string sWhere,string user) { try { - - ds = Sc_MouldMaintainPlanBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) + if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBillList", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; objJsonResult.data = null; return objJsonResult; } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + ds = Sc_MouldMaintainPlanBillList_s(sWhere); + + //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) { @@ -428,7 +464,7 @@ public static DataSet Sc_MouldMaintainPlanBillList_s(string sWhere) { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainPlanBillList where 1=1 "+sWhere+" order by 鏃ユ湡 desc", "h_v_Sc_MouldMaintainPlanBillList"); + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainPlanBillList where 1=1 "+sWhere+ " order by hmainid desc", "h_v_Sc_MouldMaintainPlanBillList"); } #endregion @@ -439,12 +475,21 @@ /// <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"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; @@ -469,7 +514,7 @@ DataSet ds; if (sWhere == null || sWhere.Equals("")) { - ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList order by 鏃ユ湡 desc" + sWhere, "h_v_Sc_MouldConkBookBillList"); + ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList where 1=1 " + sWhere+ " order by hmainid desc", "h_v_Sc_MouldConkBookBillList"); } else { @@ -489,11 +534,21 @@ /// <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; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -519,12 +574,12 @@ DataSet ds; if (sWhere == null || sWhere.Equals("")) { - ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairCheckBillList_Edit order by 鏃ユ湡 desc" + sWhere, "h_v_Sc_MouldRepairCheckBillList_Edit"); + ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairCheckBillList_Edit where 1=1" + sWhere+ " order by hmainid desc", "h_v_Sc_MouldRepairCheckBillList_Edit"); } else { string sql1 = "select * from h_v_Sc_MouldRepairCheckBillList_Edit where 1 = 1 "; - string sql = sql1 + sWhere + "order by 鏃ユ湡 desc"; + string sql = sql1 + sWhere + "order by hmainid desc"; ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairCheckBillList_Edit"); } return ds; @@ -595,28 +650,37 @@ /// <returns></returns> [Route("Sb_MouldRepairWorkBill/GetMouldRepairWorkBillList")] [HttpGet] - public object GetMouldRepairWorkBillList(string sWhere) + public object GetMouldRepairWorkBillList(string sWhere,string user) { try { - - ds = Sc_MouldRepairWorkBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) + if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBillList", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; objJsonResult.data = null; return objJsonResult; } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + ds = Sc_MouldRepairWorkBillList_s(sWhere); + + //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) { @@ -635,12 +699,12 @@ { if (sWhere == null || sWhere.Equals("")) { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairWorkBillList order by 鏃ユ湡 desc" + sWhere, "h_v_Sc_MouldRepairWorkBillList"); + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairWorkBillList where 1=1 " + sWhere+ " order by hmainid desc", "h_v_Sc_MouldRepairWorkBillList"); } else { string sql1 = "select * from h_v_Sc_MouldRepairWorkBillList where 1 = 1 "; - string sql = sql1 + sWhere + "order by 鏃ユ湡 desc"; + string sql = sql1 + sWhere + "order by hmainid desc"; return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairWorkBillList"); } } @@ -751,28 +815,46 @@ /// <returns></returns> [Route("Kf_MoveStockBill/GetMoveStockBillList")] [HttpGet] - public object GetMoveStockBillList(string sWhere) + public object GetMoveStockBillList(string sWhere,string user) { try { - - ds = Sc_GetMoveStockBillList(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + if (!DBUtility.ClsPub.Security_Log("Kf_MoveStockBillQuery", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } + + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockBillList order by hmainid desc", "h_v_IF_MoveStockBillList"); + } else { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; + string sql = "select * from h_v_IF_MoveStockBillList where 1=1 " + sWhere+ "order by hmainid desc"; + ds = oCN.RunProcReturn(sql, "h_v_IF_MoveStockBillList"); } + + //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) { @@ -784,42 +866,44 @@ } } - #region sql璇彞 - - - public static DataSet Sc_GetMoveStockBillList(string sWhere) - { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MoveStockBillList order by 鏃ユ湡 desc", "h_v_IF_MoveStockBillList"); - } - #endregion /// <summary> /// 閿�鍞嚭搴撳崟鍒楄〃 /// </summary> /// <returns></returns> [Route("Kf_SellOutBill/GetSellOutBillList")] [HttpGet] - public object GetSellOutBillList(string sWhere) + public object GetSellOutBillList(string sWhere,string user) { try { - - ds = Sc_GetSellOutBillList(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + if (!DBUtility.ClsPub.Security_Log("Kf_SellOutBillQuery", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.Message = "娌℃湁鏌ヨ鏉冮檺!"; objJsonResult.data = null; return objJsonResult; } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + ds = Sc_GetSellOutBillList(sWhere); + + //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) { @@ -836,10 +920,20 @@ /// <returns></returns> [Route("Kf_SellOutBill/DeltetSellOutBill")] [HttpGet] - public object DeltetSeOutStockBackBill(string HInterID) + public object DeltetSeOutStockBackBill(string HInterID,string user) { try { + //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄� + if (!DBUtility.ClsPub.Security_Log("Kf_SellOutBill_Drop", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愬垹闄�!"; + objJsonResult.data = null; + return objJsonResult; + } + oCN.BeginTran(); oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); @@ -865,7 +959,14 @@ public static DataSet Sc_GetSellOutBillList(string sWhere) { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList order by 鏃ユ湡 desc", "h_v_IF_SellOutBillList"); + if (sWhere == null || sWhere.Equals("")) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList order by hmainid desc", "h_v_IF_SellOutBillList"); + } + else + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList where 1=1 " + sWhere + " order by hmainid desc", "h_v_IF_SellOutBillList"); + } } #endregion @@ -876,28 +977,46 @@ /// <returns></returns> [Route("Kf_OtherOutBill/GetOtherOutBillList")] [HttpGet] - public object GetOtherOutBillList(string sWhere) + public object GetOtherOutBillList(string sWhere,string user) { try { - - ds = Sc_GetOtherOutBillList(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + if (!DBUtility.ClsPub.Security_Log("Kf_OtherOutBillQuery", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + 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 hmainid desc", "h_v_Kf_OtherOutBillList"); + } else { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; + string sql = "select * from h_v_Kf_OtherOutBillList where 1 = 1 " + sWhere+ " order by hmainid desc"; + ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherOutBillList"); } + + //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) { @@ -908,15 +1027,6 @@ return objJsonResult; } } - - #region sql璇彞 - - - public static DataSet Sc_GetOtherOutBillList(string sWhere) - { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Kf_OtherOutBillList order by 鏃ユ湡 desc", "h_v_Kf_OtherOutBillList"); - } - #endregion /// <summary> @@ -1024,28 +1134,47 @@ /// <returns></returns> [Route("Kf_ProductInBill/GetProductInBill")] [HttpGet] - public object GetProductInBill(string sWhere) + public object GetProductInBill(string sWhere,string user) { try { - - ds = Sc_GetProductInBill(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + if (!DBUtility.ClsPub.Security_Log("Kf_ProductInBill_Query", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } + + + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where 1=1 order by hmainid desc", "h_v_IF_ProductInBillList"); + } else { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; + string sql = "select * from h_v_IF_ProductInBillList where 1 = 1 " + sWhere + " order by hmainid desc"; + ds = oCN.RunProcReturn(sql, "h_v_IF_ProductInBillList"); } + + //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) { @@ -1056,6 +1185,7 @@ return objJsonResult; } } + /// <summary> ///浜у搧鍏ュ簱鍗曞垹闄ゅ姛鑳� /// </summary> @@ -1086,14 +1216,7 @@ return objJsonResult; } } - #region sql璇彞 - - - public static DataSet Sc_GetProductInBill(string sWhere) - { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_ProductInBillList order by 鏃ユ湡 desc", "h_v_IF_ProductInBillList"); - } - #endregion + /// <summary> @@ -1102,28 +1225,46 @@ /// <returns></returns> [Route("Kf_OtherInBill/GetOtherInBill")] [HttpGet] - public object GetOtherInBill(string sWhere) + public object GetOtherInBill(string sWhere,string user) { try { - - ds = Sc_GetOtherInBill(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + if (!DBUtility.ClsPub.Security_Log("Kf_OtherInBillQuery", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; objJsonResult.data = null; return objJsonResult; } + + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_Kf_OtherInBillList where 1=1 order by hmainid desc", "h_v_Kf_OtherInBillList"); + } else { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; + string sql = "select * from h_v_Kf_OtherInBillList where 1 = 1 " + sWhere+ " order by hmainid desc"; + ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherInBillList"); } + + //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) { @@ -1134,16 +1275,6 @@ return objJsonResult; } } - - #region sql璇彞 - - - public static DataSet Sc_GetOtherInBill(string sWhere) - { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Kf_OtherInBillList order by 鏃ユ湡 desc ", "h_v_Kf_OtherInBillList"); - } - #endregion - /// <summary> /// 濮斿鍏ュ簱鍗曞垪琛� @@ -1151,16 +1282,45 @@ /// <returns></returns> [Route("Kf_EntrustInBill/GetEntrustInBill")] [HttpGet] - public object GetEntrustInBill(string sWhere) + public object GetEntrustInBill(string sWhere,string user) { try { - ds = Sc_GetEntrustInBill(sWhere); + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + 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 order by hmainid desc", "h_v_Kf_EntrustInBillList"); + } + else + { + string sql = "select * from h_v_Kf_EntrustInBillList where 1 = 1 " + sWhere+ " order by hmainid desc"; + ds = oCN.RunProcReturn(sql, "h_v_Kf_EntrustInBillList"); + } + + //if (ds.Tables[0].Rows.Count != 0 || ds != null) + //{ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + 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) { @@ -1171,16 +1331,6 @@ return objJsonResult; } } - - #region sql璇彞 - - - public static DataSet Sc_GetEntrustInBill(string sWhere) - { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Kf_EntrustInBillList ", "h_v_Kf_EntrustInBillList"); - } - #endregion - //娴嬭瘯涓撶敤鎺ュ彛 [Route("LookingFor/Test")] @@ -1228,12 +1378,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("\\", ""); @@ -1413,17 +1573,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; @@ -1503,7 +1663,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; @@ -1649,6 +1809,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("\\", ""); @@ -1832,17 +2001,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; @@ -1910,7 +2079,7 @@ #region 妯″叿鏁呴殰鐧昏琛ㄤ繚瀛�/缂栬緫 /// <summary> - /// 淇濆瓨妯″叿缁翠慨鍗� + /// 淇濆瓨鏁呴殰鐧昏琛� /// </summary> /// <param name="msg"></param> /// <returns></returns> @@ -1923,12 +2092,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("\\", ""); @@ -2108,22 +2285,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; @@ -2205,12 +2382,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("\\", ""); @@ -2384,17 +2571,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; @@ -2477,11 +2664,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("\\", ""); @@ -2725,8 +2922,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) @@ -2806,12 +3012,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("\\", ""); @@ -2980,22 +3195,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; @@ -3078,12 +3293,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("\\", ""); @@ -3258,17 +3483,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; @@ -3419,7 +3644,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(); @@ -3435,7 +3660,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; @@ -3757,7 +3982,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; @@ -3767,6 +3992,7 @@ } ds = Sc_GetMouldScrapOutHouseBill(sWhere, Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -3788,11 +4014,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 hmainid desc", "h_v_Sc_MouldScrapOutHouseBillList"); } else { - string sql = sql1 + sWhere + "order by 鏃ユ湡 desc"; + string sql = sql1 + sWhere + "order by hmainid desc"; return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldScrapOutHouseBillList"); } } @@ -3892,7 +4118,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; @@ -4027,7 +4253,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; @@ -4114,7 +4340,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; @@ -4243,7 +4469,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; @@ -4332,7 +4558,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; @@ -4342,6 +4568,7 @@ } ds = Sc_GetMouldProdBackBill(sWhere, Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -4363,11 +4590,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 hmainid desc", "h_v_Sc_MouldProdBackBillList"); } else { - string sql = sql1 + sWhere + "order by 鏃ユ湡 desc"; + string sql = sql1 + sWhere + "order by hmainid desc"; return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList"); } @@ -4407,7 +4634,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"); } @@ -4417,7 +4644,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"); @@ -4425,8 +4652,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]); @@ -4467,7 +4694,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; @@ -4605,7 +4832,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; @@ -4682,7 +4909,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; @@ -4770,7 +4997,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; @@ -4780,6 +5007,7 @@ } ds = Sc_GetMouldProdOutBill(sWhere, Organization); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -4801,11 +5029,12 @@ 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"); + Log.LogInfo(sql1); + return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by hmainid desc", "h_v_Sc_MouldProdOutHouseBillList"); } else { - string sql = sql1 + sWhere + "order by 鏃ユ湡 desc"; + string sql = sql1 + sWhere + "order by hmainid desc"; return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdOutHouseBillList"); } @@ -4905,7 +5134,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; @@ -5029,6 +5259,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> /// 妯″叿澶勭悊棰嗙敤鍗曞垹闄ゅ姛鑳� @@ -5039,7 +5307,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; @@ -5113,10 +5381,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; @@ -5200,12 +5467,21 @@ [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"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; @@ -5226,12 +5502,12 @@ { if (sWhere == null || sWhere.Equals("")) { - return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldLifeChangeBillList order by 鏃ユ湡 desc", "h_v_Sc_MouldLifeChangeBillList"); + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldLifeChangeBillList order by hmainid desc", "h_v_Sc_MouldLifeChangeBillList"); } else { string sql1 = "select * from h_v_Sc_MouldLifeChangeBillList where 1 = 1 "; - string sql = sql1 + sWhere + "order by 鏃ユ湡 desc"; + string sql = sql1 + sWhere + "order by hmainid desc"; return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldLifeChangeBillList"); } @@ -5322,12 +5598,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("\\", ""); @@ -5449,17 +5735,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