From d3473e15fd14ea84a1378f3d3841bcad16c2d9f3 Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期二, 18 六月 2024 15:32:04 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 56 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs index 40890cf..8385d23 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs @@ -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