Procházet zdrojové kódy

1.增加追溯码应传数量2207 2304

zzz před 5 dny
rodič
revize
f7baae320c

+ 7 - 2
Business/HisMainBusiness.cs

@@ -1130,7 +1130,8 @@ namespace PTMedicalInsurance.Business
                     joDataExp.Add("cla_trt_flag", "");
 
                     joSetlInpar.Add("exp_content", Global.pat.ExpContent); //11111
-
+                    joSetlInpar.Add("minpacunt_drug_trac_cnt", Global.Set.minpacunt_drug_trac_cnt);//mcs_trac_cnt
+                    joSetlInpar.Add("mcs_trac_cnt", Global.Set.mcs_trac_cnt);//应传耗材追溯码结算数量
                     JObject joOut = new JObject();
                     joOut.Add("DischargeRegister", joRegInpar);
                     joOut.Add("Settlement", joSetlInpar);
@@ -1301,6 +1302,7 @@ namespace PTMedicalInsurance.Business
                     joMdtrtinfo.Add("geso_val", JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.geso_val"));            //孕周数
                     joMdtrtinfo.Add("exp_content", "");          //字段扩展
 
+
                     //组织结算入参
                     JObject joSetlInpar = new JObject();
                     joSetlInpar.Add("psn_no", Global.pat.psn_no);
@@ -1315,6 +1317,8 @@ namespace PTMedicalInsurance.Business
                     joSetlInpar.Add("insutype", frmReg.insuType);//险种类型
                     joSetlInpar.Add("pub_hosp_rfom_flag", "");
                     joSetlInpar.Add("exp_content", Global.pat.ExpContent);
+                    joSetlInpar.Add("minpacunt_drug_trac_cnt", Global.Set.minpacunt_drug_trac_cnt);//mcs_trac_cnt
+                    joSetlInpar.Add("mcs_trac_cnt", Global.Set.mcs_trac_cnt);//应传耗材追溯码结算数量
 
 
                     joReg.Add("mdtrtinfo", joMdtrtinfo);
@@ -2116,7 +2120,7 @@ namespace PTMedicalInsurance.Business
                 //JObject jo9001Rtn = new JObject();
                 //cBus.signIn(out jo9001Rtn);
                 //1.门诊挂号 2.门诊收费登记 3.住院登记 4.住院收费登记 5.住院执行医嘱 6.门诊结算 7.门诊预结算 8.住院结算 9.住院预结算 10.购药划卡
-                if (trig_scen == "2")
+                if (trig_scen == "100")
                 {
                     outparam = inparam;
                 }
@@ -2134,6 +2138,7 @@ namespace PTMedicalInsurance.Business
                 {
                     return -1;
                 }
+         
                 JObject joInput = preAnalysis.Get3101Inpar(trig_scen, Global.pat);
                 JObject joRtn = new JObject();
                 if (trig_scen == "1" || trig_scen == "2" || trig_scen == "3" || trig_scen == "4" || trig_scen == "5")

+ 1 - 0
Business/IrisServices.cs

@@ -78,6 +78,7 @@ namespace PTMedicalInsurance.Business
                 dynamic joTmp = new JObject();
                 joTmp.admID = Global.pat.adm_Dr;
                 JObject joRtn = invoker.invokeHISService(JsonHelper.setIrisInpar("05110021", joTmp).ToString(), "获取HIS患者基本信息");
+               
                 if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
                 {
                     errMsg = "获取HIS患者基本信息失败,请联系管理员!" + errMsg;

+ 2 - 2
Business/PreAndInProcessAnalysis.cs

@@ -56,8 +56,8 @@ namespace PTMedicalInsurance.Business
                 Global.pat.name = JsonHelper.getDestValue(jo, "result.patName");
                 Global.pat.brdy = JsonHelper.getDestValue(jo, "result.patBirthdate");
                 Global.pat.gend = JsonHelper.getDestValue(jo, "result.patSex");
-                Global.pat.age = JsonHelper.getDestValue(jo, "result.Age");
-                Global.pat.naty = JsonHelper.getDestValue(jo, "result.naty");
+                Global.pat.age = JsonHelper.getDestValue(jo, "result.age");
+                Global.pat.naty = JsonHelper.getDestValue(jo, "result.nation");
                 Global.pat.certNO = JsonHelper.getDestValue(jo, "result.credNo");
                 Global.pat.certType = JsonHelper.getDestValue(jo, "result.credCode");
                 return 0;

+ 12 - 2
Forms/HandleException.cs

@@ -317,11 +317,21 @@ namespace PTMedicalInsurance.Forms
             if (Chk_DealNo.Checked)
             {
                 //joRtn = invoker.invokeCenterService(tb_DealNo.Text, JsonHelper.setCenterInpar(tb_DealNo.Text, rtbInparam.Text));
-                string[] strArr = { "3501", "3502", "3503", "3504", "3505", "3506", "3507" };
+                string[] strArr = { "3501", "3502", "3503", "3504", "3505", "3506", "3507" , "992002", "992003", "992004", "991006", "991007", "991008", "991009", "991005", "991010", "991011", "I2002" };
                 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)));
+                    if(tb_DealNo.Text == "I2002")
+                    {
+
+                    }
+                    else
+                    {
+                        joRtn = invoker.invokeCenterServiceJXC(tb_DealNo.Text, JObject.Parse(JsonHelper.setCenterInpar(tb_DealNo.Text, rtbInparam.Text)));
+                        //joRtn = invoker.invokeCenterServiceJXC2(tb_DealNo.Text, JObject.Parse(JsonHelper.setCenterInpar(tb_DealNo.Text, rtbInparam.Text)));
+                    }
+                       
+
 
                 }
                 else

+ 168 - 136
Forms/HandleException.designer.cs

@@ -28,26 +28,26 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle46 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle47 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle49 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle50 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle 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 dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+            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 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();
             this.tcReverse = new Sunny.UI.UITabControl();
             this.tpSettlReverse = new System.Windows.Forms.TabPage();
             this.panel2 = new System.Windows.Forms.Panel();
@@ -131,6 +131,8 @@
             this.dtSignEnd = new Sunny.UI.UIDatetimePicker();
             this.dtSignBegin = new Sunny.UI.UIDatetimePicker();
             this.dgvSignQuery = new Sunny.UI.UIDataGridView();
