zzz 1 месяц назад
Родитель
Сommit
76877c5620

+ 9 - 0
Common/Utils.cs

@@ -103,8 +103,17 @@ namespace PTMedicalInsurance.Common
                 Global.writeLog(string.Format("转换后的日期为:{0}",datetime));
             }
 
+
         }
+        public static string convertTimestamp(string key)
+        {
+
 
+            long timestamp = long.Parse(key);
+            string datetime = Utils.GetDateTime(timestamp).ToString("yyyy-MM-dd HH:mm:ss");
+            return datetime;
+
+        }
         #endregion
 
         #region BeanUtils

+ 1 - 0
FormSetter/GridViewSetter.cs

@@ -990,6 +990,7 @@ namespace PTMedicalInsurance.FormSetter
             AddDGVColumn(dgv, "价格", "itemPrice", 80);
             AddDGVColumn(dgv, "批准文号", "pprovalNo", 200);
             AddDGVColumn(dgv, "厂家", "manfDesc", 200);
+            AddDGVColumn(dgv, "收费等级", "ChargeItemLevelName", 200);
         }
 
         /// <summary>

+ 1 - 0
Forms/AddSignleDirectory.cs

@@ -244,6 +244,7 @@ namespace PTMedicalInsurance
             joPamam.Add("Manufacturers", tbManufacturers.Text);
             joPamam.Add("UpdateTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
             joPamam.Add("ChargeItemLevel", ChargeItemLevel);
+            joPamam.Add("ChargeItemLevelName", cbxChargeItemLevel.Text);
             //joPamam.Add("Company", tbCompany.Text);
             joPamam.Add("MinPackagingQuantity", tbMinPackagingQuantity.Text);
             joPamam.Add("ChargeItemType", cbxChargeItemType.SelectedValue?.ToString());

+ 18 - 18
Forms/AddSignleDirectory.designer.cs

@@ -82,6 +82,8 @@
             this.lbStartDate = new System.Windows.Forms.Label();
             this.tbStartDate = new System.Windows.Forms.TextBox();
             this.pnlClient = new System.Windows.Forms.Panel();
+            this.cbxListType = new System.Windows.Forms.ComboBox();
+            this.cbxChargeItemType = new System.Windows.Forms.ComboBox();
             this.label3 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.tbMinPackagingQuantity = new System.Windows.Forms.TextBox();
@@ -101,8 +103,6 @@
             this.rtbLimitRange = new System.Windows.Forms.RichTextBox();
             this.gbConnotation = new System.Windows.Forms.GroupBox();
             this.rtbConnotation = new System.Windows.Forms.RichTextBox();
-            this.cbxChargeItemType = new System.Windows.Forms.ComboBox();
-            this.cbxListType = new System.Windows.Forms.ComboBox();
             this.pnlTop.SuspendLayout();
             this.pnlBottom.SuspendLayout();
             this.pnlClient.SuspendLayout();
@@ -700,6 +700,22 @@
             this.pnlClient.Size = new System.Drawing.Size(1424, 553);
             this.pnlClient.TabIndex = 1;
             // 
+            // cbxListType
+            // 
+            this.cbxListType.FormattingEnabled = true;
+            this.cbxListType.Location = new System.Drawing.Point(797, 237);
+            this.cbxListType.Name = "cbxListType";
+            this.cbxListType.Size = new System.Drawing.Size(225, 23);
+            this.cbxListType.TabIndex = 89;
+            // 
+            // cbxChargeItemType
+            // 
+            this.cbxChargeItemType.FormattingEnabled = true;
+            this.cbxChargeItemType.Location = new System.Drawing.Point(453, 236);
+            this.cbxChargeItemType.Name = "cbxChargeItemType";
+            this.cbxChargeItemType.Size = new System.Drawing.Size(225, 23);
+            this.cbxChargeItemType.TabIndex = 88;
+            // 
             // label3
             // 
             this.label3.AutoSize = true;
@@ -886,22 +902,6 @@
             this.rtbConnotation.TabIndex = 0;
             this.rtbConnotation.Text = "";
             // 
-            // cbxChargeItemType
-            // 
-            this.cbxChargeItemType.FormattingEnabled = true;
-            this.cbxChargeItemType.Location = new System.Drawing.Point(453, 236);
-            this.cbxChargeItemType.Name = "cbxChargeItemType";
-            this.cbxChargeItemType.Size = new System.Drawing.Size(225, 23);
-            this.cbxChargeItemType.TabIndex = 88;
-            // 
-            // cbxListType
-            // 
-            this.cbxListType.FormattingEnabled = true;
-            this.cbxListType.Location = new System.Drawing.Point(797, 237);
-            this.cbxListType.Name = "cbxListType";
-            this.cbxListType.Size = new System.Drawing.Size(225, 23);
-            this.cbxListType.TabIndex = 89;
-            // 
             // AddSingleDirectory
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);

+ 324 - 34
Forms/BasicData.cs

@@ -15,6 +15,9 @@ using System.Threading.Tasks;
 using System.Windows.Forms;
 using PTMedicalInsurance.FormSetter;
 using PTMedicalInsurance.Common;
+using Sunny.UI;
+using PTMedicalInsurance.Entity;
+//using Microsoft.Office.Interop.Excel;
 
 
 namespace PTMedicalInsurance.Forms
@@ -36,7 +39,10 @@ namespace PTMedicalInsurance.Forms
         public JObject joSelectedInsuInfo;
         public int insuInfoIndex = 0;
         public int idInfoIndex = 0;
-        DataTable dtExport;
+        System.Data.DataTable dtExport;
+        private Func<JObject, OutParamWrapper, int> action;
+        private System.Data.DataTable dtAllMapped;
+        int iTotalCount = 0;
 
         public BasicData()
         {
@@ -49,8 +55,8 @@ namespace PTMedicalInsurance.Forms
             this.rbgDirecType.ValueChanged += new Sunny.UI.UIRadioButtonGroup.OnValueChanged(this.rbgDirecType_ValueChanged);
             this.pgDownload.PageChanged += new Sunny.UI.UIPagination.OnPageChangeEventHandler(this.pgDownload_PageChanged);
             this.pgCenterDirect.PageChanged += new Sunny.UI.UIPagination.OnPageChangeEventHandler(this.pgCenterDirect_PageChanged);
-            Font rowFont = new Font("UTF-8", 8);
-            Font columnFont = new Font("UTF-8", 9);
+            System.Drawing.Font rowFont = new System.Drawing.Font("UTF-8", 8);
+            System.Drawing.Font columnFont = new System.Drawing.Font("UTF-8", 9);
             rbgDirecType.SelectedIndex = 8;
             rbAll.Checked = true;
             //tabControl1.SelectedIndex = 1;
@@ -128,7 +134,7 @@ namespace PTMedicalInsurance.Forms
                     return;
                 }
 
-                DataTable dt = (DataTable)joRtn["result"]["rows"].ToObject(typeof(DataTable));
+                System.Data.DataTable dt = (System.Data.DataTable)joRtn["result"]["rows"].ToObject(typeof(System.Data.DataTable));
                 int totalCount = int.Parse(joRtn["result"]["total"].ToString());
                 pg.TotalCount = totalCount;
                 pg.PageSize = pageSize;
@@ -299,11 +305,11 @@ namespace PTMedicalInsurance.Forms
 
                             dgv = dgvDirectoy;
                             pg = pgDownload;
-                            DataTable dt;
+                            System.Data.DataTable dt;
 
                             if (rbgDirecType.SelectedIndex == 20)
                             {
-                                dt = (DataTable)joRtn["output"]["medinsinfo"].ToObject(typeof(DataTable));
+                                dt = (System.Data.DataTable)joRtn["output"]["medinsinfo"].ToObject(typeof(System.Data.DataTable));
 
                                 if (joRtn["output"]["medinsinfo"].ToString() == "")
                                 {
@@ -319,7 +325,7 @@ namespace PTMedicalInsurance.Forms
                                 pages = joRtn["output"]["pages"].ToString();                 //页数
                                 recordCounts = joRtn["output"]["recordCounts"].ToString();   //总记录条数
 
-                                dt = (DataTable)joRtn["output"]["data"].ToObject(typeof(DataTable));
+                                dt = (System.Data.DataTable)joRtn["output"]["data"].ToObject(typeof(System.Data.DataTable));
 
                                 if (recordCounts == "0")
                                 {
@@ -515,7 +521,7 @@ namespace PTMedicalInsurance.Forms
                 }
             }
 
-            DataTable dt = (DataTable)joRtn["result"]["Data"].ToObject(typeof(DataTable));
+            System.Data.DataTable dt = (System.Data.DataTable)joRtn["result"]["Data"].ToObject(typeof(System.Data.DataTable));
             dtExport = dt;
             int totalCount = int.Parse(joRtn["result"]["TotalCount"].ToString());
             pgHISDirect.TotalCount = totalCount;
@@ -1268,7 +1274,7 @@ namespace PTMedicalInsurance.Forms
                         joData.query_date = DateTime.Now.ToString("yyyy-MM-dd"); //查询时间点
                         joData.hilist_code = tbDirectoryCode.Text;  //医保目录编码
                         joData.insu_admdvs = "";  //参保机构医保区划
-                        joData.begndate = TexDate.Text; //开始日期
+                        joData.begndate = "2021-01-01"; //开始日期
                         joData.hilist_name = tbDircetoryName.Text;      //医保目录名称
                         joData.wubi = "";  //五笔助记码
                         joData.pinyin = "";     //拼音助记码
@@ -1281,9 +1287,9 @@ namespace PTMedicalInsurance.Forms
                         joData.hilist_use_type = "";  //医保目录使用类别
                         joData.lmt_cpnd_type = "";  //限复方使用类型
                         joData.vali_flag = "";  //有效标志
-                        joData.updt_time = TexDate.Text;  //更新时间
-                        joData.page_num = TexDQYS.Text;   //当前页数
-                        joData.page_size = TexBYSJL.Text; //本页数据量
+                        joData.updt_time = "2021-01-01";  //更新时间
+                        joData.page_num = "1";   //当前页数
+                        joData.page_size = "100"; //本页数据量
 
                         break;
                     }
@@ -1324,20 +1330,20 @@ namespace PTMedicalInsurance.Forms
                 case 18://医保目录限价
                     {
                         funNo = "1318";
-                        joData.query_date = "";           //查询时间点
+                        joData.query_date = DateTime.Now.ToString("yyyy-MM-dd");            //查询时间点
                         joData.hilist_code = tbDirectoryCode.Text;          //医保目录编码
                         joData.hilist_lmtpric_type = "";  //医保目录限价类型
                         joData.overlmt_dspo_way = "";     //医保目录超限处理方式
                         joData.insu_admdvs = "";          //参保机构医保区划
-                        joData.begndate = "";             //开始日期
-                        joData.enddate = "";              //结束日期
+                        joData.begndate = "2021-01-01";             //开始日期
+                        joData.enddate = DateTime.Now.ToString("yyyy-MM-dd");              //结束日期
                         joData.vali_flag = "";            //有效标志
                         joData.rid = "";                  //唯一记录号
                         joData.tabname = "";              //表名
                         joData.poolarea_no = "";          //统筹区
-                        joData.updt_time = TexDate.Text;  //更新时间
-                        joData.page_num = TexDQYS.Text;   //当前页数
-                        joData.page_size = TexBYSJL.Text; //本页数据量
+                        joData.updt_time = "2021-01-01";  //更新时间
+                        joData.page_num = "1";   //当前页数
+                        joData.page_size = "100"; //本页数据量
 
                         break;
                     }
@@ -1349,15 +1355,15 @@ namespace PTMedicalInsurance.Forms
                         joData.selfpay_prop_psn_type = "";//医保目录自付比例人员类别
                         joData.selfpay_prop_type = "";    //目录自付比例类别
                         joData.insu_admdvs = "";          //参保机构医保区划
