瀏覽代碼

配置测试接口

zzz 3 月之前
父節點
當前提交
48d604221f

+ 4 - 4
Business/HisMainBusiness.cs

@@ -2026,7 +2026,7 @@ namespace PTMedicalInsurance.Business
                 //JObject jo9001Rtn = new JObject();
                 //cBus.signIn(out jo9001Rtn);
 
-                if (trig_scen == "5")
+                if (trig_scen == "100"|| trig_scen == "100")
                 {
                     outparam = inparam;
                 }
@@ -2048,12 +2048,12 @@ namespace PTMedicalInsurance.Business
                 }
                 outparam = preAnalysis.Get3101Inpar(trig_scen, Global.pat).ToString();
                 JObject joRtn=new JObject();
-                if (trig_scen == "4"|| trig_scen == "2") {
+                if (trig_scen == "1"|| trig_scen == "2" || trig_scen == "3" || trig_scen == "4" || trig_scen == "5") {
                      joRtn = invoker.invokeCenterService("3101", JsonHelper.setCenterInpar("3101", outparam));
                 }   else
                 {
-                     joRtn = invoker.invokeCenterService("3102", JsonHelper.setCenterInpar("3102", outparam));
-                }      
+                    joRtn = invoker.invokeCenterService("3102", JsonHelper.setCenterInpar("3102", outparam));
+                }
                 if (JsonHelper.parseCenterRtnValue(joRtn, out outparam) != 0)
                 {
                     return -1;

+ 20 - 4
Business/PreAndInProcessAnalysis.cs

@@ -190,7 +190,16 @@ namespace PTMedicalInsurance.Business
                 //if (insutype == "2") insutype = "310";
                 //if (insutype == "3") insutype = "390";
                 //if (insutype == "4") insutype = "340";
-                joInpar.Add("insutype", JsonHelper.getDestValue(jofsi_encounter_dtos, "insutype"));  //险种
+                //joInpar.Add("insutype", JsonHelper.getDestValue(jofsi_encounter_dtos, "insutype"));  //险种
+                if(string.IsNullOrEmpty(JsonHelper.getDestValue(jofsi_encounter_dtos, "insutype")))
+                {
+                    joInpar.Add("insutype", Global.pat.insuType);  //险种
+                }
+                else
+                {
+                    joInpar.Add("insutype", JsonHelper.getDestValue(jofsi_encounter_dtos, "insutype"));  //险种
+                }
+                
                 joInpar.Add("reim_flag", JsonHelper.getDestValue(jofsi_encounter_dtos, "reim_flag"));  //报销标志
                 joInpar.Add("out_setl_flag", JsonHelper.getDestValue(jofsi_encounter_dtos, "out_setl_flag"));  //异地结算标志
                 joInpar.Add("fsi_operation_dtos", GetFsi__operation__dtos(trig_scen, p));  //手术操作集合
@@ -272,13 +281,13 @@ namespace PTMedicalInsurance.Business
                 {
                     JObject joRtn = JObject.Parse(errMsg);
                     JArray jarry = JArray.FromObject(joRtn["data"]);
-                    
+                    string name = "";
                     for (int m = 0; m < jarry.Count; m++)
                     {
                         jarry[m]["drord_dr_profttl"] = "2";
                         if (string.IsNullOrEmpty(Convert.ToString(jarry[m]["hilist_lv"])))
                         {
-                            MessageBox.Show(Convert.ToString(jarry[m]["hosplist_name"]));
+                            name = name + "和"+ Convert.ToString(jarry[m]["hosplist_name"]);
                         }
                         if (string.IsNullOrEmpty(Convert.ToString(jarry[m]["hilist_code"]))) continue;
                         
@@ -302,8 +311,15 @@ namespace PTMedicalInsurance.Business
                             jarry[m]["chrg_type"] = "14";
                             jarry[m]["hilist_type"] = "201";
                         }
+                        if (string.IsNullOrEmpty(Convert.ToString(jarry[m]["spec"].ToString())))
+                        {
+                            jarry[m]["spec"] = jarry[m]["spec_unt"];
+                        }
                     }
-                    
+                    if( !string.IsNullOrEmpty(name))
+                    { MessageBox.Show("以下项目甲乙丙医保大类需要更新:" + name); 
+                    }                   
+
                     //return JArray.FromObject(joRtn["data"]);
                     return jarry;
                 }                

+ 5 - 2
Common/ExPortToExcel.cs

@@ -1,6 +1,10 @@
-using System;
+using Microsoft.Office.Interop.Excel;
+using System;
 using System.Collections;
+using System.Data;
+using System.IO;
 using System.Windows.Forms;
+using DataTable = System.Data.DataTable;
 using Excel = Microsoft.Office.Interop.Excel;
 
 
@@ -208,5 +212,4 @@ namespace PTMedicalInsurance.Common
         }
 
     }
-
 }

+ 19 - 1
FormSetter/GridViewSetter.cs

@@ -10,6 +10,7 @@
 
 
 ******************************************************************************/
+
 using Sunny.UI.Win32;
 using System;
 using System.Collections.Generic;
@@ -667,7 +668,7 @@ namespace PTMedicalInsurance.FormSetter
             AddDGVColumn(dgv, "中心名称", "insuName",500);
             AddDGVColumn(dgv, "对照状态", "flag", 120);
             AddDGVColumn(dgv, "规格", "spec", 200);
-            AddDGVColumn(dgv, "收费大类", "sfdl", 70);
+            AddDGVColumn(dgv, "收费大类", "ChargeItemLevelName", 70);
             AddDGVColumn(dgv, "单位", "itemUnitDesc",70);
             AddDGVColumn(dgv, "价格", "itemPrice", 70);            
             AddDGVColumn(dgv, "批准文号", "pprovalNo", 200);
@@ -712,6 +713,7 @@ namespace PTMedicalInsurance.FormSetter
             AddDGVColumn(dgv, "医保编号", "PersonnelNO");
             AddDGVColumn(dgv, "记录标志", "BillType");
             AddDGVColumn(dgv, "门诊住院", "admType");
+            AddDGVColumn(dgv, "报文ID", "msgid");            
         }
 
         /// <summary>
@@ -986,6 +988,22 @@ namespace PTMedicalInsurance.FormSetter
         }
 
         #endregion
+        #region【进销存辅助接口追溯码查询】
+        /// <summary>
+        /// 进销存辅助接口追溯码查询
+        /// </summary>
+        public void SetHeaderTextOfTraceCodeInfo(DataGridView dgv)
+        {
+            dgv.Columns.Clear();
+            dgv.AutoGenerateColumns = false;
+            AddDGVColumn(dgv, "追溯码", "code");
+            AddDGVColumn(dgv, "追溯码等级", "codeLevel");
+            AddDGVColumn(dgv, "追溯码包装等级", "codePackLevel");
+            AddDGVColumn(dgv, "追溯码状态", "status");
+            AddDGVColumn(dgv, "父码(上一层级追溯码)", "parentCode");
+        }
+
+#endregion
         #region【医保对账页面】
         /// <summary>
         /// 设置5262/5267医保结算信息查询结果

+ 55 - 62
Forms/BasicData.cs

@@ -509,7 +509,7 @@ namespace PTMedicalInsurance.Forms
 
             DataTable dt = (DataTable)joRtn["result"]["Data"].ToObject(typeof(DataTable));
 
-            dtExport = dt;
+         
             int totalCount = int.Parse(joRtn["result"]["TotalCount"].ToString());
             pgHISDirect.TotalCount = totalCount;
 
@@ -518,43 +518,44 @@ namespace PTMedicalInsurance.Forms
             else
                 pgHISDirect.PageSize = 50;
 
-            //循环增加甲乙类显示
-            Object joRtn1 = mIS.getInterface_TY(Global.inf.interfaceDr.ToString(), "");
-            string InsuCurrencyCataLogue = JsonHelper.getDestValue(joRtn, "InsuCurrencyCataLogue");    //通用目录编码 6
-            string InterfaceName_TY = JsonHelper.getDestValue(joRtn, "InterfaceName_TY");              //通用目录名称  
-            string HospName = JsonHelper.getDestValue(joRtn, "HospitalName");                          //目录名称
-            dt.Columns.Add("sfdl", typeof(string));
-            //dt.Rows.Count
-            for (int i=0;i< dt.Rows.Count; i++)
-            {
-
-                if (!string.IsNullOrEmpty(dt.Rows[i]["insuCode"].ToString()))
-                {
-                    JObject joInput = new JObject {
+            ////循环增加甲乙类显示
+            //Object joRtn1 = mIS.getInterface_TY(Global.inf.interfaceDr.ToString(), "");
+            //string InsuCurrencyCataLogue = JsonHelper.getDestValue(joRtn, "InsuCurrencyCataLogue");    //通用目录编码 6
+            //string InterfaceName_TY = JsonHelper.getDestValue(joRtn, "InterfaceName_TY");              //通用目录名称  
+            //string HospName = JsonHelper.getDestValue(joRtn, "HospitalName");                          //目录名称
+            //dt.Columns.Add("sfdl", typeof(string));
+            ////dt.Rows.Count
+            //for (int i=0;i< dt.Rows.Count; i++)
+            //{
 
-                    { "currentPage" , currentPage },
-                { "pageSize" , pageSize },
-                    { "serviceCode" , "09010042" },
-                    { "directoryType" , rbgDirecType_C.SelectedIndex+1 },
-                    { "directoryCode" , dt.Rows[i]["insuCode"].ToString() },
-                    { "directoryName" , tbCenterDirectoryFilter.Text },
-                    { "approvalNO" , "" },
-                    { "manufacturer" , "" },
-                    { "directoryDr" ,  Global.inf.interfaceDr }
-                };
-                    JObject joRtn2 = mIS.getMIDirectoryByPagination(joInput);
-                    //DataTable dt1 = (DataTable)joRtn["result"]["rows"].ToObject(typeof(DataTable));
-                    if (JsonHelper.parseIrisRtnValue(joRtn2, out errMsg) != 0)
-                    {
+            //    if (!string.IsNullOrEmpty(dt.Rows[i]["insuCode"].ToString()))
+            //    {
+            //        JObject joInput = new JObject {
+
+            //        { "currentPage" , currentPage },
+            //    { "pageSize" , pageSize },
+            //        { "serviceCode" , "09010042" },
+            //        { "directoryType" , rbgDirecType_C.SelectedIndex+1 },
+            //        { "directoryCode" , dt.Rows[i]["insuCode"].ToString() },
+            //        { "directoryName" , tbCenterDirectoryFilter.Text },
+            //        { "approvalNO" , "" },
+            //        { "manufacturer" , "" },
+            //        { "directoryDr" ,  Global.inf.interfaceDr }
+            //    };
+            //        JObject joRtn2 = mIS.getMIDirectoryByPagination(joInput);
+            //        //DataTable dt1 = (DataTable)joRtn["result"]["rows"].ToObject(typeof(DataTable));
+            //        if (JsonHelper.parseIrisRtnValue(joRtn2, out errMsg) != 0)
+            //        {
                         
-                    }
-                    else {                        
-                        dt.Rows[i]["sfdl"] = joRtn2["result"]["rows"][0]["chargeItemLevelName"].ToString();
-                    }
+            //        }
+            //        else {                        
+            //            dt.Rows[i]["sfdl"] = joRtn2["result"]["rows"][0]["chargeItemLevelName"].ToString();
+            //        }
                     
-                }            
-            }
-            //循环增加甲乙类显示
+            //    }            
+            //}
+            ////循环增加甲乙类显示
+            dtExport = dt;
             dgvHISDirectory.DataSource = null;
             dgvHISDirectory.DataSource = dt;
             dgvHISDirectory.Columns[0].ReadOnly = true;
@@ -1026,7 +1027,8 @@ namespace PTMedicalInsurance.Forms
             string errMsg;
             int iCount = 50;
             if (rbNoMaped.Checked) iCount = 3000;
-            
+            if (rbMaped.Checked) iCount = 3000;
+
             if (queryHISDirectory(1, iCount, out errMsg) != 0)
             {
                 MessageBox.Show(errMsg);
@@ -1134,26 +1136,7 @@ namespace PTMedicalInsurance.Forms
 
         private void dgvHISDirectory_DoubleClick(object sender, EventArgs e)
         {
-            int currentPage = pgHISDirect.ActivePage;
-            string flag = dgvHISDirectory.Rows[dgvHISDirectory.CurrentRow.Index].Cells["flag"].Value.ToString();
-            if (flag == "未对照")
-            {
-                Mapping();
-            }
-            else
-            if (flag == "已对照")
-            {
-                CancleMapping();
-            }
-            if (rbAll.Checked)
-            {
-                string errMsg;
-                if (queryHISDirectory(1, 50, out errMsg) != 0)
-                {
-                    MessageBox.Show(errMsg);
-                    return;
-                }
-            }
+
         }
 
         private void dgvDirectoy_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
@@ -1299,7 +1282,7 @@ namespace PTMedicalInsurance.Forms
                     }
                 case 15://目录信息查询
                     {
-                        funNo = "1312";
+                        funNo = "1312a";
                         joData.query_date = ""; //查询时间点
                         joData.hilist_code = tbDirectoryCode.Text;  //医保目录编码
                         joData.insu_admdvs = "";  //参保机构医保区划
@@ -1996,21 +1979,21 @@ namespace PTMedicalInsurance.Forms
 
                     for (int n = 0; n < dt_result.Rows.Count; n++)
                     {
-                        if (string.IsNullOrEmpty(Convert.ToString(dt_result.Rows[n][21])))//判断返回结束时间为空的
+                        if (string.IsNullOrEmpty(Convert.ToString(dt_result.Rows[n]["enddate"])))//判断返回结束时间为空的
                         {
                             //医保返参取值
                             //joPamam.Code = dt_result.Rows[n][3].ToString();//长春第四位医保编码
-                            joPamam.Code = dt_result.Rows[i]["hilist_code"].ToString();
+                            joPamam.Code = dt_result.Rows[n]["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")
+                            if (joPamam.ChargeItemLevel == "01")
                             {
                                 joPamam.ChargeItemLevelName = "甲类";
-                            }else if (joPamam.ChargeItemLevel.Tostring() == "02")
+                            }else if (joPamam.ChargeItemLevel == "02")
                             {
                                 joPamam.ChargeItemLevelName = "乙类";
                             }
-                            else if (joPamam.ChargeItemLevel.Tostring() == "03")
+                            else if (joPamam.ChargeItemLevel == "03")
                             {
                                 joPamam.ChargeItemLevelName = "丙类";
                             }
@@ -2023,5 +2006,15 @@ namespace PTMedicalInsurance.Forms
             MessageBox.Show("更新完成!");
 
         }
+
+        private void pgDownload_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void pgHISDirect_Click(object sender, EventArgs e)
+        {
+
+        }
     }
 }

+ 3 - 1
Forms/BasicData.designer.cs

@@ -286,6 +286,7 @@
             this.pgDownload.Text = "uiPagination1";
             this.pgDownload.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
             this.pgDownload.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.pgDownload.Click += new System.EventHandler(this.pgDownload_Click);
             // 
             // panel2
             // 
@@ -858,7 +859,7 @@
             this.dgvHISDirectory.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
             this.dgvHISDirectory.TabIndex = 4;
             this.dgvHISDirectory.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            this.dgvHISDirectory.DoubleClick += new System.EventHandler(this.dgvHISDirectory_DoubleClick);
+            this.dgvHISDirectory.DoubleClick += new System.EventHandler(this.tsmiMapping_Click);
             // 
             // panel5
             // 
@@ -1026,6 +1027,7 @@
             this.pgHISDirect.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
             this.pgHISDirect.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             this.pgHISDirect.PageChanged += new Sunny.UI.UIPagination.OnPageChangeEventHandler(this.pgHISDirect_PageChanged);
+            this.pgHISDirect.Click += new System.EventHandler(this.pgHISDirect_Click);
             // 
             // panel4
             // 

+ 14 - 1
Forms/HandleException.cs

@@ -15,6 +15,8 @@ using PTMedicalInsurance.Business;
 using PTMedicalInsurance.Variables;
 using FastReport;
 using System.Security.Policy;