+            this.ChkJXC = new Sunny.UI.UICheckBox();
+            this.ChkFZJK = new Sunny.UI.UICheckBox();
             this.tcReverse.SuspendLayout();
             this.tpSettlReverse.SuspendLayout();
             this.panel2.SuspendLayout();
@@ -214,44 +216,44 @@
             // 
             this.dgvSettlRecord.AllowUserToAddRows = false;
             this.dgvSettlRecord.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle41.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvSettlRecord.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle41;
+            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;
-            dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle42.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle42.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle42.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle42.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle42.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvSettlRecord.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle42;
+            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;
-            dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle43.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle43.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle43.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle43.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle43.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvSettlRecord.DefaultCellStyle = dataGridViewCellStyle43;
+            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";
-            dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle44.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle44.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle44.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle44.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle44.SelectionForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvSettlRecord.RowHeadersDefaultCellStyle = dataGridViewCellStyle44;
-            dataGridViewCellStyle45.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle45.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvSettlRecord.RowsDefaultCellStyle = dataGridViewCellStyle45;
+            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(1321, 421);
@@ -543,44 +545,44 @@
             // 
             this.dgvLog.AllowUserToAddRows = false;
             this.dgvLog.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle46.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvLog.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle46;
+            dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvLog.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
             this.dgvLog.BackgroundColor = System.Drawing.Color.White;
             this.dgvLog.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle47.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle47.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle47.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle47.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle47.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle47.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle47.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle47;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvLog.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
             this.dgvLog.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle48.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle48.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle48.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle48.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle48.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle48.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle48.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvLog.DefaultCellStyle = dataGridViewCellStyle48;
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvLog.DefaultCellStyle = dataGridViewCellStyle8;
             this.dgvLog.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvLog.EnableHeadersVisualStyles = false;
             this.dgvLog.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dgvLog.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
             this.dgvLog.Location = new System.Drawing.Point(0, 0);
             this.dgvLog.Name = "dgvLog";
-            dataGridViewCellStyle49.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle49.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle49.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle49.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle49.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle49.SelectionForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle49.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle49;
-            dataGridViewCellStyle50.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle50.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvLog.RowsDefaultCellStyle = dataGridViewCellStyle50;
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvLog.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
+            dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvLog.RowsDefaultCellStyle = dataGridViewCellStyle10;
             this.dgvLog.RowTemplate.Height = 23;
             this.dgvLog.SelectedIndex = -1;
             this.dgvLog.Size = new System.Drawing.Size(1321, 416);
@@ -951,6 +953,8 @@
             // 
             // uiPanel4
             // 
+            this.uiPanel4.Controls.Add(this.ChkFZJK);
+            this.uiPanel4.Controls.Add(this.ChkJXC);
             this.uiPanel4.Controls.Add(this.tb_DealNo);
             this.uiPanel4.Controls.Add(this.Chk_DealNo);
             this.uiPanel4.Controls.Add(this.uiButton2);
@@ -1101,44 +1105,44 @@
             // 
             this.dgvOutPatReg.AllowUserToAddRows = false;
             this.dgvOutPatReg.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle51.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvOutPatReg.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle51;
+            dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvOutPatReg.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
             this.dgvOutPatReg.BackgroundColor = System.Drawing.Color.White;
             this.dgvOutPatReg.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.SystemColors.Highlight;
-            dataGridViewCellStyle52.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle52.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvOutPatReg.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle52;
+            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.dgvOutPatReg.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
             this.dgvOutPatReg.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle53.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle53.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle53.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle53.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle53.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle53.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle53.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvOutPatReg.DefaultCellStyle = dataGridViewCellStyle53;
+            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.dgvOutPatReg.DefaultCellStyle = dataGridViewCellStyle13;
             this.dgvOutPatReg.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvOutPatReg.EnableHeadersVisualStyles = false;
             this.dgvOutPatReg.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dgvOutPatReg.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
             this.dgvOutPatReg.Location = new System.Drawing.Point(0, 0);
             this.dgvOutPatReg.Name = "dgvOutPatReg";
-            dataGridViewCellStyle54.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle54.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((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.White;
-            dataGridViewCellStyle54.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvOutPatReg.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)));
-            this.dgvOutPatReg.RowsDefaultCellStyle = dataGridViewCellStyle55;
+            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.dgvOutPatReg.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.dgvOutPatReg.RowsDefaultCellStyle = dataGridViewCellStyle15;
             this.dgvOutPatReg.RowTemplate.Height = 23;
             this.dgvOutPatReg.SelectedIndex = -1;
             this.dgvOutPatReg.Size = new System.Drawing.Size(1321, 421);
@@ -1576,44 +1580,44 @@
             // 
             // dgvSignQuery
             // 
-            dataGridViewCellStyle56.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvSignQuery.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle56;
+            dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvSignQuery.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16;
             this.dgvSignQuery.BackgroundColor = System.Drawing.Color.White;
             this.dgvSignQuery.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.dgvSignQuery.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle57;
+            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.SystemColors.Highlight;
+            dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvSignQuery.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17;
             this.dgvSignQuery.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.dgvSignQuery.DefaultCellStyle = dataGridViewCellStyle58;
+            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle18.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvSignQuery.DefaultCellStyle = dataGridViewCellStyle18;
             this.dgvSignQuery.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvSignQuery.EnableHeadersVisualStyles = false;
             this.dgvSignQuery.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dgvSignQuery.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
             this.dgvSignQuery.Location = new System.Drawing.Point(0, 0);
             this.dgvSignQuery.Name = "dgvSignQuery";
-            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.dgvSignQuery.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.dgvSignQuery.RowsDefaultCellStyle = dataGridViewCellStyle60;
+            dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((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.White;
+            dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvSignQuery.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)));
+            this.dgvSignQuery.RowsDefaultCellStyle = dataGridViewCellStyle20;
             this.dgvSignQuery.RowTemplate.Height = 23;
             this.dgvSignQuery.SelectedIndex = -1;
             this.dgvSignQuery.Size = new System.Drawing.Size(1321, 580);
@@ -1621,6 +1625,32 @@
             this.dgvSignQuery.TabIndex = 0;
             this.dgvSignQuery.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
