Ver Fonte

perf: 增加甲乙类更新

zhengjie há 2 anos atrás
pai
commit
d43dd339a0
2 ficheiros alterados com 144 adições e 36 exclusões
  1. 98 0
      Forms/BasicData.cs
  2. 46 36
      Forms/BasicData.designer.cs

+ 98 - 0
Forms/BasicData.cs

@@ -1738,6 +1738,104 @@ namespace PTMedicalInsurance.Forms
             selfpay.CenterCode = dgvDirectoy.Rows[dgvDirectoy.SelectedIndex].Cells["Code"].Value + "";
             selfpay.ShowDialog();
         }
+
+        private void batchUpdateCategory_Click(object sender, EventArgs e)
+        {
+            if (!rbMaped.Checked)
+            {
+                MessageBox.Show("请选择已对照进行更新");
+                return;
+            }
+            DataTable dt = (DataTable)dgvHISDirectory.DataSource; //获取当前页的数据,注意在已对照页面更新
+            if ((dt == null) || (dt.Rows.Count < 1))
+            {
+                MessageBox.Show("表中无数据,请检查!");
+                return;
+            }
+            string htype = "";
+            if (rbgDirecType_C.SelectedIndex == 0)
+            {
+                htype = "1";
+            }
+            else if (rbgDirecType_C.SelectedIndex == 1)
+            {
+                htype = "2";
+            }
+            else if (rbgDirecType_C.SelectedIndex == 2)
+            {
+                htype = "3";
+            }
+            // MessageBox.Show("第1列" + dt.Rows[0][0]);
+            // MessageBox.Show("第1行" + dt.Rows[0].ToString());
+            dynamic one1312 = new JObject();
+
+            one1312.Add("query_date", "");//查询时间点   日期型
+            one1312.Add("hilist_code", "");//医保目录编码 字符型 30
+            one1312.Add("insu_admdvs", "");//参保机构医保区划    字符型 6   Y
+            one1312.Add("begndate", ""); //开始日期 日期型
+            one1312.Add("hilist_name", "");//医保目录名称  字符型 200
+            one1312.Add("wubi", "");//五笔助记码        字符型        30
+            one1312.Add("pinyin", "");//拼音助记码   字符型 30
+            one1312.Add("med_chrgitm_type", "");//医疗收费项目类别    字符型 6   Y
+            one1312.Add("chrgitm_lv", "");//收费项目等级 字符型 3   Y
+            one1312.Add("lmt_used_flag", "");//限制使用标志 字符型 3   Y
+            one1312.Add("list_type", "");//目录类别 字符型 30
+            one1312.Add("med_use_flag", "");//医疗使用标志  字符型 3   Y
+            one1312.Add("matn_used_flag", "");//生育使用标志 字符型 3   Y
+            one1312.Add("hilist_use_type", "");//医保目录使用类别 字符型 3   Y
+            one1312.Add("lmt_cpnd_type", ""); //限复方使用类型 字符型 3   Y
+            one1312.Add("vali_flag", "");//有效标志 字符型 3   Y
+            one1312.Add("updt_time", "2021-01-01");//更新时间 日期型
+            one1312.Add("page_num", 1);//当前页数    数值型 4
+            one1312.Add("page_size", 50);//本页数据量   数值型 4
+            dynamic data1312 = new JObject();
+            dynamic joPamam = new JObject();//更新HIS医保目录入参
+            joPamam.Add("Code", "");
+            joPamam.Add("Name", "");
+            joPamam.Add("HisType", htype);
+            joPamam.Add("ChargeItemLevel", "");
+
+
+            int i;
+            for (i = 0; i < dt.Rows.Count; i++)
+            {
+                one1312.hilist_code = dt.Rows[i][12].ToString();//每行的第13列是医保编码
+
+                data1312.data = one1312;
+                JObject jo1312Rtn = invoker.invokeCenterService(TradeEnum.InsuDirectory,  data1312);
+
+                if (JsonHelper.parseCenterReturnJson(jo1312Rtn, out string errorMsg) == 0)
+                {
+                    DataTable dt_result = (DataTable)jo1312Rtn["output"]["data"].ToObject(typeof(DataTable));
+
+                    for (int n = 0; n < dt_result.Rows.Count; n++)
+                    {
+                        if (string.IsNullOrEmpty(Convert.ToString(dt_result.Rows[n][21])))//判断返回结束时间为空的
+                        {
+                            //医保返参取值
+                            //joPamam.Code = dt_result.Rows[n][3].ToString();//长春第四位医保编码
+                            joPamam.Code = dt_result.Rows[i]["hilist_code"].ToString();
+                            joPamam.Name = dt_result.Rows[n]["hilist_name"].ToString();//长春第18位医保名称
+                            joPamam.ChargeItemLevel = dt_result.Rows[n]["chrgitm_lv"].ToString();//长春第28位收费项目等级
+                            if (joPamam.ChargeItemLevel.Tostring() == "01")
+                            {
+                                joPamam.ChargeItemLevelName = "甲类";
+                            }
+                            else if (joPamam.ChargeItemLevel.Tostring() == "02")
+                            {
+                                joPamam.ChargeItemLevelName = "乙类";
+                            }
+                            else if (joPamam.ChargeItemLevel.Tostring() == "03")
+                            {
+                                joPamam.ChargeItemLevelName = "丙类";
+                            }
+                            JObject joRtn = mIS.UpdateDirectoryBySelf(joPamam);
+                        }
+                    }
+                }
+            }
+            MessageBox.Show("更新完成!");
+        }
     }
     
 }

