zrg
2024-11-14 66102c6607654521644c64e73cce7a2505d085a4
WebAPI/Controllers/Æ·ÖʹÜÀí/¹¤Ðò¼ìÑéµ¥/QC_ProcessCheckBillController.cs
@@ -187,6 +187,60 @@
        }
        #endregion
        #region å·¥åºæ£€éªŒå•分页列表
        [Route("QC_ProcessCheckMainBill/QC_ProcessCheckMainBillListPage")]
        [HttpGet]
        public object QC_ProcessCheckMainBillListPage(string sWhere, string user, int page, int size)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("QC_ProcessCheckBill_Query", 3, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                sWhere = sWhere.Replace("'", "''");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("exec h_p_QC_ProcessCheckMainBillListPage " + page + "," + size + ",''", "h_p_QC_ProcessCheckMainBillListPage");
                }
                else
                {
                    ds = oCN.RunProcReturn("exec h_p_QC_ProcessCheckMainBillListPage " + page + "," + size + ",'" + sWhere + "'", "h_p_QC_ProcessCheckMainBillListPage");
                }
                //添加列名
                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 = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
                objJsonResult.Message = "Sucess!";
                objJsonResult.list = columnNameList;
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥åºæ£€éªŒå•编辑查询数据
        [Route("QC_ProcessCheckBill/QC_ProcessCheckBill_Edit")]
        [HttpGet]