+            // ChkJXC
+            // 
+            this.ChkJXC.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ChkJXC.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChkJXC.Location = new System.Drawing.Point(520, 47);
+            this.ChkJXC.MinimumSize = new System.Drawing.Size(1, 1);
+            this.ChkJXC.Name = "ChkJXC";
+            this.ChkJXC.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0);
+            this.ChkJXC.Size = new System.Drawing.Size(154, 37);
+            this.ChkJXC.TabIndex = 33;
+            this.ChkJXC.Text = "市医保进销存";
+            this.ChkJXC.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // ChkFZJK
+            // 
+            this.ChkFZJK.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ChkFZJK.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChkFZJK.Location = new System.Drawing.Point(680, 55);
+            this.ChkFZJK.MinimumSize = new System.Drawing.Size(1, 1);
+            this.ChkFZJK.Name = "ChkFZJK";
+            this.ChkFZJK.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0);
+            this.ChkFZJK.Size = new System.Drawing.Size(150, 29);
+            this.ChkFZJK.TabIndex = 34;
+            this.ChkFZJK.Text = "追溯辅助-市";
+            this.ChkFZJK.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
             // HandleException
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1754,5 +1784,7 @@
         private Sunny.UI.UIButton uiButton2;
         private Sunny.UI.UITextBox tb_DealNo;
         private Sunny.UI.UICheckBox Chk_DealNo;
+        private Sunny.UI.UICheckBox ChkFZJK;
+        private Sunny.UI.UICheckBox ChkJXC;
     }
 }

+ 1 - 0
Forms/PrescriptionCirculation.cs

@@ -1159,6 +1159,7 @@ namespace PTMedicalInsurance.Forms
             jo.Add("data", joData);
 
             JObject joRtn7106 = invoker.invokeCenterService("7106", JsonHelper.setCenterInpar("7106", jo));
+            JObject joRtn7107 = invoker.invokeCenterService("7107", JsonHelper.setCenterInpar("7107", jo));
 
             //JObject joRtn7106 = invoker.invokeCenterServicePresCir("7106", JsonHelper.setCenterInparPresCirNew(joData));
             if (JsonHelper.parseCenterRtnValue(joRtn7106, out OutPut) != 0)

+ 447 - 111
Forms/SettlementChecklist.cs

@@ -24,10 +24,11 @@ using Sunny.UI;
 using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;
 using System.Drawing.Drawing2D;
 using FastReport.Editor;
