From f2a3c7938939ca156cef46b685e8991931dec968 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期五, 19 七月 2024 13:30:47 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 57 insertions(+), 2 deletions(-) diff --git a/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs index 40890cf..7c15bc8 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs @@ -210,7 +210,7 @@ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); - oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); + oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now); if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { @@ -738,7 +738,62 @@ } #endregion - + #region 璁惧鍋滄満鍗曞垪琛≒DA 鏌ヨ + [Route("Sb_EquipStopBill/Sb_EquipStopBillList_PDA")] + [HttpGet] + public object Sb_EquipStopBillList_PDA(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipStopBillMain_Check", 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_Sb_EquipStopBillList_PDA order by 鍗曟嵁鍙� desc", "锘縣_v_Sb_EquipStopBillList_PDA"); + } + else + { + string sql1 = "select * from h_v_Sb_EquipStopBillList_PDA where 1 = 1 "; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc"; + ds = oCN.RunProcReturn(sql, "锘縣_v_Sb_EquipStopBillList_PDA"); + } + + //娣诲姞鍒楀悕 + 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