+ 46 - 36
Forms/BasicData.designer.cs

@@ -47,9 +47,6 @@
             this.tabPage1 = new System.Windows.Forms.TabPage();
             this.panel1 = new System.Windows.Forms.Panel();
             this.dgvDirectoy = new Sunny.UI.UIDataGridView();
-            this.cmsUpdateInsuDir = new Sunny.UI.UIContextMenuStrip();
-            this.limitPriceUpdate = new System.Windows.Forms.ToolStripMenuItem();
-            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
             this.pgDownload = new Sunny.UI.UIPagination();
             this.panel2 = new System.Windows.Forms.Panel();
             this.rbgDirecType = new Sunny.UI.UIRadioButtonGroup();
@@ -117,15 +114,18 @@
             this.uiButton1 = new Sunny.UI.UIButton();
             this.uiPanel3 = new Sunny.UI.UIPanel();
             this.rbgDirecType_C = new Sunny.UI.UIRadioButtonGroup();
+            this.cmsUpdateInsuDir = new Sunny.UI.UIContextMenuStrip();
+            this.limitPriceUpdate = new System.Windows.Forms.ToolStripMenuItem();
+            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
             this.cmsUpdateAuxInfo = new Sunny.UI.UIContextMenuStrip();
             this.tsmiSingleUpdateAuxInfo = new System.Windows.Forms.ToolStripMenuItem();
             this.tsmiUpdateAllAuxInfo = new System.Windows.Forms.ToolStripMenuItem();
             this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
+            this.batchUpdateCategory = new System.Windows.Forms.ToolStripMenuItem();
             this.tabControl1.SuspendLayout();
             this.tabPage1.SuspendLayout();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvDirectoy)).BeginInit();
-            this.cmsUpdateInsuDir.SuspendLayout();
             this.panel2.SuspendLayout();
             this.cmsMapping.SuspendLayout();
             this.uiGroupBox3.SuspendLayout();
@@ -152,6 +152,7 @@
             this.tbApprovalNO.SuspendLayout();
             this.pgCenterDirect.SuspendLayout();
             this.uiPanel3.SuspendLayout();
+            this.cmsUpdateInsuDir.SuspendLayout();
             this.cmsUpdateAuxInfo.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -244,30 +245,6 @@
             this.dgvDirectoy.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             this.dgvDirectoy.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvDirectoy_RowPostPaint);
             // 
-            // cmsUpdateInsuDir
-            // 
-            this.cmsUpdateInsuDir.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.cmsUpdateInsuDir.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cmsUpdateInsuDir.ImageScalingSize = new System.Drawing.Size(24, 24);
-            this.cmsUpdateInsuDir.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.limitPriceUpdate,
-            this.toolStripSeparator2});
-            this.cmsUpdateInsuDir.Name = "uiContextMenuStrip1";
-            this.cmsUpdateInsuDir.Size = new System.Drawing.Size(245, 42);
-            this.cmsUpdateInsuDir.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // limitPriceUpdate
-            // 
-            this.limitPriceUpdate.Name = "limitPriceUpdate";
-            this.limitPriceUpdate.Size = new System.Drawing.Size(244, 32);
-            this.limitPriceUpdate.Text = "医保目录限价信息";
-            this.limitPriceUpdate.Click += new System.EventHandler(this.limitPriceUpdate_Click);
-            // 
-            // toolStripSeparator2
-            // 
-            this.toolStripSeparator2.Name = "toolStripSeparator2";
-            this.toolStripSeparator2.Size = new System.Drawing.Size(241, 6);
-            // 
             // pgDownload
             // 
             this.pgDownload.Dock = System.Windows.Forms.DockStyle.Bottom;
@@ -375,41 +352,42 @@
             this.tsmiCancleMapping,
             this.toolStripSeparator1,
             this.ToolStripMenuItem_Upload,
-            this.ToolStripMenuItem_CancelUpload});
+            this.ToolStripMenuItem_CancelUpload,
+            this.batchUpdateCategory});
             this.cmsMapping.Name = "uiContextMenuStrip1";
-            this.cmsMapping.Size = new System.Drawing.Size(325, 138);
+            this.cmsMapping.Size = new System.Drawing.Size(385, 198);
             this.cmsMapping.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
             // tsmiMapping
             // 
             this.tsmiMapping.Name = "tsmiMapping";
-            this.tsmiMapping.Size = new System.Drawing.Size(324, 32);
+            this.tsmiMapping.Size = new System.Drawing.Size(384, 32);
             this.tsmiMapping.Text = "对照";
             this.tsmiMapping.Click += new System.EventHandler(this.tsmiMapping_Click);
             // 
             // tsmiCancleMapping
             // 
             this.tsmiCancleMapping.Name = "tsmiCancleMapping";
