Browse Source

feat: 对账his明细持导出excel

zhengjie 1 year ago
parent
commit
dec310e24e

+ 2 - 1
ChongQingMI.csproj

@@ -4,7 +4,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{E9B4D618-13F0-4864-9C4C-28B8A6532653}</ProjectGuid>
+    <ProjectGuid>{90C6F520-7244-4505-8D16-6492803B2EDE}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>PTMedicalInsurance</RootNamespace>
@@ -256,6 +256,7 @@
     <Compile Include="Helper\InvokeRestCenter.cs" />
     <Compile Include="Helper\IrisDataHelper.cs" />
     <Compile Include="Helper\JsonHelper.cs" />
+    <Compile Include="Helper\ReadDataTableConverter.cs" />
     <Compile Include="Helper\XmlHelper.cs" />
     <Compile Include="InsuBusiness.cs" />
     <Compile Include="IInsuBusiness.cs" />

+ 125 - 5
Common/ExPortToExcel.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections;
+using System.IO;
 using System.Windows.Forms;
 using Excel = Microsoft.Office.Interop.Excel;
 
@@ -8,7 +9,7 @@ namespace PTMedicalInsurance.Common
 {
     public class ExportToExcel
     {
-        public Excel.Application m_xlApp = null;
+        static Excel.Application m_xlApp = null;
 
         /// <summary>
         /// 将DataTable数据导出到Excel表
@@ -194,14 +195,14 @@ namespace PTMedicalInsurance.Common
             }
             finally
             {                
-                new ExportToExcel().EndReport();
+                EndReport();
             }
         }
 
         /// <summary>
         /// 退出报表时关闭Excel和清理垃圾Excel进程
         /// </summary>
-        public void EndReport()
+        private static void EndReport()
         {
             object missing = System.Reflection.Missing.Value;
             try
@@ -225,7 +226,7 @@ namespace PTMedicalInsurance.Common
                 try
                 {
                     //清理垃圾进程
-                    this.killProcessThread();
+                    killProcessThread();
                 }
                 catch { }
                 GC.Collect();
@@ -235,7 +236,7 @@ namespace PTMedicalInsurance.Common
         /// <summary>
         /// 杀掉不死进程
         /// </summary>
-        public void killProcessThread()
+        private static void killProcessThread()
         {
             ArrayList myProcess = new ArrayList();
             for (int i = 0; i < myProcess.Count; i++)
@@ -248,6 +249,125 @@ namespace PTMedicalInsurance.Common
             }
         }
 
+
+        public static void GridViewToExcel(DataGridView m_DataView)
+        {
+
+            SaveFileDialog kk = new SaveFileDialog();
+
+            kk.Title = "保存EXECL文件";
+
+            kk.Filter = "EXECL文件(*.xls) |*.xls |所有文件(*.*) |*.*";
+
+            kk.FilterIndex = 1;
+
+            if (kk.ShowDialog() == DialogResult.OK)
+
+            {
+
+                string FileName = kk.FileName;
+
+                if (File.Exists(FileName))
+
+                    File.Delete(FileName);
+
+                FileStream objFileStream;
+
+                StreamWriter objStreamWriter;
+
+                string strLine = "";
+
+                objFileStream = new FileStream(FileName, FileMode.OpenOrCreate, FileAccess.Write);
+
+                objStreamWriter = new StreamWriter(objFileStream, System.Text.Encoding.Unicode);
+
+                for (int i = 0; i < m_DataView.Columns.Count; i++)
+
+                {
+
+                    if (m_DataView.Columns[i].Visible == true)
+
+                    {
+
+                        strLine = strLine + m_DataView.Columns[i].HeaderText.ToString() + Convert.ToChar(9);
+
+                    }
+
+                }
+
+                objStreamWriter.WriteLine(strLine);
+
+                strLine = "";
+
+                for (int i = 0; i < m_DataView.Rows.Count; i++)
+
+                {
+
+                    if (m_DataView.Columns[0].Visible == true)
+
+                    {
+
+                        if (m_DataView.Rows[i].Cells[0].Value == null)
+
+                            strLine = strLine + " " + Convert.ToChar(9);
+
+                        else
+
+                            strLine = strLine + m_DataView.Rows[i].Cells[0].Value.ToString() + Convert.ToChar(9);
+
+                    }
+
+                    for (int j = 1; j < m_DataView.Columns.Count; j++)
+
+                    {
+
+                        if (m_DataView.Columns[j].Visible == true)
+
+                        {
+
+                            if (m_DataView.Rows[i].Cells[j].Value == null)
+
+                                strLine = strLine + " " + Convert.ToChar(9);
+
+                            else
+
+                            {
+
+                                string rowstr = "";
+
+                                rowstr = m_DataView.Rows[i].Cells[j].Value.ToString();
+
+                                if (rowstr.IndexOf("\r\n") > 0)
+
+                                    rowstr = rowstr.Replace("\r\n", " ");
+
+                                if (rowstr.IndexOf("\t") > 0)
+
+                                    rowstr = rowstr.Replace("\t", " ");
+
+                                strLine = strLine + rowstr + Convert.ToChar(9);
+
+                            }
+
+                        }
+
+                    }
+
+                    objStreamWriter.WriteLine(strLine);
+
+                    strLine = "";
+
+                }
+
+                objStreamWriter.Close();
+
+                objFileStream.Close();
+
+                MessageBox.Show("保存EXCEL成功");
+
+            }
+
+        }
     }
 
 }

+ 12 - 4
FormSetter/GridViewSetter.cs

@@ -737,7 +737,7 @@ namespace PTMedicalInsurance.FormSetter
             AddDGVColumn(dgv, "共济账户支付金额", "AccountMutualAidAmount", 150);
             AddDGVColumn(dgv, "企业补充医疗金额", "EnterpriseSupplementPay", 150);
             AddDGVColumn(dgv, "职工大额医疗金额", "LargeExpensesSupplementPay", 150);
-
+            AddDGVColumn(dgv, "居民大病医疗金额", "SeriousIllnessPay", 150);
             AddDGVColumn(dgv, "清算类别", "clr_type",100);
             AddDGVColumn(dgv, "接口ID", "Interface_dr", 80);
             AddDGVColumn(dgv, "结算经办机构", "setl_optins", 180);
@@ -827,11 +827,19 @@ namespace PTMedicalInsurance.FormSetter
             AddDGVColumn(dgv, "医保个人编号", "PersonnelNO", 200);
             AddDGVColumn(dgv, "姓名", "PatientName", 100);
             AddDGVColumn(dgv, "结算时间", "SettlementTime", 180);
-            AddDGVColumn(dgv, "总费用", "Sumamt");
-            AddDGVColumn(dgv, "账户支付", "AccountPaySumamt", 80);
-            AddDGVColumn(dgv, "现金支付", "PersonCashPay", 80);
+           
             AddDGVColumn(dgv, "有效标志", "ValidFlag", 80);
             AddDGVColumn(dgv, "单据类型", "BillType", 80);
+            AddDGVColumn(dgv, "医疗费总额", "Sumamt", 120);
+            AddDGVColumn(dgv, "现金支付", "PersonCashPay", 120);
+            AddDGVColumn(dgv, "统筹基金支付总额", "HealthInsurancePay", 120);
+            AddDGVColumn(dgv, "个人账户支付金额", "AccountPaySumamt", 120);
+            AddDGVColumn(dgv, "公务员补助金额", "CivilserviceAllowancePay", 120);
+            AddDGVColumn(dgv, "医疗救助金额", "MedicalAssistPay", 120);
+            AddDGVColumn(dgv, "共济账户支付金额", "AccountMutualAidAmount", 120);
+            AddDGVColumn(dgv, "企业补充医疗金额", "EnterpriseSupplementPay", 120);
+            AddDGVColumn(dgv, "职工大额医疗金额", "LargeExpensesSupplementPay", 120);
+            AddDGVColumn(dgv, "居民大病医疗金额", "SeriousIllnessPay", 120);
         }
 
         public void SetHeaderTextOfDgvCenterSetlRec(DataGridView dgv)