+using FastReport.Editor;
+using System.Collections;
 
 namespace PTMedicalInsurance.Forms
 {
@@ -314,7 +316,18 @@ namespace PTMedicalInsurance.Forms
             
             if (Chk_DealNo.Checked)
             {
-                joRtn = invoker.invokeCenterService(tb_DealNo.Text, JsonHelper.setCenterInpar(tb_DealNo.Text, rtbInparam.Text));
+                //joRtn = invoker.invokeCenterService(tb_DealNo.Text, JsonHelper.setCenterInpar(tb_DealNo.Text, rtbInparam.Text));
+                string[] strArr = { "3501", "3502", "3503", "3504", "3505", "3506", "3507" };
+                bool exists = ((IList)strArr).Contains(tb_DealNo.Text);
+                if (exists)
+                {
+                    joRtn = invoker.invokeCenterServiceJXC(tb_DealNo.Text, JObject.Parse(JsonHelper.setCenterInpar(tb_DealNo.Text, rtbInparam.Text)));
+
+                }
+                else
+                {
+                    joRtn = invoker.invokeCenterService(tb_DealNo.Text, JsonHelper.setCenterInpar(tb_DealNo.Text, rtbInparam.Text));
+                }
             }
             else
             {

+ 542 - 332
Forms/MedInsuQuery.Designer.cs

@@ -29,31 +29,36 @@ namespace PTMedicalInsurance.Forms
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle46 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle47 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle49 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle50 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle51 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle52 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle53 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle54 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle55 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle56 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle57 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle58 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle59 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle60 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
             this.tbcMain = new Sunny.UI.UITabControl();
             this.tabInHosPerInfoExport = new System.Windows.Forms.TabPage();
             this.dgvSettlRecord = new Sunny.UI.UIDataGridView();
@@ -66,40 +71,53 @@ namespace PTMedicalInsurance.Forms
             this.dpED = new Sunny.UI.UIDatetimePicker();
             this.dpST = new Sunny.UI.UIDatetimePicker();
             this.tabPage1 = new System.Windows.Forms.TabPage();
+            this.uiTitlePanel3 = new Sunny.UI.UITitlePanel();
+            this.dgvFixmedinsList = new Sunny.UI.UIDataGridView();
+            this.uiTitlePanel2 = new Sunny.UI.UITitlePanel();
+            this.dgvMedInsuDirList = new Sunny.UI.UIDataGridView();
+            this.uiTitlePanel1 = new Sunny.UI.UITitlePanel();
+            this.dgvAppyinfo = new Sunny.UI.UIDataGridView();
             this.uiPanel2 = new Sunny.UI.UIPanel();
             this.uiButton1 = new Sunny.UI.UIButton();
             this.btnReadCard = new Sunny.UI.UIButton();
             this.tabPage2 = new System.Windows.Forms.TabPage();
-            this.uiTitlePanel1 = new Sunny.UI.UITitlePanel();
-            this.uiTitlePanel2 = new Sunny.UI.UITitlePanel();
-            this.uiTitlePanel3 = new Sunny.UI.UITitlePanel();
-            this.dgvAppyinfo = new Sunny.UI.UIDataGridView();
-            this.dgvMedInsuDirList = new Sunny.UI.UIDataGridView();
-            this.dgvFixmedinsList = new Sunny.UI.UIDataGridView();
+            this.dgvMain = new Sunny.UI.UIDataGridView();
             this.uiPanel3 = new Sunny.UI.UIPanel();
             this.uiButton2 = new Sunny.UI.UIButton();
             this.btnOK = new Sunny.UI.UIButton();
             this.uiGroupBox1 = new Sunny.UI.UIGroupBox();
             this.dt_End = new Sunny.UI.UIDatetimePicker();
             this.dt_Begin = new Sunny.UI.UIDatetimePicker();
-            this.dgvMain = new Sunny.UI.UIDataGridView();
+            this.tabPage3 = new System.Windows.Forms.TabPage();
+            this.uiButton4 = new Sunny.UI.UIButton();
+            this.dgvtracecode = new Sunny.UI.UIDataGridView();
+            this.uiPanel4 = new Sunny.UI.UIPanel();
+            this.uiTextBox2 = new Sunny.UI.UITextBox();
+            this.uiLabel3 = new Sunny.UI.UILabel();
+            this.uiLabel2 = new Sunny.UI.UILabel();
+            this.uiLabel1 = new Sunny.UI.UILabel();
+            this.uiTextBox1 = new Sunny.UI.UITextBox();
+            this.uiButton3 = new Sunny.UI.UIButton();
+            this.uiLabel4 = new Sunny.UI.UILabel();
             this.tbcMain.SuspendLayout();
             this.tabInHosPerInfoExport.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvSettlRecord)).BeginInit();
             this.uiPanel1.SuspendLayout();
             this.gbDateTime.SuspendLayout();
             this.tabPage1.SuspendLayout();
-            this.uiPanel2.SuspendLayout();
-            this.tabPage2.SuspendLayout();
-            this.uiTitlePanel1.SuspendLayout();
-            this.uiTitlePanel2.SuspendLayout();
             this.uiTitlePanel3.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvAppyinfo)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvMedInsuDirList)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvFixmedinsList)).BeginInit();
+            this.uiTitlePanel2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvMedInsuDirList)).BeginInit();
+            this.uiTitlePanel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvAppyinfo)).BeginInit();
+            this.uiPanel2.SuspendLayout();
+            this.tabPage2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvMain)).BeginInit();
             this.uiPanel3.SuspendLayout();
             this.uiGroupBox1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvMain)).BeginInit();
+            this.tabPage3.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvtracecode)).BeginInit();
             this.SuspendLayout();
             // 
             // tbcMain
@@ -107,6 +125,7 @@ namespace PTMedicalInsurance.Forms
             this.tbcMain.Controls.Add(this.tabInHosPerInfoExport);
             this.tbcMain.Controls.Add(this.tabPage1);
             this.tbcMain.Controls.Add(this.tabPage2);
+            this.tbcMain.Controls.Add(this.tabPage3);
             this.tbcMain.Dock = System.Windows.Forms.DockStyle.Fill;
             this.tbcMain.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
             this.tbcMain.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -137,46 +156,46 @@ namespace PTMedicalInsurance.Forms
             // 
             this.dgvSettlRecord.AllowUserToAddRows = false;
             this.dgvSettlRecord.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvSettlRecord.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle36.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvSettlRecord.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle36;
             this.dgvSettlRecord.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
             this.dgvSettlRecord.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
             this.dgvSettlRecord.BackgroundColor = System.Drawing.Color.White;
             this.dgvSettlRecord.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvSettlRecord.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle37.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle37.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle37.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle37.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle37.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle37.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvSettlRecord.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle37;
             this.dgvSettlRecord.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvSettlRecord.DefaultCellStyle = dataGridViewCellStyle3;
+            dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle38.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle38.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle38.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle38.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle38.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvSettlRecord.DefaultCellStyle = dataGridViewCellStyle38;
             this.dgvSettlRecord.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvSettlRecord.EnableHeadersVisualStyles = false;
             this.dgvSettlRecord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dgvSettlRecord.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
             this.dgvSettlRecord.Location = new System.Drawing.Point(0, 0);
             this.dgvSettlRecord.Name = "dgvSettlRecord";
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvSettlRecord.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
-            dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvSettlRecord.RowsDefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle39.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle39.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle39.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle39.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle39.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle39.SelectionForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle39.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvSettlRecord.RowHeadersDefaultCellStyle = dataGridViewCellStyle39;
+            dataGridViewCellStyle40.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle40.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvSettlRecord.RowsDefaultCellStyle = dataGridViewCellStyle40;
             this.dgvSettlRecord.RowTemplate.Height = 23;
             this.dgvSettlRecord.SelectedIndex = -1;
             this.dgvSettlRecord.Size = new System.Drawing.Size(1469, 572);
@@ -335,6 +354,216 @@ namespace PTMedicalInsurance.Forms
             this.tabPage1.Text = "【5331】人员单独支付药品用药备案查询";
             this.tabPage1.UseVisualStyleBackColor = true;
             // 
+            // uiTitlePanel3
+            // 
+            this.uiTitlePanel3.Controls.Add(this.dgvFixmedinsList);
+            this.uiTitlePanel3.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.uiTitlePanel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTitlePanel3.Location = new System.Drawing.Point(0, 410);
+            this.uiTitlePanel3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTitlePanel3.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiTitlePanel3.Name = "uiTitlePanel3";
+            this.uiTitlePanel3.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
+            this.uiTitlePanel3.ShowText = false;
+            this.uiTitlePanel3.Size = new System.Drawing.Size(1469, 245);
+            this.uiTitlePanel3.TabIndex = 16;
+            this.uiTitlePanel3.Text = "备案机构明细信息(fixmedinsList)";
+            this.uiTitlePanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiTitlePanel3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dgvFixmedinsList
+            // 
+            this.dgvFixmedinsList.AllowUserToAddRows = false;
+            this.dgvFixmedinsList.AllowUserToDeleteRows = false;
+            dataGridViewCellStyle41.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgvFixmedinsList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle41;
+            this.dgvFixmedinsList.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
+            this.dgvFixmedinsList.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
+            this.dgvFixmedinsList.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgvFixmedinsList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle42.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle42.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle42.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle42.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvFixmedinsList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle42;
+            this.dgvFixmedinsList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle43.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle43.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle43.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle43.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle43.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvFixmedinsList.DefaultCellStyle = dataGridViewCellStyle43;
+            this.dgvFixmedinsList.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgvFixmedinsList.EnableHeadersVisualStyles = false;
+            this.dgvFixmedinsList.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvFixmedinsList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgvFixmedinsList.Location = new System.Drawing.Point(0, 35);
+            this.dgvFixmedinsList.Name = "dgvFixmedinsList";
+            dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle44.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle44.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle44.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle44.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle44.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvFixmedinsList.RowHeadersDefaultCellStyle = dataGridViewCellStyle44;
+            dataGridViewCellStyle45.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle45.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle45.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle45.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle45.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgvFixmedinsList.RowsDefaultCellStyle = dataGridViewCellStyle45;
+            this.dgvFixmedinsList.RowTemplate.Height = 23;
+            this.dgvFixmedinsList.SelectedIndex = -1;
+            this.dgvFixmedinsList.Size = new System.Drawing.Size(1469, 210);
+            this.dgvFixmedinsList.TabIndex = 10;
+            this.dgvFixmedinsList.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiTitlePanel2
+            // 
+            this.uiTitlePanel2.Controls.Add(this.dgvMedInsuDirList);
+            this.uiTitlePanel2.Dock = System.Windows.Forms.DockStyle.Top;
+            this.uiTitlePanel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTitlePanel2.Location = new System.Drawing.Point(0, 150);
+            this.uiTitlePanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTitlePanel2.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiTitlePanel2.Name = "uiTitlePanel2";
+            this.uiTitlePanel2.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
+            this.uiTitlePanel2.ShowText = false;
+            this.uiTitlePanel2.Size = new System.Drawing.Size(1469, 260);
+            this.uiTitlePanel2.TabIndex = 15;
+            this.uiTitlePanel2.Text = "药品明细信息(medInsuDirList)";
+            this.uiTitlePanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiTitlePanel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dgvMedInsuDirList
+            // 
+            this.dgvMedInsuDirList.AllowUserToAddRows = false;
+            this.dgvMedInsuDirList.AllowUserToDeleteRows = false;
+            dataGridViewCellStyle46.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgvMedInsuDirList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle46;
+            this.dgvMedInsuDirList.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
+            this.dgvMedInsuDirList.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
+            this.dgvMedInsuDirList.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgvMedInsuDirList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle47.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle47.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle47.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle47.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle47.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle47.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle47.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMedInsuDirList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle47;
+            this.dgvMedInsuDirList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle48.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle48.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle48.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle48.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle48.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle48.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle48.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvMedInsuDirList.DefaultCellStyle = dataGridViewCellStyle48;
+            this.dgvMedInsuDirList.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgvMedInsuDirList.EnableHeadersVisualStyles = false;
+            this.dgvMedInsuDirList.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvMedInsuDirList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgvMedInsuDirList.Location = new System.Drawing.Point(0, 35);
+            this.dgvMedInsuDirList.Name = "dgvMedInsuDirList";
+            dataGridViewCellStyle49.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle49.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle49.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle49.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle49.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle49.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle49.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMedInsuDirList.RowHeadersDefaultCellStyle = dataGridViewCellStyle49;
+            dataGridViewCellStyle50.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle50.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle50.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle50.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle50.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgvMedInsuDirList.RowsDefaultCellStyle = dataGridViewCellStyle50;
+            this.dgvMedInsuDirList.RowTemplate.Height = 23;
+            this.dgvMedInsuDirList.SelectedIndex = -1;
+            this.dgvMedInsuDirList.Size = new System.Drawing.Size(1469, 225);
+            this.dgvMedInsuDirList.TabIndex = 10;
+            this.dgvMedInsuDirList.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiTitlePanel1
+            // 
+            this.uiTitlePanel1.Controls.Add(this.dgvAppyinfo);
+            this.uiTitlePanel1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.uiTitlePanel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTitlePanel1.Location = new System.Drawing.Point(0, 0);
+            this.uiTitlePanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTitlePanel1.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiTitlePanel1.Name = "uiTitlePanel1";
+            this.uiTitlePanel1.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
+            this.uiTitlePanel1.ShowText = false;
+            this.uiTitlePanel1.Size = new System.Drawing.Size(1469, 150);
+            this.uiTitlePanel1.TabIndex = 14;
+            this.uiTitlePanel1.Text = "备案申请信息(appyinfo)";
+            this.uiTitlePanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiTitlePanel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dgvAppyinfo
+            // 
+            this.dgvAppyinfo.AllowUserToAddRows = false;
+            this.dgvAppyinfo.AllowUserToDeleteRows = false;
+            dataGridViewCellStyle51.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgvAppyinfo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle51;
+            this.dgvAppyinfo.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
+            this.dgvAppyinfo.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
+            this.dgvAppyinfo.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgvAppyinfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle52.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle52.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle52.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle52.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle52.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle52.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle52.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvAppyinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle52;
+            this.dgvAppyinfo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle53.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle53.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle53.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle53.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle53.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle53.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle53.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvAppyinfo.DefaultCellStyle = dataGridViewCellStyle53;
+            this.dgvAppyinfo.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgvAppyinfo.EnableHeadersVisualStyles = false;
+            this.dgvAppyinfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvAppyinfo.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgvAppyinfo.Location = new System.Drawing.Point(0, 35);
+            this.dgvAppyinfo.Name = "dgvAppyinfo";
+            dataGridViewCellStyle54.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle54.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle54.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle54.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle54.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle54.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle54.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvAppyinfo.RowHeadersDefaultCellStyle = dataGridViewCellStyle54;
+            dataGridViewCellStyle55.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle55.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle55.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle55.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle55.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgvAppyinfo.RowsDefaultCellStyle = dataGridViewCellStyle55;
+            this.dgvAppyinfo.RowTemplate.Height = 23;
+            this.dgvAppyinfo.SelectedIndex = -1;
+            this.dgvAppyinfo.Size = new System.Drawing.Size(1469, 115);
+            this.dgvAppyinfo.TabIndex = 10;
+            this.dgvAppyinfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
             // uiPanel2
             // 
             this.uiPanel2.Controls.Add(this.uiButton1);
@@ -392,215 +621,56 @@ namespace PTMedicalInsurance.Forms
             this.tabPage2.Text = "【5205】人员慢特病用药记录查询";
             this.tabPage2.UseVisualStyleBackColor = true;
             // 
-            // uiTitlePanel1
-            // 
-            this.uiTitlePanel1.Controls.Add(this.dgvAppyinfo);
-            this.uiTitlePanel1.Dock = System.Windows.Forms.DockStyle.Top;
-            this.uiTitlePanel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiTitlePanel1.Location = new System.Drawing.Point(0, 0);
-            this.uiTitlePanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiTitlePanel1.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiTitlePanel1.Name = "uiTitlePanel1";
-            this.uiTitlePanel1.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
-            this.uiTitlePanel1.ShowText = false;
-            this.uiTitlePanel1.Size = new System.Drawing.Size(1469, 150);
-            this.uiTitlePanel1.TabIndex = 14;
-            this.uiTitlePanel1.Text = "备案申请信息(appyinfo)";
-            this.uiTitlePanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiTitlePanel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiTitlePanel2
-            // 
-            this.uiTitlePanel2.Controls.Add(this.dgvMedInsuDirList);
-            this.uiTitlePanel2.Dock = System.Windows.Forms.DockStyle.Top;
-            this.uiTitlePanel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiTitlePanel2.Location = new System.Drawing.Point(0, 150);
-            this.uiTitlePanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiTitlePanel2.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiTitlePanel2.Name = "uiTitlePanel2";
-            this.uiTitlePanel2.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
-            this.uiTitlePanel2.ShowText = false;
-            this.uiTitlePanel2.Size = new System.Drawing.Size(1469, 260);
-            this.uiTitlePanel2.TabIndex = 15;
-            this.uiTitlePanel2.Text = "药品明细信息(medInsuDirList)";
-            this.uiTitlePanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiTitlePanel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // uiTitlePanel3
-            // 
-            this.uiTitlePanel3.Controls.Add(this.dgvFixmedinsList);
-            this.uiTitlePanel3.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.uiTitlePanel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiTitlePanel3.Location = new System.Drawing.Point(0, 410);
-            this.uiTitlePanel3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
-            this.uiTitlePanel3.MinimumSize = new System.Drawing.Size(1, 1);
-            this.uiTitlePanel3.Name = "uiTitlePanel3";
-            this.uiTitlePanel3.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
-            this.uiTitlePanel3.ShowText = false;
-            this.uiTitlePanel3.Size = new System.Drawing.Size(1469, 245);
-            this.uiTitlePanel3.TabIndex = 16;
-            this.uiTitlePanel3.Text = "备案机构明细信息(fixmedinsList)";
-            this.uiTitlePanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
-            this.uiTitlePanel3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // dgvAppyinfo
-            // 
-            this.dgvAppyinfo.AllowUserToAddRows = false;
-            this.dgvAppyinfo.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvAppyinfo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16;
-            this.dgvAppyinfo.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
-            this.dgvAppyinfo.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
-            this.dgvAppyinfo.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvAppyinfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle17.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle17.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvAppyinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17;
-            this.dgvAppyinfo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle18.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle18.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle18.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle18.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvAppyinfo.DefaultCellStyle = dataGridViewCellStyle18;
-            this.dgvAppyinfo.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.dgvAppyinfo.EnableHeadersVisualStyles = false;
-            this.dgvAppyinfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvAppyinfo.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
-            this.dgvAppyinfo.Location = new System.Drawing.Point(0, 35);
-            this.dgvAppyinfo.Name = "dgvAppyinfo";
-            dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle19.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle19.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle19.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle19.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvAppyinfo.RowHeadersDefaultCellStyle = dataGridViewCellStyle19;
-            dataGridViewCellStyle20.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle20.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle20.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle20.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle20.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            this.dgvAppyinfo.RowsDefaultCellStyle = dataGridViewCellStyle20;
-            this.dgvAppyinfo.RowTemplate.Height = 23;
-            this.dgvAppyinfo.SelectedIndex = -1;
-            this.dgvAppyinfo.Size = new System.Drawing.Size(1469, 115);
-            this.dgvAppyinfo.TabIndex = 10;
-            this.dgvAppyinfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // dgvMedInsuDirList
-            // 
-            this.dgvMedInsuDirList.AllowUserToAddRows = false;
-            this.dgvMedInsuDirList.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvMedInsuDirList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
-            this.dgvMedInsuDirList.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
-            this.dgvMedInsuDirList.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
-            this.dgvMedInsuDirList.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvMedInsuDirList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle12.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvMedInsuDirList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
-            this.dgvMedInsuDirList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle13.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle13.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvMedInsuDirList.DefaultCellStyle = dataGridViewCellStyle13;
-            this.dgvMedInsuDirList.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.dgvMedInsuDirList.EnableHeadersVisualStyles = false;
-            this.dgvMedInsuDirList.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvMedInsuDirList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
-            this.dgvMedInsuDirList.Location = new System.Drawing.Point(0, 35);
-            this.dgvMedInsuDirList.Name = "dgvMedInsuDirList";
-            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle14.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle14.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvMedInsuDirList.RowHeadersDefaultCellStyle = dataGridViewCellStyle14;
-            dataGridViewCellStyle15.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle15.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle15.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            this.dgvMedInsuDirList.RowsDefaultCellStyle = dataGridViewCellStyle15;
-            this.dgvMedInsuDirList.RowTemplate.Height = 23;
-            this.dgvMedInsuDirList.SelectedIndex = -1;
-            this.dgvMedInsuDirList.Size = new System.Drawing.Size(1469, 225);
-            this.dgvMedInsuDirList.TabIndex = 10;
-            this.dgvMedInsuDirList.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
-            // dgvFixmedinsList
+            // dgvMain
             // 
