WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs
@@ -738,7 +738,62 @@ } #endregion #region 设备开机单列表PDA 查询 [Route("Sb_EquipBeginBill/Sb_EquipBeginBillList_PDA")] [HttpGet] public object Sb_EquipBeginBillList_PDA(string sWhere, string user) { try { List<object> columnNameList = new List<object>(); //查看权限 if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipBeginBillMain_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_EquipBeginBillList_PDA order by 单据号 desc", "h_v_Sb_EquipBeginBillList_PDA"); } else { string sql1 = "select * from h_v_Sb_EquipBeginBillList_PDA where 1 = 1 "; string sql = sql1 + sWhere + " order by 单据号 desc"; ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipBeginBillList_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));//获取到DataColumn列对象的列名 } 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 } } WebAPI/Controllers/SBGL/Sb_EquipStopBillController.cs
@@ -738,7 +738,62 @@ } #endregion #region 设备停机单列表PDA 查询 [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", "h_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, "h_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));//获取到DataColumn列对象的列名 } 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 } }