1
yusijie
2024-08-05 7b776d93b25a2e9d6e2210d581c1e2998e4fc8ae
WebAPI/Controllers/Æ·ÖʹÜÀí/ÖÊÁ¿±¨±í/QC_QualityReportsController.cs
@@ -932,6 +932,99 @@
        }
        #endregion
        #region è´¨é‡æ¨¡å—   åˆ¶ç¨‹ç»©æ•ˆè¶‹åŠ¿å›¾(合格率)  æŸ¥è¯¢
        [Route("QC_CustomerAppealReport/getQC_ProcessPerformancePass")]
        [HttpGet]
        public object getQC_ProcessPerformancePass(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_QC_ProcessPerformancePassList order by æœˆä»½ desc", "h_v_QC_ProcessPerformancePassList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_ProcessPerformancePassList where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by æœˆä»½ ";
                    ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessPerformancePassList");
                }
                //添加列名
                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
        #region è´¨é‡æ¨¡å—   å¼‚常反馈分析报表  æŸ¥è¯¢
        [Route("QC_CustomerAppealReport/getOA_ErrMsgBackBillList_Query")]
        [HttpGet]
        public object getOA_ErrMsgBackBillList_Query(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_OA_ErrMsgBackBillList_Query order by æ—¥æœŸ desc", "h_v_OA_ErrMsgBackBillList_Query");
                }
                else
                {
                    string sql1 = "select * from h_v_OA_ErrMsgBackBillList_Query where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by æ—¥æœŸ ";
                    ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackBillList_Query");
                }
                //添加列名
                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
        #region è´¨é‡æ¨¡å— å¼‚常管理台账
        /// <summary>
        /// è¿”回异常管理台账