-            this.dgvFixmedinsList.AllowUserToAddRows = false;
-            this.dgvFixmedinsList.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvFixmedinsList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
-            this.dgvFixmedinsList.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
-            this.dgvFixmedinsList.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
-            this.dgvFixmedinsList.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvFixmedinsList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvFixmedinsList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
-            this.dgvFixmedinsList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle8.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvFixmedinsList.DefaultCellStyle = dataGridViewCellStyle8;
-            this.dgvFixmedinsList.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.dgvFixmedinsList.EnableHeadersVisualStyles = false;
-            this.dgvFixmedinsList.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvFixmedinsList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
-            this.dgvFixmedinsList.Location = new System.Drawing.Point(0, 35);
-            this.dgvFixmedinsList.Name = "dgvFixmedinsList";
-            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvFixmedinsList.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
-            dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle10.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            this.dgvFixmedinsList.RowsDefaultCellStyle = dataGridViewCellStyle10;
-            this.dgvFixmedinsList.RowTemplate.Height = 23;
-            this.dgvFixmedinsList.SelectedIndex = -1;
-            this.dgvFixmedinsList.Size = new System.Drawing.Size(1469, 210);
-            this.dgvFixmedinsList.TabIndex = 10;
-            this.dgvFixmedinsList.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.dgvMain.AllowUserToAddRows = false;
+            this.dgvMain.AllowUserToDeleteRows = false;
+            dataGridViewCellStyle56.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvMain.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle56;
+            this.dgvMain.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
+            this.dgvMain.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
+            this.dgvMain.BackgroundColor = System.Drawing.Color.White;
+            this.dgvMain.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle57.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle57.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle57.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle57.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle57.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle57.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle57.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMain.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle57;
+            this.dgvMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle58.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle58.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle58.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle58.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle58.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle58.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle58.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvMain.DefaultCellStyle = dataGridViewCellStyle58;
+            this.dgvMain.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgvMain.EnableHeadersVisualStyles = false;
+            this.dgvMain.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvMain.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            this.dgvMain.Location = new System.Drawing.Point(0, 0);
+            this.dgvMain.Name = "dgvMain";
+            dataGridViewCellStyle59.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle59.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle59.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle59.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle59.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle59.SelectionForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle59.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvMain.RowHeadersDefaultCellStyle = dataGridViewCellStyle59;
+            dataGridViewCellStyle60.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle60.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvMain.RowsDefaultCellStyle = dataGridViewCellStyle60;
+            this.dgvMain.RowTemplate.Height = 23;
+            this.dgvMain.SelectedIndex = -1;
+            this.dgvMain.Size = new System.Drawing.Size(1469, 619);
+            this.dgvMain.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvMain.TabIndex = 12;
+            this.dgvMain.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
             // uiPanel3
             // 
@@ -704,56 +774,183 @@ namespace PTMedicalInsurance.Forms
             this.dt_Begin.Value = new System.DateTime(2022, 5, 22, 14, 3, 13, 266);
             this.dt_Begin.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            // dgvMain
+            // tabPage3
             // 
-            this.dgvMain.AllowUserToAddRows = false;
-            this.dgvMain.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvMain.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle21;
-            this.dgvMain.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
-            this.dgvMain.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
-            this.dgvMain.BackgroundColor = System.Drawing.Color.White;
-            this.dgvMain.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle22.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle22.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvMain.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22;
-            this.dgvMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle23.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvMain.DefaultCellStyle = dataGridViewCellStyle23;
-            this.dgvMain.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.dgvMain.EnableHeadersVisualStyles = false;
-            this.dgvMain.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvMain.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            this.dgvMain.Location = new System.Drawing.Point(0, 0);
-            this.dgvMain.Name = "dgvMain";
-            dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle24.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle24.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle24.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle24.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle24.SelectionForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvMain.RowHeadersDefaultCellStyle = dataGridViewCellStyle24;
-            dataGridViewCellStyle25.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle25.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvMain.RowsDefaultCellStyle = dataGridViewCellStyle25;
-            this.dgvMain.RowTemplate.Height = 23;
-            this.dgvMain.SelectedIndex = -1;
-            this.dgvMain.Size = new System.Drawing.Size(1469, 619);
-            this.dgvMain.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvMain.TabIndex = 12;
-            this.dgvMain.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.tabPage3.Controls.Add(this.uiPanel4);
+            this.tabPage3.Controls.Add(this.uiLabel2);
+            this.tabPage3.Controls.Add(this.uiLabel3);
+            this.tabPage3.Controls.Add(this.uiLabel1);
+            this.tabPage3.Controls.Add(this.uiTextBox2);
+            this.tabPage3.Controls.Add(this.uiTextBox1);
+            this.tabPage3.Controls.Add(this.uiButton4);
+            this.tabPage3.Controls.Add(this.dgvtracecode);
+            this.tabPage3.Controls.Add(this.uiButton3);
+            this.tabPage3.Controls.Add(this.uiLabel4);
+            this.tabPage3.Location = new System.Drawing.Point(0, 40);
+            this.tabPage3.Name = "tabPage3";
+            this.tabPage3.Size = new System.Drawing.Size(1469, 734);
+            this.tabPage3.TabIndex = 3;
+            this.tabPage3.Text = "追溯码关联关系接口I2002";
+            this.tabPage3.UseVisualStyleBackColor = true;
+            // 
+            // uiButton4
+            // 
+            this.uiButton4.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.uiButton4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton4.Location = new System.Drawing.Point(934, 49);
+            this.uiButton4.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiButton4.Name = "uiButton4";
+            this.uiButton4.Size = new System.Drawing.Size(100, 35);
+            this.uiButton4.TabIndex = 3;
+            this.uiButton4.Text = "导出";
+            this.uiButton4.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiButton4.Click += new System.EventHandler(this.uiButton4_Click);
+            // 
+            // dgvtracecode
+            // 
+            dataGridViewCellStyle31.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvtracecode.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle31;
+            this.dgvtracecode.BackgroundColor = System.Drawing.Color.White;
+            this.dgvtracecode.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle32.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle32.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle32.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle32.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle32.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle32.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvtracecode.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle32;
+            this.dgvtracecode.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle33.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle33.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle33.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle33.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle33.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle33.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvtracecode.DefaultCellStyle = dataGridViewCellStyle33;
+            this.dgvtracecode.EnableHeadersVisualStyles = false;
+            this.dgvtracecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvtracecode.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            this.dgvtracecode.Location = new System.Drawing.Point(12, 163);
+            this.dgvtracecode.Name = "dgvtracecode";
+            dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle34.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle34.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle34.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle34.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle34.SelectionForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle34.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvtracecode.RowHeadersDefaultCellStyle = dataGridViewCellStyle34;
+            dataGridViewCellStyle35.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle35.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvtracecode.RowsDefaultCellStyle = dataGridViewCellStyle35;
+            this.dgvtracecode.RowTemplate.Height = 23;
+            this.dgvtracecode.SelectedIndex = -1;
+            this.dgvtracecode.Size = new System.Drawing.Size(1445, 568);
+            this.dgvtracecode.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvtracecode.TabIndex = 2;
+            this.dgvtracecode.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiPanel4
+            // 
+            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(0, 0);
+            this.uiPanel4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiPanel4.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiPanel4.Name = "uiPanel4";
+            this.uiPanel4.Radius = 1;
+            this.uiPanel4.Size = new System.Drawing.Size(1, 1);
+            this.uiPanel4.TabIndex = 1;
+            this.uiPanel4.Text = null;
+            this.uiPanel4.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiPanel4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiTextBox2
+            // 
+            this.uiTextBox2.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.uiTextBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTextBox2.Location = new System.Drawing.Point(554, 106);
+            this.uiTextBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTextBox2.MinimumSize = new System.Drawing.Size(1, 16);
+            this.uiTextBox2.Name = "uiTextBox2";
+            this.uiTextBox2.ShowText = false;
+            this.uiTextBox2.Size = new System.Drawing.Size(290, 29);
+            this.uiTextBox2.TabIndex = 6;
+            this.uiTextBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiTextBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel3
+            // 
+            this.uiLabel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel3.Location = new System.Drawing.Point(210, 106);
+            this.uiLabel3.Name = "uiLabel3";
+            this.uiLabel3.Size = new System.Drawing.Size(133, 23);
+            this.uiLabel3.TabIndex = 4;
+            this.uiLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel2
+            // 
+            this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel2.Location = new System.Drawing.Point(141, 106);
+            this.uiLabel2.Name = "uiLabel2";
+            this.uiLabel2.Size = new System.Drawing.Size(69, 23);
+            this.uiLabel2.TabIndex = 3;
+            this.uiLabel2.Text = "比例:";
+            this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel1
+            // 
+            this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel1.Location = new System.Drawing.Point(210, 46);
+            this.uiLabel1.Name = "uiLabel1";
+            this.uiLabel1.Size = new System.Drawing.Size(141, 36);
+            this.uiLabel1.TabIndex = 1;
+            this.uiLabel1.Text = "大、中包装追溯码";
+            this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiTextBox1
+            // 
+            this.uiTextBox1.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.uiTextBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTextBox1.Location = new System.Drawing.Point(395, 48);
+            this.uiTextBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTextBox1.MinimumSize = new System.Drawing.Size(1, 16);
+            this.uiTextBox1.Name = "uiTextBox1";
+            this.uiTextBox1.ShowText = false;
+            this.uiTextBox1.Size = new System.Drawing.Size(349, 36);
+            this.uiTextBox1.TabIndex = 0;
+            this.uiTextBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiTextBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiButton3
+            // 
+            this.uiButton3.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.uiButton3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton3.Location = new System.Drawing.Point(751, 49);
+            this.uiButton3.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiButton3.Name = "uiButton3";
+            this.uiButton3.Size = new System.Drawing.Size(122, 35);
+            this.uiButton3.TabIndex = 2;
+            this.uiButton3.Text = "查询";
+            this.uiButton3.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiButton3.Click += new System.EventHandler(this.uiButton3_Click);
+            // 
+            // uiLabel4
+            // 
+            this.uiLabel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel4.Location = new System.Drawing.Point(391, 106);
+            this.uiLabel4.Name = "uiLabel4";
+            this.uiLabel4.Size = new System.Drawing.Size(154, 29);
+            this.uiLabel4.TabIndex = 5;
+            this.uiLabel4.Text = "医保药品目录编码:";
+            this.uiLabel4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
+            this.uiLabel4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
             // MedInsuQuery
             // 
@@ -770,17 +967,19 @@ namespace PTMedicalInsurance.Forms
             this.uiPanel1.ResumeLayout(false);
             this.gbDateTime.ResumeLayout(false);
             this.tabPage1.ResumeLayout(false);
-            this.uiPanel2.ResumeLayout(false);
-            this.tabPage2.ResumeLayout(false);
-            this.uiTitlePanel1.ResumeLayout(false);
-            this.uiTitlePanel2.ResumeLayout(false);
             this.uiTitlePanel3.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.dgvAppyinfo)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvMedInsuDirList)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvFixmedinsList)).EndInit();
+            this.uiTitlePanel2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgvMedInsuDirList)).EndInit();
+            this.uiTitlePanel1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgvAppyinfo)).EndInit();
+            this.uiPanel2.ResumeLayout(false);
+            this.tabPage2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgvMain)).EndInit();
             this.uiPanel3.ResumeLayout(false);
             this.uiGroupBox1.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.dgvMain)).EndInit();
+            this.tabPage3.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgvtracecode)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -816,5 +1015,16 @@ namespace PTMedicalInsurance.Forms
         private Sunny.UI.UIGroupBox uiGroupBox1;
         private Sunny.UI.UIDatetimePicker dt_End;
         private Sunny.UI.UIDatetimePicker dt_Begin;
+        private System.Windows.Forms.TabPage tabPage3;
+        private Sunny.UI.UIPanel uiPanel4;
+        private Sunny.UI.UILabel uiLabel1;
+        private Sunny.UI.UITextBox uiTextBox1;
+        private Sunny.UI.UIButton uiButton3;
+        private Sunny.UI.UIDataGridView dgvtracecode;
+        private Sunny.UI.UITextBox uiTextBox2;
+        private Sunny.UI.UILabel uiLabel4;
+        private Sunny.UI.UILabel uiLabel3;
+        private Sunny.UI.UILabel uiLabel2;
+        private Sunny.UI.UIButton uiButton4;
     }
 }

File diff suppressed because it is too large
+ 32 - 2
Forms/MedInsuQuery.cs


+ 242 - 1
Forms/SettlementChecklist.cs

@@ -21,6 +21,9 @@ using FastReportFunction = FastReport.FastReportFunction;
 using System.IO;
 using FastReport.Export.Dbf;
 using Sunny.UI;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;