+using PTMedicalInsurance.Entity;
 
 namespace PTMedicalInsurance.Forms
 {
-    
+
     public partial class SettlementChecklist : Form
     {
         private int hospitalDr;
@@ -60,9 +61,9 @@ namespace PTMedicalInsurance.Forms
             hospitalDr = Global.inf.hospitalDr;
             hospitalNO = Global.inf.hospitalNO;
             hospitalName = Global.inf.hospitalName;
-            hospitalAreaCode = Global.inf.areaCode;            
+            hospitalAreaCode = Global.inf.areaCode;
 
-            if (joParam == null) return;            
+            if (joParam == null) return;
 
             string setl_id = JsonHelper.getDestValue(joParam, "setl_id");
             if (setl_id == "")
@@ -124,7 +125,7 @@ namespace PTMedicalInsurance.Forms
 
         private void btnQuery_Click_1(object sender, EventArgs e)
         {
-            string sqlStr = " SELECT * FROM  BS_MedInsuSettlement WHERE Hospital_Dr=" + hospitalDr ;
+            string sqlStr = " SELECT * FROM  BS_MedInsuSettlement WHERE Hospital_Dr=" + hospitalDr;
             sqlStr = sqlStr + " and OccurTime>'" + dpST.Text + "'";
             sqlStr = sqlStr + " and OccurTime<'" + dpED.Text + "'";
             if (tbName.Text != "")
@@ -385,7 +386,7 @@ namespace PTMedicalInsurance.Forms
             }
         }
 
-        public JObject GetFastReportParams(string designFlag, string admID, string MdtrtID, string settlementID, string validFlag,string BillType)
+        public JObject GetFastReportParams(string designFlag, string admID, string MdtrtID, string settlementID, string validFlag, string BillType)
         {
             try
             {
@@ -402,7 +403,7 @@ namespace PTMedicalInsurance.Forms
                 joSettel.Add("MdtrtID", MdtrtID);
 
                 JObject joRtnSettle = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010066", joSettel).ToString(), "获取结算单信息");
-               
+
 
                 if (JsonHelper.parseIrisRtnValue(joRtnSettle, out string errMsg) != 0)
                 {
@@ -588,7 +589,8 @@ namespace PTMedicalInsurance.Forms
                 if (Global.pat.admType == 1)
                 {
                     joParams.Add("fastReportCode", "SP14"); //这个要从表取值 
-                }else
+                }
+                else
                 {
                     joParams.Add("fastReportCode", "SP11"); //湖北普瑞门诊结算单撤销结算单从SP14打印
                 }
@@ -680,11 +682,11 @@ namespace PTMedicalInsurance.Forms
 
         public void btnPrint_Click(object sender, EventArgs e)
         {
-           
+
             string errorMsg;
             int iHis = dgvSettlRecord.CurrentRow.Index;
             String BType = dgvSettlRecord.Rows[iHis].Cells["BillType"].Value.ToString();
-            Global.pat.admType =int.Parse(dgvSettlRecord.Rows[iHis].Cells["admType"].Value.ToString());                
+            Global.pat.admType = int.Parse(dgvSettlRecord.Rows[iHis].Cells["admType"].Value.ToString());
 
 
             JObject joData = new JObject();
@@ -695,15 +697,16 @@ namespace PTMedicalInsurance.Forms
             JObject joInput = new JObject();
             joInput.Add("data", joData);
             Global.pat.insuplc_admdvs = dgvSettlRecord.Rows[iHis].Cells["insuplc_admdvs"].Value.ToString();//更新参保地
-            if (BType == "1") {
+            if (BType == "1")
+            {
                 #region【调用医保交易YH03打印】
                 InvokeHelper invoker = new InvokeHelper();
                 JObject joRtn = invoker.invokeCenterService("YH03", JsonHelper.setCenterInpar("YH03", joInput));
-              if (JsonHelper.parseCenterRtnValue(joRtn, out errorMsg) != 0)
-               {
-                MessageBox.Show("打印失败:" + errorMsg);
-                return;
-               }
+                if (JsonHelper.parseCenterRtnValue(joRtn, out errorMsg) != 0)
+                {
+                    MessageBox.Show("打印失败:" + errorMsg);
+                    return;
+                }
                 #endregion
             }
             else if (BType == "-1")
@@ -722,7 +725,7 @@ namespace PTMedicalInsurance.Forms
                     Global.writeLog("结算单打印异常:" + ex.Message);
                     MessageBox.Show("打印异常:" + ex.Message);
                 }
-                
+
                 #endregion
             }
 
@@ -751,7 +754,7 @@ namespace PTMedicalInsurance.Forms
                 MessageBox.Show("请先查询结算数据!");
                 return;
             }
-           
+
             try
             {
                 int i = dgvSettlRecord.CurrentRow.Index;
@@ -792,8 +795,8 @@ namespace PTMedicalInsurance.Forms
         //市医保进销存992001结算信息上传
         private void JXCJSToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            
-          if (dgvSettlRecord.RowCount <= 0)
+
+            if (dgvSettlRecord.RowCount <= 0)
             {
                 MessageBox.Show("请先查询结算数据!");
                 return;
@@ -808,7 +811,7 @@ namespace PTMedicalInsurance.Forms
                 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 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);
@@ -819,6 +822,7 @@ namespace PTMedicalInsurance.Forms
                 if (BillType == "-1")
                 {
                     MessageBox.Show("请选择结算正记录!该记录为退费记录");
+                    return;
                 }
 
                 sqlStr = "SELECT * FROM  BS_MedInsuTransactionLog WHERE MSGID='" + msgid + "'";
@@ -834,59 +838,385 @@ namespace PTMedicalInsurance.Forms
                 //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.setl_id = Outlog["output"]["setlinfo"]["setl_id"];//结算ID
+                setlinfo.mdtrt_id = Outlog["output"]["setlinfo"]["mdtrt_id"];//就诊ID
+                setlinfo.psn_no = Outlog["output"]["setlinfo"]["psn_no"];//人员编号
+                setlinfo.psn_name = Outlog["output"]["setlinfo"]["psn_name"];//人员姓名
+                setlinfo.psn_cert_type = Outlog["output"]["setlinfo"]["psn_cert_type"];//凭证类型
+
+                setlinfo.certno = Outlog["output"]["setlinfo"]["certno"];//证件号码
+                setlinfo.gend = Outlog["output"]["setlinfo"]["gend"];//性别
+                setlinfo.naty = Outlog["output"]["setlinfo"]["naty"];//民族
+                setlinfo.brdy = Outlog["output"]["setlinfo"]["brdy"];//出生日期
+                setlinfo.age = Outlog["output"]["setlinfo"]["age"];//年龄
+
+                setlinfo.insutype = Outlog["output"]["setlinfo"]["insutype"];//险种类型
+                setlinfo.psn_type = Outlog["output"]["setlinfo"]["psn_type"];//人员类别
+                setlinfo.cvlserv_flag = Outlog["output"]["setlinfo"]["cvlserv_flag"];//公务员标志
+                setlinfo.setl_time = Outlog["output"]["setlinfo"]["setl_time"];//结算时间
+                setlinfo.mdtrt_cert_type = Outlog["output"]["setlinfo"]["mdtrt_cert_type"];//就诊凭证类型
+
+                setlinfo.med_type = Outlog["output"]["setlinfo"]["med_type"];//医疗类别
+                setlinfo.medfee_sumamt = Outlog["output"]["setlinfo"]["medfee_sumamt"];//医疗费总额
+                setlinfo.fulamt_ownpay_amt = Outlog["output"]["setlinfo"]["fulamt_ownpay_amt"];//全自费金额
+                setlinfo.overlmt_selfpay = Outlog["output"]["setlinfo"]["overlmt_selfpay"];//超限价自费费用
+                setlinfo.preselfpay_amt = Outlog["output"]["setlinfo"]["preselfpay_amt"];//先行自付金额
+
+                setlinfo.inscp_scp_amt = Outlog["output"]["setlinfo"]["inscp_scp_amt"];//符合政策范围金额
+                setlinfo.act_pay_dedc = Outlog["output"]["setlinfo"]["act_pay_dedc"];//实际支付起付线
+                setlinfo.hifp_pay = Outlog["output"]["setlinfo"]["hifp_pay"];//基本医疗保险统筹基金支出
+                setlinfo.pool_prop_selfpay = Outlog["output"]["setlinfo"]["pool_prop_selfpay"];//基本医疗保险统筹基金支付比例
+                setlinfo.cvlserv_pay = Outlog["output"]["setlinfo"]["cvlserv_pay"];//公务员医疗补助资金支出
+
+                setlinfo.hifes_pay = Outlog["output"]["setlinfo"]["hifes_pay"];//企业补充医疗保险基金支出
+                setlinfo.hifmi_pay = Outlog["output"]["setlinfo"]["hifmi_pay"];//居民大病保险资金支出
+                setlinfo.hifob_pay = Outlog["output"]["setlinfo"]["hifob_pay"];//职工大额医疗费用补助基金支出
+                setlinfo.maf_pay = Outlog["output"]["setlinfo"]["maf_pay"];//医疗救助基金支出
+                setlinfo.oth_pay = Outlog["output"]["setlinfo"]["oth_pay"];//结算ID
+
+                setlinfo.fund_pay_sumamt = Outlog["output"]["setlinfo"]["fund_pay_sumamt"];//基金支付总额
+                setlinfo.psn_part_amt = Outlog["output"]["setlinfo"]["psn_part_amt"];//个人负担总金额
+                setlinfo.acct_pay = Outlog["output"]["setlinfo"]["acct_pay"];//个人账户支出
+                setlinfo.psn_cash_pay = Outlog["output"]["setlinfo"]["psn_cash_pay"];//个人现金支出
+                setlinfo.balc = Outlog["output"]["setlinfo"]["balc"];//余额
+
+                setlinfo.acct_mulaid_pay = Outlog["output"]["setlinfo"]["acct_mulaid_pay"];//个人账户共济支付金额
+                setlinfo.medins_setl_id = Outlog["output"]["setlinfo"]["medins_setl_id"];//医药机构结算结算ID
+                setlinfo.clr_optins = Outlog["output"]["setlinfo"]["clr_optins"];//clr_optins
+                setlinfo.clr_way = Outlog["output"]["setlinfo"]["clr_way"];//clr_way
+                setlinfo.clr_type = Outlog["output"]["setlinfo"]["clr_type"];//clr_type
+
+               // setlinfo.exp_content = Outlog["output"]["setlinfo"]["exp_content"];//exp_content
+                setlinfo.exp_content = "";//exp_content
+                setlinfo.hosp_part_amt = Outlog["output"]["setlinfo"]["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();
+                MessageBox.Show("Outlog:" + Outlog.ToString());
+                MessageBox.Show("aaa:"+ setlinfo.ToString());
+                //Jo992001.Add("setlinfo",JObject.Parse(setlinfo));//结算信息节点
+                
+                Jo992001.Add("setlinfo", setlinfo);//结算信息节点
+                MessageBox.Show("bbb");
+                //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;
+            }
+        }
+
+        private void SYBJXCTFToolStripMenuItem_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["output"]["setlinfo"]["setl_id"];//结算ID
+                setlinfo.init_setl_id = "";//原结算ID
+                setlinfo.setl_time = Outlog["output"]["setlinfo"]["setl_time"];//结算退费时间
+                setlinfo.mdtrt_id = Outlog["output"]["setlinfo"]["mdtrt_id"];//就诊ID
+                setlinfo.psn_no = Outlog["output"]["setlinfo"]["psn_no"];//人员编号
+                setlinfo.exp_content = "";
+
+
+
+
+
+
+
+
+
+                string mdtrt_id = Outlog["mdtrt_id"].ToString();
+                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 MdtrtID ='" + mdtrt_id + "'";
+
+                JObject joSql = new JObject();
+                joSql.Add("sqlStr", sqlStr);
+                JObject joSettlInfo = mIS.QuerySettlementInfo(joSql);
+                //查询结算信息
+                JObject Outpam = JObject.Parse(joSettlInfo["result"]["data"][0].ToString());
+                setlinfo.init_setl_id = Outpam["SettlementID"];//ADMID
+
+                JObject joParam992002 = new JObject();
+                joParam992002.Add("data", setlinfo);//结算信息节点
+                JObject OutJo = invoker.invokeCenterServiceJXC("992002", JObject.Parse(JsonHelper.setCenterInpar("992002", joParam992002)));
+
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+                return;
+            }
+        }
+
+        private void FYMXToolStripMenuItem_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["output"]["setlinfo"]["setl_id"];//结算ID
+                //setlinfo.mdtrt_id = Outlog["output"]["setlinfo"]["mdtrt_id"];//就诊ID
+                //setlinfo.psn_no = Outlog["output"]["setlinfo"]["psn_no"];//人员编号
+                //setlinfo.psn_name = Outlog["output"]["setlinfo"]["psn_name"];//人员姓名
+                //setlinfo.psn_cert_type = Outlog["output"]["setlinfo"]["psn_cert_type"];//凭证类型
+
+                //setlinfo.certno = Outlog["output"]["setlinfo"]["certno"];//证件号码
+                //setlinfo.gend = Outlog["output"]["setlinfo"]["gend"];//性别
+                //setlinfo.naty = Outlog["output"]["setlinfo"]["naty"];//民族
+                //setlinfo.brdy = Outlog["output"]["setlinfo"]["brdy"];//出生日期
+                //setlinfo.age = Outlog["output"]["setlinfo"]["age"];//年龄
+
+                //setlinfo.insutype = Outlog["output"]["setlinfo"]["insutype"];//险种类型
+                //setlinfo.psn_type = Outlog["output"]["setlinfo"]["psn_type"];//人员类别
+                //setlinfo.cvlserv_flag = Outlog["output"]["setlinfo"]["cvlserv_flag"];//公务员标志
+                //setlinfo.setl_time = Outlog["output"]["setlinfo"]["setl_time"];//结算时间
+                //setlinfo.mdtrt_cert_type = Outlog["output"]["setlinfo"]["mdtrt_cert_type"];//就诊凭证类型
+
+                //setlinfo.med_type = Outlog["output"]["setlinfo"]["med_type"];//医疗类别
+                //setlinfo.medfee_sumamt = Outlog["output"]["setlinfo"]["medfee_sumamt"];//医疗费总额
+                //setlinfo.fulamt_ownpay_amt = Outlog["output"]["setlinfo"]["fulamt_ownpay_amt"];//全自费金额
+                //setlinfo.overlmt_selfpay = Outlog["output"]["setlinfo"]["overlmt_selfpay"];//超限价自费费用
+                //setlinfo.preselfpay_amt = Outlog["output"]["setlinfo"]["preselfpay_amt"];//先行自付金额
+
+                //setlinfo.inscp_scp_amt = Outlog["output"]["setlinfo"]["inscp_scp_amt"];//符合政策范围金额
+                //setlinfo.act_pay_dedc = Outlog["output"]["setlinfo"]["act_pay_dedc"];//实际支付起付线
+                //setlinfo.hifp_pay = Outlog["output"]["setlinfo"]["hifp_pay"];//基本医疗保险统筹基金支出
+                //setlinfo.pool_prop_selfpay = Outlog["output"]["setlinfo"]["pool_prop_selfpay"];//基本医疗保险统筹基金支付比例
+                //setlinfo.cvlserv_pay = Outlog["output"]["setlinfo"]["cvlserv_pay"];//公务员医疗补助资金支出
+
+                //setlinfo.hifes_pay = Outlog["output"]["setlinfo"]["hifes_pay"];//企业补充医疗保险基金支出
+                //setlinfo.hifmi_pay = Outlog["output"]["setlinfo"]["hifmi_pay"];//居民大病保险资金支出
+                //setlinfo.hifob_pay = Outlog["output"]["setlinfo"]["hifob_pay"];//职工大额医疗费用补助基金支出
+                //setlinfo.maf_pay = Outlog["output"]["setlinfo"]["maf_pay"];//医疗救助基金支出
+                //setlinfo.oth_pay = Outlog["output"]["setlinfo"]["oth_pay"];//结算ID
+
+                //setlinfo.fund_pay_sumamt = Outlog["output"]["setlinfo"]["fund_pay_sumamt"];//基金支付总额
+                //setlinfo.psn_part_amt = Outlog["output"]["setlinfo"]["psn_part_amt"];//个人负担总金额
+                //setlinfo.acct_pay = Outlog["output"]["setlinfo"]["acct_pay"];//个人账户支出
+                //setlinfo.psn_cash_pay = Outlog["output"]["setlinfo"]["psn_cash_pay"];//个人现金支出
+                //setlinfo.balc = Outlog["output"]["setlinfo"]["balc"];//余额
+
+                //setlinfo.acct_mulaid_pay = Outlog["output"]["setlinfo"]["acct_mulaid_pay"];//个人账户共济支付金额
+                //setlinfo.medins_setl_id = Outlog["output"]["setlinfo"]["medins_setl_id"];//医药机构结算结算ID
+                //setlinfo.clr_optins = Outlog["output"]["setlinfo"]["clr_optins"];//clr_optins
+                //setlinfo.clr_way = Outlog["output"]["setlinfo"]["clr_way"];//clr_way
+                //setlinfo.clr_type = Outlog["output"]["setlinfo"]["clr_type"];//clr_type
+
+                //// setlinfo.exp_content = Outlog["output"]["setlinfo"]["exp_content"];//exp_content
+                //setlinfo.exp_content = "";//exp_content
+                //setlinfo.hosp_part_amt = Outlog["output"]["setlinfo"]["hosp_part_amt"];//医院负担金额
+                //setlinfo.hifdm_pay = 0;//伤残人员医疗保障基金支出
+
+
 
                 string outParam = "";
                 //获取IS费用