-                        joData.begndate = "";             //开始日期
+                        joData.begndate = "2021-01-01";             //开始日期
                         joData.enddate = "";              //结束日期
                         joData.vali_flag = "";            //有效标志
                         joData.rid = "";                  //唯一记录号
                         joData.tabname = "";              //表名
                         joData.poolarea_no = "";          //统筹区
-                        joData.updt_time = TexDate.Text;  //更新时间
-                        joData.page_num = TexDQYS.Text;   //当前页数
-                        joData.page_size = TexBYSJL.Text; //本页数据量
+                        joData.updt_time = "2021-01-01";  //更新时间
+                        joData.page_num = "1";   //当前页数
+                        joData.page_size = "100"; //本页数据量
 
                         break;
                     }
@@ -1769,26 +1775,310 @@ namespace PTMedicalInsurance.Forms
 
         }
 
-        private void btReSign_Click(object sender, EventArgs e)
+        private void butonMenu1_Click(object sender, EventArgs e)
         {
-            JObject joRtn = new JObject();
-            //签到
-            if (cBus.signIn(out joRtn) != 0)
+             uiContextMenuStrip1.Show(((Sunny.UI.UIButton)sender), new Point(0, butonMenu1.Height));
+        }
+
+        private void ScAllDzToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            AllUpLoad();
+        }
+
+        //更新目录信息(附属信息)
+        private int updateAuxInfo(JObject jo, out string err)
+        {
+            err = "";
+            tbDirectoryCode.Text = JsonHelper.getDestValue(jo, "code");
+            dynamic joData = GetInput(15, out String trade);
+            JObject joRtn = cBus.InvokeMedicalInsuranceInquiry(trade, joData);
+
+            if (joRtn["infcode"].ToString() == "0")
+            {
+                DataTable dtAuxInfo = (DataTable)joRtn["output"]["data"].ToObject(typeof(DataTable));
+
+                DateTime dtToday = DateTime.Today;
+                string chrgitm_lv = "";
+                string begndate = "";
+                string enddate = "";
+                string list_type = "";
+                string med_chrgitm_type = "";
+
+                int iAdpater = 0;
+
+                foreach (DataRow dr in dtAuxInfo.Rows)
+                {
+                    DateTime dtBegin = getDataRowValue(dr, "begndate") == "" ? Convert.ToDateTime("2000-01-01 00:00:00") : Convert.ToDateTime(Utils.convertTimestamp(getDataRowValue(dr, "begndate")));
+                  //DateTime dtEnd = getDataRowValue(dr, "enddate") == "" ? Convert.ToDateTime("2099-01-01 00:00:00") : Convert.ToDateTime(getDataRowValue(dr, "enddate"));
+                    DateTime dtEnd = Convert.ToDateTime("2099-01-01 00:00:00");
+                    if ((dtBegin < dtToday) && (dtToday < dtEnd))
+                    {
+                        iAdpater++;
+                        chrgitm_lv = dr["chrgitm_lv"].ToString();
+                        begndate = Utils.convertTimestamp(dr["begndate"].ToString());
+                       //enddate = dr["enddate"].ToString();
+                        list_type = dr["list_type"].ToString();
+                        med_chrgitm_type = dr["med_chrgitm_type"].ToString();
+                    }
+                }
+
+                //有且只能有一条数据符合
+                if (iAdpater == 1)
+                {
+                    JObject joPamam = new JObject();
+                    joPamam.Add("Code", JsonHelper.getDestValue(jo, "code"));
+                    joPamam.Add("HisType", JsonHelper.getDestValue(jo, "HisType"));
+                    joPamam.Add("StartDate", begndate);
+                    joPamam.Add("EndDate", "2099-01-01 00:00:00");
+                    joPamam.Add("ChargeItemLevel", chrgitm_lv);
+                    if (chrgitm_lv == "01")
+                    {
+                        joPamam.Add("ChargeItemLevelName", "甲类");
+                    }
+                    if (chrgitm_lv == "02")
+                    {
+                        joPamam.Add("ChargeItemLevelName", "乙类");
+                    }
+                    if (chrgitm_lv == "02")
+                    {
+                        joPamam.Add("ChargeItemLevelName", "丙类");
+                    }
+                    joPamam.Add("ChargeItemLevel", chrgitm_lv);
+                    joPamam.Add("ListType", list_type);
+                    joPamam.Add("ChargeItemType", med_chrgitm_type);
+
+                    JObject joUpdateRtn = mIS.UpdateDirectoryBySelf(joPamam);
+                    string error = "";
+                    if (JsonHelper.parseIrisRtnValue(joUpdateRtn, out error) != 0)
+                    {
+                        err = "修改失败:" + error;
+                        return -1;
+                    }
+                    else
+                    {
+                        err = "修改成功";
+                        return 0;
+                    }
+                }
+                else
+                {
+                    err = "中心返回符合条数的记录不唯一或者为空,请检查!";
+                    return -1;
+                }
+            }
+            else
             {
-                MessageBox.Show("签到异常:" + joRtn["err_msg"].ToString());
+                err = "查询中心数据出错,请检查!";
+                return -1;
+            }
+        }
+        public string getDataRowValue(DataRow dr, string columnName)
+        {
+            if (!dr.Table.Columns.Contains(columnName))
+            {
+                return "";
             }
             else
             {
-                Global.curEvt.signno = JsonHelper.getDestValue(joRtn, "output.signinoutb.sign_no");
-                string errMsg;
-                //插入签到表
-                if (mIS.updateSignRecord(Global.curEvt.signno, out errMsg) !=0)
+                return dr[columnName].ToString();
+            }
+        }
+        //更新目录信息(附属信息)
+        private int updateCellingPrice(JObject jo, out string err)
+        {
+            err = "";
+            tbDirectoryCode.Text = JsonHelper.getDestValue(jo, "code");
+            dynamic joData = GetInput(18, out String trade);
+            JObject joRtn = cBus.InvokeMedicalInsuranceInquiry(trade, joData);
+
+            if (joRtn["infcode"].ToString() == "0")
+            {
+                DataTable dtAuxInfo = (DataTable)joRtn["output"]["data"].ToObject(typeof(DataTable));
+
+                DateTime dtToday = DateTime.Today;
+                string cellingPrice = "";
+                string begndate = "";
+                string enddate = "";
+
+
+                int iAdpater = 0;
+
+                foreach (DataRow dr in dtAuxInfo.Rows)
                 {
-                    MessageBox.Show(errMsg);
+                     DateTime dtBegin = getDataRowValue(dr, "begndate") == "" ? Convert.ToDateTime("2000-01-01 00:00:00") : Convert.ToDateTime(Utils.convertTimestamp(getDataRowValue(dr, "begndate")));
+                    //DateTime dtBegin = Convert.ToDateTime("2021-01-01");
+                    // DateTime dtEnd = getDataRowValue(dr, "enddate") == "" ? Convert.ToDateTime("2099-01-01 00:00:00") : Convert.ToDateTime(getDataRowValue(dr, "enddate"));
+                    DateTime dtEnd =  Convert.ToDateTime("2099-01-01 00:00:00");
+                    if ((dtBegin < dtToday) && (dtToday < dtEnd))
+                    {
+                        iAdpater++;
+                        cellingPrice = dr["hilist_pric_uplmt_amt"].ToString();
+                        begndate = Utils.convertTimestamp(dr["begndate"].ToString());
+                        enddate = "2099-01-01 00:00:00";
+
+                    }
+                }
+
+                //有且只能有一条数据符合
+                if (iAdpater == 1)
+                {
+                    JObject joPamam = new JObject();
+                    joPamam.Add("Code", JsonHelper.getDestValue(jo, "code"));
+                    joPamam.Add("HisType", JsonHelper.getDestValue(jo, "HisType"));
+                    joPamam.Add("StartDate", begndate);
+                    joPamam.Add("EndDate", "2099-01-01 00:00:00");
+                    joPamam.Add("CeilingPrice", cellingPrice);
+
+
+                    JObject joUpdateRtn = mIS.UpdateDirectoryBySelf(joPamam);
+                    string error = "";
+                    if (JsonHelper.parseIrisRtnValue(joUpdateRtn, out error) != 0)
+                    {
+                        err = "修改失败:" + error;
+                        return -1;
+                    }
+                    else
+                    {
+                        err = "修改成功";
+                        return 0;
+                    }
+                }
+                else
+                {
+                    err = "中心返回符合条数的记录不唯一或者为空,请检查!";
+                    return -1;
+                }
+            }
+            else
+            {
+                err = "查询中心数据出错,请检查!";
+                return -1;
+            }
+        }
+        private void CxScAllDzToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            AllCancelUpload();
+        }
+
+        private int updateAuxAndCellPrice(JObject jo, out string error)
+        {
+            string err = "";
+            int iResult = 0;
+            error = "";
+            if (updateAuxInfo(jo, out err) != 0)
+            {
+                error = $"更新目录信息失败{err}";
+                iResult--;
+            }
+
+            err = "";
+            if (updateCellingPrice(jo, out err) != 0)
+            {
+                error = $"{error};更新限价信息失败{err}";
+                iResult--;
+            }
+
+            return iResult;
+        }
+
+        private int updateAuxAndCellPriceWrapper(JObject jo, OutParamWrapper outParamWrapper)
+        {
+            string err;
+            int iresult = updateAuxAndCellPrice(jo, out err);
+            outParamWrapper.Value = err;
+            return iresult;
+        }
+        private void UpdateAllToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            batchUpdateMappedInsuInfo(updateAuxAndCellPriceWrapper);
+        }
+
+
+        private int updateMappedInsuInfo(object[] o, out string errMsg, DataLoader.ProgressCallback callback, DataLoader.ProgressMaxCallback maxCallback, BackgroundWorker worker)
+        {
+            int iFalse = 0;
+            int iCount = 0;
+            List<string> errList = new List<string>();
+
+            if (maxCallback != null)
+            {
+                maxCallback(iTotalCount);
+            }
+
+            foreach (DataRow dr in dtAllMapped.Rows)
+            {
+                JObject jo = new JObject();
+                jo.Add("code", dr["InsuCode"].ToString());
+                jo.Add("HisType", dr["HisType"].ToString());
+                OutParamWrapper outParWarp = new OutParamWrapper();
+                if (action(jo, outParWarp) != 0)
+                {
+                    iFalse++;
+                    errList.Add(outParWarp.Value);
+                    Global.writeLog(outParWarp.Value);
+                }
+
+                iCount++;
+
+                // 检查是否应取消操作
+                if (worker.CancellationPending)
+                {
+                    errMsg = "操作取消!";
+                    return -1; // 或者其他表示取消的返回值
                 }
-                MessageBox.Show("重新签到成功");
+
+                if (callback != null)
+                {
+                    callback(iCount);
+                }
+            }
+
+            if (iFalse != 0)
+            {
+                errMsg = ($"总共{iCount}条数据更新完成,但有{iFalse}条更新发生错误!");
+                Global.writeLog($"{errMsg}\r\n{errList}");
+            }
+            else
+            {
+                errMsg = ($"全部数据({iCount}条)更新完成");
             }
+            return iFalse;
         }
+        //更新所有对照目录信息:收费等级/限价/比例
+        private void batchUpdateMappedInsuInfo(Func<JObject, OutParamWrapper, int> _action)
+        {
+            action = _action;
+            string sqlStr = $"select * from HB_MedInsuMapRelation where Interface_Dr='{Global.inf.interfaceDr}' and Hospital_Dr ='{Global.inf.hospitalDr}'";
+            JObject joSqlstr = new JObject();
+            joSqlstr.Add("sqlStr", sqlStr);
+            JObject joRtn = mIS.QueryMappedData(joSqlstr, "查询所有已对照数据");
+
+            iTotalCount = int.Parse(joRtn["result"]["total"].ToString());
+            dtAllMapped = (System.Data.DataTable)joRtn["result"]["data"].ToObject(typeof(System.Data.DataTable));
+
+            DataLoader _dataLoader;
+            _dataLoader = new DataLoader(updateMappedInsuInfo, this);
+            _dataLoader.SetProgressBar(ProgressBarStyle.Continuous, "正在更新...", 50);
+
+            _dataLoader.Start(new object[] { iTotalCount }, (result, errMsg) =>
+            {
+                // 在这里处理结果和错误信息
+                if (result == 0)
+                {
+                    MessageBox.Show(errMsg);
+                }
+                else
+                {
+                    MessageBox.Show(errMsg);
+                }
+            });
+        }
+
+
+    }
+    public class OutParamWrapper
+    {
+        public string Value { get; set; }
     }