+using System.Drawing.Drawing2D;
+using FastReport.Editor;
 
 namespace PTMedicalInsurance.Forms
 {
@@ -785,7 +788,245 @@ namespace PTMedicalInsurance.Forms
         {
             Dispose();
         }
-    }
+
+        //市医保进销存992001结算信息上传
+        private void JXCJSToolStripMenuItem_Click(object sender, EventArgs e)
+        {
+            
+          if (dgvSettlRecord.RowCount <= 0)
+            {
+                MessageBox.Show("请先查询结算数据!");
+                return;
+            }
+            string sqlStr;
+            try
+            {
+                int m = dgvSettlRecord.CurrentRow.Index;
+                DataTable dt = (DataTable)dgvSettlRecord.DataSource;
+                string msgid = dt.Rows[m]["msgid"].ToString();
+                string SettlementID = dt.Rows[m]["SettlementID"].ToString();
+                string ValidFlag = dt.Rows[m]["ValidFlag"].ToString();
+                string MdtrtID = dt.Rows[m]["MdtrtID"].ToString();
+                string BillType = dt.Rows[m]["BillType"].ToString();
+                string AdmID= dt.Rows[m]["AdmID"].ToString();
+                string billID = dt.Rows[m]["billID"].ToString();
+                string recordID = dt.Rows[m]["recordID"].ToString();
+                Global.pat.adm_Dr = int.Parse(AdmID);
+                Global.pat.billID = billID;
+                Global.pat.recordID = recordID;
+
+
+                if (BillType == "-1")
+                {
+                    MessageBox.Show("请选择结算正记录!该记录为退费记录");
+                }
+
+                sqlStr = "SELECT * FROM  BS_MedInsuTransactionLog WHERE MSGID='" + msgid + "'";
+                JObject joSqlstr = new JObject();
+                joSqlstr.Add("sqlStr", sqlStr);
+                JObject joRtn = mIS.QueryTransactionLog(joSqlstr);
+                if (joRtn["result"]["data"].ToString() == "[]")
+                {
+                    MessageBox.Show("查询结果为空!");
+                    return;
+                }
+
+                //DataTable dtlog = (DataTable)joRtn["result"]["data"][0].ToObject(typeof(DataTable));
+                JObject Outlog = JObject.Parse(joRtn["result"]["data"][0]["OutparamPlain"].ToString());
+                dynamic setlinfo = new JObject();//结算信息节点
+                setlinfo.setl_id = Outlog["setl_id"];//结算ID
+                setlinfo.mdtrt_id = Outlog["mdtrt_id"];//就诊ID
+                setlinfo.psn_no = Outlog["psn_no"];//人员编号
+                setlinfo.psn_name = Outlog["psn_name"];//人员姓名
+                setlinfo.psn_cert_type = Outlog["psn_cert_type"];//凭证类型
+
+                setlinfo.certno = Outlog["certno"];//证件号码
+                setlinfo.gend = Outlog["gend"];//性别
+                setlinfo.naty = Outlog["naty"];//民族
+                setlinfo.brdy = Outlog["brdy"];//出生日期
+                setlinfo.age = Outlog["age"];//年龄
+
+                setlinfo.insutype = Outlog["insutype"];//险种类型
+                setlinfo.psn_type = Outlog["psn_type"];//人员类别
+                setlinfo.cvlserv_flag = Outlog["cvlserv_flag"];//公务员标志
+                setlinfo.setl_time = Outlog["setl_time"];//结算时间
+                setlinfo.mdtrt_cert_type = Outlog["mdtrt_cert_type"];//就诊凭证类型
+
+                setlinfo.med_type = Outlog["med_type"];//医疗类别
+                setlinfo.medfee_sumamt = Outlog["medfee_sumamt"];//医疗费总额
+                setlinfo.fulamt_ownpay_amt = Outlog["fulamt_ownpay_amt"];//全自费金额
+                setlinfo.overlmt_selfpay = Outlog["overlmt_selfpay"];//超限价自费费用
+                setlinfo.preselfpay_amt = Outlog["preselfpay_amt"];//先行自付金额
+
+                setlinfo.inscp_scp_amt = Outlog["inscp_scp_amt"];//符合政策范围金额
+                setlinfo.act_pay_dedc = Outlog["act_pay_dedc"];//实际支付起付线
+                setlinfo.hifp_pay = Outlog["hifp_pay"];//基本医疗保险统筹基金支出
+                setlinfo.pool_prop_selfpay = Outlog["pool_prop_selfpay"];//基本医疗保险统筹基金支付比例
+                setlinfo.cvlserv_pay = Outlog["cvlserv_pay"];//公务员医疗补助资金支出
+
+                setlinfo.hifes_pay = Outlog["hifes_pay"];//企业补充医疗保险基金支出
+                setlinfo.hifmi_pay = Outlog["hifmi_pay"];//居民大病保险资金支出
+                setlinfo.hifob_pay = Outlog["hifob_pay"];//职工大额医疗费用补助基金支出
+                setlinfo.maf_pay = Outlog["maf_pay"];//医疗救助基金支出
+                setlinfo.oth_pay = Outlog["oth_pay"];//结算ID
+
+                setlinfo.fund_pay_sumamt = Outlog["fund_pay_sumamt"];//基金支付总额
+                setlinfo.psn_part_amt = Outlog["psn_part_amt"];//个人负担总金额
+                setlinfo.acct_pay = Outlog["acct_pay"];//个人账户支出
+                setlinfo.psn_cash_pay = Outlog["psn_cash_pay"];//个人现金支出
+                setlinfo.balc = Outlog["balc"];//余额
+
+                setlinfo.acct_mulaid_pay = Outlog["acct_mulaid_pay"];//个人账户共济支付金额
+                setlinfo.medins_setl_id = Outlog["medins_setl_id"];//医药机构结算结算ID
+                setlinfo.clr_optins = Outlog["clr_optins"];//clr_optins
+                setlinfo.clr_way = Outlog["clr_way"];//clr_way
+                setlinfo.clr_type = Outlog["clr_type"];//clr_type
+
+                setlinfo.exp_content = Outlog["exp_content"];//exp_content
+                setlinfo.hosp_part_amt = Outlog["hosp_part_amt"];//医院负担金额
+                setlinfo.hifdm_pay = 0;//伤残人员医疗保障基金支出
+
+               
+
+                string outParam = "";
+                //获取IS费用
+                if (hIS.getHisFee(Global.pat, out outParam) != 0)
+                {
+                    MessageBox.Show("获取HIS费用失败");
+                }
+                //调用医保平台转换HIS费用(转换医保编码等)
+                JObject joHisFee = JObject.Parse(outParam);
+
+                if (mIS.convertHisFeeWithInsuCode(joHisFee, out outParam) != 0)
+                {
+                    MessageBox.Show("获取HIS费用医保对照关系失败");
+                }
+                JArray jaFeeDetail = JArray.Parse(JsonHelper.getDestValue(JObject.Parse(outParam), "data"));
+                
+                 JObject jaFeeOne=new  JObject();
+                for (int i = 0; i < jaFeeDetail.Count; i++)
+                {
+                    jaFeeOne.Add("feedetl_sn", jaFeeDetail[i]["feedetl_sn"]);//费用明细流水号
+                    jaFeeOne.Add("rxno", "");//处方号
+                    if (string.IsNullOrEmpty(jaFeeDetail[i]["rx_circ_flag"].ToString()))
+                    {
+                        jaFeeOne.Add("rx_circ_flag", "");//外购处方标志
+                    }
+                    else
+                    {
+                        jaFeeOne.Add("rx_circ_flag", jaFeeDetail[i]["rx_circ_flag"]);//外购处方标志
+                    }
+                    jaFeeOne.Add("fee_ocur_time", jaFeeDetail[i]["fee_ocur_time"]);
+                    jaFeeOne.Add("med_list_codg", jaFeeDetail[i]["med_list_codg"]);
+
+                    jaFeeOne.Add("medins_list_codg", jaFeeDetail[i]["medins_list_codg"]);
+                    jaFeeOne.Add("medins_list_name", jaFeeDetail[i]["medins_list_desc"]);
+
+                    jaFeeOne.Add("prodname", jaFeeDetail[i]["medins_list_desc"]);
+
+                    if (string.IsNullOrEmpty(jaFeeDetail[i]["spec"].ToString()))
+                    {
+                        jaFeeOne.Add("spec", "");
+                    }
+                    else
+                    {
+                        jaFeeOne.Add("spec", jaFeeDetail[i]["spec"]);
+                    }
+
+
+                    if (string.IsNullOrEmpty(jaFeeDetail[i]["doseForm"].ToString()))
+                    {
+                        jaFeeOne.Add("dosform_name", "");
+                    }
+
+                    else
+                    {
+                        jaFeeOne.Add("dosform_name", jaFeeDetail[i]["doseForm"]);
+                    }
+
+
+                    jaFeeOne.Add(" det_item_fee_sumamt", jaFeeDetail[i]["det_item_fee_sumamt"]);
+                    jaFeeOne.Add("cnt", jaFeeDetail[i]["cnt"]);
+                    jaFeeOne.Add("pric", jaFeeDetail[i]["pric"]);
+
+                    if (string.IsNullOrEmpty(jaFeeDetail[i]["sin_dos_dscr"].ToString()))
+                    {
+                        jaFeeOne.Add("sin_dos_dscr", "");
+                    }
+                    else
+                    {
+                        jaFeeOne.Add("sin_dos_dscr", jaFeeDetail[i]["sin_dos_dscr"]);
+                    }
+
+
+                    if (string.IsNullOrEmpty(jaFeeDetail[i]["used_frqu_dscr"].ToString()))
+                    {
+                        jaFeeOne.Add("used_frqu_dscr", "");
+                    }
+                    else
+                    {
+                        jaFeeOne.Add("used_frqu_dscr", jaFeeDetail[i]["used_frqu_dscr"]);
+                    }
+
+                    if (string.IsNullOrEmpty(jaFeeDetail[i]["prd_days"].ToString()))
+                    {
+                        jaFeeOne.Add("prd_days", "");
+                    }
+                    else
+                    {
+                        jaFeeOne.Add("prd_days", jaFeeDetail[i]["prd_days"]);
+                    }
+                    MessageBox.Show("555");
+                    if (string.IsNullOrEmpty(jaFeeDetail[i]["medc_way_dscr"].ToString()))
+                    {
+                        jaFeeOne.Add("medc_way_dscr", "");
+                    }
+                    else
+                    {
+                        jaFeeOne.Add("medc_way_dscr", jaFeeDetail[i]["medc_way_dscr"]);
+                    }
+
+                    if (string.IsNullOrEmpty(jaFeeDetail[i]["bilg_dr_codg"].ToString()))
+                    {
+                        jaFeeOne.Add("bilg_dr_codg", "");
+                    }
+                    else
+                    {
+                        jaFeeOne.Add("bilg_dr_codg", jaFeeDetail[i]["bilg_dr_codg"]);
+                    }
+                    if (string.IsNullOrEmpty(jaFeeDetail[i]["bilg_dr_name"].ToString()))
+                    {
+                        jaFeeOne.Add("bilg_dr_name", "");
+                    }
+                    else
+                    {
+                        jaFeeOne.Add("bilg_dr_name", jaFeeDetail[i]["bilg_dr_name"]);
+                    }
+                    MessageBox.Show("666");
+                    jaFeeOne.Add("phar_name", "");
+
+                    jaFeeOne.Add("phar_prac_cert_no", "");
+                    jaFeeOne.Add("tcmdrug_used_way", ""); //中药使用方式 1复方 2单方 必填
+                    jaFeeOne.Add("trdn_flag", "1");//拆零标志 必填 0否  1是
+                    jaFeeDetail.Add(jaFeeOne);
+
+                    jaFeeOne = new JObject();
+                    MessageBox.Show("777");
+                }
+                JObject Jo992001 = new JObject();
+                Jo992001.Add("setlinfo",JObject.Parse(setlinfo));//结算信息节点
+                Jo992001.Add("drugdetail", jaFeeDetail);//购药明细节点 
+                MessageBox.Show("上传开始:" + Jo992001.ToString());
+                JObject OutJo = invoker.invokeCenterServiceJXC("992001", JObject.Parse(JsonHelper.setCenterInpar("992001", Jo992001)));
+                MessageBox.Show("上传返回:" + OutJo.ToString());
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+                return;
+            }
+        }
+ }
 
     // Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);
     public class Classification

+ 58 - 34
Forms/SettlementChecklist.designer.cs

@@ -28,11 +28,11 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettlementChecklist));
             this.panel1 = new System.Windows.Forms.Panel();
             this.dgvSettlRecord = new Sunny.UI.UIDataGridView();
@@ -54,6 +54,8 @@
             this.dpED = new Sunny.UI.UIDatetimePicker();
             this.dpST = new Sunny.UI.UIDatetimePicker();
             this.report1 = new FastReport.Report();
+            this.JXCMenuStrip = new Sunny.UI.UIContextMenuStrip();
+            this.市医保进销存992001结算信息上传ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvSettlRecord)).BeginInit();
             this.uiPanel1.SuspendLayout();
@@ -61,6 +63,7 @@
             this.gbInterface.SuspendLayout();
             this.gbDateTime.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.report1)).BeginInit();
+            this.JXCMenuStrip.SuspendLayout();
             this.SuspendLayout();
             // 
             // panel1
@@ -78,44 +81,45 @@
             // 
             this.dgvSettlRecord.AllowUserToAddRows = false;
             this.dgvSettlRecord.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvSettlRecord.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvSettlRecord.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
             this.dgvSettlRecord.BackgroundColor = System.Drawing.Color.White;
             this.dgvSettlRecord.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle12.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvSettlRecord.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvSettlRecord.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
             this.dgvSettlRecord.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvSettlRecord.DefaultCellStyle = dataGridViewCellStyle13;
+            this.dgvSettlRecord.ContextMenuStrip = this.JXCMenuStrip;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvSettlRecord.DefaultCellStyle = dataGridViewCellStyle3;
             this.dgvSettlRecord.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvSettlRecord.EnableHeadersVisualStyles = false;
             this.dgvSettlRecord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dgvSettlRecord.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
             this.dgvSettlRecord.Location = new System.Drawing.Point(0, 0);
             this.dgvSettlRecord.Name = "dgvSettlRecord";
-            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle14.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle14.SelectionForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvSettlRecord.RowHeadersDefaultCellStyle = dataGridViewCellStyle14;
-            dataGridViewCellStyle15.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvSettlRecord.RowsDefaultCellStyle = dataGridViewCellStyle15;
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvSettlRecord.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvSettlRecord.RowsDefaultCellStyle = dataGridViewCellStyle5;
             this.dgvSettlRecord.RowTemplate.Height = 23;
             this.dgvSettlRecord.SelectedIndex = -1;
             this.dgvSettlRecord.Size = new System.Drawing.Size(1194, 382);
@@ -419,6 +423,23 @@
             this.report1.ReportResourceString = resources.GetString("report1.ReportResourceString");
             this.report1.Tag = null;
             // 
+            // JXCMenuStrip
+            // 
+            this.JXCMenuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.JXCMenuStrip.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.JXCMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.市医保进销存992001结算信息上传ToolStripMenuItem});
+            this.JXCMenuStrip.Name = "JXCMenuStrip";
+            this.JXCMenuStrip.Size = new System.Drawing.Size(327, 30);
+            this.JXCMenuStrip.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // 市医保进销存992001结算信息上传ToolStripMenuItem
+            // 
+            this.市医保进销存992001结算信息上传ToolStripMenuItem.Name = "市医保进销存992001结算信息上传ToolStripMenuItem";
+            this.市医保进销存992001结算信息上传ToolStripMenuItem.Size = new System.Drawing.Size(326, 26);
+            this.市医保进销存992001结算信息上传ToolStripMenuItem.Text = "市医保进销存992001结算信息上传";
+            this.市医保进销存992001结算信息上传ToolStripMenuItem.Click += new System.EventHandler(this.JXCJSToolStripMenuItem_Click);
+            // 
             // SettlementChecklist
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -436,6 +457,7 @@
             this.gbInterface.ResumeLayout(false);
             this.gbDateTime.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.report1)).EndInit();
+            this.JXCMenuStrip.ResumeLayout(false);
             this.ResumeLayout(false);
 
         }
@@ -462,5 +484,7 @@
         private FastReport.Report report1;
         private Sunny.UI.UIButton btnClose;
         private Sunny.UI.UIButton btnDesign;
+        private Sunny.UI.UIContextMenuStrip JXCMenuStrip;
+        private System.Windows.Forms.ToolStripMenuItem 市医保进销存992001结算信息上传ToolStripMenuItem;
     }
 }

+ 4 - 1
Forms/SettlementChecklist.resx

@@ -117,12 +117,15 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="JXCMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>113, 17</value>
+  </metadata>
   <metadata name="report1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
   <data name="report1.ReportResourceString" xml:space="preserve">
     <value>&lt;?xml version="1.0" encoding="utf-8"?&gt;
-&lt;Report ScriptLanguage="CSharp" ReportInfo.Created="07/20/2022 15:48:06" ReportInfo.Modified="05/16/2023 17:47:11" ReportInfo.CreatorVersion="2021.3.0.0"&gt;
+&lt;Report ScriptLanguage="CSharp" ReportInfo.Created="07/20/2022 15:48:06" ReportInfo.Modified="10/23/2024 16:18:42" ReportInfo.CreatorVersion="2023.1.8.0"&gt;
   &lt;Dictionary/&gt;
 &lt;/Report&gt;
 </value>

+ 355 - 33
Helper/InvokeHelper.cs

@@ -27,6 +27,7 @@ using PTMedicalInsurance.Common;
 using PTMedicalInsurance.Variables;
 using System.Runtime.InteropServices;
 using System.Reflection;
+using PTMedicalInsurance.Helper;
 
 
 using PTMedicalInsurance.APIGATEWAY_SDK;
@@ -55,42 +56,56 @@ namespace PTMedicalInsurance.Helper
                 {
                     //创建实例,不能再次创建,否则会提示没有初始化                    
                     object YinHaiComInstance = System.Activator.CreateInstance(YinHaiComType);
-
-                    if (YinHaiComInstance != null)
+                    try
                     {
-                        Global.writeLog("实例创建成功,准备调用yh_hb_call服务");
+
+                        if (YinHaiComInstance != null)
+                        {
+                            Global.writeLog("实例创建成功,准备调用yh_hb_call服务");
+                        }
+                        else
+                        {
+                            output = "实例不存在!";
+                            Global.writeLog("实例不存在");
+                            return -1;
+                        }
+                        //GlobalVariables.writeLog("入参infno:" + infno);
+                        //GlobalVariables.writeLog("入参input:" + input);
+                        //设置需要设置的参数值
+                        Global.writeLog("开始调用入参" + input);
+                        object[] ParamArray = new object[3];
+                        ParamArray[0] = infno;
+                        ParamArray[1] = input;
+                        ParamArray[2] = "";
+                        ParameterModifier[] ParamMods = new ParameterModifier[1];
+                        ParamMods[0] = new ParameterModifier(3); // 初始化为接口参数的个数
+                                                                 //ParamMods[0][0] = false;
+                                                                 //ParamMods[0][1] = false; 
+                        ParamMods[0][2] = true;
+                        YinHaiComType.InvokeMember("yh_hb_call", // 接口函数名
+                         BindingFlags.Default | BindingFlags.InvokeMethod,
+                        null,
+                        YinHaiComInstance, // 调用的COM组件
+                        ParamArray, // 参数数组
+                        ParamMods, // 指定返回参数的ParameterModifier数组
+                        null,
+                        null);
+                        output = ParamArray[2].ToString();
+                        Global.writeLog("Com输出:" + output);
+
+                        //Marshal.ReleaseComObject(YinHaiComInstance);//释放comm组件
+                        return 0;
                     }
-                    else
+                    finally
                     {
-                        output = "实例不存在!";
-                        Global.writeLog("实例不存在");
-                        return -1;
+                        if (YinHaiComInstance != null)
+                        {
+                            Marshal.ReleaseComObject(YinHaiComInstance);
+                        }
+                        GC.Collect();
+                     
+                            
                     }
-                    //GlobalVariables.writeLog("入参infno:" + infno);
-                    //GlobalVariables.writeLog("入参input:" + input);
-                    //设置需要设置的参数值
-                    object[] ParamArray = new object[3];
-                    ParamArray[0] = infno;
-                    ParamArray[1] = input;
-                    ParamArray[2] = "";
-                    ParameterModifier[] ParamMods = new ParameterModifier[1];
-                    ParamMods[0] = new ParameterModifier(3); // 初始化为接口参数的个数
-                                                             //ParamMods[0][0] = false;
-                                                             //ParamMods[0][1] = false; 
-                    ParamMods[0][2] = true;
-                    YinHaiComType.InvokeMember("yh_hb_call", // 接口函数名
-                     BindingFlags.Default | BindingFlags.InvokeMethod,
-                    null,
-                    YinHaiComInstance, // 调用的COM组件
-                    ParamArray, // 参数数组
-                    ParamMods, // 指定返回参数的ParameterModifier数组
-                    null,
-                    null);
-
-                    output = ParamArray[2].ToString();
-                    Global.writeLog("Com输出:" + output);
-
-                    return 0;
                 }
                 else
                 {
@@ -103,6 +118,7 @@ namespace PTMedicalInsurance.Helper
             {
                 output = ex.Message;
                 Global.writeLog("COM加载失败!" + output);
+                System.Diagnostics.EventLog.WriteEntry("Application", "Error occurred: " + ex.Message, System.Diagnostics.EventLogEntryType.Error);
                 return -1;
             }
         }              
