ソースを参照

上传文件至 ''

Joey 2 ヶ月 前
コミット
654c3e7685
4 ファイル変更593 行追加42 行削除
  1. 368 16
      DataManager.Designer.cs
  2. 220 26
      DataManager.cs
  3. 3 0
      UICollectionTask.cs
  4. 2 0
      UIContactTask.cs

+ 368 - 16
DataManager.Designer.cs

@@ -28,7 +28,11 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea4 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Legend legend4 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+            System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.Title title4 = new System.Windows.Forms.DataVisualization.Charting.Title();
             this.ctnDataCollection = new System.Windows.Forms.SplitContainer();
             this.dtpCollectionTaskDate = new System.Windows.Forms.DateTimePicker();
             this.btnCollectionSearch = new System.Windows.Forms.Button();
@@ -94,9 +98,28 @@
             this.tbpOrphanFund = new System.Windows.Forms.TabPage();
             this.grdOrphanFund = new System.Windows.Forms.DataGridView();
             this.panel2 = new System.Windows.Forms.Panel();
+            this.chkIsOrphan = new System.Windows.Forms.CheckBox();
             this.btnOrphanFundSearch = new System.Windows.Forms.Button();
             this.txtOrphanProvider = new System.Windows.Forms.TextBox();
             this.label13 = new System.Windows.Forms.Label();
+            this.tbpAuthorization = new System.Windows.Forms.TabPage();
+            this.splitContainer4 = new System.Windows.Forms.SplitContainer();
+            this.txtLocalCompany = new System.Windows.Forms.TextBox();
+            this.btnCompanyCoverage = new System.Windows.Forms.Button();
+            this.chk0 = new System.Windows.Forms.CheckBox();
+            this.chk5 = new System.Windows.Forms.CheckBox();
+            this.chk10 = new System.Windows.Forms.CheckBox();
+            this.chk20 = new System.Windows.Forms.CheckBox();
+            this.chk50 = new System.Windows.Forms.CheckBox();
+            this.chk100 = new System.Windows.Forms.CheckBox();
+            this.splitContainer5 = new System.Windows.Forms.SplitContainer();
+            this.splitContainer6 = new System.Windows.Forms.SplitContainer();
+            this.chtCompanyCoverage = new System.Windows.Forms.DataVisualization.Charting.Chart();
+            this.grdCompanyCoverage = new System.Windows.Forms.DataGridView();
+            this.grdAuthCompany = new System.Windows.Forms.DataGridView();
+            this.panel3 = new System.Windows.Forms.Panel();
+            this.rdbFund = new System.Windows.Forms.RadioButton();
+            this.rdbCompany = new System.Windows.Forms.RadioButton();
             ((System.ComponentModel.ISupportInitialize)(this.ctnDataCollection)).BeginInit();
             this.ctnDataCollection.Panel1.SuspendLayout();
             this.ctnDataCollection.Panel2.SuspendLayout();
@@ -130,6 +153,23 @@
             this.tbpOrphanFund.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdOrphanFund)).BeginInit();
             this.panel2.SuspendLayout();
+            this.tbpAuthorization.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
+            this.splitContainer4.Panel1.SuspendLayout();
+            this.splitContainer4.Panel2.SuspendLayout();
+            this.splitContainer4.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit();
+            this.splitContainer5.Panel1.SuspendLayout();
+            this.splitContainer5.Panel2.SuspendLayout();
+            this.splitContainer5.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer6)).BeginInit();
+            this.splitContainer6.Panel1.SuspendLayout();
+            this.splitContainer6.Panel2.SuspendLayout();
+            this.splitContainer6.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.chtCompanyCoverage)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdCompanyCoverage)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdAuthCompany)).BeginInit();
+            this.panel3.SuspendLayout();
             this.SuspendLayout();
             // 
             // ctnDataCollection
@@ -285,14 +325,14 @@
             this.grdCollectionTask.AllowUserToDeleteRows = false;
             this.grdCollectionTask.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
             this.grdCollectionTask.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9F, 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.grdCollectionTask.DefaultCellStyle = dataGridViewCellStyle3;
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle4.BackColor = System.Drawing.Color.WhiteSmoke;
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.grdCollectionTask.DefaultCellStyle = dataGridViewCellStyle4;
             this.grdCollectionTask.Dock = System.Windows.Forms.DockStyle.Fill;
             this.grdCollectionTask.Location = new System.Drawing.Point(0, 53);
             this.grdCollectionTask.Name = "grdCollectionTask";
@@ -839,22 +879,26 @@
             // 
             this.tabControl2.Alignment = System.Windows.Forms.TabAlignment.Left;
             this.tabControl2.Controls.Add(this.tbpOrphanFund);