-    
+
 }

+ 62 - 43
Forms/BasicData.designer.cs

@@ -89,11 +89,10 @@
             this.panel3 = new System.Windows.Forms.Panel();
             this.dgvHISDirectory = new Sunny.UI.UIDataGridView();
             this.panel5 = new System.Windows.Forms.Panel();
+            this.butonMenu1 = new Sunny.UI.UIButton();
             this.uiTextBox7 = new Sunny.UI.UITextBox();
             this.uiTextBox9 = new Sunny.UI.UITextBox();
             this.btnExport = new Sunny.UI.UIButton();
-            this.btnCancelUpShip = new Sunny.UI.UIButton();
-            this.btnUpShip = new Sunny.UI.UIButton();
             this.uiTextBox1 = new Sunny.UI.UITextBox();
             this.rbAll = new Sunny.UI.UIRadioButton();
             this.rbNoMaped = new Sunny.UI.UIRadioButton();
@@ -126,6 +125,15 @@
             this.tsmiSingleUpdateAuxInfo = new System.Windows.Forms.ToolStripMenuItem();
             this.tsmiUpdateAllAuxInfo = new System.Windows.Forms.ToolStripMenuItem();
             this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
+            this.uiContextMenuStrip1 = new Sunny.UI.UIContextMenuStrip();
+            this.导出全部已对照数据ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.按左侧类别导出已对照数据ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.UpdateAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.更新所有对照目录信息甲乙丙类ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.更新所有对照目录限价ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.更新所有目录自付比例ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.ScAllDzToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.CxScAllDzToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.tabControl1.SuspendLayout();
             this.tabPage1.SuspendLayout();
             this.panel1.SuspendLayout();
@@ -159,6 +167,7 @@
             this.pgCenterDirect.SuspendLayout();
             this.uiPanel3.SuspendLayout();
             this.cmsUpdateAuxInfo.SuspendLayout();
+            this.pgHISDirect.SuspendLayout();
             this.SuspendLayout();
             // 
             // tabControl1
@@ -889,10 +898,9 @@
             // 
             // panel5
             // 
+            this.panel5.Controls.Add(this.butonMenu1);
             this.panel5.Controls.Add(this.uiTextBox7);
             this.panel5.Controls.Add(this.btnExport);
-            this.panel5.Controls.Add(this.btnCancelUpShip);
-            this.panel5.Controls.Add(this.btnUpShip);
             this.panel5.Controls.Add(this.uiTextBox1);
             this.panel5.Controls.Add(this.rbAll);
             this.panel5.Controls.Add(this.rbNoMaped);
@@ -905,6 +913,20 @@
             this.panel5.Size = new System.Drawing.Size(1257, 45);
             this.panel5.TabIndex = 1;
             // 
+            // butonMenu1
+            // 
+            this.butonMenu1.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.butonMenu1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.butonMenu1.Location = new System.Drawing.Point(1031, 3);
+            this.butonMenu1.MinimumSize = new System.Drawing.Size(1, 1);
+            this.butonMenu1.Name = "butonMenu1";
+            this.butonMenu1.Size = new System.Drawing.Size(166, 35);
+            this.butonMenu1.TabIndex = 15;
+            this.butonMenu1.Text = "菜单选项";
+            this.butonMenu1.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.butonMenu1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.butonMenu1.Click += new System.EventHandler(this.butonMenu1_Click);
+            // 
             // uiTextBox7
             // 
             this.uiTextBox7.Controls.Add(this.uiTextBox9);
@@ -956,8 +978,8 @@
             this.btnCancelUpShip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnCancelUpShip.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnCancelUpShip.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnCancelUpShip.Location = new System.Drawing.Point(1109, 8);
-            this.btnCancelUpShip.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnCancelUpShip.Location = new System.Drawing.Point(1110, 8);
+            this.btnCancelUpShip.Margin = new System.Windows.Forms.Padding(2);
             this.btnCancelUpShip.MinimumSize = new System.Drawing.Size(1, 1);
             this.btnCancelUpShip.Name = "btnCancelUpShip";
             this.btnCancelUpShip.Size = new System.Drawing.Size(140, 28);
@@ -972,8 +994,8 @@
             this.btnUpShip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnUpShip.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnUpShip.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnUpShip.Location = new System.Drawing.Point(994, 8);
-            this.btnUpShip.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnUpShip.Location = new System.Drawing.Point(995, 8);
+            this.btnUpShip.Margin = new System.Windows.Forms.Padding(2);
             this.btnUpShip.MinimumSize = new System.Drawing.Size(1, 1);
             this.btnUpShip.Name = "btnUpShip";
             this.btnUpShip.Size = new System.Drawing.Size(110, 28);
@@ -1069,38 +1091,6 @@
             this.tbHISDirectoryFilter.Watermark = "HIS名称/编码";
             this.tbHISDirectoryFilter.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            // pgHISDirect
-            // 
-            this.pgHISDirect.Controls.Add(this.LabExplain);
-            this.pgHISDirect.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.pgHISDirect.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pgHISDirect.Location = new System.Drawing.Point(0, 237);
-            this.pgHISDirect.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.pgHISDirect.MinimumSize = new System.Drawing.Size(1, 1);
-            this.pgHISDirect.Name = "pgHISDirect";
-            this.pgHISDirect.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
-            this.pgHISDirect.ShowJumpButton = false;
-            this.pgHISDirect.ShowText = false;
-            this.pgHISDirect.Size = new System.Drawing.Size(1257, 35);
-            this.pgHISDirect.TabIndex = 6;
-            this.pgHISDirect.Text = "uiPagination2";
-            this.pgHISDirect.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.pgHISDirect.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            this.pgHISDirect.PageChanged += new Sunny.UI.UIPagination.OnPageChangeEventHandler(this.pgHISDirect_PageChanged);
-            this.pgHISDirect.Click += new System.EventHandler(this.btnQuery_Click);
-            // 
-            // LabExplain
-            // 
-            this.LabExplain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.LabExplain.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.LabExplain.Location = new System.Drawing.Point(741, 3);
-            this.LabExplain.Name = "LabExplain";
-            this.LabExplain.Size = new System.Drawing.Size(455, 30);
-            this.LabExplain.TabIndex = 26;
-            this.LabExplain.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.LabExplain.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
             // panel4
             // 
             this.panel4.Controls.Add(this.dgvCenterDirectory);
@@ -1472,6 +1462,37 @@
             this.tsmiUpdateAllAuxInfo.Size = new System.Drawing.Size(240, 26);
             this.tsmiUpdateAllAuxInfo.Text = "更新所有目录附属信息";
             // 
+            // LabExplain
+            // 
+            this.LabExplain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.LabExplain.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.LabExplain.Location = new System.Drawing.Point(741, 3);
+            this.LabExplain.Name = "LabExplain";
+            this.LabExplain.Size = new System.Drawing.Size(454, 30);
+            this.LabExplain.TabIndex = 26;
+            this.LabExplain.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.LabExplain.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // pgHISDirect
+            // 
+            this.pgHISDirect.Controls.Add(this.LabExplain);
+            this.pgHISDirect.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.pgHISDirect.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pgHISDirect.Location = new System.Drawing.Point(0, 238);
+            this.pgHISDirect.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.pgHISDirect.MinimumSize = new System.Drawing.Size(1, 1);
+            this.pgHISDirect.Name = "pgHISDirect";
+            this.pgHISDirect.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
+            this.pgHISDirect.ShowText = false;
+            this.pgHISDirect.Size = new System.Drawing.Size(1257, 35);
+            this.pgHISDirect.TabIndex = 6;
+            this.pgHISDirect.Text = "uiPagination2";
+            this.pgHISDirect.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.pgHISDirect.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.pgHISDirect.PageChanged += new Sunny.UI.UIPagination.OnPageChangeEventHandler(this.pgHISDirect_PageChanged);
+            this.pgHISDirect.Click += new System.EventHandler(this.btnQuery_Click);
+            // 
             // BasicData
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1521,6 +1542,7 @@
             this.pgCenterDirect.ResumeLayout(false);
             this.uiPanel3.ResumeLayout(false);
             this.cmsUpdateAuxInfo.ResumeLayout(false);
+            this.pgHISDirect.ResumeLayout(false);
             this.ResumeLayout(false);
 
         }
@@ -1591,8 +1613,6 @@
         private Sunny.UI.UIButton btnExit;
         private Sunny.UI.UIButton uiButton1;
         private System.ComponentModel.BackgroundWorker backgroundWorker1;
-        private Sunny.UI.UIButton btnCancelUpShip;
-        private Sunny.UI.UIButton btnUpShip;
         private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem_CancelUpload;
         private Sunny.UI.UIRadioButtonGroup rbgDirecType;
         private Sunny.UI.UIButton btnExport;
@@ -1609,7 +1629,6 @@
         private Sunny.UI.UITextBox uiTextBox9;
         private Sunny.UI.UIPagination pgHISDirect;
         private Sunny.UI.UILabel LabExplain;
-        private Sunny.UI.UIButton btReSign;
     }
 }
 

+ 3 - 0
Forms/BasicData.resx

@@ -129,6 +129,9 @@
   <metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>499, 17</value>
   </metadata>
+  <metadata name="uiContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>673, 17</value>
+  </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>63</value>
   </metadata>

+ 414 - 379
Forms/SpecialDrugSelect.Designer.cs

@@ -28,48 +28,50 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle46 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle47 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle49 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle50 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
             this.uiTabControl1 = new Sunny.UI.UITabControl();
             this.tabPage1 = new System.Windows.Forms.TabPage();
-            this.tabPage2 = new System.Windows.Forms.TabPage();
-            this.uiDataGridView1 = new Sunny.UI.UIDataGridView();
-            this.uiPanel1 = new Sunny.UI.UIPanel();
-            this.uiDatetimePicker1 = new Sunny.UI.UIDatetimePicker();
-            this.uiLabel1 = new Sunny.UI.UILabel();
-            this.uiLabel2 = new Sunny.UI.UILabel();
-            this.uiDatetimePicker2 = new Sunny.UI.UIDatetimePicker();
-            this.uiButton1 = new Sunny.UI.UIButton();
-            this.uiDataGridView2 = new Sunny.UI.UIDataGridView();
             this.uiPanel2 = new Sunny.UI.UIPanel();
-            this.uiLabel3 = new Sunny.UI.UILabel();
-            this.uiLabel4 = new Sunny.UI.UILabel();
-            this.uiDatetimePicker3 = new Sunny.UI.UIDatetimePicker();
-            this.uiDatetimePicker4 = new Sunny.UI.UIDatetimePicker();
-            this.uiButton3 = new Sunny.UI.UIButton();
-            this.uiTextBox1 = new Sunny.UI.UITextBox();
-            this.uiTextBox2 = new Sunny.UI.UITextBox();
-            this.uiLabel5 = new Sunny.UI.UILabel();
             this.uiLabel6 = new Sunny.UI.UILabel();