@@ -720,6 +736,312 @@ namespace PTMedicalInsurance.Helper
             }  
         }
 
+        /// <summary>
+        /// 这个是调用业务服务的invokeCenterService
+        /// 湖北进销存接口调用
+        /// </summary>
+        /// <param name="funNO"></param>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        public JObject invokeCenterServiceJXC(string funNO, JObject data)
+        {
+            JObject joRtn = new JObject();
+            string outPar = "";
+            try
+            {
+                // 动态调试模式
+                if (Global.curEvt.enabledDebug)
+                {
+                    CenterResult center = new CenterResult();
+                    center.setTradeNo(funNO);
+                    if (center.ShowDialog() == DialogResult.OK)
+                    {
+                        outPar = center.returnData;
+                        return JObject.Parse(outPar);
+                    }
+                }
+
+                //setCenterURL(funNO);
+                Global.curEvt.URL = "http://prod.xxhgl.whsybj.cn/mrss-data/api/uts/callService";//市医保进销存地址
+
+                   if (Global.inf.interfaceDr == 43) //湖北普瑞测试环境
+                {
+
+                    Global.curEvt.URL = "http://test.xxhgl.whsybj.cn/mrss-data/api/uts/callService";
+                }
+
+                joRtn = invokeCenterServiceJXC(JsonHelper.setCenterInparInventory(data));//调用前加密
+                Global.writeLog("返回解密后"+ joRtn.ToString());
+                outPar = JsonHelper.Compress(joRtn);
+                return joRtn;
+            }
+            catch (Exception ex)
+            {
+                if (joRtn["infcode"] == null)
+                { joRtn.Add("infcode", joRtn["code"]); }
+                if (joRtn["err_msg"] == null)
+                { //joRtn.Add("err_msg", "invokeCenterService(2):" + ex.Message);
+                    joRtn.Add("err_msg", joRtn["message"]);                    
+                }
+                outPar = JsonHelper.Compress(joRtn);
+                return joRtn;
+            }
+            finally
+            {
+                Global.writeLog(funNO + "(" + Global.curEvt.URL + ")", JsonHelper.Compress(data), joRtn.ToString());
+                this.saveCenterLog(JsonHelper.Compress(data), joRtn.ToString(), JsonHelper.Compress(data), joRtn.ToString());
+            }
+        }
+
+        /// <summary>
+        /// 市医保医保进销存Post服务调用封装
+        /// </summary>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        private JObject invokeCenterServiceJXC(string data)
+        {
+            string postContent = "";
+            JObject joRtn = new JObject();
+            try
+            {
+                Global.writeLog(string.Format("调用中心{0}接口入参:{1}", data, Global.curEvt.URL));
+
+
+                //创建一个HTTP请求  
+                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Global.curEvt.URL);
+                //Post请求方式  
+                request.Method = "POST";
+                //string nonce = Guid.NewGuid().ToString();         //非重复的随机字符串(十分钟内不能重复)
+                //string timestamp = TimeStamp.get13().ToString();  //当前时间戳(秒)
+                //string BusinessID = Global.inf.BusinessID;        //服务商ID
+                //string InsuHosID = Global.inf.hospitalNO;         //医疗机构ID
+                //string CreditID = Global.inf.CreditID;            //服务商统一社会信用代码                
+
+                //内容类型
+                request.ContentType = "application/json;charset=UTF-8";
+                //昆明增加头部信息
+                //string sTemp = timestamp + BusinessID + nonce;
+                //Sha256 加密生成的签名 signature = sha256(hsf_timestamp + infosyssign + hsf_nonce)
+                //string signature = Encrypt.SHA256EncryptStr(sTemp);
+
+                //request.Headers.Add("hsf_signature", signature);
+                //request.Headers.Add("hsf_timestamp", timestamp);
+                //request.Headers.Add("hsf_nonce", nonce);
+                //request.Headers.Add("fixmedins_code", InsuHosID);
+                //request.Headers.Add("infosyscode", CreditID);
+
+                //设置参数,并进行URL编码 
+                string paraUrlCoded = data;//System.Web.HttpUtility.UrlEncode(jsonParas);   
+                byte[] payload;
+                //将Json字符串转化为字节  
+                payload = System.Text.Encoding.UTF8.GetBytes(paraUrlCoded);
+                //设置请求的ContentLength   
+                request.ContentLength = payload.Length;
+                //发送请求,获得请求流 
+                Stream writer;
+                writer = request.GetRequestStream();//获取用于写入请求数据的Stream对象
+                                                    //将请求参数写入流
+                writer.Write(payload, 0, payload.Length);
+                writer.Close();//关闭请求流
+                               // String strValue = "";//strValue为http响应所返回的字符流
+                HttpWebResponse response = null;
+                try
+                {
+                    //获得响应流
+                    response = (HttpWebResponse)request.GetResponse();
+                }
+                catch (WebException ex)
+                {
+                    // return JsonHelper.setExceptionJson(-99, "centerServeiceInvok中获得响应流异常", ex.Message);
+
+                    HttpWebResponse res = (HttpWebResponse)ex.Response;
+                    Stream myResponseStream = res.GetResponseStream();
+                    StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.UTF8);
+                    string retString = myStreamReader.ReadToEnd();
+                    return JsonHelper.setExceptionJson(-99, "获得响应流异常", retString);
+
+                }
+                postContent = getResponseData(response);
+                joRtn = JObject.Parse(postContent);//返回Json数据
+                if (joRtn.ContainsKey("body"))
+                {
+                    joRtn = (JObject)joRtn.GetValue("body");
+                }
+                Global.writeLog("返回解密前" + joRtn.ToString());
+                return JObject.Parse(JsonHelper.insDecryptInventory(joRtn));//返回前解密
+            }
+            catch (Exception ex)
+            {
+                postContent = "调用中心服务异常" + ex.Message;
+                joRtn.Add("infcode", -1);
+                joRtn.Add("err_msg", "invokeCenterService(1):" + ex.Message);
+                return joRtn;
+                
+            }
+        }
+        /// <summary>
+        /// 这个是调用业务服务的invokeCenterService
+        /// 湖北进销存辅助接口I2001-I2002接口调用
+        /// </summary>
+        /// <param name="funNO"></param>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        public JObject invokeCenterServiceFZJK(string funNO, JObject data)
+        {
+            JObject joRtn = new JObject();
+            string outPar = "";
+            try
+            {
+                // 动态调试模式
+                if (Global.curEvt.enabledDebug)
+                {
+                    CenterResult center = new CenterResult();
+                    center.setTradeNo(funNO);
+                    if (center.ShowDialog() == DialogResult.OK)
+                    {
+                        outPar = center.returnData;
+                        return JObject.Parse(outPar);
+                    }
+                }
+
+                //setCenterURL(funNO);
+                //湖北进销存辅助接口
+                //12001 : http://ymtng.whsybj.cn/api/wuhan/queryMedicallnfo
+                //12002: http://ymtng.whsybj.cn/api/wuhan/queryCodeRelation
+                if(funNO== "I2001")
+                {
+                    Global.curEvt.URL = "http://ymtng.whsybj.cn/api/wuhan/queryMedicallnfoe";//市医保进销存地址
+                }
+                else if (funNO == "I2002")
+                {
+                    Global.curEvt.URL = "http://ymtng.whsybj.cn/api/wuhan/queryCodeRelation";//市医保进销存地址
+                }
+
+
+                //joRtn = invokeCenterServiceFZJK(JsonHelper.setCenterInparInventory(data));//调用前加密
+                joRtn = invokeCenterServiceFZJK(data.ToString());//调用前加密
+                Global.writeLog("返回解密后" + joRtn.ToString());
+                outPar = JsonHelper.Compress(joRtn);
+                return joRtn;
+            }
+            catch (Exception ex)
+            {
+                if (joRtn["infcode"] == null)
+                { joRtn.Add("infcode", joRtn["code"]); }
+                if (joRtn["err_msg"] == null)
+                { //joRtn.Add("err_msg", "invokeCenterService(2):" + ex.Message);
+                    joRtn.Add("err_msg", joRtn["message"]);
+                }
+                outPar = JsonHelper.Compress(joRtn);
+                return joRtn;
+            }
+            finally
+            {
+                Global.writeLog(funNO + "(" + Global.curEvt.URL + ")", JsonHelper.Compress(data), joRtn.ToString());
+                this.saveCenterLog(JsonHelper.Compress(data), joRtn.ToString(), JsonHelper.Compress(data), joRtn.ToString());
+            }
+        }
+
+        /// <summary>
+        /// 市医保医保进销存辅助接口I2001-I2002-Post服务调用封装
+        /// </summary>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        private JObject invokeCenterServiceFZJK(string data)
+        {
+            string postContent = "";
+            JObject joRtn = new JObject();
+            try
+            {
+                Global.writeLog(string.Format("调用中心{0}接口入参:{1}", data, Global.curEvt.URL));
+
+
+                //创建一个HTTP请求  
+                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Global.curEvt.URL);
+                //Post请求方式  
+                request.Method = "POST";
+                //string nonce = Guid.NewGuid().ToString();         //非重复的随机字符串(十分钟内不能重复)
+                //string timestamp = TimeStamp.get13().ToString();  //当前时间戳(秒)
+                //string BusinessID = Global.inf.BusinessID;        //服务商ID
+                //string InsuHosID = Global.inf.hospitalNO;         //医疗机构ID
+                //string CreditID = Global.inf.CreditID;            //服务商统一社会信用代码                
+
+                //内容类型
+                request.ContentType = "application/json;charset=UTF-8";
+                //昆明增加头部信息
+                //string sTemp = timestamp + BusinessID + nonce;
+                //Sha256 加密生成的签名 signature = sha256(hsf_timestamp + infosyssign + hsf_nonce)
+                //string signature = Encrypt.SHA256EncryptStr(sTemp);
+
+                //request.Headers.Add("hsf_signature", signature);
+                //request.Headers.Add("hsf_timestamp", timestamp);
+                //request.Headers.Add("hsf_nonce", nonce);
+                //request.Headers.Add("fixmedins_code", InsuHosID);
+                //request.Headers.Add("infosyscode", CreditID);
+
+                //设置参数,并进行URL编码 
+                string paraUrlCoded = data;//System.Web.HttpUtility.UrlEncode(jsonParas);   
+                byte[] payload;
+                //将Json字符串转化为字节  
+                payload = System.Text.Encoding.UTF8.GetBytes(paraUrlCoded);
+                //设置请求的ContentLength   
+                request.ContentLength = payload.Length;
+                //发送请求,获得请求流 
+                Stream writer;
+                writer = request.GetRequestStream();//获取用于写入请求数据的Stream对象
+                                                    //将请求参数写入流
+                writer.Write(payload, 0, payload.Length);
+                writer.Close();//关闭请求流
+                               // String strValue = "";//strValue为http响应所返回的字符流
+                HttpWebResponse response = null;
+                try
+                {
+                    //获得响应流
+                    response = (HttpWebResponse)request.GetResponse();
+                }
+                catch (WebException ex)
+                {
+                    // return JsonHelper.setExceptionJson(-99, "centerServeiceInvok中获得响应流异常", ex.Message);
+
+                    HttpWebResponse res = (HttpWebResponse)ex.Response;
+                    Stream myResponseStream = res.GetResponseStream();
+                    StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.UTF8);
+                    string retString = myStreamReader.ReadToEnd();
+                    return JsonHelper.setExceptionJson(-99, "获得响应流异常", retString);
+
+                }
+                postContent = getResponseData(response);
+                joRtn = JObject.Parse(postContent);//返回Json数据
+                if (joRtn.ContainsKey("body"))
+                {
+                    joRtn = (JObject)joRtn.GetValue("body");
+                }
+                //return JObject.Parse(JsonHelper.insDecryptInventory(joRtn));//返回前解密
+                return joRtn;//返回前解密
+            }
+            catch (Exception ex)
+            {
+                postContent = "调用中心服务异常" + ex.Message;
+                joRtn.Add("infcode", -1);
+                joRtn.Add("err_msg", "invokeCenterService(1):" + ex.Message);
+                return joRtn;
+
+            }
+        }
+
+        private string getResponseData(HttpWebResponse response)
+        {
+            string data = "";
+            if (response != null)
+            {
+                Stream s = response.GetResponseStream();
+                StreamReader sRead = new StreamReader(s);
+                data = sRead.ReadToEnd();
+                sRead.Close();
+                response.Close();
+            }
+            return data;
+        }
         /// <summary>
         /// 这个是下载目录用的invokeCenterService
         /// </summary>
@@ -820,7 +1142,7 @@ namespace PTMedicalInsurance.Helper
                     if (iRes == 0)
                     {
                         joRtn = JObject.Parse(outPar);
-                    }
+                    } 
                     else
                     {
                         joRtn.Add("infcode", -1);

+ 266 - 9
Helper/JsonHelper.cs

@@ -22,6 +22,7 @@ using PTMedicalInsurance.Variables;
 
 using Newtonsoft.Json;
 using SM2Crypto.Lib;
+using System.Windows.Forms;
 
 namespace PTMedicalInsurance.Helper
 {
@@ -190,7 +191,21 @@ namespace PTMedicalInsurance.Helper
             }
             if (Global.inf.hospitalDr.ToString() == "20")
             {
-                Jo.cainfo = "541b3f54627e252a3c028f2f9b1fb67b";//新院洪山区区医保密钥正式环境!!!!
+
+                if (Global.inf.interfaceDr == 43)
+                {
+                 Jo.cainfo = "0f35371f8890ff4e889ba76a5ebaba6a"; //湖北普瑞测试环境测试追溯安全控件测试密钥
+                    //Jo.cainfo = "309627d5adbfc5cb610ece4d9a14022a"; //湖北普瑞测试环境测试追溯安全控件测试密钥==旧版888
+
+                
+                }
+                if (Global.inf.interfaceDr == 14)
+                {
+                    Jo.cainfo = "541b3f54627e252a3c028f2f9b1fb67b";//新院洪山区区医保密钥正式环境!!!!
+                }
+              
+
+
             }
             Jo.signtype = Global.inf.signatureType; ;
             Jo.infver = Global.inf.version; ;
@@ -250,7 +265,21 @@ namespace PTMedicalInsurance.Helper
             }
             if (Global.inf.hospitalDr.ToString() == "20")
             {
-                Jo.cainfo = "541b3f54627e252a3c028f2f9b1fb67b";//新院洪山区区医保密钥正式环境!!!!
+
+                if (Global.inf.interfaceDr == 43)
+                {
+                Jo.cainfo = "0f35371f8890ff4e889ba76a5ebaba6a"; //湖北普瑞测试环境测试追溯安全控件测试密钥
+                    //Jo.cainfo = "309627d5adbfc5cb610ece4d9a14022a"; //湖北普瑞测试环境测试追溯安全控件测试密钥==旧版888
+
+
+                }
+                if (Global.inf.interfaceDr == 14)
+                {
+                    Jo.cainfo = "541b3f54627e252a3c028f2f9b1fb67b";//新院洪山区区医保密钥正式环境!!!!
+                }
+              
+
+
             }
             Jo.signtype = Global.inf.signatureType; 
             Jo.infver = Global.inf.version; 
@@ -319,7 +348,19 @@ namespace PTMedicalInsurance.Helper
             }
             if (Global.inf.hospitalDr.ToString() == "20")
             {
-                Jo.cainfo = "541b3f54627e252a3c028f2f9b1fb67b";//新院洪山区区医保密钥正式环境!!!!
+                if (Global.inf.interfaceDr == 43)
+                {
+                   Jo.cainfo = "0f35371f8890ff4e889ba76a5ebaba6a"; //湖北普瑞测试环境测试追溯安全控件测试密钥
+                    //Jo.cainfo = "309627d5adbfc5cb610ece4d9a14022a"; //湖北普瑞测试环境测试追溯安全控件测试密钥==旧版888
+
+                }
+                if (Global.inf.interfaceDr == 14)
+                {
+                    Jo.cainfo = "541b3f54627e252a3c028f2f9b1fb67b";//新院洪山区区医保密钥正式环境!!!!
+                }
+               
+
+
             }
             Jo.signtype = "SM3"; ;
             Jo.infver = "V2.0";