@@ -902,122 +1232,128 @@ namespace PTMedicalInsurance.Forms
                     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++)
+                JArray jaFeeDetail1 = new JArray();
+;                JObject jaFeeOne = new JObject();
+                MessageBox.Show(jaFeeDetail.Count.ToString());
+                for (int k = 0; k < jaFeeDetail.Count; k++)
                 {
-                    jaFeeOne.Add("feedetl_sn", jaFeeDetail[i]["feedetl_sn"]);//费用明细流水号
+                    jaFeeOne.Add("feedetl_sn", jaFeeDetail[k]["feedetl_sn"]);//费用明细流水号
                     jaFeeOne.Add("rxno", "");//处方号
-                    if (string.IsNullOrEmpty(jaFeeDetail[i]["rx_circ_flag"].ToString()))
+                    if (string.IsNullOrEmpty(jaFeeDetail[k]["rx_circ_flag"].ToString()))
                     {
                         jaFeeOne.Add("rx_circ_flag", "");//外购处方标志
                     }
                     else
                     {
-                        jaFeeOne.Add("rx_circ_flag", jaFeeDetail[i]["rx_circ_flag"]);//外购处方标志
+                        jaFeeOne.Add("rx_circ_flag", jaFeeDetail[k]["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("fee_ocur_time", jaFeeDetail[k]["fee_ocur_time"]);
+                    jaFeeOne.Add("med_list_codg", jaFeeDetail[k]["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("medins_list_codg", jaFeeDetail[k]["medins_list_codg"]);
+                    jaFeeOne.Add("medins_list_name", jaFeeDetail[k]["medins_list_desc"]);
 
-                    jaFeeOne.Add("prodname", jaFeeDetail[i]["medins_list_desc"]);
+                    jaFeeOne.Add("prodname", jaFeeDetail[k]["medins_list_desc"]);
 
-                    if (string.IsNullOrEmpty(jaFeeDetail[i]["spec"].ToString()))
+                    if (string.IsNullOrEmpty(jaFeeDetail[k]["spec"].ToString()))
                     {
                         jaFeeOne.Add("spec", "");
                     }
                     else
                     {
-                        jaFeeOne.Add("spec", jaFeeDetail[i]["spec"]);
+                        jaFeeOne.Add("spec", jaFeeDetail[k]["spec"]);
                     }
 
 
-                    if (string.IsNullOrEmpty(jaFeeDetail[i]["doseForm"].ToString()))
+                    if (string.IsNullOrEmpty(jaFeeDetail[k]["doseForm"].ToString()))
                     {
                         jaFeeOne.Add("dosform_name", "");
                     }
 
                     else
                     {
-                        jaFeeOne.Add("dosform_name", jaFeeDetail[i]["doseForm"]);
+                        jaFeeOne.Add("dosform_name", jaFeeDetail[k]["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"]);
+                    jaFeeOne.Add("det_item_fee_sumamt", jaFeeDetail[k]["det_item_fee_sumamt"]);
+                    jaFeeOne.Add("cnt", jaFeeDetail[k]["cnt"]);
+                    jaFeeOne.Add("pric", jaFeeDetail[k]["pric"]);
 
-                    if (string.IsNullOrEmpty(jaFeeDetail[i]["sin_dos_dscr"].ToString()))
+                    if (string.IsNullOrEmpty(jaFeeDetail[k]["sin_dos_dscr"].ToString()))
                     {
                         jaFeeOne.Add("sin_dos_dscr", "");
                     }
                     else
                     {
-                        jaFeeOne.Add("sin_dos_dscr", jaFeeDetail[i]["sin_dos_dscr"]);
+                        jaFeeOne.Add("sin_dos_dscr", jaFeeDetail[k]["sin_dos_dscr"]);
                     }
 
 
-                    if (string.IsNullOrEmpty(jaFeeDetail[i]["used_frqu_dscr"].ToString()))
+                    if (string.IsNullOrEmpty(jaFeeDetail[k]["used_frqu_dscr"].ToString()))
                     {
                         jaFeeOne.Add("used_frqu_dscr", "");
                     }
                     else
                     {
-                        jaFeeOne.Add("used_frqu_dscr", jaFeeDetail[i]["used_frqu_dscr"]);
+                        jaFeeOne.Add("used_frqu_dscr", jaFeeDetail[k]["used_frqu_dscr"]);
                     }
 
-                    if (string.IsNullOrEmpty(jaFeeDetail[i]["prd_days"].ToString()))
+                    if (string.IsNullOrEmpty(jaFeeDetail[k]["prd_days"].ToString()))
                     {
                         jaFeeOne.Add("prd_days", "");
                     }
                     else
                     {
-                        jaFeeOne.Add("prd_days", jaFeeDetail[i]["prd_days"]);
+                        jaFeeOne.Add("prd_days", jaFeeDetail[k]["prd_days"]);
                     }
-                    MessageBox.Show("555");
-                    if (string.IsNullOrEmpty(jaFeeDetail[i]["medc_way_dscr"].ToString()))
+                    if (string.IsNullOrEmpty(jaFeeDetail[k]["medc_way_dscr"].ToString()))
                     {
                         jaFeeOne.Add("medc_way_dscr", "");
                     }
                     else
                     {
-                        jaFeeOne.Add("medc_way_dscr", jaFeeDetail[i]["medc_way_dscr"]);
+                        jaFeeOne.Add("medc_way_dscr", jaFeeDetail[k]["medc_way_dscr"]);
                     }
 
-                    if (string.IsNullOrEmpty(jaFeeDetail[i]["bilg_dr_codg"].ToString()))
+                    if (string.IsNullOrEmpty(jaFeeDetail[k]["bilg_dr_codg"].ToString()))
                     {
                         jaFeeOne.Add("bilg_dr_codg", "");
                     }
                     else
                     {
-                        jaFeeOne.Add("bilg_dr_codg", jaFeeDetail[i]["bilg_dr_codg"]);
+                        jaFeeOne.Add("bilg_dr_codg", jaFeeDetail[k]["bilg_dr_codg"]);
                     }
-                    if (string.IsNullOrEmpty(jaFeeDetail[i]["bilg_dr_name"].ToString()))
+                    if (string.IsNullOrEmpty(jaFeeDetail[k]["bilg_dr_name"].ToString()))
                     {
                         jaFeeOne.Add("bilg_dr_name", "");
                     }
                     else
                     {
-                        jaFeeOne.Add("bilg_dr_name", jaFeeDetail[i]["bilg_dr_name"]);
+                        jaFeeOne.Add("bilg_dr_name", jaFeeDetail[k]["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);
+                    jaFeeDetail1.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(jaFeeDetail1.ToString());
+                JObject Jo992004 = new JObject();
+               // JObject Jo992001 = new JObject();
+                MessageBox.Show("Outlog:" + Outlog.ToString());
+                MessageBox.Show("aaa:" + setlinfo.ToString());
+                //Jo992001.Add("setlinfo",JObject.Parse(setlinfo));//结算信息节点
+
+                Jo992004.Add("setlinfo", setlinfo);
+                Jo992004.Add("drugdetail", jaFeeDetail1);//结算信息节点
+                MessageBox.Show("bbb");
+                //Jo992001.Add("drugdetail", jaFeeDetail);//购药明细节点 
+                MessageBox.Show("上传开始:" + Jo992004.ToString());
+                JObject OutJo = invoker.invokeCenterServiceJXC("9920004", JObject.Parse(JsonHelper.setCenterInpar("992004", Jo992004)));
                 MessageBox.Show("上传返回:" + OutJo.ToString());
             }
             catch (Exception ex)
@@ -1026,7 +1362,7 @@ namespace PTMedicalInsurance.Forms
                 return;
             }
         }
- }
+    }
 
     // Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);
     public class Classification

+ 39 - 29
Forms/SettlementChecklist.designer.cs

@@ -33,9 +33,11 @@
             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();
+            this.JXCMenuStrip = new Sunny.UI.UIContextMenuStrip();
+            this.市医保进销存992001结算信息上传ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+            this.SYBJXCTFToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.pgSettlRecod = new Sunny.UI.UIPagination();
             this.uiPanel1 = new Sunny.UI.UIPanel();
             this.btnClose = new Sunny.UI.UIButton();
@@ -53,17 +55,14 @@
             this.gbDateTime = new Sunny.UI.UIGroupBox();
             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.FYMXToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvSettlRecord)).BeginInit();
+            this.JXCMenuStrip.SuspendLayout();
             this.uiPanel1.SuspendLayout();
             this.gbExactLocate.SuspendLayout();
             this.gbInterface.SuspendLayout();
             this.gbDateTime.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.report1)).BeginInit();
-            this.JXCMenuStrip.SuspendLayout();
             this.SuspendLayout();
             // 
             // panel1
@@ -127,6 +126,32 @@
             this.dgvSettlRecord.TabIndex = 3;
             this.dgvSettlRecord.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
+            // 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.SYBJXCTFToolStripMenuItem,
+            this.FYMXToolStripMenuItem});
+            this.JXCMenuStrip.Name = "JXCMenuStrip";
+            this.JXCMenuStrip.Size = new System.Drawing.Size(359, 104);
+            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(358, 26);
+            this.市医保进销存992001结算信息上传ToolStripMenuItem.Text = "市医保进销存992001结算信息上传";
+            this.市医保进销存992001结算信息上传ToolStripMenuItem.Click += new System.EventHandler(this.JXCJSToolStripMenuItem_Click);
+            // 
+            // SYBJXCTFToolStripMenuItem
+            // 
+            this.SYBJXCTFToolStripMenuItem.Name = "SYBJXCTFToolStripMenuItem";
+            this.SYBJXCTFToolStripMenuItem.Size = new System.Drawing.Size(358, 26);
+            this.SYBJXCTFToolStripMenuItem.Text = "市医保进销存992002结算退费信息上传";
+            this.SYBJXCTFToolStripMenuItem.Click += new System.EventHandler(this.SYBJXCTFToolStripMenuItem_Click);
+            // 
             // pgSettlRecod
             // 
             this.pgSettlRecod.Dock = System.Windows.Forms.DockStyle.Bottom;
