WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
@@ -292,7 +292,7 @@
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Gy_BadReason", 1, false, user))
                if (!DBUtility.ClsPub.Security_Log("Gy_BadType_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -301,16 +301,9 @@
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_BadReasonList " + sWhere + " order by 不良原因代码 ", "h_v_IF_BadReasonList");
                }
                else
                {
                    string sql1 = "select * from h_v_IF_BadReasonList where 1 = 1";
                    string sql = sql1 + sWhere + " order by 不良原因代码 ";
                    ds = oCN.RunProcReturn(sql, "h_v_IF_BadReasonList");
                }
                string sql1 = "select * from h_v_gy_BadTypeList where 1 = 1";
                string sql = sql1 + sWhere + " order by 不良类型代码 ";
                ds = oCN.RunProcReturn(sql, "h_v_gy_BadTypeList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)