zrg
2024-03-26 7fcf7cc09a728223220a757614d8421115e19895
WebAPI/Controllers/XSGL/Xs_OutDoorCheckBillController.cs
@@ -590,7 +590,45 @@
        #endregion
        //---------------------------------------------------------------PDA模块调用
        #region 出门确认单列表
        /// <summary>
        /// 获取出门确认单列表信息
        /// </summary>
        /// <returns></returns>
        [Route("Xs_OutDoorCheckBillController/GetXs_OutDoorCheckBillList_PDA_Json")]
        [HttpGet]
        public object GetXs_OutDoorCheckBillList_PDA_Json(string sWhere)
        {
            try
            {
                //返回列表信息
                ds = oCn.RunProcReturn("exec h_p_Xs_OutDoorCheckBillList_PDA '" + sWhere + "'", "h_p_Xs_OutDoorCheckBillList_PDA");
                List<object> columnNameList = new List<object>();
                //添加列名
                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 = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "成功!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询列表信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}