wangyi
2026-03-31 aa51eec0fb3c02837a8fdde02732667cb8f99045
增加出运单子表信息获取
1个文件已修改
50 ■■■■■ 已修改文件
WebAPI/Controllers/物流管理/出运单/WLYayBillController.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/ÎïÁ÷¹ÜÀí/³öÔ˵¥/WLYayBillController.cs
@@ -818,6 +818,56 @@
        
        #region å‡ºè¿å• èŽ·å–å­è¡¨æ•°æ®
        [Route("WLYayBillController/GetList")]
        [HttpGet]
        public object GetList(string hmainid, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                if (!DBUtility.ClsPub.Security_Log("WLYayBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DataSet ds = oCN.RunProcReturn("select * from h_v_Gy_MaterialPackingRelation where hmainid=" + hmainid, "WL_YayBillMain");
                //添加列名
                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 ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        
    }