+            this.tabControl2.Controls.Add(this.tbpAuthorization);
             this.tabControl2.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.tabControl2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.tabControl2.ItemSize = new System.Drawing.Size(80, 30);
             this.tabControl2.Location = new System.Drawing.Point(0, 0);
             this.tabControl2.Multiline = true;
             this.tabControl2.Name = "tabControl2";
             this.tabControl2.SelectedIndex = 0;
             this.tabControl2.Size = new System.Drawing.Size(925, 602);
+            this.tabControl2.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
             this.tabControl2.TabIndex = 0;
             // 
             // tbpOrphanFund
             // 
             this.tbpOrphanFund.Controls.Add(this.grdOrphanFund);
             this.tbpOrphanFund.Controls.Add(this.panel2);
-            this.tbpOrphanFund.Location = new System.Drawing.Point(27, 4);
+            this.tbpOrphanFund.Location = new System.Drawing.Point(68, 4);
             this.tbpOrphanFund.Name = "tbpOrphanFund";
             this.tbpOrphanFund.Padding = new System.Windows.Forms.Padding(3);
-            this.tbpOrphanFund.Size = new System.Drawing.Size(894, 594);
+            this.tbpOrphanFund.Size = new System.Drawing.Size(853, 594);
             this.tbpOrphanFund.TabIndex = 0;
             this.tbpOrphanFund.Text = "孤儿基金";
             this.tbpOrphanFund.UseVisualStyleBackColor = true;
@@ -872,29 +916,43 @@
             this.grdOrphanFund.ReadOnly = true;
             this.grdOrphanFund.RowHeadersVisible = false;
             this.grdOrphanFund.RowTemplate.Height = 23;
-            this.grdOrphanFund.Size = new System.Drawing.Size(888, 535);
-            this.grdOrphanFund.TabIndex = 1;
+            this.grdOrphanFund.Size = new System.Drawing.Size(847, 535);
+            this.grdOrphanFund.TabIndex = 10;
             this.grdOrphanFund.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdOrphanFund_CellClick);
             // 
             // panel2
             // 
+            this.panel2.BackColor = System.Drawing.Color.Cornsilk;
+            this.panel2.Controls.Add(this.chkIsOrphan);
             this.panel2.Controls.Add(this.btnOrphanFundSearch);
             this.panel2.Controls.Add(this.txtOrphanProvider);
             this.panel2.Controls.Add(this.label13);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel2.Location = new System.Drawing.Point(3, 3);
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(888, 53);
+            this.panel2.Size = new System.Drawing.Size(847, 53);
             this.panel2.TabIndex = 0;
             // 
+            // chkIsOrphan
+            // 
+            this.chkIsOrphan.AutoSize = true;
+            this.chkIsOrphan.Checked = true;
+            this.chkIsOrphan.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.chkIsOrphan.Location = new System.Drawing.Point(302, 14);
+            this.chkIsOrphan.Name = "chkIsOrphan";
+            this.chkIsOrphan.Size = new System.Drawing.Size(93, 23);
+            this.chkIsOrphan.TabIndex = 3;
+            this.chkIsOrphan.Text = "未连接基金";
+            this.chkIsOrphan.UseVisualStyleBackColor = true;
+            // 
             // btnOrphanFundSearch
             // 
             this.btnOrphanFundSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnOrphanFundSearch.BackColor = System.Drawing.Color.SkyBlue;
-            this.btnOrphanFundSearch.Location = new System.Drawing.Point(746, 11);
+            this.btnOrphanFundSearch.Location = new System.Drawing.Point(705, 11);
             this.btnOrphanFundSearch.Name = "btnOrphanFundSearch";
             this.btnOrphanFundSearch.Size = new System.Drawing.Size(121, 28);
-            this.btnOrphanFundSearch.TabIndex = 26;
+            this.btnOrphanFundSearch.TabIndex = 9;
             this.btnOrphanFundSearch.Text = "搜 索";
             this.btnOrphanFundSearch.UseVisualStyleBackColor = false;
             this.btnOrphanFundSearch.Click += new System.EventHandler(this.btnOrphanFundSearch_Click);
@@ -902,6 +960,7 @@
             // txtOrphanProvider
             // 
             this.txtOrphanProvider.Location = new System.Drawing.Point(89, 13);
+            this.txtOrphanProvider.MaxLength = 100;
             this.txtOrphanProvider.Name = "txtOrphanProvider";
             this.txtOrphanProvider.Size = new System.Drawing.Size(171, 25);
             this.txtOrphanProvider.TabIndex = 1;