+ 131 - 107
Forms/Clearing.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             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();
@@ -209,6 +210,8 @@
             this.uiContextMenuStrip1 = new Sunny.UI.UIContextMenuStrip();
             this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
             this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
+            this.contextTable = new System.Windows.Forms.ContextMenuStrip(this.components);
+            this.exportToExcel = new System.Windows.Forms.ToolStripMenuItem();
             this.uiTabControl1.SuspendLayout();
             this.tabPage1.SuspendLayout();
             this.uiPanel2.SuspendLayout();
@@ -259,6 +262,7 @@
             this.uiGroupBox6.SuspendLayout();
             this.uiGroupBox5.SuspendLayout();
             this.uiContextMenuStrip1.SuspendLayout();
+            this.contextTable.SuspendLayout();
             this.SuspendLayout();
             // 
             // uiTabControl1
@@ -273,10 +277,10 @@
             this.uiTabControl1.ItemSize = new System.Drawing.Size(150, 30);
             this.uiTabControl1.Location = new System.Drawing.Point(0, 0);
             this.uiTabControl1.MainPage = "";
-            this.uiTabControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.uiTabControl1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.uiTabControl1.Name = "uiTabControl1";
             this.uiTabControl1.SelectedIndex = 0;
-            this.uiTabControl1.Size = new System.Drawing.Size(1600, 995);
+            this.uiTabControl1.Size = new System.Drawing.Size(1800, 1194);
             this.uiTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
             this.uiTabControl1.TabIndex = 0;
             this.uiTabControl1.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -287,9 +291,9 @@
             this.tabPage1.Controls.Add(this.uiPanel2);
             this.tabPage1.Controls.Add(this.uiPanel1);
             this.tabPage1.Location = new System.Drawing.Point(0, 30);
-            this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.tabPage1.Name = "tabPage1";
-            this.tabPage1.Size = new System.Drawing.Size(1600, 965);
+            this.tabPage1.Size = new System.Drawing.Size(1800, 1164);
             this.tabPage1.TabIndex = 0;
             this.tabPage1.Text = "本地对账";
             this.tabPage1.UseVisualStyleBackColor = true;
@@ -300,11 +304,11 @@
             this.uiPanel2.Controls.Add(this.uiTabControl2);
             this.uiPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
             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(304, 0);
-            this.uiPanel2.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
+            this.uiPanel2.Location = new System.Drawing.Point(342, 0);
+            this.uiPanel2.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.uiPanel2.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiPanel2.Name = "uiPanel2";
-            this.uiPanel2.Size = new System.Drawing.Size(1296, 965);
+            this.uiPanel2.Size = new System.Drawing.Size(1458, 1164);
             this.uiPanel2.TabIndex = 3;
             this.uiPanel2.Text = null;
             this.uiPanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -323,7 +327,7 @@
             this.uiTabControl3.MainPage = "";
             this.uiTabControl3.Name = "uiTabControl3";
             this.uiTabControl3.SelectedIndex = 0;
-            this.uiTabControl3.Size = new System.Drawing.Size(1296, 541);
+            this.uiTabControl3.Size = new System.Drawing.Size(1458, 740);
             this.uiTabControl3.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
             this.uiTabControl3.TabIndex = 1;
             this.uiTabControl3.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -334,7 +338,7 @@
             this.tabPage6.Controls.Add(this.dgvHisSettlRec);
             this.tabPage6.Location = new System.Drawing.Point(0, 25);
             this.tabPage6.Name = "tabPage6";
-            this.tabPage6.Size = new System.Drawing.Size(1296, 516);
+            this.tabPage6.Size = new System.Drawing.Size(1458, 715);
             this.tabPage6.TabIndex = 0;
             this.tabPage6.Text = "HIS结算记录";
             this.tabPage6.UseVisualStyleBackColor = true;
@@ -355,6 +359,7 @@
             dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
             this.dgvHisSettlRec.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
             this.dgvHisSettlRec.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dgvHisSettlRec.ContextMenuStrip = this.contextTable;
             dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
             dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
             dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -384,7 +389,7 @@
             this.dgvHisSettlRec.RowsDefaultCellStyle = dataGridViewCellStyle5;
             this.dgvHisSettlRec.RowTemplate.Height = 23;
             this.dgvHisSettlRec.SelectedIndex = -1;
-            this.dgvHisSettlRec.Size = new System.Drawing.Size(1296, 516);
+            this.dgvHisSettlRec.Size = new System.Drawing.Size(1458, 715);
             this.dgvHisSettlRec.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
             this.dgvHisSettlRec.TabIndex = 1;
             this.dgvHisSettlRec.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
@@ -395,7 +400,7 @@
             this.tabPage7.Controls.Add(this.dgvCenterSettlRec);
             this.tabPage7.Location = new System.Drawing.Point(0, 25);
             this.tabPage7.Name = "tabPage7";
-            this.tabPage7.Size = new System.Drawing.Size(972, 317);
+            this.tabPage7.Size = new System.Drawing.Size(1458, 715);
             this.tabPage7.TabIndex = 1;
             this.tabPage7.Text = "中心结算记录";
             this.tabPage7.UseVisualStyleBackColor = true;
@@ -444,7 +449,7 @@
             this.dgvCenterSettlRec.RowsDefaultCellStyle = dataGridViewCellStyle10;
             this.dgvCenterSettlRec.RowTemplate.Height = 23;
             this.dgvCenterSettlRec.SelectedIndex = -1;
-            this.dgvCenterSettlRec.Size = new System.Drawing.Size(972, 317);
+            this.dgvCenterSettlRec.Size = new System.Drawing.Size(1458, 715);
             this.dgvCenterSettlRec.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
             this.dgvCenterSettlRec.TabIndex = 1;
             this.dgvCenterSettlRec.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
@@ -454,7 +459,7 @@
             this.tabPage8.Controls.Add(this.rtbCheckDetailLog);
             this.tabPage8.Location = new System.Drawing.Point(0, 25);
             this.tabPage8.Name = "tabPage8";
-            this.tabPage8.Size = new System.Drawing.Size(972, 317);
+            this.tabPage8.Size = new System.Drawing.Size(1458, 715);
             this.tabPage8.TabIndex = 2;
             this.tabPage8.Text = "对明细账结果记录";
             this.tabPage8.UseVisualStyleBackColor = true;
@@ -470,7 +475,7 @@
             this.rtbCheckDetailLog.Name = "rtbCheckDetailLog";
             this.rtbCheckDetailLog.Padding = new System.Windows.Forms.Padding(2);
             this.rtbCheckDetailLog.ShowText = false;
-            this.rtbCheckDetailLog.Size = new System.Drawing.Size(972, 317);
+            this.rtbCheckDetailLog.Size = new System.Drawing.Size(1458, 715);
             this.rtbCheckDetailLog.Style = Sunny.UI.UIStyle.Custom;
             this.rtbCheckDetailLog.TabIndex = 0;
             this.rtbCheckDetailLog.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -488,7 +493,7 @@
             this.uiTabControl2.MainPage = "";
             this.uiTabControl2.Name = "uiTabControl2";
             this.uiTabControl2.SelectedIndex = 0;
-            this.uiTabControl2.Size = new System.Drawing.Size(1296, 424);
+            this.uiTabControl2.Size = new System.Drawing.Size(1458, 424);
             this.uiTabControl2.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
             this.uiTabControl2.TabIndex = 0;
             this.uiTabControl2.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -499,7 +504,7 @@
             this.tabPage4.Controls.Add(this.dgvSettlSummary);
             this.tabPage4.Location = new System.Drawing.Point(0, 25);
             this.tabPage4.Name = "tabPage4";