@@ -368,7 +409,7 @@ namespace PTMedicalInsurance.Helper
             Jo.infno = infno;
             Global.curEvt.msgid = Global.inf.hospitalNO + DateTime.Now.ToString("yyyyMMddHHmmssffff");
             Jo.msgid = Global.curEvt.msgid;
-            Jo.mdtrtarea_admvs = Global.inf.areaCode;
+            
 
             if (Global.pat.insuplc_admdvs == "")
             {
@@ -376,6 +417,8 @@ namespace PTMedicalInsurance.Helper
             }
             Jo.insuplc_admdvs = Global.pat.insuplc_admdvs;
 
+            Jo.mdtrtarea_admvs = Global.inf.areaCode;
+
             if (Global.inf.hospitalDr.ToString() == "18")
             {
                 Jo.mdtrtarea_admvs = "420104";
@@ -394,7 +437,8 @@ namespace PTMedicalInsurance.Helper
             }
 
 
-            Jo.recer_sys_code = "HuBei";
+            //Jo.recer_sys_code = "HuBei";
+            Jo.recer_sys_code = "1";
             Jo.dev_no = Global.curEvt.mac; 
             Jo.dev_safe_info = Global.inf.dev_safe_info; //设备编号
             Jo.cainfo = Global.inf.cainfo;//
@@ -404,11 +448,28 @@ namespace PTMedicalInsurance.Helper
             }
             if (Global.inf.hospitalDr.ToString() == "20")
             {
-                Jo.cainfo = "541b3f54627e252a3c028f2f9b1fb67b";//新院洪山区区医保密钥2024-01-02正式环境!!!!
+
+                if (Global.inf.interfaceDr == 43)
+                {
+                    Jo.cainfo = "0f35371f8890ff4e889ba76a5ebaba6a"; //湖北普瑞测试环境测试追溯安全控件测试密钥
+                    //Jo.cainfo = "309627d5adbfc5cb610ece4d9a14022a"; //湖北普瑞测试环境测试追溯安全控件测试密钥==旧版888
+
+               
+                }
+                if (Global.inf.interfaceDr ==14)
+                {
+                    Jo.cainfo = "541b3f54627e252a3c028f2f9b1fb67b";//新院洪山区区医保密钥正式环境!!!!
+
+                }
+               
+
             }
-            Jo.signtype = "asn1"; ;
-            Jo.infver = "v1.0";
-            Jo.opter_type = Global.user.type; ;
+            //Jo.signtype = "asn1"; ;
+            Jo.signtype = "SM3"; ;
+            //Jo.infver = "v1.0";
+            Jo.infver = "V2.0";
+            //Jo.opter_type = Global.user.type;
+            Jo.opter_type = "1";//1经办人  2自助终端  3移动终端
             Jo.opter = Global.user.ID; 
             Jo.opter_name = Global.user.name; ;
             Jo.inf_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
@@ -521,6 +582,202 @@ namespace PTMedicalInsurance.Helper
             return requestData.ToString();
         }
 