-            this.tsmiCancleMapping.Size = new System.Drawing.Size(324, 32);
+            this.tsmiCancleMapping.Size = new System.Drawing.Size(384, 32);
             this.tsmiCancleMapping.Text = "取消对照";
             this.tsmiCancleMapping.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
             // 
             // toolStripSeparator1
             // 
             this.toolStripSeparator1.Name = "toolStripSeparator1";
-            this.toolStripSeparator1.Size = new System.Drawing.Size(321, 6);
+            this.toolStripSeparator1.Size = new System.Drawing.Size(381, 6);
             // 
             // ToolStripMenuItem_Upload
             // 
             this.ToolStripMenuItem_Upload.Name = "ToolStripMenuItem_Upload";
-            this.ToolStripMenuItem_Upload.Size = new System.Drawing.Size(324, 32);
+            this.ToolStripMenuItem_Upload.Size = new System.Drawing.Size(384, 32);
             this.ToolStripMenuItem_Upload.Text = "单条目录对照关系上传";
             this.ToolStripMenuItem_Upload.Click += new System.EventHandler(this.ToolStripMenuItem_Upload_Click);
             // 
             // ToolStripMenuItem_CancelUpload
             // 
             this.ToolStripMenuItem_CancelUpload.Name = "ToolStripMenuItem_CancelUpload";
-            this.ToolStripMenuItem_CancelUpload.Size = new System.Drawing.Size(324, 32);
+            this.ToolStripMenuItem_CancelUpload.Size = new System.Drawing.Size(384, 32);
             this.ToolStripMenuItem_CancelUpload.Text = "单条目录对照关系上传撤销";
             this.ToolStripMenuItem_CancelUpload.Click += new System.EventHandler(this.ToolStripMenuItem_CancelUpload_Click);
             // 
@@ -1402,6 +1380,30 @@
             this.rbgDirecType_C.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             this.rbgDirecType_C.ValueChanged += new Sunny.UI.UIRadioButtonGroup.OnValueChanged(this.rbgDirecType_C_ValueChanged);
             // 
+            // cmsUpdateInsuDir
+            // 
+            this.cmsUpdateInsuDir.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.cmsUpdateInsuDir.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cmsUpdateInsuDir.ImageScalingSize = new System.Drawing.Size(24, 24);
+            this.cmsUpdateInsuDir.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.limitPriceUpdate,
+            this.toolStripSeparator2});
+            this.cmsUpdateInsuDir.Name = "uiContextMenuStrip1";
+            this.cmsUpdateInsuDir.Size = new System.Drawing.Size(245, 42);
+            this.cmsUpdateInsuDir.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // limitPriceUpdate
+            // 
+            this.limitPriceUpdate.Name = "limitPriceUpdate";
+            this.limitPriceUpdate.Size = new System.Drawing.Size(244, 32);
+            this.limitPriceUpdate.Text = "医保目录限价信息";
+            this.limitPriceUpdate.Click += new System.EventHandler(this.limitPriceUpdate_Click);
+            // 
+            // toolStripSeparator2
+            // 
+            this.toolStripSeparator2.Name = "toolStripSeparator2";
+            this.toolStripSeparator2.Size = new System.Drawing.Size(241, 6);
+            // 
             // cmsUpdateAuxInfo
             // 
             this.cmsUpdateAuxInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
@@ -1426,6 +1428,13 @@
             this.tsmiUpdateAllAuxInfo.Size = new System.Drawing.Size(284, 32);
             this.tsmiUpdateAllAuxInfo.Text = "更新所有目录附属信息";
             // 
+            // batchUpdateCategory
+            // 
+            this.batchUpdateCategory.Name = "batchUpdateCategory";
+            this.batchUpdateCategory.Size = new System.Drawing.Size(384, 32);
+            this.batchUpdateCategory.Text = "批量更新当前页甲乙类(已对照)";
+            this.batchUpdateCategory.Click += new System.EventHandler(this.batchUpdateCategory_Click);
+            // 
             // BasicData
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -1442,7 +1451,6 @@
             this.tabPage1.ResumeLayout(false);
             this.panel1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.dgvDirectoy)).EndInit();
-            this.cmsUpdateInsuDir.ResumeLayout(false);
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
             this.cmsMapping.ResumeLayout(false);
@@ -1474,6 +1482,7 @@
             this.tbApprovalNO.ResumeLayout(false);
             this.pgCenterDirect.ResumeLayout(false);
             this.uiPanel3.ResumeLayout(false);
+            this.cmsUpdateInsuDir.ResumeLayout(false);
             this.cmsUpdateAuxInfo.ResumeLayout(false);
             this.ResumeLayout(false);
 
@@ -1559,6 +1568,7 @@
         private Sunny.UI.UITextBox uiTextBox3;
         private Sunny.UI.UITextBox uiTextBox5;
         private Sunny.UI.UILabel LabExplain;
+        private System.Windows.Forms.ToolStripMenuItem batchUpdateCategory;
     }
 }