@@ -417,28 +442,12 @@
             this.dpST.Value = new System.DateTime(2022, 5, 22, 14, 3, 13, 266);
             this.dpST.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            // report1
+            // FYMXToolStripMenuItem
             // 
-            this.report1.NeedRefresh = false;
-            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);
+            this.FYMXToolStripMenuItem.Name = "FYMXToolStripMenuItem";
+            this.FYMXToolStripMenuItem.Size = new System.Drawing.Size(358, 26);
+            this.FYMXToolStripMenuItem.Text = "市医保进销存992004费用明细上传";
+            this.FYMXToolStripMenuItem.Click += new System.EventHandler(this.FYMXToolStripMenuItem_Click);
             // 
             // SettlementChecklist
             // 
@@ -452,12 +461,11 @@
             this.Load += new System.EventHandler(this.SettlementChecklist_Load);
             this.panel1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.dgvSettlRecord)).EndInit();
+            this.JXCMenuStrip.ResumeLayout(false);
             this.uiPanel1.ResumeLayout(false);
             this.gbExactLocate.ResumeLayout(false);
             this.gbInterface.ResumeLayout(false);
             this.gbDateTime.ResumeLayout(false);
-            ((System.ComponentModel.ISupportInitialize)(this.report1)).EndInit();
-            this.JXCMenuStrip.ResumeLayout(false);
             this.ResumeLayout(false);
 
         }
