From 719a47b4aff725d4224b85e2b2079983cb31cf89 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期二, 23 十二月 2025 13:28:36 +0800
Subject: [PATCH] 增加临时查询方案

---
 DevApp/Gs.DevApp/UserControl/ShowFilter.cs |   72 ++++++++++++++++++++++++++++++++---
 1 files changed, 65 insertions(+), 7 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
index 37a9fb8..2a83a73 100644
--- a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
+++ b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
@@ -1,16 +1,17 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Data;
-using System.Text;
-using System.Windows.Forms;
-using DevExpress.XtraEditors;
+锘縰sing DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
 using DevExpress.XtraGrid.Columns;
+using DevExpress.XtraGrid.Views.Base.ViewInfo;
 using DevExpress.XtraGrid.Views.Grid;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
 
 namespace Gs.DevApp.UserControl
 {
@@ -66,7 +67,63 @@
                 if (xtraTabControl1.SelectedTabPageIndex == 1)
                     getPageListQuery();
             };
+            #region 淇濆瓨涓存椂鏌ヨ鏂规 2025-12-23鍔犱笂
+            btnFa.Click += (s, e) =>
+            {
+                gridView1.CloseEditor();
+                gridView1.UpdateCurrentRow();
+                var sbWhere = new StringBuilder();
+                var listGv = new List<FilterEntity>();
+                for (var i = 0; i < gridView1.DataRowCount; i++)
+                {
+                    if (string.IsNullOrEmpty(gridView1.GetRowCellValue(i, "field")
+                            .ToString())
+                        || string.IsNullOrEmpty(gridView1
+                            .GetRowCellValue(i, "fieldWhere").ToString())
+                        || string.IsNullOrEmpty(gridView1
+                            .GetRowCellValue(i, "fieldValue").ToString())
+                       )
+                        continue;
+                    string _fieId, _fileIdDec;
+                    (_fieId, _fileIdDec) =
+                        _getFiled(gridView1.GetRowCellValue(i, "field").ToString());
+                    string _fileWhere, _fileWhereDec;
+                    (_fileWhere, _fileWhereDec) = _getFiled(gridView1
+                        .GetRowCellValue(i, "fieldWhere").ToString());
+                    var _fieldValue = gridView1.GetRowCellValue(i, "fieldValue")
+                        .ToString();
+                    var _fieldType = gridView1.GetRowCellValue(i, "fieldType")
+                      .ToString();
+                    //濡傛灉鏄痩ike 瑕佸姞涓婄櫨鍒嗗彿
+                    if (_fileWhere.Contains("like"))
+                    {
+                        _fileWhere = "like";
+                        _fieldValue = "%" + _fieldValue + "%";
+                    }
+                    listGv.Add(new FilterEntity(_fieId, _fileIdDec, _fileWhere,
+                        _fileWhereDec, _fieldValue, _fieldType));
+                    //鎶婅繖涓猯istGv淇濆瓨鑷虫暟鎹簱
+                }
+                var _obj = new { formPath = _fullName, list = listGv };
+                try
+                {
+                    string strJson = UtilityHelper.HttpPost("", "Fm/SetFormSearchAll", JsonConvert.SerializeObject(_obj));
+                    ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+                    if (_rtn.rtnCode > 0)
+                    {
+                        ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
+                    }
+                    else
+                        ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
+                }
+                catch (Exception ex)
+                {
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+                }
+            };
+            #endregion
         }
+
 
         /// <summary>
         ///     鏌ヨ闆嗗悎
@@ -104,9 +161,10 @@
                     .ToString();
                 var _fieldType = gridView1.GetRowCellValue(i, "fieldType")
                   .ToString();
+                //濡傛灉鏄痩ike 瑕佸姞涓婄櫨鍒嗗彿
                 if (_fileWhere.Contains("like"))
                 {
-                    _fileWhere = " like ";
+                    _fileWhere = "like";
                     _fieldValue = "%" + _fieldValue + "%";
                 }
                 list.Add(new FilterEntity(_fieId, _fileIdDec, _fileWhere,

--
Gitblit v1.9.3