-            this.tabPage4.Size = new System.Drawing.Size(1296, 399);
+            this.tabPage4.Size = new System.Drawing.Size(1458, 399);
             this.tabPage4.TabIndex = 0;
             this.tabPage4.Text = "结算汇总数据";
             this.tabPage4.UseVisualStyleBackColor = true;
@@ -551,7 +556,7 @@
             this.dgvSettlSummary.RowsDefaultCellStyle = dataGridViewCellStyle15;
             this.dgvSettlSummary.RowTemplate.Height = 30;
             this.dgvSettlSummary.SelectedIndex = -1;
-            this.dgvSettlSummary.Size = new System.Drawing.Size(1296, 399);
+            this.dgvSettlSummary.Size = new System.Drawing.Size(1458, 399);
             this.dgvSettlSummary.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
             this.dgvSettlSummary.TabIndex = 0;
             this.dgvSettlSummary.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
@@ -572,55 +577,56 @@
             this.tsmAICheck,
             this.导出TXTToolStripMenuItem});
             this.cmsCheck.Name = "cmsCheck";
-            this.cmsCheck.Size = new System.Drawing.Size(278, 260);
+            this.cmsCheck.Size = new System.Drawing.Size(320, 308);
             this.cmsCheck.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             this.cmsCheck.Opening += new System.ComponentModel.CancelEventHandler(this.cmsCheck_Opening);
             // 
             // tsmCheck_Single
             // 
             this.tsmCheck_Single.Name = "tsmCheck_Single";
-            this.tsmCheck_Single.Size = new System.Drawing.Size(277, 32);
+            this.tsmCheck_Single.Size = new System.Drawing.Size(319, 38);
             this.tsmCheck_Single.Text = "单条对总账";
             this.tsmCheck_Single.Click += new System.EventHandler(this.tsmCheck_Single_Click);
             // 
             // tsmCheckDetail_Single
             // 
             this.tsmCheckDetail_Single.Name = "tsmCheckDetail_Single";
-            this.tsmCheckDetail_Single.Size = new System.Drawing.Size(277, 32);
+            this.tsmCheckDetail_Single.Size = new System.Drawing.Size(319, 38);
             this.tsmCheckDetail_Single.Text = "单条对明细账";
             this.tsmCheckDetail_Single.Click += new System.EventHandler(this.tsmCheckDetail_Single_Click);
             // 
             // tsmCheck_Batch
             // 
             this.tsmCheck_Batch.Name = "tsmCheck_Batch";
-            this.tsmCheck_Batch.Size = new System.Drawing.Size(277, 32);
+            this.tsmCheck_Batch.Size = new System.Drawing.Size(319, 38);
             this.tsmCheck_Batch.Text = "批量对总账";
+            this.tsmCheck_Batch.Click += new System.EventHandler(this.tsmCheck_Batch_Click);
             // 
             // tsmCheckDetail_Batch
             // 
             this.tsmCheckDetail_Batch.Name = "tsmCheckDetail_Batch";
-            this.tsmCheckDetail_Batch.Size = new System.Drawing.Size(277, 32);
+            this.tsmCheckDetail_Batch.Size = new System.Drawing.Size(319, 38);
             this.tsmCheckDetail_Batch.Text = "批量对明细账";
             this.tsmCheckDetail_Batch.Click += new System.EventHandler(this.tsmCheckDetail_Batch_Click);
             // 
             // tsmHisRecord
             // 
             this.tsmHisRecord.Name = "tsmHisRecord";
-            this.tsmHisRecord.Size = new System.Drawing.Size(277, 32);
+            this.tsmHisRecord.Size = new System.Drawing.Size(319, 38);
             this.tsmHisRecord.Text = "查看HIS记录明细 ";
             this.tsmHisRecord.Click += new System.EventHandler(this.tsmHisRecord_Click);
             // 
             // toolStripMenuItem1
             // 
             this.toolStripMenuItem1.Name = "toolStripMenuItem1";
-            this.toolStripMenuItem1.Size = new System.Drawing.Size(277, 32);
+            this.toolStripMenuItem1.Size = new System.Drawing.Size(319, 38);
             this.toolStripMenuItem1.Text = "toolStripMenuItem1";
             this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
             // 
             // tsmAICheck
             // 
             this.tsmAICheck.Name = "tsmAICheck";
-            this.tsmAICheck.Size = new System.Drawing.Size(277, 32);
+            this.tsmAICheck.Size = new System.Drawing.Size(319, 38);
             this.tsmAICheck.Text = "智能比对";
             this.tsmAICheck.Click += new System.EventHandler(this.tsmAICheck_Click);
             // 
@@ -637,69 +643,69 @@
             this.tsmImport,
             this.tsmHandCheck});
             this.导出TXTToolStripMenuItem.Name = "导出TXTToolStripMenuItem";
-            this.导出TXTToolStripMenuItem.Size = new System.Drawing.Size(277, 32);
+            this.导出TXTToolStripMenuItem.Size = new System.Drawing.Size(319, 38);
             this.导出TXTToolStripMenuItem.Text = "附属功能";
             // 
             // tsmExport
             // 
             this.tsmExport.Name = "tsmExport";
-            this.tsmExport.Size = new System.Drawing.Size(268, 32);
+            this.tsmExport.Size = new System.Drawing.Size(323, 40);
             this.tsmExport.Text = "导出TXT";
             this.tsmExport.Click += new System.EventHandler(this.tsmExport_Click);
             // 
             // tsmCompress
             // 
             this.tsmCompress.Name = "tsmCompress";
-            this.tsmCompress.Size = new System.Drawing.Size(268, 32);
+            this.tsmCompress.Size = new System.Drawing.Size(323, 40);
             this.tsmCompress.Text = "TXT压缩为ZIP";
             this.tsmCompress.Click += new System.EventHandler(this.tsmCompress_Click);
             // 
             // tsmZIPToSDec
             // 
             this.tsmZIPToSDec.Name = "tsmZIPToSDec";
-            this.tsmZIPToSDec.Size = new System.Drawing.Size(268, 32);
+            this.tsmZIPToSDec.Size = new System.Drawing.Size(323, 40);
             this.tsmZIPToSDec.Text = "ZIP转为有符号整数";
             this.tsmZIPToSDec.Click += new System.EventHandler(this.tsmZIPToSDec_Click);
             // 
             // tsmUploadZIP
             // 
             this.tsmUploadZIP.Name = "tsmUploadZIP";
-            this.tsmUploadZIP.Size = new System.Drawing.Size(268, 32);
+            this.tsmUploadZIP.Size = new System.Drawing.Size(323, 40);
             this.tsmUploadZIP.Text = "上传ZIP";
             this.tsmUploadZIP.Click += new System.EventHandler(this.tsmUploadZIP_Click);
             // 
             // tsm3202
             // 
             this.tsm3202.Name = "tsm3202";
-            this.tsm3202.Size = new System.Drawing.Size(268, 32);
+            this.tsm3202.Size = new System.Drawing.Size(323, 40);
             this.tsm3202.Text = "明细对账(3202)";
             this.tsm3202.Click += new System.EventHandler(this.tsm3202_Click);
             // 
             // tsmDownload
             // 
             this.tsmDownload.Name = "tsmDownload";
-            this.tsmDownload.Size = new System.Drawing.Size(268, 32);
+            this.tsmDownload.Size = new System.Drawing.Size(323, 40);
             this.tsmDownload.Text = "下载文件";
             this.tsmDownload.Click += new System.EventHandler(this.tsmDownload_Click);
             // 
             // tsmUnCompress
             // 
             this.tsmUnCompress.Name = "tsmUnCompress";