@@ -916,6 +975,261 @@
             this.label13.TabIndex = 0;
             this.label13.Text = "数据源";
             // 
+            // tbpAuthorization
+            // 
+            this.tbpAuthorization.Controls.Add(this.splitContainer4);
+            this.tbpAuthorization.Controls.Add(this.panel3);
+            this.tbpAuthorization.Location = new System.Drawing.Point(34, 4);
+            this.tbpAuthorization.Name = "tbpAuthorization";
+            this.tbpAuthorization.Size = new System.Drawing.Size(887, 594);
+            this.tbpAuthorization.TabIndex = 1;
+            this.tbpAuthorization.Text = "协议授权";
+            this.tbpAuthorization.UseVisualStyleBackColor = true;
+            // 
+            // splitContainer4
+            // 
+            this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.splitContainer4.Location = new System.Drawing.Point(0, 49);
+            this.splitContainer4.Name = "splitContainer4";
+            this.splitContainer4.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // splitContainer4.Panel1
+            // 
+            this.splitContainer4.Panel1.Controls.Add(this.txtLocalCompany);
+            this.splitContainer4.Panel1.Controls.Add(this.btnCompanyCoverage);
+            this.splitContainer4.Panel1.Controls.Add(this.chk0);
+            this.splitContainer4.Panel1.Controls.Add(this.chk5);
+            this.splitContainer4.Panel1.Controls.Add(this.chk10);
+            this.splitContainer4.Panel1.Controls.Add(this.chk20);
+            this.splitContainer4.Panel1.Controls.Add(this.chk50);
+            this.splitContainer4.Panel1.Controls.Add(this.chk100);
+            // 
+            // splitContainer4.Panel2
+            // 
+            this.splitContainer4.Panel2.Controls.Add(this.splitContainer5);
+            this.splitContainer4.Size = new System.Drawing.Size(887, 545);
+            this.splitContainer4.SplitterDistance = 48;
+            this.splitContainer4.TabIndex = 1;
+            // 
+            // txtLocalCompany
+            // 
+            this.txtLocalCompany.Location = new System.Drawing.Point(567, 13);
+            this.txtLocalCompany.MaxLength = 100;
+            this.txtLocalCompany.Name = "txtLocalCompany";
+            this.txtLocalCompany.Size = new System.Drawing.Size(175, 25);
+            this.txtLocalCompany.TabIndex = 6;
+            this.txtLocalCompany.TextChanged += new System.EventHandler(this.txtLocalCompany_TextChanged);
+            // 
+            // btnCompanyCoverage
+            // 
+            this.btnCompanyCoverage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnCompanyCoverage.BackColor = System.Drawing.Color.SkyBlue;
+            this.btnCompanyCoverage.Location = new System.Drawing.Point(748, 11);
+            this.btnCompanyCoverage.Name = "btnCompanyCoverage";
+            this.btnCompanyCoverage.Size = new System.Drawing.Size(121, 28);
+            this.btnCompanyCoverage.TabIndex = 10;
+            this.btnCompanyCoverage.Text = "搜 索";
+            this.btnCompanyCoverage.UseVisualStyleBackColor = false;
+            this.btnCompanyCoverage.Click += new System.EventHandler(this.btnCompanyCoverage_Click);
+            // 
+            // chk0
+            // 
+            this.chk0.AutoSize = true;
+            this.chk0.Location = new System.Drawing.Point(457, 14);
+            this.chk0.Name = "chk0";
+            this.chk0.Size = new System.Drawing.Size(63, 23);
+            this.chk0.TabIndex = 5;
+            this.chk0.Text = "0-5亿";
+            this.chk0.UseVisualStyleBackColor = true;
+            this.chk0.CheckedChanged += new System.EventHandler(this.chk0_CheckedChanged);
+            // 
+            // chk5
+            // 
+            this.chk5.AutoSize = true;
+            this.chk5.Checked = true;
+            this.chk5.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.chk5.Location = new System.Drawing.Point(373, 14);
+            this.chk5.Name = "chk5";
+            this.chk5.Size = new System.Drawing.Size(71, 23);
+            this.chk5.TabIndex = 4;
+            this.chk5.Text = "5-10亿";
+            this.chk5.UseVisualStyleBackColor = true;
+            this.chk5.CheckedChanged += new System.EventHandler(this.chk5_CheckedChanged);
+            // 
+            // chk10
+            // 
+            this.chk10.AutoSize = true;
+            this.chk10.Checked = true;
+            this.chk10.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.chk10.Location = new System.Drawing.Point(283, 14);
+            this.chk10.Name = "chk10";
+            this.chk10.Size = new System.Drawing.Size(79, 23);
+            this.chk10.TabIndex = 3;
+            this.chk10.Text = "10-20亿";
+            this.chk10.UseVisualStyleBackColor = true;
+            this.chk10.CheckedChanged += new System.EventHandler(this.chk10_CheckedChanged);
+            // 
+            // chk20
+            // 
+            this.chk20.AutoSize = true;
+            this.chk20.Checked = true;
+            this.chk20.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.chk20.Location = new System.Drawing.Point(193, 14);
+            this.chk20.Name = "chk20";
+            this.chk20.Size = new System.Drawing.Size(79, 23);
+            this.chk20.TabIndex = 2;
+            this.chk20.Text = "20-50亿";
+            this.chk20.UseVisualStyleBackColor = true;
+            this.chk20.CheckedChanged += new System.EventHandler(this.chk20_CheckedChanged);
+            // 
+            // chk50
+            // 
+            this.chk50.AutoSize = true;
+            this.chk50.Checked = true;
+            this.chk50.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.chk50.Location = new System.Drawing.Point(100, 14);
+            this.chk50.Name = "chk50";
+            this.chk50.Size = new System.Drawing.Size(87, 23);
+            this.chk50.TabIndex = 1;
+            this.chk50.Text = "50-100亿";
+            this.chk50.UseVisualStyleBackColor = true;
+            this.chk50.CheckedChanged += new System.EventHandler(this.chk50_CheckedChanged);
+            // 
+            // chk100
+            // 
+            this.chk100.AutoSize = true;
+            this.chk100.Checked = true;
+            this.chk100.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.chk100.Location = new System.Drawing.Point(13, 14);
+            this.chk100.Name = "chk100";
+            this.chk100.Size = new System.Drawing.Size(75, 23);
+            this.chk100.TabIndex = 0;
+            this.chk100.Text = ">100亿";
+            this.chk100.UseVisualStyleBackColor = true;
+            this.chk100.CheckedChanged += new System.EventHandler(this.chk100_CheckedChanged);
+            // 
+            // splitContainer5
+            // 
+            this.splitContainer5.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.splitContainer5.Location = new System.Drawing.Point(0, 0);
+            this.splitContainer5.Name = "splitContainer5";
+            // 
+            // splitContainer5.Panel1
+            // 
+            this.splitContainer5.Panel1.Controls.Add(this.splitContainer6);
+            // 
+            // splitContainer5.Panel2
+            // 
+            this.splitContainer5.Panel2.Controls.Add(this.grdAuthCompany);
+            this.splitContainer5.Size = new System.Drawing.Size(887, 493);
+            this.splitContainer5.SplitterDistance = 422;
+            this.splitContainer5.TabIndex = 0;
+            // 
+            // splitContainer6
+            // 
+            this.splitContainer6.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.splitContainer6.Location = new System.Drawing.Point(0, 0);
+            this.splitContainer6.Name = "splitContainer6";
+            this.splitContainer6.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // splitContainer6.Panel1
+            // 
+            this.splitContainer6.Panel1.Controls.Add(this.chtCompanyCoverage);
+            // 
+            // splitContainer6.Panel2
+            // 
+            this.splitContainer6.Panel2.Controls.Add(this.grdCompanyCoverage);
+            this.splitContainer6.Size = new System.Drawing.Size(422, 493);
+            this.splitContainer6.SplitterDistance = 299;
+            this.splitContainer6.TabIndex = 0;
+            // 
+            // chtCompanyCoverage
+            // 
+            this.chtCompanyCoverage.BackColor = System.Drawing.Color.Transparent;
+            this.chtCompanyCoverage.BorderlineColor = System.Drawing.Color.Black;
+            this.chtCompanyCoverage.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
+            chartArea4.Name = "ChartArea1";
+            this.chtCompanyCoverage.ChartAreas.Add(chartArea4);
+            this.chtCompanyCoverage.Dock = System.Windows.Forms.DockStyle.Fill;
+            legend4.Name = "Legend1";
+            this.chtCompanyCoverage.Legends.Add(legend4);
+            this.chtCompanyCoverage.Location = new System.Drawing.Point(0, 0);
+            this.chtCompanyCoverage.Name = "chtCompanyCoverage";
+            series4.ChartArea = "ChartArea1";
+            series4.Legend = "Legend1";
+            series4.Name = "Series1";
+            this.chtCompanyCoverage.Series.Add(series4);
+            this.chtCompanyCoverage.Size = new System.Drawing.Size(422, 299);
+            this.chtCompanyCoverage.TabIndex = 0;
+            title4.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            title4.Name = "Title1";
+            title4.Text = "公司覆盖";
+            this.chtCompanyCoverage.Titles.Add(title4);
+            // 
+            // grdCompanyCoverage
+            // 
+            this.grdCompanyCoverage.AllowUserToAddRows = false;
+            this.grdCompanyCoverage.AllowUserToDeleteRows = false;
+            this.grdCompanyCoverage.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+            this.grdCompanyCoverage.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdCompanyCoverage.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.grdCompanyCoverage.Location = new System.Drawing.Point(0, 0);
+            this.grdCompanyCoverage.Name = "grdCompanyCoverage";
+            this.grdCompanyCoverage.ReadOnly = true;
+            this.grdCompanyCoverage.RowHeadersVisible = false;
+            this.grdCompanyCoverage.RowTemplate.Height = 23;
+            this.grdCompanyCoverage.Size = new System.Drawing.Size(422, 190);
+            this.grdCompanyCoverage.TabIndex = 0;
+            // 
+            // grdAuthCompany
+            // 
+            this.grdAuthCompany.AllowUserToAddRows = false;
+            this.grdAuthCompany.AllowUserToOrderColumns = true;
+            this.grdAuthCompany.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.grdAuthCompany.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.grdAuthCompany.Location = new System.Drawing.Point(0, 0);
+            this.grdAuthCompany.Name = "grdAuthCompany";
+            this.grdAuthCompany.ReadOnly = true;
+            this.grdAuthCompany.RowHeadersVisible = false;
+            this.grdAuthCompany.RowTemplate.Height = 23;
+            this.grdAuthCompany.Size = new System.Drawing.Size(461, 493);
+            this.grdAuthCompany.TabIndex = 0;
+            this.grdAuthCompany.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdAuthCompany_CellClick);
+            // 
+            // panel3
+            // 
+            this.panel3.BackColor = System.Drawing.Color.MistyRose;
+            this.panel3.Controls.Add(this.rdbFund);
+            this.panel3.Controls.Add(this.rdbCompany);
+            this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panel3.Location = new System.Drawing.Point(0, 0);
+            this.panel3.Name = "panel3";
+            this.panel3.Size = new System.Drawing.Size(887, 49);
+            this.panel3.TabIndex = 0;
+            // 
+            // rdbFund
+            // 
+            this.rdbFund.AutoSize = true;
+            this.rdbFund.Location = new System.Drawing.Point(125, 12);
+            this.rdbFund.Name = "rdbFund";
+            this.rdbFund.Size = new System.Drawing.Size(53, 23);
+            this.rdbFund.TabIndex = 1;
+            this.rdbFund.Text = "基金";
+            this.rdbFund.UseVisualStyleBackColor = true;
+            // 
+            // rdbCompany
+            // 
+            this.rdbCompany.AutoSize = true;
+            this.rdbCompany.Checked = true;
+            this.rdbCompany.Location = new System.Drawing.Point(38, 12);
+            this.rdbCompany.Name = "rdbCompany";
+            this.rdbCompany.Size = new System.Drawing.Size(53, 23);
+            this.rdbCompany.TabIndex = 0;
+            this.rdbCompany.TabStop = true;
+            this.rdbCompany.Text = "公司";
+            this.rdbCompany.UseVisualStyleBackColor = true;
+            this.rdbCompany.CheckedChanged += new System.EventHandler(this.rdbCompany_CheckedChanged);
+            // 
             // frmDataManager
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
@@ -967,6 +1281,25 @@
             ((System.ComponentModel.ISupportInitialize)(this.grdOrphanFund)).EndInit();
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
+            this.tbpAuthorization.ResumeLayout(false);
+            this.splitContainer4.Panel1.ResumeLayout(false);
+            this.splitContainer4.Panel1.PerformLayout();
+            this.splitContainer4.Panel2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
+            this.splitContainer4.ResumeLayout(false);
+            this.splitContainer5.Panel1.ResumeLayout(false);
+            this.splitContainer5.Panel2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).EndInit();
+            this.splitContainer5.ResumeLayout(false);
+            this.splitContainer6.Panel1.ResumeLayout(false);
+            this.splitContainer6.Panel2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.splitContainer6)).EndInit();
+            this.splitContainer6.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.chtCompanyCoverage)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdCompanyCoverage)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.grdAuthCompany)).EndInit();
+            this.panel3.ResumeLayout(false);
+            this.panel3.PerformLayout();
             this.ResumeLayout(false);
 
         }