-            this.uiLabel7 = new Sunny.UI.UILabel();
-            this.uiLabel8 = new Sunny.UI.UILabel();
-            this.uiTextBox3 = new Sunny.UI.UITextBox();
+            this.uiLabel5 = new Sunny.UI.UILabel();
+            this.uiTextBox2 = new Sunny.UI.UITextBox();
+            this.uiTextBox1 = new Sunny.UI.UITextBox();
+            this.uiButton3 = new Sunny.UI.UIButton();
+            this.uiDatetimePicker4 = new Sunny.UI.UIDatetimePicker();
+            this.uiDatetimePicker3 = new Sunny.UI.UIDatetimePicker();
+            this.uiLabel4 = new Sunny.UI.UILabel();
+            this.uiLabel3 = new Sunny.UI.UILabel();
+            this.uiDataGridView2 = new Sunny.UI.UIDataGridView();
+            this.tabPage2 = new System.Windows.Forms.TabPage();
+            this.uiPanel1 = new Sunny.UI.UIPanel();
             this.uiTextBox4 = new Sunny.UI.UITextBox();
+            this.uiTextBox3 = new Sunny.UI.UITextBox();
+            this.uiLabel8 = new Sunny.UI.UILabel();
+            this.uiLabel7 = new Sunny.UI.UILabel();
+            this.uiButton1 = new Sunny.UI.UIButton();
+            this.uiDatetimePicker2 = new Sunny.UI.UIDatetimePicker();
+            this.uiLabel2 = new Sunny.UI.UILabel();
+            this.uiLabel1 = new Sunny.UI.UILabel();
+            this.uiDatetimePicker1 = new Sunny.UI.UIDatetimePicker();
+            this.uiDataGridView1 = new Sunny.UI.UIDataGridView();
+            this.uiTextBox5 = new Sunny.UI.UITextBox();
+            this.uiLabel9 = new Sunny.UI.UILabel();
             this.uiTabControl1.SuspendLayout();
             this.tabPage1.SuspendLayout();
+            this.uiPanel2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.uiDataGridView2)).BeginInit();
             this.tabPage2.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.uiDataGridView1)).BeginInit();
             this.uiPanel1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.uiDataGridView2)).BeginInit();
-            this.uiPanel2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.uiDataGridView1)).BeginInit();
             this.SuspendLayout();
             // 
             // uiTabControl1
@@ -100,6 +102,207 @@
             this.tabPage1.Text = "慢特病用药记录数据查询";
             this.tabPage1.UseVisualStyleBackColor = true;
             // 
+            // uiPanel2
+            // 
+            this.uiPanel2.Controls.Add(this.uiLabel9);
+            this.uiPanel2.Controls.Add(this.uiTextBox5);
+            this.uiPanel2.Controls.Add(this.uiLabel6);
+            this.uiPanel2.Controls.Add(this.uiLabel5);
+            this.uiPanel2.Controls.Add(this.uiTextBox2);
+            this.uiPanel2.Controls.Add(this.uiTextBox1);
+            this.uiPanel2.Controls.Add(this.uiButton3);
+            this.uiPanel2.Controls.Add(this.uiDatetimePicker4);
+            this.uiPanel2.Controls.Add(this.uiDatetimePicker3);
+            this.uiPanel2.Controls.Add(this.uiLabel4);
+            this.uiPanel2.Controls.Add(this.uiLabel3);
+            this.uiPanel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiPanel2.Location = new System.Drawing.Point(0, 472);
+            this.uiPanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiPanel2.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiPanel2.Name = "uiPanel2";
+            this.uiPanel2.Size = new System.Drawing.Size(1410, 116);
+            this.uiPanel2.TabIndex = 1;
+            this.uiPanel2.Text = null;
+            this.uiPanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiPanel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiPanel2.Click += new System.EventHandler(this.uiPanel2_Click);
+            // 
+            // uiLabel6
+            // 
+            this.uiLabel6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel6.Location = new System.Drawing.Point(479, 78);
+            this.uiLabel6.Name = "uiLabel6";
+            this.uiLabel6.Size = new System.Drawing.Size(100, 23);
+            this.uiLabel6.TabIndex = 8;
+            this.uiLabel6.Text = "页记录数";
+            this.uiLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel6.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel5
+            // 
+            this.uiLabel5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel5.Location = new System.Drawing.Point(479, 31);
+            this.uiLabel5.Name = "uiLabel5";
+            this.uiLabel5.Size = new System.Drawing.Size(100, 23);
+            this.uiLabel5.TabIndex = 7;
+            this.uiLabel5.Text = "页数";
+            this.uiLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiTextBox2
+            // 
+            this.uiTextBox2.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.uiTextBox2.DoubleValue = 100D;
+            this.uiTextBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTextBox2.IntValue = 100;
+            this.uiTextBox2.Location = new System.Drawing.Point(586, 72);
+            this.uiTextBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTextBox2.MinimumSize = new System.Drawing.Size(1, 16);
+            this.uiTextBox2.Name = "uiTextBox2";
+            this.uiTextBox2.ShowText = false;
+            this.uiTextBox2.Size = new System.Drawing.Size(150, 29);
+            this.uiTextBox2.TabIndex = 6;
+            this.uiTextBox2.Text = "100";
+            this.uiTextBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiTextBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiTextBox1
+            // 
+            this.uiTextBox1.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.uiTextBox1.DoubleValue = 1D;
+            this.uiTextBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTextBox1.IntValue = 1;
+            this.uiTextBox1.Location = new System.Drawing.Point(586, 25);
+            this.uiTextBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTextBox1.MinimumSize = new System.Drawing.Size(1, 16);
+            this.uiTextBox1.Name = "uiTextBox1";
+            this.uiTextBox1.ShowText = false;
+            this.uiTextBox1.Size = new System.Drawing.Size(150, 29);
+            this.uiTextBox1.TabIndex = 5;
+            this.uiTextBox1.Text = "1";
+            this.uiTextBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiTextBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiButton3
+            // 
+            this.uiButton3.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.uiButton3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton3.Location = new System.Drawing.Point(1232, 50);
+            this.uiButton3.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiButton3.Name = "uiButton3";
+            this.uiButton3.Size = new System.Drawing.Size(100, 35);
+            this.uiButton3.TabIndex = 4;
+            this.uiButton3.Text = "查询";
+            this.uiButton3.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiButton3.Click += new System.EventHandler(this.uiButton3_Click);
+            // 
+            // uiDatetimePicker4
+            // 
+            this.uiDatetimePicker4.FillColor = System.Drawing.Color.White;
+            this.uiDatetimePicker4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiDatetimePicker4.Location = new System.Drawing.Point(233, 72);
+            this.uiDatetimePicker4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiDatetimePicker4.MaxLength = 19;
+            this.uiDatetimePicker4.MinimumSize = new System.Drawing.Size(63, 0);
+            this.uiDatetimePicker4.Name = "uiDatetimePicker4";
+            this.uiDatetimePicker4.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.uiDatetimePicker4.Size = new System.Drawing.Size(200, 29);
+            this.uiDatetimePicker4.SymbolDropDown = 61555;
+            this.uiDatetimePicker4.SymbolNormal = 61555;
+            this.uiDatetimePicker4.TabIndex = 3;
+            this.uiDatetimePicker4.Text = "2025-12-30 10:01:45";
+            this.uiDatetimePicker4.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiDatetimePicker4.Value = new System.DateTime(2025, 12, 30, 10, 1, 45, 211);
+            this.uiDatetimePicker4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiDatetimePicker3
+            // 
+            this.uiDatetimePicker3.FillColor = System.Drawing.Color.White;
+            this.uiDatetimePicker3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiDatetimePicker3.Location = new System.Drawing.Point(233, 25);
+            this.uiDatetimePicker3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiDatetimePicker3.MaxLength = 19;
+            this.uiDatetimePicker3.MinimumSize = new System.Drawing.Size(63, 0);
+            this.uiDatetimePicker3.Name = "uiDatetimePicker3";
+            this.uiDatetimePicker3.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.uiDatetimePicker3.Size = new System.Drawing.Size(200, 29);
+            this.uiDatetimePicker3.SymbolDropDown = 61555;
+            this.uiDatetimePicker3.SymbolNormal = 61555;
+            this.uiDatetimePicker3.TabIndex = 2;
+            this.uiDatetimePicker3.Text = "2025-12-30 10:01:45";
+            this.uiDatetimePicker3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiDatetimePicker3.Value = new System.DateTime(2025, 12, 30, 10, 1, 45, 211);
+            this.uiDatetimePicker3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel4
+            // 
+            this.uiLabel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel4.Location = new System.Drawing.Point(104, 72);
+            this.uiLabel4.Name = "uiLabel4";
+            this.uiLabel4.Size = new System.Drawing.Size(100, 23);
+            this.uiLabel4.TabIndex = 1;
+            this.uiLabel4.Text = "截止时间";
+            this.uiLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel3
+            // 
+            this.uiLabel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel3.Location = new System.Drawing.Point(104, 25);
+            this.uiLabel3.Name = "uiLabel3";
+            this.uiLabel3.Size = new System.Drawing.Size(100, 23);
+            this.uiLabel3.TabIndex = 0;
+            this.uiLabel3.Text = "开始时间";
+            this.uiLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiDataGridView2
+            // 
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.uiDataGridView2.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            this.uiDataGridView2.BackgroundColor = System.Drawing.Color.White;
+            this.uiDataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.uiDataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            this.uiDataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.uiDataGridView2.DefaultCellStyle = dataGridViewCellStyle3;
+            this.uiDataGridView2.EnableHeadersVisualStyles = false;
+            this.uiDataGridView2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiDataGridView2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            this.uiDataGridView2.Location = new System.Drawing.Point(0, 0);
+            this.uiDataGridView2.Name = "uiDataGridView2";
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.uiDataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiDataGridView2.RowsDefaultCellStyle = dataGridViewCellStyle5;
+            this.uiDataGridView2.RowTemplate.Height = 23;
+            this.uiDataGridView2.SelectedIndex = -1;
+            this.uiDataGridView2.Size = new System.Drawing.Size(1410, 473);
+            this.uiDataGridView2.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.uiDataGridView2.TabIndex = 0;
+            this.uiDataGridView2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
             // tabPage2
             // 
             this.tabPage2.Controls.Add(this.uiPanel1);
@@ -111,52 +314,6 @@
             this.tabPage2.Text = "慢特病用药记录数据统计";
             this.tabPage2.UseVisualStyleBackColor = true;
             // 
-            // uiDataGridView1
-            // 
-            dataGridViewCellStyle41.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.uiDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle41;
-            this.uiDataGridView1.BackgroundColor = System.Drawing.Color.White;
-            this.uiDataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle42.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle42.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle42.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle42.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle42.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.uiDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle42;
-            this.uiDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle43.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle43.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle43.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle43.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle43.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.uiDataGridView1.DefaultCellStyle = dataGridViewCellStyle43;
-            this.uiDataGridView1.EnableHeadersVisualStyles = false;
-            this.uiDataGridView1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiDataGridView1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            this.uiDataGridView1.Location = new System.Drawing.Point(3, 3);
-            this.uiDataGridView1.Name = "uiDataGridView1";
-            dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle44.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle44.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle44.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle44.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle44.SelectionForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.uiDataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle44;
-            dataGridViewCellStyle45.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle45.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle45;
-            this.uiDataGridView1.RowTemplate.Height = 23;
-            this.uiDataGridView1.SelectedIndex = -1;
-            this.uiDataGridView1.Size = new System.Drawing.Size(1407, 478);
-            this.uiDataGridView1.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.uiDataGridView1.TabIndex = 0;
-            this.uiDataGridView1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
             // uiPanel1
             // 
             this.uiPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
@@ -176,69 +333,68 @@
             this.uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiPanel1.Name = "uiPanel1";
-            this.uiPanel1.Size = new System.Drawing.Size(1410, 108);
+            this.uiPanel1.Radius = 1;
+            this.uiPanel1.Size = new System.Drawing.Size(197, 1);
             this.uiPanel1.TabIndex = 1;
+            this.uiPanel1.Text = null;
             this.uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
             this.uiPanel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            // uiDatetimePicker1