-            this.tsmUnCompress.Size = new System.Drawing.Size(268, 32);
+            this.tsmUnCompress.Size = new System.Drawing.Size(323, 40);
             this.tsmUnCompress.Text = "解压文件";
             this.tsmUnCompress.Click += new System.EventHandler(this.tsmUnCompress_Click);
             // 
             // tsmImport
             // 
             this.tsmImport.Name = "tsmImport";
-            this.tsmImport.Size = new System.Drawing.Size(268, 32);
+            this.tsmImport.Size = new System.Drawing.Size(323, 40);
             this.tsmImport.Text = "导入文件";
             this.tsmImport.Click += new System.EventHandler(this.tsmImport_Click);
             // 
             // tsmHandCheck
             // 
             this.tsmHandCheck.Name = "tsmHandCheck";
-            this.tsmHandCheck.Size = new System.Drawing.Size(268, 32);
+            this.tsmHandCheck.Size = new System.Drawing.Size(323, 40);
             this.tsmHandCheck.Text = "手工对账";
             this.tsmHandCheck.Click += new System.EventHandler(this.tsmHandCheck_Click);
             // 
@@ -708,7 +714,7 @@
             this.tabPage5.Controls.Add(this.rtbCheckLog);
             this.tabPage5.Location = new System.Drawing.Point(0, 25);
             this.tabPage5.Name = "tabPage5";
-            this.tabPage5.Size = new System.Drawing.Size(972, 399);
+            this.tabPage5.Size = new System.Drawing.Size(1458, 399);
             this.tabPage5.TabIndex = 1;
             this.tabPage5.Text = "对总账结果记录";
             this.tabPage5.UseVisualStyleBackColor = true;
@@ -724,7 +730,7 @@
             this.rtbCheckLog.Name = "rtbCheckLog";
             this.rtbCheckLog.Padding = new System.Windows.Forms.Padding(2);
             this.rtbCheckLog.ShowText = false;
-            this.rtbCheckLog.Size = new System.Drawing.Size(972, 399);
+            this.rtbCheckLog.Size = new System.Drawing.Size(1458, 399);
             this.rtbCheckLog.Style = Sunny.UI.UIStyle.Custom;
             this.rtbCheckLog.TabIndex = 1;
             this.rtbCheckLog.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -740,10 +746,10 @@
             this.uiPanel1.Dock = System.Windows.Forms.DockStyle.Left;
             this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.uiPanel1.Location = new System.Drawing.Point(0, 0);
-            this.uiPanel1.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
+            this.uiPanel1.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiPanel1.Name = "uiPanel1";
-            this.uiPanel1.Size = new System.Drawing.Size(304, 965);
+            this.uiPanel1.Size = new System.Drawing.Size(342, 1164);
             this.uiPanel1.TabIndex = 2;
             this.uiPanel1.Text = null;
             this.uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -754,7 +760,7 @@
             this.tbTmp.Dock = System.Windows.Forms.DockStyle.Top;
             this.tbTmp.Location = new System.Drawing.Point(0, 493);
             this.tbTmp.Name = "tbTmp";
-            this.tbTmp.Size = new System.Drawing.Size(304, 146);
+            this.tbTmp.Size = new System.Drawing.Size(342, 146);
             this.tbTmp.TabIndex = 31;
             this.tbTmp.Text = "";
             // 
@@ -777,7 +783,7 @@
             this.gbConditionSet.MinimumSize = new System.Drawing.Size(1, 1);
             this.gbConditionSet.Name = "gbConditionSet";
             this.gbConditionSet.Padding = new System.Windows.Forms.Padding(0, 26, 0, 0);
-            this.gbConditionSet.Size = new System.Drawing.Size(304, 226);
+            this.gbConditionSet.Size = new System.Drawing.Size(342, 226);
             this.gbConditionSet.TabIndex = 24;
             this.gbConditionSet.TabStop = false;
             this.gbConditionSet.Text = "条件设置";
@@ -953,7 +959,7 @@
             this.cbgGroupSet.Padding = new System.Windows.Forms.Padding(0, 26, 0, 0);
             this.cbgGroupSet.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Top;
             this.cbgGroupSet.SelectedIndexes = ((System.Collections.Generic.List<int>)(resources.GetObject("cbgGroupSet.SelectedIndexes")));
-            this.cbgGroupSet.Size = new System.Drawing.Size(304, 155);
+            this.cbgGroupSet.Size = new System.Drawing.Size(342, 155);
             this.cbgGroupSet.TabIndex = 25;
             this.cbgGroupSet.Text = "分组设置";
             this.cbgGroupSet.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -975,7 +981,7 @@
             this.uiGroupBox1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0);
             this.uiGroupBox1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
             this.uiGroupBox1.RectSize = 2;
-            this.uiGroupBox1.Size = new System.Drawing.Size(304, 853);
+            this.uiGroupBox1.Size = new System.Drawing.Size(342, 1052);
             this.uiGroupBox1.TabIndex = 22;
             this.uiGroupBox1.Text = null;
             this.uiGroupBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -988,14 +994,14 @@
             this.uiGroupBox10.Controls.Add(this.Btn_Query);
             this.uiGroupBox10.Dock = System.Windows.Forms.DockStyle.Bottom;
             this.uiGroupBox10.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiGroupBox10.Location = new System.Drawing.Point(0, 740);
+            this.uiGroupBox10.Location = new System.Drawing.Point(0, 939);
             this.uiGroupBox10.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.uiGroupBox10.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiGroupBox10.Name = "uiGroupBox10";
             this.uiGroupBox10.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0);
             this.uiGroupBox10.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
             this.uiGroupBox10.RectSize = 2;
-            this.uiGroupBox10.Size = new System.Drawing.Size(304, 113);
+            this.uiGroupBox10.Size = new System.Drawing.Size(342, 113);
             this.uiGroupBox10.TabIndex = 34;
             this.uiGroupBox10.Text = null;
             this.uiGroupBox10.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1010,7 +1016,7 @@
             this.uiButton4.Location = new System.Drawing.Point(23, 73);
             this.uiButton4.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiButton4.Name = "uiButton4";
-            this.uiButton4.Size = new System.Drawing.Size(261, 35);
+            this.uiButton4.Size = new System.Drawing.Size(299, 35);
             this.uiButton4.TabIndex = 2;
             this.uiButton4.Text = "退出";
             this.uiButton4.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1026,7 +1032,7 @@
             this.uiButton5.Location = new System.Drawing.Point(23, 37);
             this.uiButton5.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiButton5.Name = "uiButton5";
-            this.uiButton5.Size = new System.Drawing.Size(261, 35);
+            this.uiButton5.Size = new System.Drawing.Size(299, 35);
             this.uiButton5.TabIndex = 1;
             this.uiButton5.Text = "批量对总账";
             this.uiButton5.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1041,7 +1047,7 @@
             this.Btn_Query.Location = new System.Drawing.Point(23, 1);
             this.Btn_Query.MinimumSize = new System.Drawing.Size(1, 1);
             this.Btn_Query.Name = "Btn_Query";
-            this.Btn_Query.Size = new System.Drawing.Size(261, 35);
+            this.Btn_Query.Size = new System.Drawing.Size(299, 35);
             this.Btn_Query.TabIndex = 0;
             this.Btn_Query.Text = "查询汇总数据";
             this.Btn_Query.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1053,7 +1059,7 @@
             this.btnQuerySettlSummary.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.btnQuerySettlSummary.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnQuerySettlSummary.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnQuerySettlSummary.Location = new System.Drawing.Point(34, 918);
+            this.btnQuerySettlSummary.Location = new System.Drawing.Point(34, 1117);
             this.btnQuerySettlSummary.MinimumSize = new System.Drawing.Size(1, 1);
             this.btnQuerySettlSummary.Name = "btnQuerySettlSummary";
             this.btnQuerySettlSummary.Size = new System.Drawing.Size(168, 27);