@@ -1040,6 +1373,25 @@
         private System.Windows.Forms.DataGridView grdOrphanFund;
         private System.Windows.Forms.TextBox txtOrphanProvider;
         private System.Windows.Forms.Button btnOrphanFundSearch;
+        private System.Windows.Forms.CheckBox chkIsOrphan;
+        private System.Windows.Forms.TabPage tbpAuthorization;
+        private System.Windows.Forms.Panel panel3;
+        private System.Windows.Forms.RadioButton rdbFund;
+        private System.Windows.Forms.RadioButton rdbCompany;
+        private System.Windows.Forms.SplitContainer splitContainer4;
+        private System.Windows.Forms.CheckBox chk10;
+        private System.Windows.Forms.CheckBox chk20;
+        private System.Windows.Forms.CheckBox chk50;
+        private System.Windows.Forms.CheckBox chk100;
+        private System.Windows.Forms.SplitContainer splitContainer5;
+        private System.Windows.Forms.CheckBox chk5;
+        private System.Windows.Forms.CheckBox chk0;
+        private System.Windows.Forms.Button btnCompanyCoverage;
+        private System.Windows.Forms.DataGridView grdAuthCompany;
+        private System.Windows.Forms.TextBox txtLocalCompany;
+        private System.Windows.Forms.SplitContainer splitContainer6;
+        private System.Windows.Forms.DataVisualization.Charting.Chart chtCompanyCoverage;
+        private System.Windows.Forms.DataGridView grdCompanyCoverage;
     }
 }
 