-            // 
-            this.uiDatetimePicker1.FillColor = System.Drawing.Color.White;
-            this.uiDatetimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiDatetimePicker1.Location = new System.Drawing.Point(226, 9);
-            this.uiDatetimePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiDatetimePicker1.MaxLength = 19;
-            this.uiDatetimePicker1.MinimumSize = new System.Drawing.Size(63, 0);
-            this.uiDatetimePicker1.Name = "uiDatetimePicker1";
-            this.uiDatetimePicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
-            this.uiDatetimePicker1.Size = new System.Drawing.Size(200, 29);
-            this.uiDatetimePicker1.SymbolDropDown = 61555;
-            this.uiDatetimePicker1.SymbolNormal = 61555;
-            this.uiDatetimePicker1.TabIndex = 0;
-            this.uiDatetimePicker1.Text = "uiDatetimePicker1";
-            this.uiDatetimePicker1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiDatetimePicker1.Value = new System.DateTime(2025, 12, 30, 9, 52, 6, 281);
-            this.uiDatetimePicker1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel1
+            // uiTextBox4
             // 
-            this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel1.Location = new System.Drawing.Point(76, 15);
-            this.uiLabel1.Name = "uiLabel1";
-            this.uiLabel1.Size = new System.Drawing.Size(100, 23);
-            this.uiLabel1.TabIndex = 1;
-            this.uiLabel1.Text = "开始时间";
-            this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiLabel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiTextBox4.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.uiTextBox4.DoubleValue = 100D;
+            this.uiTextBox4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTextBox4.IntValue = 100;
+            this.uiTextBox4.Location = new System.Drawing.Point(571, 64);
+            this.uiTextBox4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTextBox4.MinimumSize = new System.Drawing.Size(1, 16);
+            this.uiTextBox4.Name = "uiTextBox4";
+            this.uiTextBox4.ShowText = false;
+            this.uiTextBox4.Size = new System.Drawing.Size(150, 29);
+            this.uiTextBox4.TabIndex = 11;
+            this.uiTextBox4.Text = "100";
+            this.uiTextBox4.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiTextBox4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            // uiLabel2
+            // uiTextBox3
             // 
-            this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel2.Location = new System.Drawing.Point(76, 70);
-            this.uiLabel2.Name = "uiLabel2";
-            this.uiLabel2.Size = new System.Drawing.Size(100, 23);
-            this.uiLabel2.TabIndex = 2;
-            this.uiLabel2.Text = "结束时间";
-            this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiLabel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiTextBox3.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.uiTextBox3.DoubleValue = 1D;
+            this.uiTextBox3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTextBox3.IntValue = 1;
+            this.uiTextBox3.Location = new System.Drawing.Point(571, 15);
+            this.uiTextBox3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTextBox3.MinimumSize = new System.Drawing.Size(1, 16);
+            this.uiTextBox3.Name = "uiTextBox3";
+            this.uiTextBox3.ShowText = false;
+            this.uiTextBox3.Size = new System.Drawing.Size(150, 29);
+            this.uiTextBox3.TabIndex = 10;
+            this.uiTextBox3.Text = "1";
+            this.uiTextBox3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiTextBox3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            // uiDatetimePicker2
+            // uiLabel8
             // 
-            this.uiDatetimePicker2.FillColor = System.Drawing.Color.White;
-            this.uiDatetimePicker2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiDatetimePicker2.Location = new System.Drawing.Point(226, 64);
-            this.uiDatetimePicker2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiDatetimePicker2.MaxLength = 19;
-            this.uiDatetimePicker2.MinimumSize = new System.Drawing.Size(63, 0);
-            this.uiDatetimePicker2.Name = "uiDatetimePicker2";
-            this.uiDatetimePicker2.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
-            this.uiDatetimePicker2.Size = new System.Drawing.Size(200, 29);
-            this.uiDatetimePicker2.SymbolDropDown = 61555;
-            this.uiDatetimePicker2.SymbolNormal = 61555;
-            this.uiDatetimePicker2.TabIndex = 3;
-            this.uiDatetimePicker2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiDatetimePicker2.Value = new System.DateTime(2025, 12, 30, 9, 52, 6, 281);
-            this.uiDatetimePicker2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiLabel8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel8.Location = new System.Drawing.Point(479, 70);
+            this.uiLabel8.Name = "uiLabel8";
+            this.uiLabel8.Size = new System.Drawing.Size(100, 23);
+            this.uiLabel8.TabIndex = 9;
+            this.uiLabel8.Text = "页记录数";
+            this.uiLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel8.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel7
+            // 
+            this.uiLabel7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel7.Location = new System.Drawing.Point(479, 15);
+            this.uiLabel7.Name = "uiLabel7";
+            this.uiLabel7.Size = new System.Drawing.Size(100, 23);
+            this.uiLabel7.TabIndex = 8;
+            this.uiLabel7.Text = "页数";
+            this.uiLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel7.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
             // uiButton1
             // 
@@ -254,259 +410,136 @@
             this.uiButton1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             this.uiButton1.Click += new System.EventHandler(this.uiButton1_Click);
             // 
-            // uiDataGridView2
-            // 
-            dataGridViewCellStyle46.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.uiDataGridView2.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle46;
-            this.uiDataGridView2.BackgroundColor = System.Drawing.Color.White;
-            this.uiDataGridView2.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle47.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle47.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle47.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle47.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle47.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle47.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle47.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.uiDataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle47;
-            this.uiDataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle48.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle48.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle48.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle48.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle48.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle48.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle48.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.uiDataGridView2.DefaultCellStyle = dataGridViewCellStyle48;
-            this.uiDataGridView2.EnableHeadersVisualStyles = false;
-            this.uiDataGridView2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiDataGridView2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            this.uiDataGridView2.Location = new System.Drawing.Point(0, 0);
-            this.uiDataGridView2.Name = "uiDataGridView2";
-            dataGridViewCellStyle49.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle49.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle49.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle49.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle49.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle49.SelectionForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle49.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.uiDataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle49;
-            dataGridViewCellStyle50.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle50.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiDataGridView2.RowsDefaultCellStyle = dataGridViewCellStyle50;
-            this.uiDataGridView2.RowTemplate.Height = 23;
-            this.uiDataGridView2.SelectedIndex = -1;
-            this.uiDataGridView2.Size = new System.Drawing.Size(1410, 473);
-            this.uiDataGridView2.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.uiDataGridView2.TabIndex = 0;
-            this.uiDataGridView2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiPanel2
-            // 
-            this.uiPanel2.Controls.Add(this.uiLabel6);
-            this.uiPanel2.Controls.Add(this.uiLabel5);
-            this.uiPanel2.Controls.Add(this.uiTextBox2);
-            this.uiPanel2.Controls.Add(this.uiTextBox1);
-            this.uiPanel2.Controls.Add(this.uiButton3);
-            this.uiPanel2.Controls.Add(this.uiDatetimePicker4);
-            this.uiPanel2.Controls.Add(this.uiDatetimePicker3);
-            this.uiPanel2.Controls.Add(this.uiLabel4);
-            this.uiPanel2.Controls.Add(this.uiLabel3);
-            this.uiPanel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiPanel2.Location = new System.Drawing.Point(0, 472);
-            this.uiPanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiPanel2.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiPanel2.Name = "uiPanel2";
-            this.uiPanel2.Size = new System.Drawing.Size(1410, 116);
-            this.uiPanel2.TabIndex = 1;
-            this.uiPanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiPanel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            this.uiPanel2.Click += new System.EventHandler(this.uiPanel2_Click);
-            // 
-            // uiLabel3
-            // 
-            this.uiLabel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel3.Location = new System.Drawing.Point(104, 25);
-            this.uiLabel3.Name = "uiLabel3";
-            this.uiLabel3.Size = new System.Drawing.Size(100, 23);
-            this.uiLabel3.TabIndex = 0;
-            this.uiLabel3.Text = "开始时间";
-            this.uiLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiLabel3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel4
-            // 
-            this.uiLabel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel4.Location = new System.Drawing.Point(104, 72);
-            this.uiLabel4.Name = "uiLabel4";
-            this.uiLabel4.Size = new System.Drawing.Size(100, 23);
-            this.uiLabel4.TabIndex = 1;
-            this.uiLabel4.Text = "截止时间";
-            this.uiLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiLabel4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiDatetimePicker3
-            // 
-            this.uiDatetimePicker3.FillColor = System.Drawing.Color.White;
-            this.uiDatetimePicker3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiDatetimePicker3.Location = new System.Drawing.Point(233, 25);
-            this.uiDatetimePicker3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiDatetimePicker3.MaxLength = 19;
-            this.uiDatetimePicker3.MinimumSize = new System.Drawing.Size(63, 0);
-            this.uiDatetimePicker3.Name = "uiDatetimePicker3";
-            this.uiDatetimePicker3.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
-            this.uiDatetimePicker3.Size = new System.Drawing.Size(200, 29);
-            this.uiDatetimePicker3.SymbolDropDown = 61555;
-            this.uiDatetimePicker3.SymbolNormal = 61555;
-            this.uiDatetimePicker3.TabIndex = 2;
-            this.uiDatetimePicker3.Text = "uiDatetimePicker3";
-            this.uiDatetimePicker3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiDatetimePicker3.Value = new System.DateTime(2025, 12, 30, 10, 1, 45, 211);
-            this.uiDatetimePicker3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiDatetimePicker4
-            // 
-            this.uiDatetimePicker4.FillColor = System.Drawing.Color.White;
-            this.uiDatetimePicker4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiDatetimePicker4.Location = new System.Drawing.Point(233, 72);
-            this.uiDatetimePicker4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiDatetimePicker4.MaxLength = 19;
-            this.uiDatetimePicker4.MinimumSize = new System.Drawing.Size(63, 0);
-            this.uiDatetimePicker4.Name = "uiDatetimePicker4";
-            this.uiDatetimePicker4.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
-            this.uiDatetimePicker4.Size = new System.Drawing.Size(200, 29);
-            this.uiDatetimePicker4.SymbolDropDown = 61555;
-            this.uiDatetimePicker4.SymbolNormal = 61555;
-            this.uiDatetimePicker4.TabIndex = 3;
-            this.uiDatetimePicker4.Text = "2025-12-30 10:01:45";
-            this.uiDatetimePicker4.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiDatetimePicker4.Value = new System.DateTime(2025, 12, 30, 10, 1, 45, 211);
-            this.uiDatetimePicker4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiButton3
-            // 
-            this.uiButton3.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.uiButton3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiButton3.Location = new System.Drawing.Point(951, 43);
-            this.uiButton3.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiButton3.Name = "uiButton3";
-            this.uiButton3.Size = new System.Drawing.Size(100, 35);
-            this.uiButton3.TabIndex = 4;
-            this.uiButton3.Text = "查询";
-            this.uiButton3.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiButton3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            this.uiButton3.Click += new System.EventHandler(this.uiButton3_Click);
-            // 
-            // uiTextBox1
-            // 
-            this.uiTextBox1.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.uiTextBox1.DoubleValue = 1D;
-            this.uiTextBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiTextBox1.IntValue = 1;
-            this.uiTextBox1.Location = new System.Drawing.Point(586, 25);
-            this.uiTextBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiTextBox1.MinimumSize = new System.Drawing.Size(1, 16);
-            this.uiTextBox1.Name = "uiTextBox1";
-            this.uiTextBox1.ShowText = false;
-            this.uiTextBox1.Size = new System.Drawing.Size(150, 29);
-            this.uiTextBox1.TabIndex = 5;
-            this.uiTextBox1.Text = "1";
-            this.uiTextBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiTextBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiTextBox2
-            // 
-            this.uiTextBox2.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.uiTextBox2.DoubleValue = 100D;
-            this.uiTextBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiTextBox2.IntValue = 100;
-            this.uiTextBox2.Location = new System.Drawing.Point(586, 72);
-            this.uiTextBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiTextBox2.MinimumSize = new System.Drawing.Size(1, 16);
-            this.uiTextBox2.Name = "uiTextBox2";
-            this.uiTextBox2.ShowText = false;
-            this.uiTextBox2.Size = new System.Drawing.Size(150, 29);
-            this.uiTextBox2.TabIndex = 6;
-            this.uiTextBox2.Text = "100";
-            this.uiTextBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiTextBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiLabel5
-            // 
-            this.uiLabel5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel5.Location = new System.Drawing.Point(479, 31);
-            this.uiLabel5.Name = "uiLabel5";
-            this.uiLabel5.Size = new System.Drawing.Size(100, 23);
-            this.uiLabel5.TabIndex = 7;
-            this.uiLabel5.Text = "页数";
-            this.uiLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiLabel5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // uiDatetimePicker2
             // 
