1
zrg
6 天以前 5184117835a0656429af34c646f05c401223a203
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -7436,6 +7436,58 @@
        }
        #endregion
        #region 工作联系单列表 使用下拉加载 调用存储过程
        [Route("Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListProcess")]
        [HttpGet]
        public object GetOA_WorkLinkBillList2(string beginDate, string endDate, string user, string type, int page = -1, int size = -1)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("OA_WorkLinkBillList", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql = $"exec h_p_OA_WorkLinkBillAllList '{user}', '{type}', '{page}', '{size}', '{beginDate}', '{endDate}'";
                ds = oCN.RunProcReturn(sql, "h_p_OA_WorkLinkBillAllList");
                //添加列名
                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
        #region 工作联系单列表 使用下拉加载        
        [Route("Sc_MESTransFerWorkBill/GetOA_WorkLinkBillList")]
        [HttpGet]