From 5e96e0430336ebdc8590499d6d8d76eec00092e9 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期一, 06 三月 2023 09:09:39 +0800 Subject: [PATCH] 工序返工记录单 --- WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs | 45 ++++++++++++++++++++++++++++----------------- 1 files changed, 28 insertions(+), 17 deletions(-) diff --git a/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs b/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs index 07dab3b..8ac14d5 100644 --- a/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs @@ -23,35 +23,46 @@ /// <returns></returns> [Route("Sc_ProductionReturnBill/list")] [HttpGet] - public object list(string sWhere) + public object list(string sWhere,string user) { try { - if (sWhere == null || sWhere.Equals("")) - { - ds = oCN.RunProcReturn("select * from h_v_IF_ProductionReturnList where 1=1 order by 鏃ユ湡 desc", "h_v_IF_ProductionReturnList"); - } - else - { - string sql = "select * from h_v_IF_ProductionReturnList where 1 = 1 " + sWhere + " order by 鏃ユ湡 desc"; - ds = oCN.RunProcReturn(sql, "h_v_IF_ProductionReturnList"); - } - if (ds == null || ds.Tables[0].Rows.Count <= 0) + //鍒ゆ柇鏄惁鏈夋煡璇㈢殑鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Kf_ProductionReturnBill_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_ProductionReturnList where 1=1 order by hmainid desc", "h_v_IF_ProductionReturnList"); + } else { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; + string sql = "select * from h_v_IF_ProductionReturnList where 1 = 1 " + sWhere + " order by hmainid desc"; + ds = oCN.RunProcReturn(sql, "h_v_IF_ProductionReturnList"); } + + //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) { -- Gitblit v1.9.1