-            // uiLabel6
+            this.uiDatetimePicker2.FillColor = System.Drawing.Color.White;
+            this.uiDatetimePicker2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiDatetimePicker2.Location = new System.Drawing.Point(226, 64);
+            this.uiDatetimePicker2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiDatetimePicker2.MaxLength = 19;
+            this.uiDatetimePicker2.MinimumSize = new System.Drawing.Size(63, 0);
+            this.uiDatetimePicker2.Name = "uiDatetimePicker2";
+            this.uiDatetimePicker2.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.uiDatetimePicker2.Size = new System.Drawing.Size(200, 29);
+            this.uiDatetimePicker2.SymbolDropDown = 61555;
+            this.uiDatetimePicker2.SymbolNormal = 61555;
+            this.uiDatetimePicker2.TabIndex = 3;
+            this.uiDatetimePicker2.Text = "2025-12-30 09:52:06";
+            this.uiDatetimePicker2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiDatetimePicker2.Value = new System.DateTime(2025, 12, 30, 9, 52, 6, 281);
+            this.uiDatetimePicker2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            this.uiLabel6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel6.Location = new System.Drawing.Point(479, 78);
-            this.uiLabel6.Name = "uiLabel6";
-            this.uiLabel6.Size = new System.Drawing.Size(100, 23);
-            this.uiLabel6.TabIndex = 8;
-            this.uiLabel6.Text = "页记录数";
-            this.uiLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiLabel6.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // uiLabel2
             // 
-            // uiLabel7
+            this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel2.Location = new System.Drawing.Point(76, 70);
+            this.uiLabel2.Name = "uiLabel2";
+            this.uiLabel2.Size = new System.Drawing.Size(100, 23);
+            this.uiLabel2.TabIndex = 2;
+            this.uiLabel2.Text = "结束时间";
+            this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            this.uiLabel7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel7.Location = new System.Drawing.Point(479, 15);
-            this.uiLabel7.Name = "uiLabel7";
-            this.uiLabel7.Size = new System.Drawing.Size(100, 23);
-            this.uiLabel7.TabIndex = 8;
-            this.uiLabel7.Text = "页数";
-            this.uiLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiLabel7.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // uiLabel1
             // 
-            // uiLabel8
+            this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel1.Location = new System.Drawing.Point(76, 15);
+            this.uiLabel1.Name = "uiLabel1";
+            this.uiLabel1.Size = new System.Drawing.Size(100, 23);
+            this.uiLabel1.TabIndex = 1;
+            this.uiLabel1.Text = "开始时间";
+            this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            this.uiLabel8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiLabel8.Location = new System.Drawing.Point(479, 70);
-            this.uiLabel8.Name = "uiLabel8";
-            this.uiLabel8.Size = new System.Drawing.Size(100, 23);
-            this.uiLabel8.TabIndex = 9;
-            this.uiLabel8.Text = "页记录数";
-            this.uiLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiLabel8.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // uiDatetimePicker1
             // 
-            // uiTextBox3
+            this.uiDatetimePicker1.FillColor = System.Drawing.Color.White;
+            this.uiDatetimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiDatetimePicker1.Location = new System.Drawing.Point(226, 9);
+            this.uiDatetimePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiDatetimePicker1.MaxLength = 19;
+            this.uiDatetimePicker1.MinimumSize = new System.Drawing.Size(63, 0);
+            this.uiDatetimePicker1.Name = "uiDatetimePicker1";
+            this.uiDatetimePicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.uiDatetimePicker1.Size = new System.Drawing.Size(200, 29);
+            this.uiDatetimePicker1.SymbolDropDown = 61555;
+            this.uiDatetimePicker1.SymbolNormal = 61555;
+            this.uiDatetimePicker1.TabIndex = 0;
+            this.uiDatetimePicker1.Text = "2025-12-30 09:52:06";
+            this.uiDatetimePicker1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiDatetimePicker1.Value = new System.DateTime(2025, 12, 30, 9, 52, 6, 281);
+            this.uiDatetimePicker1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            this.uiTextBox3.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.uiTextBox3.DoubleValue = 1D;
-            this.uiTextBox3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiTextBox3.IntValue = 1;
-            this.uiTextBox3.Location = new System.Drawing.Point(571, 15);
-            this.uiTextBox3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiTextBox3.MinimumSize = new System.Drawing.Size(1, 16);
-            this.uiTextBox3.Name = "uiTextBox3";
-            this.uiTextBox3.ShowText = false;
-            this.uiTextBox3.Size = new System.Drawing.Size(150, 29);
-            this.uiTextBox3.TabIndex = 10;
-            this.uiTextBox3.Text = "1";
-            this.uiTextBox3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiTextBox3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // uiDataGridView1
             // 
-            // uiTextBox4
+            dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.uiDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
+            this.uiDataGridView1.BackgroundColor = System.Drawing.Color.White;
+            this.uiDataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.uiDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
+            this.uiDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.uiDataGridView1.DefaultCellStyle = dataGridViewCellStyle8;
+            this.uiDataGridView1.EnableHeadersVisualStyles = false;
+            this.uiDataGridView1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiDataGridView1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            this.uiDataGridView1.Location = new System.Drawing.Point(3, 3);
+            this.uiDataGridView1.Name = "uiDataGridView1";
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.uiDataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
+            dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle10;
+            this.uiDataGridView1.RowTemplate.Height = 23;
+            this.uiDataGridView1.SelectedIndex = -1;
+            this.uiDataGridView1.Size = new System.Drawing.Size(1407, 478);
+            this.uiDataGridView1.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.uiDataGridView1.TabIndex = 0;
+            this.uiDataGridView1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            this.uiTextBox4.Cursor = System.Windows.Forms.Cursors.IBeam;
-            this.uiTextBox4.DoubleValue = 100D;
-            this.uiTextBox4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiTextBox4.IntValue = 100;
-            this.uiTextBox4.Location = new System.Drawing.Point(571, 64);
-            this.uiTextBox4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiTextBox4.MinimumSize = new System.Drawing.Size(1, 16);
-            this.uiTextBox4.Name = "uiTextBox4";
-            this.uiTextBox4.ShowText = false;
-            this.uiTextBox4.Size = new System.Drawing.Size(150, 29);
-            this.uiTextBox4.TabIndex = 11;
-            this.uiTextBox4.Text = "100";
-            this.uiTextBox4.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
-            this.uiTextBox4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // uiTextBox5
+            // 
+            this.uiTextBox5.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.uiTextBox5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTextBox5.Location = new System.Drawing.Point(895, 31);
+            this.uiTextBox5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTextBox5.MinimumSize = new System.Drawing.Size(1, 16);
+            this.uiTextBox5.Name = "uiTextBox5";
+            this.uiTextBox5.ShowText = false;
+            this.uiTextBox5.Size = new System.Drawing.Size(276, 29);
+            this.uiTextBox5.TabIndex = 9;
+            this.uiTextBox5.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiTextBox5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel9
+            // 
+            this.uiLabel9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel9.Location = new System.Drawing.Point(763, 37);
+            this.uiLabel9.Name = "uiLabel9";
+            this.uiLabel9.Size = new System.Drawing.Size(125, 23);
+            this.uiLabel9.TabIndex = 10;
+            this.uiLabel9.Text = "医保人员编号";
+            this.uiLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel9.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
             // SpecialDrugSelect
             // 
@@ -519,11 +552,11 @@
             this.Load += new System.EventHandler(this.SpecialDrugSelect_Load);
             this.uiTabControl1.ResumeLayout(false);
             this.tabPage1.ResumeLayout(false);
+            this.uiPanel2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.uiDataGridView2)).EndInit();
             this.tabPage2.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.uiDataGridView1)).EndInit();
             this.uiPanel1.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.uiDataGridView2)).EndInit();
-            this.uiPanel2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.uiDataGridView1)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -555,5 +588,7 @@
         private Sunny.UI.UITextBox uiTextBox3;
         private Sunny.UI.UILabel uiLabel8;
         private Sunny.UI.UILabel uiLabel7;
+        private Sunny.UI.UILabel uiLabel9;
+        private Sunny.UI.UITextBox uiTextBox5;
     }
 }

+ 2 - 1
Forms/SpecialDrugSelect.cs

@@ -30,9 +30,10 @@ namespace AnHuiMI.Forms
             JObject Joinput= new JObject();
             JObject JoParms= new JObject();
 
+            JoParms.Add("psnNo", uiTextBox5.Text);
             JoParms.Add("psnNo", Global.pat.psn_no);
             JoParms.Add("begnTime", uiDatetimePicker3.Text);
-            JoParms.Add("endTime", uiDatetimePicker3.Text);
+            JoParms.Add("endTime", uiDatetimePicker4.Text);
 
             Joinput.Add("Code", "feeListOpsp");
             Joinput.Add("pageNum", uiTextBox1.Text);

+ 1 - 0
HeFeiMI.csproj

@@ -483,6 +483,7 @@
     <Compile Include="Helper\IrisDataHelper.cs" />
     <Compile Include="Helper\JsonHelper.cs" />
     <Compile Include="Helper\JsonMapper.cs" />
+    <Compile Include="Helper\ProgressHelper.cs" />
     <Compile Include="Helper\ProgressWrapper.cs" />
     <Compile Include="Helper\XmlHelper.cs" />
     <Compile Include="InsuBusiness.cs" />

+ 789 - 0
Helper/ProgressHelper.cs