@@ -1067,7 +1073,7 @@
             this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnClose.Location = new System.Drawing.Point(34, 1027);
+            this.btnClose.Location = new System.Drawing.Point(34, 1226);
             this.btnClose.MinimumSize = new System.Drawing.Size(1, 1);
             this.btnClose.Name = "btnClose";
             this.btnClose.Size = new System.Drawing.Size(168, 27);
@@ -1082,7 +1088,7 @@
             this.btnBatchCheck.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.btnBatchCheck.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnBatchCheck.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnBatchCheck.Location = new System.Drawing.Point(34, 978);
+            this.btnBatchCheck.Location = new System.Drawing.Point(34, 1177);
             this.btnBatchCheck.MinimumSize = new System.Drawing.Size(1, 1);
             this.btnBatchCheck.Name = "btnBatchCheck";
             this.btnBatchCheck.Size = new System.Drawing.Size(168, 27);
@@ -1105,7 +1111,7 @@
             this.gbDateTime.MinimumSize = new System.Drawing.Size(1, 1);
             this.gbDateTime.Name = "gbDateTime";
             this.gbDateTime.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
-            this.gbDateTime.Size = new System.Drawing.Size(304, 112);
+            this.gbDateTime.Size = new System.Drawing.Size(342, 112);
             this.gbDateTime.TabIndex = 21;
             this.gbDateTime.Text = "起止时间";
             this.gbDateTime.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1182,9 +1188,9 @@
             this.tabPage10.Controls.Add(this.uiPanel7);
             this.tabPage10.Controls.Add(this.uiPanel6);
             this.tabPage10.Location = new System.Drawing.Point(0, 30);
-            this.tabPage10.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.tabPage10.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.tabPage10.Name = "tabPage10";
-            this.tabPage10.Size = new System.Drawing.Size(1600, 965);
+            this.tabPage10.Size = new System.Drawing.Size(1800, 1164);
             this.tabPage10.TabIndex = 3;
             this.tabPage10.Text = "异地对账";
             this.tabPage10.UseVisualStyleBackColor = true;
@@ -1195,11 +1201,11 @@
             this.uiPanel7.Controls.Add(this.uiTabControl7);
             this.uiPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
             this.uiPanel7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiPanel7.Location = new System.Drawing.Point(289, 0);
-            this.uiPanel7.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
+            this.uiPanel7.Location = new System.Drawing.Point(325, 0);
+            this.uiPanel7.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.uiPanel7.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiPanel7.Name = "uiPanel7";
-            this.uiPanel7.Size = new System.Drawing.Size(1311, 965);
+            this.uiPanel7.Size = new System.Drawing.Size(1475, 1164);
             this.uiPanel7.TabIndex = 4;
             this.uiPanel7.Text = null;
             this.uiPanel7.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1216,7 +1222,7 @@
             this.uiTabControl6.MainPage = "";
             this.uiTabControl6.Name = "uiTabControl6";
             this.uiTabControl6.SelectedIndex = 0;
-            this.uiTabControl6.Size = new System.Drawing.Size(1311, 541);
+            this.uiTabControl6.Size = new System.Drawing.Size(1475, 740);
             this.uiTabControl6.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
             this.uiTabControl6.TabIndex = 1;
             this.uiTabControl6.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1227,7 +1233,7 @@
             this.tabPage14.Controls.Add(this.rtbOthCheckResultRecord);
             this.tabPage14.Location = new System.Drawing.Point(0, 25);
             this.tabPage14.Name = "tabPage14";
-            this.tabPage14.Size = new System.Drawing.Size(1311, 516);
+            this.tabPage14.Size = new System.Drawing.Size(1475, 715);
             this.tabPage14.TabIndex = 2;
             this.tabPage14.Text = "对账结果记录";
             this.tabPage14.UseVisualStyleBackColor = true;
@@ -1243,7 +1249,7 @@
             this.rtbOthCheckResultRecord.Name = "rtbOthCheckResultRecord";
             this.rtbOthCheckResultRecord.Padding = new System.Windows.Forms.Padding(2);
             this.rtbOthCheckResultRecord.ShowText = false;
-            this.rtbOthCheckResultRecord.Size = new System.Drawing.Size(1311, 516);
+            this.rtbOthCheckResultRecord.Size = new System.Drawing.Size(1475, 715);
             this.rtbOthCheckResultRecord.Style = Sunny.UI.UIStyle.Custom;
             this.rtbOthCheckResultRecord.TabIndex = 0;
             this.rtbOthCheckResultRecord.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1260,7 +1266,7 @@
             this.uiTabControl7.MainPage = "";
             this.uiTabControl7.Name = "uiTabControl7";
             this.uiTabControl7.SelectedIndex = 0;
-            this.uiTabControl7.Size = new System.Drawing.Size(1311, 424);
+            this.uiTabControl7.Size = new System.Drawing.Size(1475, 424);
             this.uiTabControl7.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
             this.uiTabControl7.TabIndex = 0;
             this.uiTabControl7.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1271,7 +1277,7 @@
             this.tabPage15.Controls.Add(this.dgvOthCheck);
             this.tabPage15.Location = new System.Drawing.Point(0, 25);
             this.tabPage15.Name = "tabPage15";
-            this.tabPage15.Size = new System.Drawing.Size(1311, 399);
+            this.tabPage15.Size = new System.Drawing.Size(1475, 399);
             this.tabPage15.TabIndex = 0;
             this.tabPage15.Text = "结算汇总数据";
             this.tabPage15.UseVisualStyleBackColor = true;
@@ -1323,7 +1329,7 @@
             this.dgvOthCheck.RowsDefaultCellStyle = dataGridViewCellStyle20;
             this.dgvOthCheck.RowTemplate.Height = 30;
             this.dgvOthCheck.SelectedIndex = -1;
-            this.dgvOthCheck.Size = new System.Drawing.Size(1311, 399);
+            this.dgvOthCheck.Size = new System.Drawing.Size(1475, 399);
             this.dgvOthCheck.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
             this.dgvOthCheck.TabIndex = 0;
             this.dgvOthCheck.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
@@ -1337,13 +1343,13 @@
             this.cmdOthPlcCheck.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.tsmOthPlcCheck});
             this.cmdOthPlcCheck.Name = "cmsCheck";
-            this.cmdOthPlcCheck.Size = new System.Drawing.Size(219, 36);
+            this.cmdOthPlcCheck.Size = new System.Drawing.Size(249, 42);
             this.cmdOthPlcCheck.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
             // tsmOthPlcCheck
             // 
             this.tsmOthPlcCheck.Name = "tsmOthPlcCheck";
-            this.tsmOthPlcCheck.Size = new System.Drawing.Size(218, 32);
+            this.tsmOthPlcCheck.Size = new System.Drawing.Size(248, 38);
             this.tsmOthPlcCheck.Text = "单条对账(异地)";
             this.tsmOthPlcCheck.Click += new System.EventHandler(this.tsmOthPlcCheck_Click);
             // 
@@ -1355,10 +1361,10 @@
             this.uiPanel6.Dock = System.Windows.Forms.DockStyle.Left;
             this.uiPanel6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.uiPanel6.Location = new System.Drawing.Point(0, 0);
-            this.uiPanel6.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
+            this.uiPanel6.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.uiPanel6.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiPanel6.Name = "uiPanel6";
-            this.uiPanel6.Size = new System.Drawing.Size(289, 965);
+            this.uiPanel6.Size = new System.Drawing.Size(325, 1164);
             this.uiPanel6.TabIndex = 3;
             this.uiPanel6.Text = null;
             this.uiPanel6.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1381,7 +1387,7 @@
             this.uiGroupBox7.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiGroupBox7.Name = "uiGroupBox7";
             this.uiGroupBox7.Padding = new System.Windows.Forms.Padding(0, 26, 0, 0);