+        /// <summary>
+        /// 组织中心入参-湖北市医保进销存
+        /// </summary>
+        /// <param name="infno"></param>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        public static string setCenterInparInventory(JObject data)
+        {
+            Global.inf.InvCenterURL = "http://prod.xxhgl.whsybj.cn/mrss-data/api/uts/callService";//正式环境
+            #region【正式环境】
+            if (Global.inf.interfaceDr == 13) //武汉普瑞
+            {
+                //应用ID
+                Global.inf.appId = "4cec448c16fc4cd1a7a7528393e2c9";
+                //应用秘钥
+                Global.inf.Secret = "32286C7E2639CEE5D2696B69A44F990C";
+                //应用私钥
+                Global.inf.privateKey = "UIpNkMda1KJA0I19KLQvb4RVva+N3JMQlnIDk++Kj+Y=";
+                //应用公钥            
+                Global.inf.publicKey = "BF5SiL9DyMWjwpXPxL97Q3Cm4mahQHoEJfx4isFWD5B/ksqgC4PpAZ7uY/rcTEyEf6yV5GI2LVv0IHIdPAkycXo=";
+             
+            }
+            else if (Global.inf.interfaceDr == 14) //湖北普瑞
+            {
+                //应用ID
+                Global.inf.appId = "4cec448c16fc4cd1a7a7528393e2c9";
+                //应用秘钥
+                Global.inf.Secret = "9723DEC0B84EB18A8A4EC5A29276A655";
+                //应用私钥
+                Global.inf.privateKey = "APs8qKCn5a1DvxsH3mjjt38gCuNBowrYypsr5WnaYXtS";
+                //应用公钥            
+                Global.inf.publicKey = "BBtYV5vKGOUfDttRGLRnBjisZF6bKQltHLhwn/9eb1SxHuW74RiyFJmDEULvjunYiM9R9k7VafxggFNpgZaZVW4=";
+               
+            }
+           
+             #endregion
+                #region【测试环境】
+            else if (Global.inf.interfaceDr == 43) //湖北普瑞测试环境
+            {
+                //应用ID
+                Global.inf.appId = "ebb8bb9052c34b4086a166a71e8182";
+                //应用秘钥
+                Global.inf.Secret = "799E9D420EBD307C6064A8323162B3E0";
+                //应用私钥
+                Global.inf.privateKey = "AOTECylu3j5+8SxmINYon61kTtb1g095KZgZsTS3rxn1";
+                //应用公钥            
+                Global.inf.publicKey = "BCfnkiDeQ/b3FNtjAuTsLa0hJLE0lQJAXSjEEWlaQtlpSndN/vPlCG9LFrzhrCOLqrOAZA5+R3dTeoyXB64igzk=";
+                Global.inf.InvCenterURL = "http://test.xxhgl.whsybj.cn/mrss-data/api/uts/callService";
+            }
+            #endregion
+
+            Global.writeLog("医保进销存密钥id:" + Global.inf.appId);
+            Global.writeLog("医保进销存密钥key:" + Global.inf.Secret);
+            Global.writeLog("医保进销存密钥签名:" + Global.inf.privateKey);
+            Global.writeLog("医保进销存公钥签名:" + Global.inf.publicKey);
+
+            //Global.curEvt.msgid = Global.inf.hospitalNO + DateTime.Now.ToString("yyyyMMddHHmmssffff");
+            string timestamp = ((long)(DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds).ToString();
+            Global.curEvt.msgid = timestamp;
+
+            DateTime epochStart = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
+            long currentMillis = (long)((DateTime.UtcNow - epochStart).TotalMilliseconds);
+
+            JObject requestData = new JObject();
+            requestData.Add("appId", Global.inf.appId);
+            requestData.Add("version", "1.0.0");
+           // requestData.Add("timestamp", timestamp);
+            requestData.Add("timestamp", currentMillis);
+            requestData.Add("encType", "SM4");
+            requestData.Add("signType", "SM2");
+            requestData.Add("fixmedinsCode", Global.inf.hospitalNO);
+
+
+            //加密
+            String encData = SMUtil.encrypt(JsonConvert.SerializeObject(data, Formatting.None), Global.inf.appId, Global.inf.Secret);
+            //Global.writeLog("入参加密前:" + "\r\n" + JsonConvert.DeserializeObject(data.ToString()) + "\r\n" + "入参加密后:" + "\r\n" + encData);
+
+            JObject signDto = (JObject)JObject.Parse(JsonConvert.SerializeObject(requestData, Formatting.None));
+            signDto.Add("data", data);
+        
+            //加签
+            String signData = SMUtil.sign(signDto, Global.inf.Secret, Global.inf.privateKey);
+            Global.writeLog("签名结果:" + "\r\n" + signData);
+
+            //报文
+            requestData.Add("encData", encData);
+            requestData.Add("signData", signData);
+            dynamic Jo = new JObject();
+            Jo.appId = Global.inf.appId;
+            Jo.version = "1.0.0";
+            Jo.timestamp = timestamp;
+            Jo.encType = "SM4";
+            Jo.signType = "SM2";
+            Jo.signData = signDto.ToString();
+            Jo.encData = data.ToString();
+
+            Global.writeLog("加密前报文:" + "\r\n" + Jo.ToString() + "\r\n" + "加密后报文:" + "\r\n" + JsonConvert.SerializeObject(requestData, Formatting.None));
+
+            //本地解密
+            //String decData = SMUtil.decrypt(encData, Global.inf.appId, Global.inf.Secret);
+            //Global.writeLog("解密:" + decData);
+            //使用应用公钥(publicKey示例默认值)对本地自签名的数据进行验签示例
+            //Boolean isVerify = SMUtil.verify(signDto, Global.inf.Secret, Global.inf.publicKey, signData);
+            //Global.writeLog("验签:" + isVerify);
+
+            return requestData.ToString();
+        }
+        /// <summary>
+        /// 组织中心入参-湖北市医保进销存解密
+        /// </summary>
+        /// <param name="infno"></param>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        public static string insDecryptInventory(JObject data)
+        {
+            #region【正式环境】
+            if (Global.inf.interfaceDr == 13) //武汉普瑞
+            {
+                //应用ID
+                Global.inf.appId = "4cec448c16fc4cd1a7a7528393e2c9";
+                //应用秘钥
+                Global.inf.Secret = "32286C7E2639CEE5D2696B69A44F990C";
+                //应用私钥
+                Global.inf.privateKey = "UIpNkMda1KJA0I19KLQvb4RVva+N3JMQlnIDk++Kj+Y=";
+                //应用公钥            
+                Global.inf.publicKey = "BF5SiL9DyMWjwpXPxL97Q3Cm4mahQHoEJfx4isFWD5B/ksqgC4PpAZ7uY/rcTEyEf6yV5GI2LVv0IHIdPAkycXo=";
+            }
+            else if (Global.inf.interfaceDr == 14) //湖北普瑞
+            {
+                //应用ID
+                Global.inf.appId = "4cec448c16fc4cd1a7a7528393e2c9";
+                //应用秘钥
+                Global.inf.Secret = "9723DEC0B84EB18A8A4EC5A29276A655";
+                //应用私钥
+                Global.inf.privateKey = "APs8qKCn5a1DvxsH3mjjt38gCuNBowrYypsr5WnaYXtS";
+                //应用公钥            
+                Global.inf.publicKey = "BBtYV5vKGOUfDttRGLRnBjisZF6bKQltHLhwn/9eb1SxHuW74RiyFJmDEULvjunYiM9R9k7VafxggFNpgZaZVW4=";
+            }
+
+            Global.inf.InvCenterURL = "http://prod.xxhgl.whsybj.cn/mrss-data/api/uts/callService";
+
+            #endregion
+
+            Global.writeLog("密钥id:" + Global.inf.appId);
+            Global.writeLog("密钥key:" + Global.inf.Secret);
+            Global.writeLog("定点医药机构私钥:" + Global.inf.privateKey);
+            Global.writeLog("医保电子处方中心公钥:" + Global.inf.publicKey);
+
+            ////Global.curEvt.msgid = Global.inf.hospitalNO + DateTime.Now.ToString("yyyyMMddHHmmssffff");
+            //string timestamp = ((long)(DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds).ToString();
+            //Global.curEvt.msgid = timestamp;
+
+            //JObject requestData = new JObject();
+            //requestData.Add("appId", Global.inf.appId);
+            //requestData.Add("version", "1.0.0.");
+            //requestData.Add("timestamp", timestamp);
+            //requestData.Add("encType", "SM4");
+            //requestData.Add("signType", "SM2");
+
+
+            ////加密
+            //String encData = SMUtil.encrypt(JsonConvert.SerializeObject(data, Formatting.None), Global.inf.appId, Global.inf.Secret);
+            ////Global.writeLog("入参加密前:" + "\r\n" + JsonConvert.DeserializeObject(data.ToString()) + "\r\n" + "入参加密后:" + "\r\n" + encData);
+
+            //JObject signDto = (JObject)JObject.Parse(JsonConvert.SerializeObject(requestData, Formatting.None));
+            //signDto.Add("data", data);
+            //signDto.Add("fixmedinsCode", Global.inf.hospitalNO);
+
+            ////加签
+            //String signData = SMUtil.sign(signDto, Global.inf.Secret, Global.inf.privateKey);
+            //Global.writeLog("签名结果:" + "\r\n" + signData);
+
+            ////报文
+            //requestData.Add("encData", encData);
+            //requestData.Add("signData", signData);
+            //requestData.Remove("data");
+            //dynamic Jo = new JObject();
+            //Jo.appId = Global.inf.appId;
+            //Jo.version = "1.0.0";
+            //Jo.timestamp = timestamp;
+            //Jo.encType = "SM4";
+            //Jo.signType = "SM2";
+            //Jo.signData = signDto.ToString();
+            //Jo.encData = data.ToString();
+
+            //Global.writeLog("加密前报文:" + "\r\n" + Jo.ToString() + "\r\n" + "加密后报文:" + "\r\n" + JsonConvert.SerializeObject(requestData, Formatting.None));
+
+            //本地解密
+            String decData = SMUtil.decrypt(data["data"]["encData"].ToString(), Global.inf.appId, Global.inf.Secret);
+            Global.writeLog("解密:" + decData);
+           // 使用应用公钥(publicKey示例默认值)对本地自签名的数据进行验签示例
+            Boolean isVerify = SMUtil.verify(decData, Global.inf.Secret, Global.inf.publicKey, data["data"]["signData"].ToString());
+            Global.writeLog("验签:" + isVerify);
+
+            return decData.ToString();
+        }
         /// <summary>
         /// 组织Iris入参
         /// </summary>

+ 30 - 4
HuBeiMI.csproj

@@ -41,13 +41,13 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>bin\Debug\FastReport.dll</HintPath>
     </Reference>
-    <Reference Include="FastReport.Bars, Version=2020.3.7.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
+    <Reference Include="FastReport.Bars, Version=2023.1.8.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>C:\Program Files (x86)\FastReports\FastReport.Net Trial\FastReport.Bars.dll</HintPath>
+      <HintPath>bin\Debug\FastReport.Bars.dll</HintPath>
     </Reference>
-    <Reference Include="FastReport.Editor, Version=2020.3.7.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
+    <Reference Include="FastReport.Editor, Version=2023.1.8.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>C:\Program Files (x86)\FastReports\FastReport.Net Trial\FastReport.Editor.dll</HintPath>
+      <HintPath>bin\Debug\FastReport.Editor.dll</HintPath>
     </Reference>
     <Reference Include="FastReportFrom, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -56,6 +56,9 @@
     <Reference Include="GMUtilCore">
       <HintPath>c#国密算法加密解密库-v1.0.0\core\GMUtilCore.dll</HintPath>
     </Reference>
+    <Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.IO.RecyclableMemoryStream.3.0.1\lib\netstandard2.0\Microsoft.IO.RecyclableMemoryStream.dll</HintPath>
+    </Reference>
     <Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
       <HintPath>packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
       <EmbedInteropTypes>True</EmbedInteropTypes>
@@ -67,6 +70,7 @@
       <HintPath>packages\Microsoft.Office.Excel.14.0.4760.1000\lib\net20\Office.dll</HintPath>
       <EmbedInteropTypes>True</EmbedInteropTypes>
     </Reference>
+    <Reference Include="PresentationCore" />
     <Reference Include="PTControl">
       <HintPath>..\..\..\..\C#练习\普天控件2\PTControl\PTControl\bin\Debug\PTControl.dll</HintPath>
     </Reference>
@@ -77,12 +81,31 @@
       <HintPath>packages\SunnyUI.Common.3.1.2\lib\net472\SunnyUI.Common.dll</HintPath>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ComponentModel.DataAnnotations" />
+    <Reference Include="System.configuration" />
     <Reference Include="System.Core" />
     <Reference Include="System.Design" />
     <Reference Include="System.Drawing" />
     <Reference Include="System.IO.Compression" />
     <Reference Include="System.IO.Compression.FileSystem" />
     <Reference Include="System.Management" />
+    <Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Numerics" />
+    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Security" />
     <Reference Include="System.Web.Extensions" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml.Linq" />
@@ -417,5 +440,8 @@
       <EmbedInteropTypes>True</EmbedInteropTypes>
     </COMReference>
   </ItemGroup>
+  <ItemGroup>
+    <WCFMetadata Include="Connected Services\" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 620 - 11
InsuBusiness.cs

@@ -14,6 +14,10 @@ using System.IO;
 using System.Reflection;
 using System.Data;
 using HuBeiMI.Forms;
+using System.Collections;
+using System.Data.SqlTypes;
+using Sunny.UI.Win32;
+using Sunny.UI;
 
 namespace PTMedicalInsurance
 {
@@ -33,6 +37,10 @@ namespace PTMedicalInsurance
         private JObject joParam;
         private JObject joInterface;
         private JObject joInsuAdmObj;
+        private JObject joParamA;//临时进销存使用
+        JObject joParam992001;//临时进销存使用
+        JObject joParam992002;//临时进销存使用
+        JObject joParam992004;//临时进销存使用
 
         //设置业务实例
         CenterBusiness cBus = new CenterBusiness();
@@ -67,6 +75,7 @@ namespace PTMedicalInsurance
                     joInsuAdmObj = JObject.Parse(JsonHelper.getDestValue(joInParam, "insuAdmObj"));
 
                 joInterface = JObject.Parse(JsonHelper.getDestValue(joInParam, "interfaceinfo"));
+                Global.pat.insuplc_admdvs= JsonHelper.getDestValue(joInParam, "insuplc_admdvs");
 
                 businessType = JsonHelper.getDestValue(joInParam, "businessType");
                 return 0;
@@ -320,7 +329,14 @@ namespace PTMedicalInsurance
                         {
                             Global.writeLog(Global.pat.insuType);
                             string  regInParam = "";
-                            
+
+
+                            //校验HIS姓名与医保姓名是否一致
+                            if (hBus.checkName(Global.pat.name, out errMsg) != 0)
+                            {
+                                rtnResult = JsonHelper.setExceptionJson(-1, "校验HIS与医保姓名是否一致", errMsg).ToString();
+                                return rtnResult;
+                            }
                             //显示登记面板
                             if (hBus.showInPatRegisterForm( out regInParam) == 0)
                             {
@@ -525,10 +541,17 @@ namespace PTMedicalInsurance
                             {
                                 if (hBus.PreAnalysis("4", "", out errMsg) != 0)
                                 {
-                                    rtnResult = JsonHelper.setExceptionJson(-1, "事前分析", errMsg).ToString();
-                                    return rtnResult;
+                                    //rtnResult = JsonHelper.setExceptionJson(-1, "事前分析", errMsg).ToString();
+                                    //return rtnResult;
+                                    DialogResult dr = MessageBox.Show("【3101】医保明细审核事前分析服务医保中心返回结果:" + errMsg + "!是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
+                                    if (dr != DialogResult.OK)
+                                    {
+                                        rtnResult = JsonHelper.setExceptionJson(-1, "【3101】医保明细审核事前分析服务调用失败:", errMsg).ToString();
+                                        return rtnResult;
+                                    }
                                 }
                             }
+
                             //从医保平台获取患者详细的医保登记信息
                             if (mIS.queryRegisterInfo(1, out outParam) != 0)
                             {
@@ -723,16 +746,26 @@ namespace PTMedicalInsurance
                             hBus.InsuMessage(out string InsuMess);
                             MessageBox.Show(InsuMess,"参保信息提示");
 
+                           
                             ////事前分析
                             if (Global.curEvt.ext.isOpenAnalysis)
                             {
-                                if (hBus.PreAnalysis("2", "", out errMsg) != 0)
+                                if (hBus.PreAnalysis("2", "", out errMsg) != 0) //事前事中:门诊挂号1 门诊收费登记2 住院登记3 住院收费登记4 住院执行医嘱5 门诊结算6 门诊预结算7 住院结算8 住院预结算9 购药划卡10
                                 {
-                                    rtnResult = JsonHelper.setExceptionJson(-1, "事前分析", errMsg).ToString();
-                                    return rtnResult;
+                                    //rtnResult = JsonHelper.setExceptionJson(-1, "事前分析", errMsg).ToString();
+                                    //return rtnResult;
+                                    DialogResult dr = MessageBox.Show("【3101】医保明细审核事前分析服务医保中心返回结果:" + errMsg + "!是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
+                                    if (dr != DialogResult.OK)
+                                    {
+                                        rtnResult = JsonHelper.setExceptionJson(-1, "【3102】医保明细审核事前分析服务调用失败:", errMsg).ToString();
+                                        return rtnResult;
+                                    }
                                 }
                             }
 
+
+
+
                             //显示登记面板
                             if (hBus.showOutPatRegisterForm(out outParam) != 0)
                             {
@@ -740,7 +773,7 @@ namespace PTMedicalInsurance
                                 return rtnResult;
                             }
 
-                            JObject joReg = JObject.Parse(outParam);
+                            JObject joReg = JObject.Parse(outParam); 
 
                             //医保挂号
                             JObject jo2201Inpar = JObject.Parse(JsonHelper.getDestProperty(joReg, "data"));
@@ -870,6 +903,22 @@ namespace PTMedicalInsurance
                             */
                             #endregion
 
+                            ////事中分析
+                            if (Global.curEvt.ext.isOpenAnalysis)
+                            {
+                                if (hBus.PreAnalysis("7", "", out errMsg) != 0) //事前事中:门诊挂号1 门诊收费登记2 住院登记3 住院收费登记4 住院执行医嘱5 门诊结算6 门诊预结算7 住院结算8 住院预结算9 购药划卡10
+                                {
+                                    //rtnResult = JsonHelper.setExceptionJson(-1, "事前分析", errMsg).ToString();
+                                    //return rtnResult;
+                                    DialogResult dr = MessageBox.Show("【3102】医保明细审核事前分析服务医保中心返回结果:" + errMsg + "!是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
+                                    if (dr != DialogResult.OK)
+                                    {
+                                        rtnResult = JsonHelper.setExceptionJson(-1, "【3101】医保明细审核事前分析服务调用失败:", errMsg).ToString();
+                                        return rtnResult;
+                                    }
+                                }
+                            }
+
                             //调用IRIS获取医保各项金额
                             if (mIS.getSumFee(out outParam) != 0)
                             {
@@ -1198,12 +1247,20 @@ namespace PTMedicalInsurance
                             */
                             #endregion
                             #region【住院预结算2303前调用3102医保明细审核事中服务】   
+
+                            ////事中分析
                             if (Global.curEvt.ext.isOpenAnalysis)
                             {
-                                if (hBus.PreAnalysis("9", "", out errMsg) != 0)
+                                if (hBus.PreAnalysis("9", "", out errMsg) != 0) //事前事中:门诊挂号1 门诊收费登记2 住院登记3 住院收费登记4 住院执行医嘱5 门诊结算6 门诊预结算7 住院结算8 住院预结算9 购药划卡10
                                 {
-                                    rtnResult = JsonHelper.setExceptionJson(-1, "事中分析", errMsg).ToString();
-                                    return rtnResult;
+                                    //rtnResult = JsonHelper.setExceptionJson(-1, "事前分析", errMsg).ToString();
+                                    //return rtnResult;
+                                    DialogResult dr = MessageBox.Show("【3101】医保明细审核事前分析服务医保中心返回结果:" + errMsg + "!是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
+                                    if (dr != DialogResult.OK)
+                                    {
+                                        rtnResult = JsonHelper.setExceptionJson(-1, "【3101】医保明细审核事前分析服务调用失败:", errMsg).ToString();
+                                        return rtnResult;
+                                    }
                                 }
                             }
                             #endregion  
@@ -1704,7 +1761,57 @@ namespace PTMedicalInsurance
                     rtnResult = outParam;
                     return rtnResult;
                 }
-                JObject joRtn = invoker.invokeCenterService(funNO, JsonHelper.setCenterInpar(funNO, joParam));
+                JObject joRtn;
+                string[] strArr = { "3501", "3502", "3503", "3504", "3505", "3506", "3507" };//进销存交易
+                bool exists = ((IList)strArr).Contains(funNO);
+                if (exists)
+                {
+
+                    //解析入参
+                    if (parsejoParam(joParam, funNO, out errMsg) != 0)
+                    {
+                        rtnResult = JsonHelper.setExceptionJson(-1, "", errMsg).ToString();
+                        return rtnResult;
+                    }
+                   
+                    //if (funNO == "3505")
+                    //{
+                        
+                    //    //解析入参
+                    //    if (parsejoParamSet(joParam, funNO, out errMsg) != 0)
+                    //    {
+                    //        rtnResult = JsonHelper.setExceptionJson(-1, "", errMsg).ToString();
+                    //        return rtnResult;
+                    //    }
+                    //    invoker.invokeCenterServiceJXC("992001", JObject.Parse(JsonHelper.setCenterInpar("992001", joParam992001)));//结算信息上传
+                    //    invoker.invokeCenterServiceJXC("992004", JObject.Parse(JsonHelper.setCenterInpar("992004", joParam992004)));//结算费用明细上传
+                    //}
+                    //if (funNO == "3506")
+                    //{
+                        
+                    //    invoker.invokeCenterServiceJXC("992002", JObject.Parse(JsonHelper.setCenterInpar("992002", joParam992001)));//结算退费信息上传
+                    //    invoker.invokeCenterServiceJXC("992004", JObject.Parse(JsonHelper.setCenterInpar("992004", joParam992004)));//结算退费费用明细上传
+                    //}
+                    joRtn = invoker.invokeCenterServiceJXC(funNO, JObject.Parse(JsonHelper.setCenterInpar(funNO, joParam)));
+
+
+                    string funNOA = funNO + 'A';
+                   
+                    joRtn = invoker.invokeCenterService(funNOA, JsonHelper.setCenterInpar(funNOA, joParamA));
+
+                }
+                else //非进销存交易
+                {
+                    if (funNO== "I2002")
+                    {
+                         joRtn = invoker.invokeCenterServiceFZJK("I2002", joParam);//追溯码辅助接口
+                    }
+                    else {
+                        
+                        joRtn = invoker.invokeCenterService(funNO, JsonHelper.setCenterInpar(funNO, joParam));//正常交易走医保COM组件
+                    }
+                    
+                }
                 if (JsonHelper.parseCenterRtnValue(joRtn, out errMsg) != 0)
                 {
                     rtnResult = JsonHelper.setExceptionJson(-1, "平台直连错误", errMsg).ToString();
@@ -1726,6 +1833,508 @@ namespace PTMedicalInsurance
                 Global.writeLog("PlatformDirectConnect 出参:" + JsonHelper.Compress(rtnResult));
             }
         }
+        private int parsejoParam(JObject joParam,string funno,out string errMsg)
+        {
+            errMsg = "";
+            try
+            {
+                if (funno == "3505"|| funno == "3506")
+                {
+                    if (!string.IsNullOrEmpty(joParam["selinfo"]["setl_id"].ToString()))
+                    {
+                        if (joParam["selinfo"]["setl_id"].ToString().Substring(0, 4) == "4299" || joParam["selinfo"]["setl_id"].ToString().Substring(0, 4) == "4201")
+                        {
+                            joParam["selinfo"]["hi_feesetl_type"] = "1";
+                        }
+                        else
+                        {
+                            joParam["selinfo"]["hi_feesetl_type"] = "2";
+                        }
+                    }
+                    else
+                    {
+                        joParam["selinfo"]["hi_feesetl_type"] = "0";
+                    }
+                    JObject joRtn = JObject.Parse(joParam["selinfo"].ToString());
+                    //if (!string.IsNullOrEmpty(joParam["selinfo"]["drugtracinfo"].ToString()))
+                    //{
+                    //    joRtn.Add("drug_trac_info", joParam["selinfo"]["drugtracinfo"]);
+                    //    joParam["selinfo"] = joRtn;
+                    //}
+                    //MessageBox.Show("111");
+                    //MessageBox.Show(joParam.ToString());
+                    JArray selDtl = new JArray();
+                    selDtl.Add(JObject.Parse(joParam["selinfo"].ToString()));
+                    //MessageBox.Show(selDtl.ToString());
+                    joParamA = new JObject();
+                    joParamA.Add("selinfoDetail", selDtl);
+                    //MessageBox.Show(joParamA.ToString());
+                    return 0;
+                }
+                else if (funno == "3501")
+                {
+                    JObject joRtn = JObject.Parse(joParam["invinfo"].ToString());
+                    //if (!string.IsNullOrEmpty(joParam["invinfo"]["drugtracinfo"].ToString()))
+                    //{
+                    //    joRtn.Add("drug_trac_info", joParam["invinfo"]["drugtracinfo"]);
+                    //    joParam["invinfo"] = joRtn;
+                    //}
+
+                    JArray selDtl = new JArray();
+                    selDtl.Add(JObject.Parse(joParam["invinfo"].ToString()));
+                    //MessageBox.Show(selDtl.ToString());
+                    joParamA = new JObject();
+                    joParamA.Add("invinfoDetail", selDtl);
+
+                    return 0;
+                }
+                else if (funno == "3502")
+                {
+                    JObject joRtn = JObject.Parse(joParam["invinfo"].ToString());
+                    //if (!string.IsNullOrEmpty(joParam["invinfo"]["drugtracinfo"].ToString()))
+                    //{
+                    //    joRtn.Add("drug_trac_info", joParam["invinfo"]["drugtracinfo"]);
+                    //    joParam["invinfo"] = joRtn;
+                    //}
+
+                    JArray selDtl = new JArray();
+                    selDtl.Add(JObject.Parse(joParam["invinfo"].ToString()));
+                    //MessageBox.Show(selDtl.ToString());
+                    joParamA = new JObject();
+                    joParamA.Add("invinfoDetail", selDtl);
+
+                    return 0;
+                }
+                else if (funno == "3503")
+                {
+                    JObject joRtn = JObject.Parse(joParam["purcinfo"].ToString());
+                    //if (!string.IsNullOrEmpty(joParam["purcinfo"]["drugtracinfo"].ToString()))
+                    //{
+                    //    joRtn.Add("drug_trac_info", joParam["purcinfo"]["drugtracinfo"]);
+                    //    joParam["purcinfo"] = joRtn;
+                    //}
+
+                    JArray selDtl = new JArray();
+                    selDtl.Add(JObject.Parse(joParam["purcinfo"].ToString()));
+                    //MessageBox.Show(selDtl.ToString());
+                    joParamA = new JObject();
+                    joParamA.Add("purcinfoDetail", selDtl);
+
+                    return 0;
+                }
+                else if ( funno == "3504")
+                {
+                    JObject joRtn = JObject.Parse(joParam["purcinfo"].ToString());
+                    //if (!string.IsNullOrEmpty(joParam["purcinfo"]["drugtracinfo"].ToString()))
+                    //{
+                    //    joRtn.Add("drug_trac_info", joParam["purcinfo"]["drugtracinfo"]);
+                    //    joParam["purcinfo"] = joRtn;
+                    //}
+
+                    JArray selDtl = new JArray();
+                    selDtl.Add(JObject.Parse(joParam["purcinfo"].ToString()));
+                    //MessageBox.Show(selDtl.ToString());
+                    joParamA = new JObject();
+                    joParamA.Add("purcinfoDetail", selDtl);
+
+                    return 0;
+                }
+                else { return -1; }
+                
+            }
+            catch (Exception ex)
+            {
+                errMsg = "parsejoParam 解析入参异常1:" + errMsg;
+                return -1;
+            }
+
+        }
+        private int parsejoParamSet(JObject joParam, string funno, out string errMsg)
+        {
+            errMsg = "";
+            try
+            {
+                if (funno == "3505")
+                {
+                    string setl_id = joParam["selinfo"]["setl_id"].ToString();
+                    string sqlStr = "SELECT * FROM  BS_MedInsuSettlement WHERE billType = 1  ";
+                    sqlStr = sqlStr + " AND Hospital_Dr=" + Global.inf.hospitalDr + " AND Interface_Dr=" + Global.inf.interfaceDr;
+                    sqlStr = sqlStr + " AND SettlementID ='" + setl_id + "'";
+
+                    JObject joSql = new JObject();
+                    joSql.Add("sqlStr", sqlStr);
+                    JObject joSettlInfo = mIS.QuerySettlementInfo(joSql);
+                    //查询结算信息
+                    JObject Outpam = JObject.Parse(joSettlInfo["result"]["data"][0].ToString());
+                    dynamic setlinfo = new JObject();//结算信息节点
+                    setlinfo.setl_id = Outpam["SettlementID"];//结算ID
+                    setlinfo.mdtrt_id = Outpam["MdtrtID"];//就诊ID
+                    setlinfo.psn_no = Outpam["PersonnelNO"];//人员编号
+                    setlinfo.psn_name = Outpam["PatientName"];//人员姓名
+                    setlinfo.psn_cert_type = Outpam["MdtrtCertType"];//凭证类型
+
+                    setlinfo.certno = Outpam["CertificateNO"];//证件号码
+                    setlinfo.gend = Outpam["Gender"];//性别
+                    setlinfo.naty = Outpam["Nation"];//民族
+                    setlinfo.brdy = Outpam["BirthDay"];//出生日期
+                    setlinfo.age = Outpam["Age"];//年龄
+
+                    setlinfo.insutype = Outpam["InsuranceType"];//险种类型
+                    setlinfo.psn_type = Outpam["PersonType"];//人员类别
+                    setlinfo.cvlserv_flag = Outpam["CivilserviceFlag"];//公务员标志
+                    setlinfo.setl_time = Outpam["SettlementTime"];//结算时间
+                    setlinfo.mdtrt_cert_type = Outpam["MdtrtCertType"];//就诊凭证类型
+
+                    setlinfo.med_type = Outpam["MedicalType"];//医疗类别
+                    setlinfo.medfee_sumamt = Outpam["Sumamt"];//医疗费总额
+                    setlinfo.fulamt_ownpay_amt = Outpam["OwnPayAmount"];//全自费金额
+                    setlinfo.overlmt_selfpay = Outpam["OverLimitAmount"];//超限价自费费用
+                    setlinfo.preselfpay_amt = Outpam["PreSelfPayAmount"];//先行自付金额
+
+                    setlinfo.inscp_scp_amt = Outpam["InPolicyRangeAmount"];//符合政策范围金额
+                    setlinfo.act_pay_dedc = Outpam["ActualPayDeductible"];//实际支付起付线
+                    setlinfo.hifp_pay = Outpam["HealthInsurancePay"];//基本医疗保险统筹基金支出
+                    setlinfo.pool_prop_selfpay = Outpam["HealthInsuranceRatio"];//基本医疗保险统筹基金支付比例
+                    setlinfo.cvlserv_pay = Outpam["CivilserviceAllowancePay"];//公务员医疗补助资金支出
+
+                    setlinfo.hifes_pay = Outpam["EnterpriseSupplementPay"];//企业补充医疗保险基金支出
+                    setlinfo.hifmi_pay = Outpam["SeriousIllnessPay"];//居民大病保险资金支出
+                    setlinfo.hifob_pay = Outpam["LargeExpensesSupplementPay"];//职工大额医疗费用补助基金支出
+                    setlinfo.maf_pay = Outpam["MedicalAssistPay"];//医疗救助基金支出
+                    setlinfo.oth_pay = Outpam["OtherPay"];//结算ID
+
+                    setlinfo.fund_pay_sumamt = Outpam["FundPaySumamt"];//基金支付总额
+                    setlinfo.psn_part_amt = Outpam["PersonPaySumamt"];//个人负担总金额
+                    setlinfo.acct_pay = Outpam["AccountPaySumamt"];//个人账户支出
+                    setlinfo.psn_cash_pay = Outpam["PersonCashPay"];//个人现金支出
+                    setlinfo.balc = Outpam["Balance"];//余额
+
+                    setlinfo.acct_mulaid_pay = Outpam["AccountMutualAidAmount"];//个人账户共济支付金额
+                    setlinfo.medins_setl_id = Outpam["OrganSettlementID"];//医药机构结算结算ID
+                    setlinfo.clr_optins = Outpam["ClearingOrgan"];//clr_optins
+                    setlinfo.clr_way = Outpam["ClearingWay"];//clr_way
+                    setlinfo.clr_type = Outpam["ClearingType"];//clr_type
+
+                    setlinfo.exp_content = "";//exp_content
+                    setlinfo.hosp_part_amt = Outpam["HospitalPartAmount"];//医院负担金额
+                    setlinfo.hifdm_pay = 0;//伤残人员医疗保障基金支出
+
+                    dynamic setlinfo1 = new JObject();//结算信息节点
+                    setlinfo1.setl_id = Outpam["SettlementID"];//结算ID
+                    string outParam = "";
+
+                    string AdmID = Outpam["AdmID"].ToString();
+                    string billID = Outpam["BillID"].ToString();
+                    string recordID = Outpam["RecordID"].ToString();
+                  
+                    Global.pat.adm_Dr = int.Parse(AdmID);
+                    Global.pat.billID = billID;
+                    Global.pat.recordID = recordID;
+                    //获取IS费用
+                    if (hIS.getHisFee(Global.pat, out outParam) != 0)
+                    {
+                        MessageBox.Show("获取HIS费用失败");
+                    }
+                    //调用医保平台转换HIS费用(转换医保编码等)
+                    JObject joHisFee = JObject.Parse(outParam);
+
+                    if (mIS.convertHisFeeWithInsuCode(joHisFee, out outParam) != 0)
+                    {
+                        MessageBox.Show("获取HIS费用医保对照关系失败");
+                    }
+                    JArray jaFeeDetail = JArray.Parse(JsonHelper.getDestValue(JObject.Parse(outParam), "data"));
+                    MessageBox.Show("11111");
+                    JObject jaFeeOne = new JObject();
+                    for (int i = 0; i < jaFeeDetail.Count; i++)
+                    {
+                        jaFeeOne.Add("feedetl_sn", jaFeeDetail[i]["feedetl_sn"]);//费用明细流水号
+                        jaFeeOne.Add("rxno", "");//处方号
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["rx_circ_flag"].ToString()))
+                        {
+                            jaFeeOne.Add("rx_circ_flag", "");//外购处方标志
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("rx_circ_flag", jaFeeDetail[i]["rx_circ_flag"]);//外购处方标志
+                        }
+                        jaFeeOne.Add("fee_ocur_time", jaFeeDetail[i]["fee_ocur_time"]);
+                        jaFeeOne.Add("med_list_codg", jaFeeDetail[i]["med_list_codg"]);
+
+                        jaFeeOne.Add("medins_list_codg", jaFeeDetail[i]["medins_list_codg"]);
+                        jaFeeOne.Add("medins_list_name", jaFeeDetail[i]["medins_list_desc"]);
+
+                        jaFeeOne.Add("prodname", jaFeeDetail[i]["medins_list_desc"]);
+
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["spec"].ToString()))
+                        {
+                            jaFeeOne.Add("spec", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("spec", jaFeeDetail[i]["spec"]);
+                        }
+
+
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["doseForm"].ToString()))
+                        {
+                            jaFeeOne.Add("dosform_name", "");
+                        }
+
+                        else
+                        {
+                            jaFeeOne.Add("dosform_name", jaFeeDetail[i]["doseForm"]);
+                        }
+
+
+                        jaFeeOne.Add(" det_item_fee_sumamt", jaFeeDetail[i]["det_item_fee_sumamt"]);
+                        jaFeeOne.Add("cnt", jaFeeDetail[i]["cnt"]);
+                        jaFeeOne.Add("pric", jaFeeDetail[i]["pric"]);
+
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["sin_dos_dscr"].ToString()))
+                        {
+                            jaFeeOne.Add("sin_dos_dscr", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("sin_dos_dscr", jaFeeDetail[i]["sin_dos_dscr"]);
+                        }
+
+
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["used_frqu_dscr"].ToString()))
+                        {
+                            jaFeeOne.Add("used_frqu_dscr", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("used_frqu_dscr", jaFeeDetail[i]["used_frqu_dscr"]);
+                        }
+
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["prd_days"].ToString()))
+                        {
+                            jaFeeOne.Add("prd_days", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("prd_days", jaFeeDetail[i]["prd_days"]);
+                        }
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["medc_way_dscr"].ToString()))
+                        {
+                            jaFeeOne.Add("medc_way_dscr", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("medc_way_dscr", jaFeeDetail[i]["medc_way_dscr"]);
+                        }
+
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["bilg_dr_codg"].ToString()))
+                        {
+                            jaFeeOne.Add("bilg_dr_codg", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("bilg_dr_codg", jaFeeDetail[i]["bilg_dr_codg"]);
+                        }
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["bilg_dr_name"].ToString()))
+                        {
+                            jaFeeOne.Add("bilg_dr_name", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("bilg_dr_name", jaFeeDetail[i]["bilg_dr_name"]);
+                        }
+
+                        jaFeeOne.Add("phar_name", "");
+
+                        jaFeeOne.Add("phar_prac_cert_no", "");
+                        jaFeeOne.Add("tcmdrug_used_way", ""); //中药使用方式 1复方 2单方 必填
+                        jaFeeOne.Add("trdn_flag", "1");//拆零标志 必填 0否  1是
+                        jaFeeDetail.Add(jaFeeOne);
+                        jaFeeOne = new JObject();
+                    }
+                    MessageBox.Show("22222");
+                    joParam992001.Add("setlinfo", JObject.Parse(setlinfo));//结算信息节点
+                    joParam992004.Add("setlinfo", JObject.Parse(setlinfo1)); 
+                    joParam992004.Add("drugdetail", jaFeeDetail);//购药明细节点 
+                    //JObject OutJo = invoker.invokeCenterServiceJXC("992001", JObject.Parse(JsonHelper.setCenterInpar("992001", Jo992001)));
+                    //MessageBox.Show("上传返回:" + OutJo.ToString());
+                }
+                if (funno == "3506")
+                {
+                    string setl_id = joParam["selinfo"]["setl_id"].ToString();
+                    string sqlStr = "SELECT * FROM  BS_MedInsuSettlement WHERE billType = -1 ";
+                    sqlStr = sqlStr + " AND Hospital_Dr=" + Global.inf.hospitalDr + " AND Interface_Dr=" + Global.inf.interfaceDr;
+                    sqlStr = sqlStr + " AND SettlementID ='" + setl_id + "'";
+
+                    JObject joSql = new JObject();
+                    joSql.Add("sqlStr", sqlStr);
+                    JObject joSettlInfo = mIS.QuerySettlementInfo(joSql);
+                    //查询结算信息
+                    JObject Outpam = JObject.Parse(joSettlInfo["result"]["data"][0].ToString());
+                    string mdtrt_id = Outpam["MdtrtID"].ToString();//ADMID
+
+                    string sqlStr1 = "SELECT * FROM  BS_MedInsuSettlement WHERE billType = 1 ";
+                    sqlStr1 = sqlStr1 + " AND Hospital_Dr=" + Global.inf.hospitalDr + " AND Interface_Dr=" + Global.inf.interfaceDr;
+                    sqlStr1 = sqlStr1 + " AND MdtrtID ='" + mdtrt_id + "'";
+                    JObject joSql1 = new JObject();
+                    joSql1.Add("sqlStr1", sqlStr);
+                    JObject joSettlInfo1 = mIS.QuerySettlementInfo(joSql1);
+                    JObject Outpam1= JObject.Parse(joSettlInfo1["result"]["data"][0].ToString());
+
+
+                    dynamic setlinfo = new JObject();//结算信息节点                    
+                    setlinfo.setl_id = Outpam["SettlementID"];//结算ID
+                    setlinfo.init_setl_id = Outpam1["SettlementID"]; ;//结算ID
+                    setlinfo.setl_time = Outpam["SettlementTime"];//结算时间
+                    setlinfo.mdtrt_id = Outpam["MdtrtID"];//就诊ID
+                    setlinfo.psn_no = Outpam["PersonnelNO"];//人员编号
+                    setlinfo.exp_content = "";//人员姓名
+
+                    dynamic setlinfo1 = new JObject();//结算信息节点
+                    setlinfo1.setl_id = Outpam["SettlementID"];//结算ID
+
+                    joParam992002.Add("data", JObject.Parse(setlinfo));//结算信息节点
+
+
+                    string AdmID = Outpam["AdmID"].ToString();
+                    string billID = Outpam["BillID"].ToString();
+                    string recordID = Outpam["RecordID"].ToString();
+                    Global.pat.adm_Dr = int.Parse(AdmID);
+                    Global.pat.billID = billID;
+                    Global.pat.recordID = recordID;
+                    string outParam = "";
+                    //获取IS费用
+                    if (hIS.getHisFee(Global.pat, out outParam) != 0)
+                    {
+                        MessageBox.Show("获取HIS费用失败");
+                    }
+                    //调用医保平台转换HIS费用(转换医保编码等)
+                    JObject joHisFee = JObject.Parse(outParam);
+
+                    if (mIS.convertHisFeeWithInsuCode(joHisFee, out outParam) != 0)
+                    {
+                        MessageBox.Show("获取HIS费用医保对照关系失败");
+                    }
+                    JArray jaFeeDetail = JArray.Parse(JsonHelper.getDestValue(JObject.Parse(outParam), "data"));
+
+                    JObject jaFeeOne = new JObject();
+                    for (int i = 0; i < jaFeeDetail.Count; i++)
+                    {
+                        jaFeeOne.Add("feedetl_sn", jaFeeDetail[i]["feedetl_sn"]);//费用明细流水号
+                        jaFeeOne.Add("rxno", "");//处方号
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["rx_circ_flag"].ToString()))
+                        {
+                            jaFeeOne.Add("rx_circ_flag", "");//外购处方标志
+                        }else {
+                            jaFeeOne.Add("rx_circ_flag", jaFeeDetail[i]["rx_circ_flag"]);//外购处方标志
+                        }
+                        jaFeeOne.Add("fee_ocur_time", jaFeeDetail[i]["fee_ocur_time"]);
+                        jaFeeOne.Add("med_list_codg", jaFeeDetail[i]["med_list_codg"]);
+
+                        jaFeeOne.Add("medins_list_codg", jaFeeDetail[i]["medins_list_codg"]);
+                        jaFeeOne.Add("medins_list_name", jaFeeDetail[i]["medins_list_desc"]);
+
+                        jaFeeOne.Add("prodname", jaFeeDetail[i]["medins_list_desc"]);
+                        
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["spec"].ToString()))
+                        {
+                            jaFeeOne.Add("spec", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("spec", jaFeeDetail[i]["spec"]);
+                        }
+
+                      
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["doseForm"].ToString()))
+                        {
+                            jaFeeOne.Add("dosform_name", "");
+                        }
+                        
+                        else
+                        {
+                            jaFeeOne.Add("dosform_name", jaFeeDetail[i]["doseForm"]);
+                        }
+                        
+
+                        jaFeeOne.Add(" det_item_fee_sumamt", jaFeeDetail[i]["det_item_fee_sumamt"]);
+                        jaFeeOne.Add("cnt", jaFeeDetail[i]["cnt"]);
+                        jaFeeOne.Add("pric", jaFeeDetail[i]["pric"]);
+
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["sin_dos_dscr"].ToString()))
+                        {
+                            jaFeeOne.Add("sin_dos_dscr", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("sin_dos_dscr", jaFeeDetail[i]["sin_dos_dscr"]);
+                        }
+                       
+                        
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["used_frqu_dscr"].ToString()))
+                        {
+                            jaFeeOne.Add("used_frqu_dscr", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("used_frqu_dscr", jaFeeDetail[i]["used_frqu_dscr"]);
+                        }
+
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["prd_days"].ToString()))
+                        {
+                            jaFeeOne.Add("prd_days", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("prd_days", jaFeeDetail[i]["prd_days"]);
+                        }
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["medc_way_dscr"].ToString()))
+                        {
+                            jaFeeOne.Add("medc_way_dscr", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("medc_way_dscr", jaFeeDetail[i]["medc_way_dscr"]);
+                        }
+                        
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["bilg_dr_codg"].ToString()))
+                        {
+                            jaFeeOne.Add("bilg_dr_codg", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("bilg_dr_codg", jaFeeDetail[i]["bilg_dr_codg"]);
+                        }
+                        if (string.IsNullOrEmpty(jaFeeDetail[i]["bilg_dr_name"].ToString()))
+                        {
+                            jaFeeOne.Add("bilg_dr_name", "");
+                        }
+                        else
+                        {
+                            jaFeeOne.Add("bilg_dr_name", jaFeeDetail[i]["bilg_dr_name"]);
+                        }
+                       
+                        jaFeeOne.Add("phar_name", "");
+
+                        jaFeeOne.Add("phar_prac_cert_no", "");
+                        jaFeeOne.Add("tcmdrug_used_way", ""); //中药使用方式 1复方 2单方 必填
+                        jaFeeOne.Add("trdn_flag", "1");//拆零标志 必填 0否  1是
+                        jaFeeDetail.Add(jaFeeOne);
+                        jaFeeOne = new JObject();
+                    }
+
+                    joParam992004.Add("setlinfo", JObject.Parse(setlinfo1));
+                    joParam992004.Add("drugdetail", jaFeeDetail);//购药明细节点 
+                }
+
+                return 0;
+            }
+            catch (Exception ex)
+            {
+                errMsg = "parsejoParam 解析入参异常2:" + errMsg;
+                return -1;
+            }
+
+        }
 
     }
 }

