From 7f7c137e8c1d26bb777f3d5abd13866ad6fde28b Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期三, 19 一月 2022 01:17:35 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs | 49 ++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 38 insertions(+), 11 deletions(-) diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs index 1733451..302c7ba 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs @@ -9,6 +9,7 @@ public class Sb_EquipDotCheckPlanBillController : ApiController { private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); public DataSet ds = new DataSet(); #region 璁惧鐐规璁″垝琛� @@ -23,12 +24,38 @@ { try { - ds = Sb_EquipDotCheckPlanBillList_s(sWhere); - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckPlanBillList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipDotCheckPlanBillList"); + } + else + { + string sql1 = "select * from h_v_Sb_EquipDotCheckPlanBillList where 1 = 1"; + string sql = sql1 + sWhere + " order by hmainid desc"; + ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanBillList"); + } + 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; + } + //ds = Sb_EquipDotCheckPlanBillList_s(sWhere); + //objJsonResult.code = "1"; + //objJsonResult.count = 1; + //objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + //objJsonResult.data = ds.Tables[0]; + //return objJsonResult; } catch (Exception ex) { @@ -191,7 +218,7 @@ public object DeltetEquipDotCheckPlanBillList(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; @@ -274,7 +301,7 @@ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; } #endregion - #region[璁惧鐐规璁″垝琛ㄧ紪杈戞椂鑾峰彇琛ㄩ鏁版嵁] + #region[璁惧鐐规璁″垝琛ㄧ紪杈戞椂鑾峰彇琛ㄤ綋鏁版嵁] [Route("Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListProjectDetai")] [HttpGet] public object Sb_EquipDotCheckPlanBillListProjectDetai(string sqlWhere) @@ -285,7 +312,7 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { - ds = oCN.RunProcReturn("select 鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart ,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,HManagerID from h_v_Sb_EquipDotCheckPlanBillList_Edit", "h_v_Sb_EquipDotCheckPlanBillList_Edit"); + ds = oCN.RunProcReturn("select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart ,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckPlanBillList", "h_v_Sb_EquipDotCheckPlanBillList"); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; @@ -293,9 +320,9 @@ } else { - string sql1 = "select 鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,HManagerID from h_v_Sb_EquipDotCheckPlanBillList_Edit where 1 = 1 "; + string sql1 = "select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart ,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckPlanBillList where 1 = 1 "; string sql = sql1 + sqlWhere; - ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanBillList_Edit"); + ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanBillList"); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; -- Gitblit v1.9.1