-            this.uiGroupBox7.Size = new System.Drawing.Size(289, 198);
+            this.uiGroupBox7.Size = new System.Drawing.Size(325, 198);
             this.uiGroupBox7.TabIndex = 24;
             this.uiGroupBox7.TabStop = false;
             this.uiGroupBox7.Text = "条件设置";
@@ -1515,14 +1521,14 @@
             this.uiGroupBox8.Controls.Add(this.uiButton3);
             this.uiGroupBox8.Dock = System.Windows.Forms.DockStyle.Bottom;
             this.uiGroupBox8.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiGroupBox8.Location = new System.Drawing.Point(0, 828);
+            this.uiGroupBox8.Location = new System.Drawing.Point(0, 1027);
             this.uiGroupBox8.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.uiGroupBox8.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiGroupBox8.Name = "uiGroupBox8";
             this.uiGroupBox8.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0);
             this.uiGroupBox8.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
             this.uiGroupBox8.RectSize = 2;
-            this.uiGroupBox8.Size = new System.Drawing.Size(289, 137);
+            this.uiGroupBox8.Size = new System.Drawing.Size(325, 137);
             this.uiGroupBox8.TabIndex = 22;
             this.uiGroupBox8.Text = null;
             this.uiGroupBox8.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1583,7 +1589,7 @@
             this.uiGroupBox9.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiGroupBox9.Name = "uiGroupBox9";
             this.uiGroupBox9.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
-            this.uiGroupBox9.Size = new System.Drawing.Size(289, 112);
+            this.uiGroupBox9.Size = new System.Drawing.Size(325, 112);
             this.uiGroupBox9.TabIndex = 21;
             this.uiGroupBox9.Text = "起止时间";
             this.uiGroupBox9.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1659,9 +1665,9 @@
             this.tabPage2.Controls.Add(this.uiPanel4);
             this.tabPage2.Controls.Add(this.uiPanel3);
             this.tabPage2.Location = new System.Drawing.Point(0, 30);
-            this.tabPage2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.tabPage2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.tabPage2.Name = "tabPage2";
-            this.tabPage2.Size = new System.Drawing.Size(1600, 965);
+            this.tabPage2.Size = new System.Drawing.Size(1800, 1164);
             this.tabPage2.TabIndex = 1;
             this.tabPage2.Text = "清算汇总";
             this.tabPage2.UseVisualStyleBackColor = true;
@@ -1672,11 +1678,11 @@
             this.uiPanel4.Controls.Add(this.uiTabControl5);
             this.uiPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
             this.uiPanel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiPanel4.Location = new System.Drawing.Point(296, 0);
-            this.uiPanel4.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
+            this.uiPanel4.Location = new System.Drawing.Point(333, 0);
+            this.uiPanel4.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.uiPanel4.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiPanel4.Name = "uiPanel4";
-            this.uiPanel4.Size = new System.Drawing.Size(1304, 965);
+            this.uiPanel4.Size = new System.Drawing.Size(1467, 1164);
             this.uiPanel4.TabIndex = 4;
             this.uiPanel4.Text = null;
             this.uiPanel4.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1693,7 +1699,7 @@
             this.uiTabControl4.MainPage = "";
             this.uiTabControl4.Name = "uiTabControl4";
             this.uiTabControl4.SelectedIndex = 0;
-            this.uiTabControl4.Size = new System.Drawing.Size(1304, 541);
+            this.uiTabControl4.Size = new System.Drawing.Size(1467, 740);
             this.uiTabControl4.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
             this.uiTabControl4.TabIndex = 1;
             this.uiTabControl4.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1704,7 +1710,7 @@
             this.tabPage9.Controls.Add(this.dgvHisSettlRec_2);
             this.tabPage9.Location = new System.Drawing.Point(0, 25);
             this.tabPage9.Name = "tabPage9";
-            this.tabPage9.Size = new System.Drawing.Size(1304, 516);
+            this.tabPage9.Size = new System.Drawing.Size(1467, 715);
             this.tabPage9.TabIndex = 0;
             this.tabPage9.Text = "HIS结算记录";
             this.tabPage9.UseVisualStyleBackColor = true;
@@ -1754,7 +1760,7 @@
             this.dgvHisSettlRec_2.RowsDefaultCellStyle = dataGridViewCellStyle25;
             this.dgvHisSettlRec_2.RowTemplate.Height = 23;
             this.dgvHisSettlRec_2.SelectedIndex = -1;
-            this.dgvHisSettlRec_2.Size = new System.Drawing.Size(1304, 516);
+            this.dgvHisSettlRec_2.Size = new System.Drawing.Size(1467, 715);
             this.dgvHisSettlRec_2.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
             this.dgvHisSettlRec_2.TabIndex = 1;
             this.dgvHisSettlRec_2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
@@ -1770,7 +1776,7 @@
             this.uiTabControl5.MainPage = "";
             this.uiTabControl5.Name = "uiTabControl5";
             this.uiTabControl5.SelectedIndex = 0;
-            this.uiTabControl5.Size = new System.Drawing.Size(1304, 424);
+            this.uiTabControl5.Size = new System.Drawing.Size(1467, 424);
             this.uiTabControl5.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
             this.uiTabControl5.TabIndex = 0;
             this.uiTabControl5.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1781,7 +1787,7 @@
             this.tabPage12.Controls.Add(this.dgvClearingSum);
             this.tabPage12.Location = new System.Drawing.Point(0, 25);
             this.tabPage12.Name = "tabPage12";
-            this.tabPage12.Size = new System.Drawing.Size(1304, 399);
+            this.tabPage12.Size = new System.Drawing.Size(1467, 399);
             this.tabPage12.TabIndex = 0;
             this.tabPage12.Text = "结算汇总数据";
             this.tabPage12.UseVisualStyleBackColor = true;
@@ -1833,7 +1839,7 @@
             this.dgvClearingSum.RowsDefaultCellStyle = dataGridViewCellStyle30;
             this.dgvClearingSum.RowTemplate.Height = 30;
             this.dgvClearingSum.SelectedIndex = -1;
-            this.dgvClearingSum.Size = new System.Drawing.Size(1304, 399);
+            this.dgvClearingSum.Size = new System.Drawing.Size(1467, 399);
             this.dgvClearingSum.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
             this.dgvClearingSum.TabIndex = 0;
             this.dgvClearingSum.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
@@ -1847,21 +1853,21 @@
             this.tmsClearing_2,
             this.tmsHisSettlRecord_2});
             this.cmsClearing.Name = "cmsClearing";
-            this.cmsClearing.Size = new System.Drawing.Size(238, 68);
+            this.cmsClearing.Size = new System.Drawing.Size(273, 80);
             this.cmsClearing.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             this.cmsClearing.Opening += new System.ComponentModel.CancelEventHandler(this.cmsClearing_Opening);
             // 
             // tmsClearing_2
             // 
             this.tmsClearing_2.Name = "tmsClearing_2";
-            this.tmsClearing_2.Size = new System.Drawing.Size(237, 32);
+            this.tmsClearing_2.Size = new System.Drawing.Size(272, 38);
             this.tmsClearing_2.Text = "单条清算";
             this.tmsClearing_2.Click += new System.EventHandler(this.tmsClearing_2_Click);
             // 
             // tmsHisSettlRecord_2
             // 
             this.tmsHisSettlRecord_2.Name = "tmsHisSettlRecord_2";
-            this.tmsHisSettlRecord_2.Size = new System.Drawing.Size(237, 32);
+            this.tmsHisSettlRecord_2.Size = new System.Drawing.Size(272, 38);
             this.tmsHisSettlRecord_2.Text = "查看HIS结算记录";
             // 
             // uiPanel3