+ 220 - 26
DataManager.cs

@@ -7,7 +7,9 @@ using System.Linq;
 using System.Text;
 using System.Text.RegularExpressions;
 using System.Threading.Tasks;
+using System.Windows.Automation.Peers;
 using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
 using static DataManager.DataAccess;
 using static DataManager.UIConstants;
 
@@ -21,6 +23,8 @@ namespace DataManager
         private DataTable collectionTaskTable = new DataTable();
         private DataTable contactTaskTable;
         private DataTable orphanFundTable;
+        private DataTable companyCoverageTable;
+        private DataTable authorizedCompanyTable;
 
         private static int userId;
 
@@ -545,6 +549,8 @@ namespace DataManager
             grdCompanyList.Columns["company_short_name"].HeaderText = "公司简称";
             grdCompanyList.Columns["company_asset_size"].Visible = false;
             grdCompanyList.Columns["company_asset_size_name"].HeaderText = "管理规模";
+            grdCompanyList.Columns["register_number"].HeaderText = "协会编号";
+            grdCompanyList.Columns["establish_date"].HeaderText = "成立日";
 
             grdCompanyList.Columns["company_name"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
 
@@ -586,14 +592,24 @@ namespace DataManager
 
         #region Orphan Fund
 
-        private void LoadOrphanFund(DataTable dt)
+        private void LoadOrphanFund()
         {
-            if(dt == null)
-                dt = DataAccess.Get_dm_report_orphan_fund(UserId);
+            DataTable dt;
+            string providerName = txtOrphanProvider.Text.Trim();
+            sbyte isOrphan = 1;
+            if (!chkIsOrphan.Checked) isOrphan = 0;
+
+            orphanFundTable = DataAccess.Get_dm_external_fund_mapping(isOrphan, UserId);
+
+            if (providerName != string.Empty)
+                dt = orphanFundTable.Select("provider_name LIKE '%" + providerName + "%'", "id DESC").CopyToDataTable();
+            else
+                dt = orphanFundTable;
 
             grdOrphanFund.DataSource = dt;
 
             grdOrphanFund.Columns["id"].Visible = false;
+            grdOrphanFund.Columns["fund_id"].HeaderText = "基金ID";
             grdOrphanFund.Columns["provider_id"].Visible = false;
             grdOrphanFund.Columns["provider_name"].HeaderText = "数据源";
             grdOrphanFund.Columns["external_id"].HeaderText = "外部ID";
@@ -612,27 +628,9 @@ namespace DataManager
 
         private void btnOrphanFundSearch_Click(object sender, EventArgs e)
         {
-            DataTable dt;
-            string providerName = txtOrphanProvider.Text.Trim();
-
-            if(orphanFundTable == null)
-            {
-                LoadOrphanFund(orphanFundTable);
-            }
-            else
-            {
-                if (providerName != string.Empty)
-                    dt = orphanFundTable.Select("provider_name LIKE '%" + providerName + "%'", "id DESC").CopyToDataTable();
-                else
-                    dt = orphanFundTable;
-
-                LoadOrphanFund(dt);
-
-            }
+            LoadOrphanFund();
         }
 
-        #endregion
-
         private void grdOrphanFund_CellClick(object sender, DataGridViewCellEventArgs e)
         {
             int rowIndex = e.RowIndex;
@@ -644,19 +642,18 @@ namespace DataManager
             // 弹出基金页面
             string provider_id = row.Cells["provider_id"].Value.ToString();
             string external_id = row.Cells["external_id"].Value.ToString();
+            string fund_id = row.Cells["fund_id"].Value.ToString();
 
-            UIFund frmFund = new UIFund(provider_id, external_id, UserId);
+            UIFund frmFund = new UIFund(provider_id, external_id, fund_id, UserId);
             frmFund.ShowDialog();
 
             if (frmFund.DialogResult == DialogResult.OK) 
             {
-                LoadOrphanFund(null);
+                LoadOrphanFund();
             }
 
         }
 
-        #endregion
-
         private void txtOrphanProvider_KeyPress(object sender, KeyPressEventArgs e)
         {
             if (e.KeyChar == 13) 
@@ -664,5 +661,202 @@ namespace DataManager
                 btnOrphanFundSearch_Click(sender, e);
             }
         }
+
+
+        #endregion
+
+        #region Company Coverage
+
+        private void LoadCompanyCoverageChart()
+        {
+            int coveredCnt = 0;
+            int totalCnt = 0;
+
+            DataRow[] rows = companyCoverageTable.Select(CompanySizeFilter());
+            for (int i = 0; i < rows.Length; i ++) 
+            {
+                coveredCnt += int.Parse(rows[i]["covered_cnt"].ToString());
+                totalCnt += int.Parse(rows[i]["total_cnt"].ToString());
+            }
+
+            string[] pieX = { "合作", "其它" };
+            int[] pieY = { coveredCnt, totalCnt - coveredCnt };
+
+            Series series = chtCompanyCoverage.Series[0];
+            series.ChartType = SeriesChartType.Pie;
+            series.Points.DataBindXY(pieX, pieY);
+            series.Points[0].Label = $"{series.Points[0].AxisLabel}: {coveredCnt}";
+            series.Points[0].ToolTip = $"{series.Points[0].AxisLabel}: {(100.0 * coveredCnt / totalCnt):F2}%";
+            series.Points[1].Label = $"{series.Points[1].AxisLabel}: {totalCnt - coveredCnt}";
+            series.Points[1].ToolTip = $"{series.Points[1].AxisLabel}: {(100.0 * ( 1.0 - coveredCnt / totalCnt)):F2}%";
+
+        }
+
+        private string CompanySizeFilter()
+        {
+            string selectExp = "company_asset_size in (";
+            if (chk100.Checked) selectExp += "6,";
+            if (chk50.Checked) selectExp += "5,";
+            if (chk20.Checked) selectExp += "4,";
+            if (chk10.Checked) selectExp += "3,";
+            if (chk5.Checked) selectExp += "2,";
+            if (chk0.Checked) selectExp += "1,";
+            // 没有checkbox背选中时表示规模未知
+            if (selectExp.Substring(selectExp.Length - 1) == "(") selectExp = selectExp + " -1)";
+            // 去掉最后一个逗号
+            if (selectExp.Substring(selectExp.Length - 1) == ",") selectExp = selectExp.Substring(0, selectExp.Length - 1) + ")";
+
+            return selectExp;
+        }
+
+
+        private void LoadCompanyCoverageGrid()
+        {
+            companyCoverageTable = DataAccess.Report_company_coverage(null);
+
+            grdCompanyCoverage.DataSource = companyCoverageTable;
+
+            grdCompanyCoverage.Columns["company_asset_size"].Visible = false;
+            grdCompanyCoverage.Columns["company_asset_size_name"].HeaderText = "规模";
+            grdCompanyCoverage.Columns["covered_cnt"].HeaderText = "覆盖家数";
+            grdCompanyCoverage.Columns["covered_cnt"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight;
+            grdCompanyCoverage.Columns["covered_cnt"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
+            grdCompanyCoverage.Columns["total_cnt"].HeaderText = "总家数";
+            grdCompanyCoverage.Columns["total_cnt"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight;
+            grdCompanyCoverage.Columns["total_cnt"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
+            grdCompanyCoverage.Columns["cover_pct"].HeaderText = "覆盖率%";
+            grdCompanyCoverage.Columns["cover_pct"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight;
+            grdCompanyCoverage.Columns["cover_pct"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
+
+            grdCompanyCoverage.Columns["company_asset_size_name"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
+            grdCompanyCoverage.Columns["cover_pct"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
+
+        }
+
+        private void LoadAuthrizedCompanyList()
+        {
+            authorizedCompanyTable = DataAccess.Get_dm_company_authorization(null);
+        }
+
+        private void LoadAuthorizedCompanyGrid()
+        {
+            if (authorizedCompanyTable != null)
+            {
+                DataTable dt = null;
+
+                string selectExp = CompanySizeFilter();
+                string nameExp = txtLocalCompany.Text.Trim();
+                if (nameExp.Length > 0) selectExp += " and company_short_name LIKE '%" + nameExp + "%'";
+
+                DataRow[] dr = authorizedCompanyTable.Select(selectExp);
+
+                if (dr != null && dr.Length > 0) dt = dr.CopyToDataTable();
+
+                grdAuthCompany.DataSource = dt;
+
+                if (dt != null)
+                {
+                    grdAuthCompany.Columns["company_id"].Visible = false;
+                    grdAuthCompany.Columns["company_name"].Visible = false;
+                    grdAuthCompany.Columns["company_short_name"].HeaderText = "公司简称";
+                    grdAuthCompany.Columns["company_asset_size"].Visible = false;
+                    grdAuthCompany.Columns["company_asset_size_name"].HeaderText = "规模";
+                    grdAuthCompany.Columns["register_number"].HeaderText = "协会编号";
+                    grdAuthCompany.Columns["establish_date"].HeaderText = "成立日";
+
+                    grdAuthCompany.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
+                    grdAuthCompany.Columns["company_short_name"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
+                    grdAuthCompany.Columns["company_asset_size_name"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
+                }
+            }
+        }
+
+        private void btnCompanyCoverage_Click(object sender, EventArgs e)
+        {
+            LoadAuthrizedCompanyList();
+
+            LoadCompanyCoverageGrid();
+
+            LoadCompanyCoverageChart();
+            
+            LoadAuthorizedCompanyGrid();
+        }
+
+
+
+
+
+        #endregion
+
+
+        private void rdbCompany_CheckedChanged(object sender, EventArgs e)
+        {
+            if (rdbCompany.Checked)
+            {
+                btnCompanyCoverage_Click(sender, e);
+            }
+        }
+        #endregion
+
+        private void chk100_CheckedChanged(object sender, EventArgs e)
+        {
+            if (((Control)sender).Focus())
+            {
+                // 重新画饼图
+                LoadCompanyCoverageChart();
+
+                // 刷新公司列表
+                LoadAuthorizedCompanyGrid();
+            }
+        }
+
+        private void chk50_CheckedChanged(object sender, EventArgs e)
+        {
+            chk100_CheckedChanged(sender, e);
+        }
+
+        private void chk20_CheckedChanged(object sender, EventArgs e)
+        {
+            chk100_CheckedChanged(sender, e);
+        }
+
+        private void chk10_CheckedChanged(object sender, EventArgs e)
+        {
+            chk100_CheckedChanged(sender, e);
+        }
+
+        private void chk5_CheckedChanged(object sender, EventArgs e)
+        {
+            chk100_CheckedChanged(sender, e);
+        }
+
+        private void chk0_CheckedChanged(object sender, EventArgs e)
+        {
+            chk100_CheckedChanged(sender, e);
+        }
+
+        private void txtLocalCompany_TextChanged(object sender, EventArgs e)
+        {
+            LoadAuthorizedCompanyGrid();
+        }
+
+        private void grdAuthCompany_CellClick(object sender, DataGridViewCellEventArgs e)
+        {
+            int rowIndex = e.RowIndex;
+            int columnIndex = e.ColumnIndex;
+
+            if (columnIndex < 0 || rowIndex < 0) return;
+
+            DataGridViewRow row = grdAuthCompany.Rows[rowIndex];
+
+            string entityId = row.Cells["company_id"].Value.ToString().ToUpper();
+
+            if (entityId.Length == 10 && Regex.Match(entityId, "^CO").Success)
+            {
+                UICompany frm = new UICompany(entityId, UserId);
+
+                frm.Show();
+            }
+        }
     }
 }

+ 3 - 0
UICollectionTask.cs

@@ -201,6 +201,9 @@ namespace DataManager
             grdCompany.Columns["company_id"].Visible = false;
             grdCompany.Columns["company_name"].Visible = false;
             grdCompany.Columns["company_asset_size"].Visible = false;
+            grdCompany.Columns["register_number"].Visible = false;
+            grdCompany.Columns["establish_date"].Visible = false;
+
             grdCompany.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
             grdCompany.Columns["company_short_name"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
             grdCompany.Visible = true;

+ 2 - 0
UIContactTask.cs

@@ -218,6 +218,8 @@ namespace DataManager
             grdCompany.Columns["company_id"].Visible = false;
             grdCompany.Columns["company_name"].Visible = false;
             grdCompany.Columns["company_asset_size"].Visible = false;
+            grdCompany.Columns["register_number"].Visible = false;
+            grdCompany.Columns["establish_date"].Visible = false;
             grdCompany.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
             grdCompany.Columns["company_short_name"].AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
             grdCompany.Visible = true;