@@ -486,5 +494,7 @@
         private Sunny.UI.UIButton btnDesign;
         private Sunny.UI.UIContextMenuStrip JXCMenuStrip;
         private System.Windows.Forms.ToolStripMenuItem 市医保进销存992001结算信息上传ToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem SYBJXCTFToolStripMenuItem;
+        private System.Windows.Forms.ToolStripMenuItem FYMXToolStripMenuItem;
     }
 }

+ 0 - 10
Forms/SettlementChecklist.resx

@@ -120,14 +120,4 @@
   <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="10/23/2024 16:18:42" ReportInfo.CreatorVersion="2023.1.8.0"&gt;
-  &lt;Dictionary/&gt;
-&lt;/Report&gt;
-</value>
-  </data>
 </root>

+ 50 - 0
Helper/InvokeHelper.cs

@@ -793,6 +793,56 @@ namespace PTMedicalInsurance.Helper
             }
         }
 
+        public JObject invokeCenterServiceJXC2(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";
+                //}
+                Global.writeLog("市医保进销存地址" + Global.curEvt.URL);
+                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>

+ 28 - 9
Helper/JsonHelper.cs

@@ -590,7 +590,7 @@ namespace PTMedicalInsurance.Helper
         /// <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) //武汉普瑞
             {
@@ -616,7 +616,7 @@ namespace PTMedicalInsurance.Helper
                 Global.inf.publicKey = "BBtYV5vKGOUfDttRGLRnBjisZF6bKQltHLhwn/9eb1SxHuW74RiyFJmDEULvjunYiM9R9k7VafxggFNpgZaZVW4=";
                
             }
-           
+
              #endregion
                 #region【测试环境】
             else if (Global.inf.interfaceDr == 43) //湖北普瑞测试环境
@@ -627,17 +627,20 @@ namespace PTMedicalInsurance.Helper
                 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;
@@ -654,18 +657,18 @@ namespace PTMedicalInsurance.Helper
             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);