@@ -1872,10 +1878,10 @@
             this.uiPanel3.Dock = System.Windows.Forms.DockStyle.Left;
             this.uiPanel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.uiPanel3.Location = new System.Drawing.Point(0, 0);
-            this.uiPanel3.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
+            this.uiPanel3.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.uiPanel3.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiPanel3.Name = "uiPanel3";
-            this.uiPanel3.Size = new System.Drawing.Size(296, 965);
+            this.uiPanel3.Size = new System.Drawing.Size(333, 1164);
             this.uiPanel3.TabIndex = 3;
             this.uiPanel3.Text = null;
             this.uiPanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1906,7 +1912,7 @@
             this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiGroupBox2.Name = "uiGroupBox2";
             this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 26, 0, 0);
-            this.uiGroupBox2.Size = new System.Drawing.Size(296, 288);
+            this.uiGroupBox2.Size = new System.Drawing.Size(333, 288);
             this.uiGroupBox2.TabIndex = 27;
             this.uiGroupBox2.TabStop = false;
             this.uiGroupBox2.Text = "条件设置";
@@ -2161,14 +2167,14 @@
             this.uiGroupBox3.Controls.Add(this.btnQueryClrSum);
             this.uiGroupBox3.Dock = System.Windows.Forms.DockStyle.Bottom;
             this.uiGroupBox3.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiGroupBox3.Location = new System.Drawing.Point(0, 831);
+            this.uiGroupBox3.Location = new System.Drawing.Point(0, 1030);
             this.uiGroupBox3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.uiGroupBox3.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiGroupBox3.Name = "uiGroupBox3";
             this.uiGroupBox3.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0);
             this.uiGroupBox3.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
             this.uiGroupBox3.RectSize = 2;
-            this.uiGroupBox3.Size = new System.Drawing.Size(296, 134);
+            this.uiGroupBox3.Size = new System.Drawing.Size(333, 134);
             this.uiGroupBox3.TabIndex = 25;
             this.uiGroupBox3.Text = null;
             this.uiGroupBox3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -2228,7 +2234,7 @@
             this.uiGroupBox4.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiGroupBox4.Name = "uiGroupBox4";
             this.uiGroupBox4.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
-            this.uiGroupBox4.Size = new System.Drawing.Size(296, 112);
+            this.uiGroupBox4.Size = new System.Drawing.Size(333, 112);
             this.uiGroupBox4.TabIndex = 21;
             this.uiGroupBox4.Text = "起止时间";
             this.uiGroupBox4.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -2305,9 +2311,9 @@
             this.tabPage3.Controls.Add(this.dgvClearingData);
             this.tabPage3.Controls.Add(this.uiPanel5);
             this.tabPage3.Location = new System.Drawing.Point(0, 30);
-            this.tabPage3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.tabPage3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.tabPage3.Name = "tabPage3";
-            this.tabPage3.Size = new System.Drawing.Size(1600, 965);
+            this.tabPage3.Size = new System.Drawing.Size(1800, 1164);
             this.tabPage3.TabIndex = 2;
             this.tabPage3.Text = "清算撤销";
             this.tabPage3.UseVisualStyleBackColor = true;
@@ -2341,7 +2347,7 @@
             this.dgvClearingData.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dgvClearingData.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
             this.dgvClearingData.Location = new System.Drawing.Point(0, 0);
-            this.dgvClearingData.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.dgvClearingData.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.dgvClearingData.Name = "dgvClearingData";
             dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
             dataGridViewCellStyle34.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
@@ -2357,7 +2363,7 @@
             this.dgvClearingData.RowsDefaultCellStyle = dataGridViewCellStyle35;
             this.dgvClearingData.RowTemplate.Height = 23;
             this.dgvClearingData.SelectedIndex = -1;
-            this.dgvClearingData.Size = new System.Drawing.Size(1600, 831);
+            this.dgvClearingData.Size = new System.Drawing.Size(1800, 1003);
             this.dgvClearingData.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
             this.dgvClearingData.TabIndex = 1;
             this.dgvClearingData.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
@@ -2372,11 +2378,11 @@
             this.uiPanel5.Controls.Add(this.uiGroupBox5);
             this.uiPanel5.Dock = System.Windows.Forms.DockStyle.Bottom;
             this.uiPanel5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiPanel5.Location = new System.Drawing.Point(0, 831);
-            this.uiPanel5.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
+            this.uiPanel5.Location = new System.Drawing.Point(0, 1003);
+            this.uiPanel5.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.uiPanel5.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiPanel5.Name = "uiPanel5";
-            this.uiPanel5.Size = new System.Drawing.Size(1600, 134);
+            this.uiPanel5.Size = new System.Drawing.Size(1800, 161);
             this.uiPanel5.TabIndex = 0;
             this.uiPanel5.Text = null;
             this.uiPanel5.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -2409,7 +2415,7 @@
             this.uiGroupBox6.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiGroupBox6.Name = "uiGroupBox6";
             this.uiGroupBox6.Padding = new System.Windows.Forms.Padding(0, 26, 0, 0);
-            this.uiGroupBox6.Size = new System.Drawing.Size(236, 134);
+            this.uiGroupBox6.Size = new System.Drawing.Size(236, 161);
             this.uiGroupBox6.TabIndex = 26;
             this.uiGroupBox6.TabStop = false;
             this.uiGroupBox6.Text = null;
@@ -2492,7 +2498,7 @@
             this.rbgTimeWay.MinimumSize = new System.Drawing.Size(1, 1);
             this.rbgTimeWay.Name = "rbgTimeWay";
             this.rbgTimeWay.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
-            this.rbgTimeWay.Size = new System.Drawing.Size(176, 134);
+            this.rbgTimeWay.Size = new System.Drawing.Size(176, 161);
             this.rbgTimeWay.TabIndex = 25;
             this.rbgTimeWay.Text = null;
             this.rbgTimeWay.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -2537,7 +2543,7 @@
             this.uiGroupBox5.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiGroupBox5.Name = "uiGroupBox5";
             this.uiGroupBox5.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
-            this.uiGroupBox5.Size = new System.Drawing.Size(178, 134);
+            this.uiGroupBox5.Size = new System.Drawing.Size(178, 161);
             this.uiGroupBox5.TabIndex = 22;
             this.uiGroupBox5.Text = null;
             this.uiGroupBox5.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -2592,28 +2598,43 @@
             this.toolStripMenuItem2,
             this.toolStripMenuItem3});
             this.uiContextMenuStrip1.Name = "cmsClearing";
-            this.uiContextMenuStrip1.Size = new System.Drawing.Size(238, 68);
+            this.uiContextMenuStrip1.Size = new System.Drawing.Size(273, 80);
             this.uiContextMenuStrip1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
             // toolStripMenuItem2
             // 
             this.toolStripMenuItem2.Name = "toolStripMenuItem2";
-            this.toolStripMenuItem2.Size = new System.Drawing.Size(237, 32);
+            this.toolStripMenuItem2.Size = new System.Drawing.Size(272, 38);
             this.toolStripMenuItem2.Text = "单条清算";
             // 
             // toolStripMenuItem3
             // 
             this.toolStripMenuItem3.Name = "toolStripMenuItem3";
-            this.toolStripMenuItem3.Size = new System.Drawing.Size(237, 32);
+            this.toolStripMenuItem3.Size = new System.Drawing.Size(272, 38);
             this.toolStripMenuItem3.Text = "查看HIS结算记录";
             // 