+ 1 - 0
Variables/Struct.cs

@@ -39,6 +39,7 @@ namespace PTMedicalInsurance.Variables
         public string hospitalNO;
         public string centerURL;
         public string presCenterURL;
+        public string InvCenterURL;//武汉市进销存http调用地址
         public string cardURL;
         public string ecURL;
         public string areaCode;

+ 13 - 9
app.config

@@ -1,22 +1,26 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
 		
-		<probing prvatePath="bin/service/plugins/INSUNew"/>
+		<probing prvatePath="bin/service/plugins/INSUNew" />
 		
       <dependentAssembly>
-        <assemblyIdentity name="SunnyUI.Common" publicKeyToken="5a271fb7ba597231" culture="neutral"/>
-        <bindingRedirect oldVersion="0.0.0.0-3.3.2.0" newVersion="3.3.2.0"/>
+        <assemblyIdentity name="SunnyUI.Common" publicKeyToken="5a271fb7ba597231" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-3.3.2.0" newVersion="3.3.2.0" />
       </dependentAssembly>
       <dependentAssembly>
-        <assemblyIdentity name="FastReport.Bars" publicKeyToken="db7e5ce63278458c" culture="neutral"/>
-        <bindingRedirect oldVersion="0.0.0.0-2021.3.0.0" newVersion="2021.3.0.0"/>
+        <assemblyIdentity name="FastReport.Bars" publicKeyToken="db7e5ce63278458c" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-2021.3.0.0" newVersion="2021.3.0.0" />
       </dependentAssembly>
       <dependentAssembly>
-        <assemblyIdentity name="FastReport.Editor" publicKeyToken="db7e5ce63278458c" culture="neutral"/>
-        <bindingRedirect oldVersion="0.0.0.0-2021.3.0.0" newVersion="2021.3.0.0"/>
+        <assemblyIdentity name="FastReport.Editor" publicKeyToken="db7e5ce63278458c" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-2021.3.0.0" newVersion="2021.3.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
       </dependentAssembly>
     </assemblyBinding>
   </runtime>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration>

+ 8 - 0
packages.config

@@ -1,10 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
   <package id="Datatable.Activities.UiPath" version="1.0.1" targetFramework="net45" />
+  <package id="EPPlus.Interfaces" version="6.1.1" targetFramework="net472" />
+  <package id="EPPlus.System.Drawing" version="6.1.1" targetFramework="net472" />
+  <package id="Microsoft.IO.RecyclableMemoryStream" version="3.0.1" targetFramework="net472" />
   <package id="Microsoft.Office.Excel" version="14.0.4760.1000" targetFramework="net45" />
   <package id="Microsoft.Office.Interop.Excel" version="15.0.4795.1001" targetFramework="net45" />
   <package id="Newtonsoft.Json" version="12.0.1" targetFramework="net45" />
   <package id="Portable.BouncyCastle" version="1.9.0" targetFramework="net48" />
   <package id="SunnyUI" version="3.1.5" targetFramework="net48" />
   <package id="SunnyUI.Common" version="3.1.2" targetFramework="net48" />
+  <package id="System.Buffers" version="4.5.1" targetFramework="net472" />
+  <package id="System.ComponentModel.Annotations" version="5.0.0" targetFramework="net472" />
+  <package id="System.Memory" version="4.5.5" targetFramework="net472" />
+  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
 </packages>

Some files were not shown because too many files changed in this diff