@@ -697,6 +700,7 @@ namespace PTMedicalInsurance.Helper
         /// <returns></returns>
         public static string insDecryptInventory(JObject data)
         {
+           
             #region【正式环境】
             if (Global.inf.interfaceDr == 13) //武汉普瑞
             {
@@ -721,7 +725,22 @@ namespace PTMedicalInsurance.Helper
                 Global.inf.publicKey = "BBtYV5vKGOUfDttRGLRnBjisZF6bKQltHLhwn/9eb1SxHuW74RiyFJmDEULvjunYiM9R9k7VafxggFNpgZaZVW4=";
             }
 
-            Global.inf.InvCenterURL = "http://prod.xxhgl.whsybj.cn/mrss-data/api/uts/callService";
+            #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=";
+  
+            }
+
+           
 
             #endregion
 

+ 7 - 2
InsuBusiness.cs

@@ -712,6 +712,8 @@ namespace PTMedicalInsurance
                     case "M5"://门诊结算
                         {
                             Global.pat.admType = 1;
+                            Global.Set.minpacunt_drug_trac_cnt = JsonHelper.getDestValue(joInParam, "insuAdmObj.minpacunt_drug_trac_cnt");//应传药品追溯码结算数量
+                            Global.Set.mcs_trac_cnt = JsonHelper.getDestValue(joInParam, "insuAdmObj.mcs_trac_cnt");//应传耗材追溯码结算数量
                             string patInfo ="";
                             //打开读卡窗口,操作员选择读卡类型后进行读卡器读卡,再进行1101获取参保信息
                             if (hBus.readCard(out outParam) != 0)
@@ -1222,6 +1224,8 @@ namespace PTMedicalInsurance
                         }
                     case "Z5"://住院结算
                         {
+                            Global.Set.minpacunt_drug_trac_cnt = JsonHelper.getDestValue(joInParam, "insuAdmObj.minpacunt_drug_trac_cnt");//应传药品追溯码结算数量
+                            Global.Set.mcs_trac_cnt = JsonHelper.getDestValue(joInParam, "insuAdmObj.mcs_trac_cnt");//应传耗材追溯码结算数量
                             #region【住院预结算2303前调用3102医保明细审核事中服务】                            
                             //1.获取3102入参报文
                             /*
@@ -1806,7 +1810,7 @@ namespace PTMedicalInsurance
                     //}
                     joRtn = invoker.invokeCenterServiceJXC(funNO, JObject.Parse(JsonHelper.setCenterInpar(funNO, joParam)));
 
-
+                    //joRtn = invoker.invokeCenterServiceJXC2(funNO, JObject.Parse(JsonHelper.setCenterInpar(funNO, joParam)));
                     string funNOA = funNO + 'A';
                    
                     joRtn = invoker.invokeCenterService(funNOA, JsonHelper.setCenterInpar(funNOA, joParamA));
@@ -1928,7 +1932,8 @@ namespace PTMedicalInsurance
                     //    joRtn.Add("drug_trac_info", joParam["purcinfo"]["drugtracinfo"]);
                     //    joParam["purcinfo"] = joRtn;
                     //}
-
+                    joRtn.Add("prdr_name", joParam["purcinfo"]["prodentp_name"].ToString());
+                    joParam["purcinfo"] = joRtn;
                     JArray selDtl = new JArray();
                     selDtl.Add(JObject.Parse(joParam["purcinfo"].ToString()));
                     //MessageBox.Show(selDtl.ToString());

+ 2 - 0
Variables/Struct.cs

@@ -242,6 +242,8 @@ namespace PTMedicalInsurance.Variables
         public string onlineYBFalg; //线上线下标志  Y  N
         public string payOrdId; //订单编号
         public string medinsSetlId; //医疗结构结算ID
+        public string minpacunt_drug_trac_cnt; //本次结算应上传最小包装追溯码数量
+        public string mcs_trac_cnt; //本次结算应上传耗材追溯码数量
     }
 
     //当前环境实时信息