+            // contextTable
+            // 
+            this.contextTable.ImageScalingSize = new System.Drawing.Size(24, 24);
+            this.contextTable.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.exportToExcel});
+            this.contextTable.Name = "contextTable";
+            this.contextTable.Size = new System.Drawing.Size(153, 34);
+            // 
+            // exportToExcel
+            // 
+            this.exportToExcel.Name = "exportToExcel";
+            this.exportToExcel.Size = new System.Drawing.Size(152, 30);
+            this.exportToExcel.Text = "导出数据";
+            this.exportToExcel.Click += new System.EventHandler(this.exportToExcel_Click);
+            // 
             // Clearing
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1600, 995);
+            this.ClientSize = new System.Drawing.Size(1800, 1194);
             this.Controls.Add(this.uiTabControl1);
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
             this.Name = "Clearing";
             this.Text = "对账与清算";
             this.Load += new System.EventHandler(this.Clearing_Load);
@@ -2667,6 +2688,7 @@
             this.uiGroupBox6.ResumeLayout(false);
             this.uiGroupBox5.ResumeLayout(false);
             this.uiContextMenuStrip1.ResumeLayout(false);
+            this.contextTable.ResumeLayout(false);
             this.ResumeLayout(false);
 
         }
@@ -2818,5 +2840,7 @@
         private Sunny.UI.UIComboBox cbInsutype_2;
         private Sunny.UI.UILabel uiLabel9;
         private Sunny.UI.UILabel uiLabel10;
+        private System.Windows.Forms.ContextMenuStrip contextTable;
+        private System.Windows.Forms.ToolStripMenuItem exportToExcel;
     }
 }

+ 14 - 3
Forms/Clearing.cs

@@ -1449,7 +1449,6 @@ namespace PTMedicalInsurance.Forms
             joSettlQuery.Add("code", "09010068");
             InvokeHelper invoker = new InvokeHelper();
             JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询汇总结算信息(清算)");
-
             DataTable dt = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
             dgvClearingSum.DataSource = dt;
         }
@@ -1525,6 +1524,7 @@ namespace PTMedicalInsurance.Forms
             JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询清算信息");
 
             DataTable dt = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
+            dt.Columns["SeriousIllnessPay"].DataType = typeof(string);
             dgvClearingData.DataSource = dt;
         }
 
@@ -1771,7 +1771,7 @@ namespace PTMedicalInsurance.Forms
             sqlStr = sqlStr + " SUM(billType*AccountPaySumamt) AS acct_pay,SUM(BillType*FundPaySumamt) AS fund_pay_sumamt ";
             //sqlStr = sqlStr + " Interface_dr,clearingWay AS clr_way,clearingType AS clr_type ";
             // 增加先行自付金额、医疗救助基金、公务员医疗补助、个人账户共济支付、企业补充、职工大额
-            sqlStr += ",Sum(BillType*PreSelfPayAmount) as PreSelfPayAmount,sum(BillType*MedicalAssistPay) as MedicalAssistPay,sum(BillType*CivilserviceAllowancePay) as CivilserviceAllowancePay,sum(BillType*AccountMutualAidAmount) as AccountMutualAidAmount ,sum(BillType*LargeExpensesSupplementPay) as LargeExpensesSupplementPay,sum(BillType*EnterpriseSupplementPay) as EnterpriseSupplementPay ";
+            sqlStr += ",Sum(BillType*PreSelfPayAmount) as PreSelfPayAmount,sum(BillType*MedicalAssistPay) as MedicalAssistPay,sum(BillType*CivilserviceAllowancePay) as CivilserviceAllowancePay,sum(BillType*AccountMutualAidAmount) as AccountMutualAidAmount ,sum(BillType*LargeExpensesSupplementPay) as LargeExpensesSupplementPay,sum(BillType*EnterpriseSupplementPay) as EnterpriseSupplementPay,sum(BillType*SeriousIllnessPay) as SeriousIllnessPay ";
 
             string conditionStr = " Group By";
             if (cbgGroupSet.GetItemCheckState(0))
@@ -1855,7 +1855,8 @@ namespace PTMedicalInsurance.Forms
             InvokeHelper invoker = new InvokeHelper();
             JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询汇总结算信息");
 
-            DataTable dt = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
+            //DataTable dt = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
+            DataTable dt = JsonConvert.DeserializeObject<DataTable>(joRtn["result"]["data"].ToString(), new ReadDataTableConverter());
             dgvSettlSummary.DataSource = dt;
 
             //初始化HIS结算明细View数据
@@ -1892,5 +1893,15 @@ namespace PTMedicalInsurance.Forms
           
 
         }
+
+        private void tsmCheck_Batch_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void exportToExcel_Click(object sender, EventArgs e)
+        {
+            ExportToExcel.GridViewToExcel(dgvHisSettlRec);
+        }
     }
 }

+ 4 - 1
Forms/Clearing.resx

@@ -117,6 +117,9 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="contextTable.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>651, 25</value>
+  </metadata>
   <metadata name="cmsCheck.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>21, 25</value>
   </metadata>
@@ -139,6 +142,6 @@
     <value>408, 25</value>
   </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>38</value>
+    <value>122</value>
   </metadata>
 </root>

+ 117 - 0
Helper/ReadDataTableConverter.cs

@@ -0,0 +1,117 @@
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PTMedicalInsurance.Helper
+{
+    class ReadDataTableConverter : JsonConverter
+    {
+        public override bool CanConvert(Type objectType)
+        {
+            return objectType == typeof(DataTable);
+        }
+
+        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
+        {
+            JArray array = JArray.Load(reader);
+            var dataTypes = DetermineColumnDataTypes(array);
+            var table = BuildDataTable(array, dataTypes);
+            return table;
+        }
+
+        private DataTable BuildDataTable(JArray array, Dictionary<string, Type> dataTypes)
+        {
+            DataTable table = new DataTable();
+            foreach (var kvp in dataTypes)
+            {
+                table.Columns.Add(kvp.Key, kvp.Value);
+            }
+
+            foreach (JObject item in array.Children<JObject>())
+            {
+                DataRow row = table.NewRow();
+                foreach (JProperty prop in item.Properties())
+                {
+                    if (prop.Value.Type != JTokenType.Null)
+                    {
+                        Type dataType = dataTypes[prop.Name];
+                        row[prop.Name] = prop.Value.ToObject(dataType);
+                    }
+                }
+                table.Rows.Add(row);
+            }
+            return table;
+        }
+
+        private Dictionary<string, Type> DetermineColumnDataTypes(JArray array)
+        {
+            var dataTypes = new Dictionary<string, Type>();
+            foreach (JObject item in array.Children<JObject>())
+            {
+                foreach (JProperty prop in item.Properties())
+                {
+                    Type currentType = GetDataType(prop.Value.Type);
+                    if (currentType != null)
+                    {
+                        Type previousType;
+                        if (!dataTypes.TryGetValue(prop.Name, out previousType) ||
+                            (previousType == typeof(long) && currentType == typeof(decimal)))
+                        {
+                            dataTypes[prop.Name] = currentType;
+                        }
+                        else if (previousType != currentType)
+                        {
+                            dataTypes[prop.Name] = typeof(string);
+                        }
+                    }
+                }
+            }
+            return dataTypes;
+        }
+
+        private Type GetDataType(JTokenType tokenType)
+        {
+            switch (tokenType)
+            {
+                case JTokenType.Null:
+                    return null;
+                case JTokenType.String:
+                    return typeof(string);
+                case JTokenType.Integer:
+                    return typeof(long);
+                case JTokenType.Float:
+                    return typeof(decimal);
+                case JTokenType.Boolean:
+                    return typeof(bool);
+                case JTokenType.Date:
+                    return typeof(DateTime);
+                case JTokenType.TimeSpan:
+                    return typeof(TimeSpan);
+                case JTokenType.Guid:
+                    return typeof(Guid);
+                case JTokenType.Bytes:
+                    return typeof(byte[]);
+                case JTokenType.Array:
+                case JTokenType.Object:
+                    throw new JsonException("This converter does not support complex types");
+                default:
+                    return typeof(string);
+            }
+        }
+
+        public override bool CanWrite
+        {
+            get { return false; }
+        }
+
+        public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}