From 8aa5b5b90724ef9665c03fcc72a503319d354fdb Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期三, 22 五月 2024 14:46:00 +0800 Subject: [PATCH] 网页版: 增加 设备启动点检清单 单据编辑模块 ,以及 单据列表 --- WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs | 68 +++++++++++++++++++++++++++++---- 1 files changed, 59 insertions(+), 9 deletions(-) diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs index 3160d31..b5fb9f7 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs @@ -382,7 +382,7 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { - ds = oCN.RunProcReturn("select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 as HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart ,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜虹紪鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckBillList", "h_v_Sb_EquipDotCheckBillList"); + ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckBill_Edit", "h_v_Sb_EquipDotCheckBill_Edit"); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; @@ -390,9 +390,9 @@ } else { - string sql1 = "select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 as HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜虹紪鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckBillList where 1 = 1 "; + string sql1 = "select * from h_v_Sb_EquipDotCheckBill_Edit where 1 = 1 "; string sql = sql1 + sqlWhere; - ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList"); + ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBill_Edit"); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; @@ -411,13 +411,8 @@ #endregion - - - #endregion - - #region 璁惧鐐规璁板綍鍗昉DA #region 鏍规嵁璁惧鏉$爜鏌ユ壘璁惧妗f淇℃伅PDA [Route("Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown")] @@ -752,7 +747,62 @@ } #endregion - #endregion + #region 璁惧鐐规閫炬湡棰勮鎶ヨ〃 + [Route("Sb_EquipDotCheckWarning/Report")] + [HttpGet] + public object Report(string HYear,string HMonth,string HEquipTypeID, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //if (!DBUtility.ClsPub.Security_Log("Gy_EquipFileList", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺"; + // objJsonResult.data = null; + // return objJsonResult; + //} + if (HYear == null || HYear.Equals("") || HMonth == null || HMonth.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤锛屾湀浠�"; + objJsonResult.data = ""; + objJsonResult.list = columnNameList; + return objJsonResult; + } + else + { + string sql = "exec h_p_Sb_EquipDotCheckWarningReport " + HYear + "," + HMonth + "," + HEquipTypeID; + ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipDotCheckWarningReport"); + } + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion } } \ No newline at end of file -- Gitblit v1.9.1