@@ -0,0 +1,789 @@
+using PTMedicalInsurance.Variables;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace PTMedicalInsurance.Common
+{
+    //public class ProgressDialog : Form
+    //{
+    //    private ProgressBar progressBar1;
+    //    private Label labelStatus;
+    //    private Button cancelButton;
+    //    BackgroundWorker _backgroundWorker;
+    //    private int maximum;
+    //    private ProgressBarStyle _pbStyle = ProgressBarStyle.Marquee;
+    //    private string _header = "正在查询...";
+    //    private int _marqueeAnimationSpeed = 50;
+
+    //    public string HeaderText
+    //    {
+    //        get { return _header; }
+    //        set { this.Text =_header = value; }
+    //    }
+
+    //    public ProgressBarStyle PBStyle 
+    //    { 
+    //        get { return _pbStyle; }
+    //        set { progressBar1.Style =_pbStyle = value; }
+    //    }
+    //    public int MQSpeed
+    //    {
+    //        get { return _marqueeAnimationSpeed; }
+    //        set { progressBar1.MarqueeAnimationSpeed =_marqueeAnimationSpeed = value; }
+    //    }
+
+    //    public ProgressDialog()
+    //    {
+    //        Init();
+    //    }
+
+    //    public ProgressDialog(BackgroundWorker backgroundWorker)
+    //    {
+    //        Init();
+    //        _backgroundWorker = backgroundWorker;
+    //    }
+
+    //    private void  Init()
+    //    {
+    //        Application.EnableVisualStyles();
+    //        this.Text = _header;
+    //        this.StartPosition = FormStartPosition.CenterParent;
+    //        this.FormBorderStyle = FormBorderStyle.FixedDialog;
+    //        this.MaximizeBox = false;
+    //        this.MinimizeBox = false;
+    //        this.ShowInTaskbar = false;
+    //        this.TopMost = true; // 确保进度条始终在最前面
+    //        this.CenterToScreen();
+
+    //        progressBar1 = new ProgressBar
+    //        {
+    //            Location = new System.Drawing.Point(12, 12),
+    //            Size = new System.Drawing.Size(260, 23)
+    //        };
+    //        //progressBar1.Style = ProgressBarStyle.Continuous;
+    //        progressBar1.Style = _pbStyle;
+    //        progressBar1.MarqueeAnimationSpeed = _marqueeAnimationSpeed;
+    //        Controls.Add(progressBar1);
+
+    //        labelStatus = new Label
+    //        {
+    //            Location = new System.Drawing.Point(12, 41),
+    //            Size = new System.Drawing.Size(260, 23)
+    //        };
+    //        Controls.Add(labelStatus);
+
+    //        //// 初始化取消按钮
+    //        //cancelButton = new Button
+    //        //{
+    //        //    Text = "取消",
+    //        //    Location = new System.Drawing.Point(197, 41), // 设置适当的位置
+    //        //    Size = new System.Drawing.Size(75, 23) // 设置按钮大小
+    //        //};
+    //        //cancelButton.Click += CancelButton_Click; // 添加点击事件处理程序
+    //        //Controls.Add(cancelButton);
+
+
+    //        // 初始化取消按钮
+    //        cancelButton = new Button
+    //        {
+    //            Text = "取消",
+    //            Location = new System.Drawing.Point(197, 60), // 修改Y坐标以避免与labelStatus重叠
+    //            Size = new System.Drawing.Size(75, 23) // 设置按钮大小
+    //        };
+    //        cancelButton.Click += CancelButton_Click; // 添加点击事件处理程序
+    //        Controls.Add(cancelButton);
+
+    //        // 设置默认样式
+    //        SetStyle(ControlStyles.ResizeRedraw, true);
+    //        ClientSize = new System.Drawing.Size(284, 100);
+    //    }
+
+    //    // 允许外部设置进度条的值
+    //    public int ProgressValue
+    //    {
+    //        set { if (InvokeRequired) Invoke(new Action(() => progressBar1.Value = value)); else progressBar1.Value = value; }
+    //    }
+
+    //    public void UpdateProgress(int progress)
+    //    {
+    //        //if (progressBar1.InvokeRequired)
+    //        //{
+    //        //    progressBar1.Invoke(new Action<int>(UpdateProgress), progress);
+    //        //}
+    //        //else
+    //        //{
+    //        //    progressBar1.Value = progress;
+    //        //    //这个有点糊涂了,这个进度条显示总是少一个
+    //        //    labelStatus.Text = $"已完成 {progress}/{maximum}";
+    //        //}
+    //        if (this.IsHandleCreated)
+    //        {
+    //            this.Invoke((MethodInvoker)delegate
+    //            {
+    //                progressBar1.Value = progress;
+    //                //这个有点糊涂了,这个进度条显示总是少一个
+    //                labelStatus.Text = $"已完成 {progress}/{maximum}";
+
+    //                ///在Windows Forms应用程序中,控件的更新通常是由操作系统消息循环处理的。当你修改一个控件的属性(如 Text 或 Value),
+    //                ///这些更改并不会立即反映在界面上,而是会被放入队列等待下一个合适的时机进行绘制。这是因为直接更新控件属性并不会强制执行重绘操作,
+    //                ///系统可能会批量处理多个更新以提高效率。
+    //                ///使用 Refresh() 方法 调用控件的 Refresh() 方法会强制该控件立即重绘自身。这包括清除控件并重新绘制其所有内容
+    //                if (progress == maximum)
+    //                {
+    //                    progressBar1.Refresh();
+    //                    labelStatus.Refresh();
+    //                }
+
+    //            });
+    //        }
+
+    //    }
+
+    //    public void SetProgress(int max)
+    //    {
+    //        maximum = max;
+    //        progressBar1.Maximum = maximum;
+    //    }
+
+    //    // 允许外部设置状态文本
+    //    public string StatusText
+    //    {
+    //        set { if (InvokeRequired) Invoke(new Action(() => labelStatus.Text = value)); else labelStatus.Text = value; }
+    //    }
+
+    //    //异步展示
+    //    public async void ShowAsync()
+    //    {
+    //        await Task.Run(() => progressBar1.Show());
+    //    }
+
+    //    private void CancelButton_Click(object sender, EventArgs e)
+    //    {
+    //        // 这里可以放置取消操作的逻辑
+    //        // 比如通知BackgroundWorker取消工作
+    //        if (_backgroundWorker != null && _backgroundWorker.WorkerSupportsCancellation)
+    //        {
+    //            _backgroundWorker.CancelAsync();
+    //        }
+    //        this.Close(); // 关闭对话框
+    //    }
+    //}
+    //public class DataLoader : IDisposable
+    //{
+    //    private  BackgroundWorker _backgroundWorker = new BackgroundWorker();
+    //    /// <summary>
+    //    /// 接收一个动态可变的入参,各种参数均可接收;回调函数返回总条数和当前进度
+    //    /// </summary>
+    //    /// <typeparam name="T1"></typeparam>
+    //    /// <param name="o"></param>
+    //    /// <param name="err"></param>
+    //    /// <param name="progressCallback"></param>
+    //    /// <param name="progressMaxCallback"></param>
+    //    /// <returns></returns>
+    //    public delegate int MyFunc<T1>(object[] o,out T1 err,ProgressCallback progressCallback,ProgressMaxCallback progressMaxCallback);
+    //    private MyFunc<string> _delegateFunc;
+    //    private ProgressDialog progressDialog ;
+    //    private Form mainForm;
+    //    private object[] _o;
+
+    //    // 定义进度回调委托
+    //    //返回当前进度
+    //    public delegate void ProgressCallback(int progress);
+    //    //返回进度条总条数
+    //    public delegate void ProgressMaxCallback(int max);
+
+    //    public DataLoader(MyFunc<string> delegateFunc, Form frm)
+    //    {
+    //        mainForm = frm;
+    //        _delegateFunc = delegateFunc ?? throw new ArgumentNullException(nameof(delegateFunc));
+
+
+    //    }
+
+    //    public DataLoader(Form frm)
+    //    {
+    //        mainForm = frm;
+
+    //        // 配置 BackgroundWorker
+    //        _backgroundWorker.WorkerReportsProgress = true;
+    //        _backgroundWorker.WorkerSupportsCancellation = true;
+    //        _backgroundWorker.DoWork += BackgroundWorker_DoWork;
+    //        _backgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted;
+    //        _backgroundWorker.ProgressChanged += BackgroundWorker_ProgressChanged;
+
+    //        progressDialog = new ProgressDialog(_backgroundWorker);
+    //    }
+
+    //    public void SetDelagate(MyFunc<string> delegateFunc)
+    //    {
+    //        _delegateFunc = delegateFunc ?? throw new ArgumentNullException(nameof(delegateFunc));
+    //    }
+
+    //    public void SetProgressBar(ProgressBarStyle pbStyle,string headerText,int mqSpeed)
+    //    {
+    //        progressDialog.PBStyle = pbStyle;
+    //        progressDialog.HeaderText = headerText;
+    //        progressDialog.MQSpeed = mqSpeed;
+
+    //    }
+    //    public void Start(int total, Action<int, string> onCompleted)
+    //    {
+    //        // 配置 BackgroundWorker
+    //        _backgroundWorker.WorkerReportsProgress = true;
+    //        _backgroundWorker.WorkerSupportsCancellation = true;
+    //        _backgroundWorker.DoWork += BackgroundWorker_DoWork;
+    //        _backgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted;
+    //        _backgroundWorker.ProgressChanged += BackgroundWorker_ProgressChanged;
+
+    //        progressDialog = new ProgressDialog(_backgroundWorker);
+
+    //        if (mainForm == null)
+    //        {
+    //            progressDialog.Show();
+    //        }
+    //        else
+    //        {
+    //            progressDialog.Show(mainForm);
+    //        }
+    //        if (_backgroundWorker.IsBusy) return;
+
+    //        this._onCompleted = onCompleted;
+
+    //        _backgroundWorker.RunWorkerAsync(total);
+
+
+    //    }
+
+    //    public void Start(Action<int, string> onCompleted)
+    //    {
+    //        // 配置 BackgroundWorker
+    //        _backgroundWorker.WorkerReportsProgress = true;
+    //        _backgroundWorker.WorkerSupportsCancellation = true;
+    //        _backgroundWorker.DoWork += BackgroundWorker_DoWork;
+    //        _backgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted;
+    //        _backgroundWorker.ProgressChanged += BackgroundWorker_ProgressChanged;
+
+    //        progressDialog = new ProgressDialog(_backgroundWorker);
+
+    //        if (mainForm == null)
+    //        {
+    //            progressDialog.Show();
+    //        }
+    //        else
+    //        {
+    //            progressDialog.Show(mainForm);
+    //        }
+    //        if (_backgroundWorker.IsBusy) return;
+
+    //        this._onCompleted = onCompleted;
+
+    //        _backgroundWorker.RunWorkerAsync();
+    //    }
+
+
+    //    public void Start(object[] o,Action<int, string> onCompleted)
+    //    {
+    //        // 配置 BackgroundWorker
+    //        _backgroundWorker.WorkerReportsProgress = true;
+    //        _backgroundWorker.WorkerSupportsCancellation = true;
+    //        _backgroundWorker.DoWork += BackgroundWorker_DoWorkO;
+    //        _backgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted;
+    //        _backgroundWorker.ProgressChanged += BackgroundWorker_ProgressChanged;
+
+    //        progressDialog = new ProgressDialog(_backgroundWorker);
+
+    //        if (mainForm == null)
+    //        {
+    //            progressDialog.Show();
+    //        }
+    //        else
+    //        {
+    //            progressDialog.Show(mainForm);
+    //        }
+    //        if (_backgroundWorker.IsBusy) return;
+
+    //        this._onCompleted = onCompleted;
+
+    //        _backgroundWorker.RunWorkerAsync();
+    //    }
+
+    //    private Action<int, string> _onCompleted;
+
+    //    private void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
+    //    {
+    //        // 调用传入的方法
+    //        string errMsg = "";
+    //        int result = -1;
+
+    //        //注意,如果_queryExportDataAction 事件里需要更新UI 必须使用 Control.Invoke 或 Control.BeginInvoke。否则会导致程序卡死
+    //        ///类似这样:this.Invoke((MethodInvoker)delegate {labelProgress.Text = $"Progress: {progress}%"; });
+    //        result = _delegateFunc(null, out errMsg, (progress) =>
+    //        {
+    //            if (!_backgroundWorker.CancellationPending)
+    //            {
+    //                _backgroundWorker.ReportProgress(progress);
+    //            }
+    //            else
+    //            {
+    //                // 如果用户请求了取消,则跳出循环或采取其他措施
+    //                // 这个异常处理查询下
+    //                throw new OperationCanceledException();
+    //            }
+    //        },
+    //        (max) =>
+    //        {
+    //            if (!_backgroundWorker.CancellationPending)
+    //            {
+    //                progressDialog.SetProgress(max); ;
+    //            }
+    //            else
+    //            {
+    //                    // 如果用户请求了取消,则跳出循环或采取其他措施
+    //                    // 这个异常处理查询下
+    //                    throw new OperationCanceledException();
+    //            }
+    //        }
+    //        );
+    //        e.Result = Tuple.Create(result, errMsg);
+    //    }
+
+    //    private void BackgroundWorker_DoWorkO(object sender, DoWorkEventArgs e)
+    //    {
+    //        // 调用传入的方法
+    //        string errMsg = "";
+    //        int result = -1;
+
+    //        //注意,如果_queryExportDataAction 事件里需要更新UI 必须使用 Control.Invoke 或 Control.BeginInvoke。否则会导致程序卡死
+    //        ///类似这样:this.Invoke((MethodInvoker)delegate {labelProgress.Text = $"Progress: {progress}%"; });
+    //        result = _delegateFunc(_o, out errMsg, (progress) =>
+    //        {
+    //            if (!_backgroundWorker.CancellationPending)
+    //            {
+    //                _backgroundWorker.ReportProgress(progress);
+    //            }
+    //            else
+    //            {
+    //                // 如果用户请求了取消,则跳出循环或采取其他措施
+    //                // 这个异常处理查询下
+    //                throw new OperationCanceledException();
+    //            }
+    //        },
+    //        (max) =>
+    //        {
+    //            if (!_backgroundWorker.CancellationPending)
+    //            {
+    //                progressDialog.SetProgress(max); ;
+    //            }
+    //            else
+    //            {
+    //                // 如果用户请求了取消,则跳出循环或采取其他措施
+    //                // 这个异常处理查询下
+    //                throw new OperationCanceledException();
+    //            }
+    //        }
+    //        );
+    //        e.Result = Tuple.Create(result, errMsg);
+    //    }
+
+    //    private void BackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
+    //    {
+    //        if (!_backgroundWorker.CancellationPending)
+    //        {
+    //            System.Threading.Thread.Sleep(1000);
+    //        }
+
+    //        progressDialog.Close();
+    //        if (e.Error != null)
+    //        {
+    //            // 处理错误
+    //            MessageBox.Show($"An error occurred: {e.Error.Message}");
+    //        }
+    //        else if (e.Cancelled)
+    //        {
+    //            // 处理取消的情况
+    //            MessageBox.Show("Operation was cancelled.");
+    //        }
+    //        else
+    //        {
+
+    //            var resultTuple = (Tuple<int, string>)e.Result;
+    //            int result = resultTuple.Item1;
+    //            string errMsg = resultTuple.Item2;
+
+    //            // 调用回调函数,传递结果和错误信息
+    //            _onCompleted?.Invoke(result, errMsg);
+    //        }
+
+    //        Dispose();
+    //    }
+
+    //    private void BackgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
+    //    {
+    //        progressDialog.UpdateProgress(e.ProgressPercentage );
+    //    }
+
+    //    public void Dispose()
+    //    {
+    //        _backgroundWorker.Dispose();
+    //        progressDialog.Dispose();
+    //    }
+    //}
+
+
+
+    [DesignerCategory("Code")]
+    public class ProgressDialog : Form
+    {
+        private  ProgressBar _progressBar;
+        private  Label _labelStatus;
+        private  Button _cancelButton;
+
+        private BackgroundWorker _backgroundWorker;
+        private int _maximum = 100;
+        private string _header = "正在查询...";
+
+
+        public string HeaderText
+        {
+            get => _header;
+            set { Text = _header = value; }
+        }
+
+        public ProgressBarStyle PBStyle
+        {
+            get => _progressBar.Style;
+            set => _progressBar.Style = value;
+        }
+
+        public int MQSpeed
+        {
+            get => _progressBar.MarqueeAnimationSpeed;
+            set => _progressBar.MarqueeAnimationSpeed = value;
+        }
+
+        public ProgressDialog()
+        {
+            InitComponent();
+        }
+
+        public ProgressDialog(BackgroundWorker backgroundWorker) : this()
+        {
+            _backgroundWorker = backgroundWorker;
+        }
+
+        public void InitComponent()
+        {
+            Application.EnableVisualStyles();
+
+            // 设置窗体样式
+            Text = _header;
+            StartPosition = FormStartPosition.CenterParent;
+            FormBorderStyle = FormBorderStyle.FixedDialog;
+            MaximizeBox = false;
+            MinimizeBox = false;
+            ShowInTaskbar = false;
+            TopMost = true;
+            ClientSize = new Size(284, 100);
+            CenterToScreen();
+
+            // 初始化进度条
+            _progressBar = new ProgressBar
+            {
+                Location = new Point(12, 12),
+                Size = new Size(260, 23),
+                Style = ProgressBarStyle.Marquee,
+                MarqueeAnimationSpeed = 50
+            };
+            Controls.Add(_progressBar);
+
+            // 状态标签
+            _labelStatus = new Label
+            {
+                Location = new Point(12, 41),
+                Size = new Size(260, 23)
+            };
+            Controls.Add(_labelStatus);
+
+            // 取消按钮
+            _cancelButton = new Button
+            {
+                Text = "取消",
+                Location = new Point(197, 60),
+                Size = new Size(75, 23)
+            };
+            _cancelButton.Click += CancelButton_Click;
+            Controls.Add(_cancelButton);
+
+            SetStyle(ControlStyles.ResizeRedraw, true);
+        }
+
+        public int ProgressValue
+        {
+            set
+            {
+                if (this.IsHandleCreated)
+                {
+                    this.InvokeIfRequired(() =>
+                    {
+                        _progressBar.Value = value;
+                        _labelStatus.Text = $"已完成 {value}/{_maximum}";
+
+                        if (value == _maximum || value >= _progressBar.Maximum)
+                        {
+                            _progressBar.Refresh();
+                            _labelStatus.Refresh();
+                        }
+                    });
+                }
+            }
+        }
+
+        public void SetProgress(int max)
+        {
+            _maximum = max;
+            _progressBar.Maximum = max;
+        }
+
+        public string StatusText
+        {
+            set => this.InvokeIfRequired(() => _labelStatus.Text = value);
+        }
+
+        private void CancelButton_Click(object sender, EventArgs e)
+        {
+            if (_backgroundWorker != null && _backgroundWorker.WorkerSupportsCancellation)
+            {
+                _backgroundWorker.CancelAsync();
+            }
+
+            this.Close();
+        }
+
+        public async void ShowAsync()
+        {
+            await Task.Run(() =>
+            {
+                Application.Run(this);
+            });
+        }
+
+        protected override void OnClosed(EventArgs e)
+        {
+            base.OnClosed(e);
+            _backgroundWorker = null;
+        }
+    }
+
+    // 扩展方法:简化 Invoke 操作
+    public static class ControlExtensions
+    {
+        public static void InvokeIfRequired(this Control control, MethodInvoker action)
+        {
+            if (control.InvokeRequired)
+            {
+                try
+                {
+                    control.Invoke(action);
+                }
+                catch (Exception ex) when (ex is InvalidOperationException || ex is InvalidAsynchronousStateException)
+                {
+                    // 忽略无效句柄操作
+                    Console.WriteLine("无法执行 Invoke:" + ex.Message);
+                }
+            }
+            else
+            {
+                action();
+            }
+        }
+    }
+
+    public class DataLoader : IDisposable
+    {
+        private readonly BackgroundWorker _backgroundWorker;
+        private ProgressDialog _progressDialog;
+        private readonly Form _ownerForm;
+        private readonly MyFunc<string> _delegateFunc;
+
+        private Action<int, string> _onCompleted;
+        private bool _disposed = false;
+
+        public delegate int MyFunc<T>(object[] o, out T err, ProgressCallback progressCallback, ProgressMaxCallback progressMaxCallback, BackgroundWorker worker);
+
+        public delegate void ProgressCallback(int progress);
+        public delegate void ProgressMaxCallback(int max);
+
+        public DataLoader(MyFunc<string> func, Form ownerForm)
+        {
+            _delegateFunc = func ?? throw new ArgumentNullException(nameof(func));
+            _ownerForm = ownerForm;
+
+            _backgroundWorker = new BackgroundWorker
+            {
+                WorkerReportsProgress = true,
+                WorkerSupportsCancellation = true
+            };
+            _backgroundWorker.DoWork += BackgroundWorker_DoWork;
+            _backgroundWorker.ProgressChanged += BackgroundWorker_ProgressChanged;
+            _backgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted;
+        }
+
+        public void SetProgressBar(ProgressBarStyle style, string headerText, int mqSpeed)
+        {
+            if (_progressDialog == null || _progressDialog.IsDisposed)
+            {
+                _progressDialog = new ProgressDialog(_backgroundWorker)
+                {
+                    PBStyle = style,
+                    HeaderText = headerText,
+                    MQSpeed = mqSpeed
+                };
+            }
+        }
+
+        public void Start(object[] args, Action<int, string> onCompleted)
+        {
+            if (_backgroundWorker.IsBusy) return;
+
+            _onCompleted = onCompleted;
+
+            if (_ownerForm == null || _ownerForm.IsDisposed)
+            {
+                _progressDialog?.Show();
+            }
+            else
+            {
+                _progressDialog?.Show(_ownerForm);
+            }
+
+            _backgroundWorker.RunWorkerAsync(args);
+        }
+
+        private void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
+        {
+            //var args = (object[])e.Argument;
+            //string errMsg = "";
+            //int result = -1;
+
+            //try
+            //{
+            //    result = _delegateFunc(args, out errMsg,
+            //        progress => _backgroundWorker.ReportProgress(progress),
+            //        max => _progressDialog?.SetProgress(max));
+            //}
+            //catch (Exception ex)
+            //{
+            //    errMsg = ex.Message;
+            //    result = 0;
+            //}
+
+            //e.Result = Tuple.Create(result, errMsg);
+
+            var worker = sender as BackgroundWorker;
+            if (worker == null)
+            {
+                e.Result = Tuple.Create(-1, "BackgroundWorker 实例无效");
+                return;
+            }
+
+            var args = e.Argument as object[];
+            if (args == null || args.Length == 0)
+            {
+                e.Result = Tuple.Create(-1, "参数无效");
+                return;
+            }
+
+            string errMsg = "";
+            int result = -1;
+
+            try
+            {
+                // 定义进度报告的 Action
+                ProgressCallback progressAction = percent =>
+                {
+                    if (worker.WorkerReportsProgress && !worker.CancellationPending)
+                        worker.ReportProgress(percent);
+                };
+
+                // 定义设置最大值的 Action
+                ProgressMaxCallback setProgressAction = max =>
+                {
+                    if (_progressDialog != null && !_progressDialog.IsDisposed)
+                        _progressDialog.SetProgress(max);
+                };
+
+                // 调用实际业务逻辑
+                result = _delegateFunc(args, out errMsg, progressAction, setProgressAction, _backgroundWorker);
+                Global.writeLog($"result:{result}");
+            }
+            catch (Exception ex)
+            {
+                errMsg = $"后台任务发生异常: {ex.Message}";
+                result = 0;
+            }
+            finally
+            {
+                Global.writeLog($"e.result:{e.Result}");
+            }
+
+            // 返回结果给 RunWorkerCompleted 事件
+            e.Result = Tuple.Create(result, errMsg);
+            Global.writeLog($"e.result2:{e.Result}");
+        }
+
+        private void BackgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
+        {
+            //_progressDialog?.UpdateProgress(e.ProgressPercentage);
+            _progressDialog.ProgressValue = (e.ProgressPercentage);
+        }
+
+        private void BackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
+        {
+            if (e.Cancelled)
+            {
+                MessageBox.Show("操作已取消");
+            }
+            else if (e.Error != null)
+            {
+                MessageBox.Show($"发生错误:{e.Error.Message}");
+            }
+            else
+            {
+                var resultTuple = (Tuple<int, string>)e.Result;
+                _onCompleted?.Invoke(resultTuple.Item1, resultTuple.Item2);
+            }
+
+            _progressDialog?.Close();
+            _progressDialog?.Dispose();
+            _progressDialog = null;
+        }
+
+        #region IDisposable Support
+        protected virtual void Dispose(bool disposing)
+        {
+            if (!_disposed)
+            {
+                if (disposing)
+                {
+                    _backgroundWorker.Dispose();
+                    _progressDialog?.Dispose();
+                }
+
+                _disposed = true;
+            }
+        }
+
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+        #endregion
+    }
+}

+ 7 - 0
InsuBusiness.cs

@@ -1904,6 +1904,13 @@ namespace PTMedicalInsurance
 
                             break;
                         }
+                    case "SpecialDrugSelect"://辅助查询
+                        {
+                            SpecialDrugSelect SpecialDrug = new SpecialDrugSelect();
+                            SpecialDrug.ShowDialog();
+                            break;
+                        }
+
 
                     case "QuerySpecialDrugDetilInfo"://人员慢特病用药记录查询
                         {