From b8940573cf1d9bb5b3ddaca6aed87cc953c6bc43 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期一, 14 八月 2023 08:54:30 +0800 Subject: [PATCH] 日计划报表优化 --- WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs | 28 ++++++++++------------------ 1 files changed, 10 insertions(+), 18 deletions(-) diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs index 1b8df03..9ac86d4 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs @@ -173,24 +173,16 @@ try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - if (sqlWhere == null || sqlWhere.Equals("")) - { - ds = oCN.RunProcReturn("select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜� HManagerName,瀛愬娉� HRemark from h_v_Sb_EquipDotCheckRuleList", "h_v_Sb_EquipDotCheckRuleList"); - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - } - else - { - string sql1 = "select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜� HManagerName,瀛愬娉� HRemark from h_v_Sb_EquipDotCheckRuleList where 1 = 1 "; - string sql = sql1 + sqlWhere; - ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList"); - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - } + + string sql1 = @"select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜� HManagerName,瀛愬娉� HRemark,b.HNumber 鐐规椤圭洰浠g爜 from h_v_Sb_EquipDotCheckRuleList a + left join Gy_QCCheckItem b on a.鐐规椤圭洰ID =b.HItemID where 1 = 1 "; + string sql = sql1 + sqlWhere; + ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList"); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + } catch (Exception e) { -- Gitblit v1.9.1