Browse Source

pref: 优化以下功能:
1、增加对账时显示大病、企业补助等金额显示
2、结算时病种选择支持与登记时保持一致

zhengjie 1 năm trước cách đây
mục cha
commit
f79be5b798

+ 61 - 6
Business/HisMainBusiness.cs

@@ -637,8 +637,23 @@ namespace PTMedicalInsurance.Business
                     }
                     joSelectedInsuInfo.Add("mdtrt_cert_type", Global.pat.mdtrtcertType);
                     joSelectedInsuInfo.Add("mdtrt_cert_no", Global.pat.mdtrtcertNO);
-                    joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedInsuInfo", joSelectedInsuInfo));
-                    joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedIdInfo", joSelectedInsuInfo));
+                    if(joOutparam["selectedInsuInfo"]!=null)
+                    {
+                        joOutparam["selectedInsuInfo"] = joSelectedInsuInfo;
+                    } else
+                    {
+                        joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedInsuInfo", joSelectedInsuInfo));
+                    }
+
+                    if (joOutparam["selectedIdInfo"] != null)
+                    {
+                        joOutparam["selectedIdInfo"] = joSelectedInsuInfo;
+                    }
+                    else
+                    {
+                        joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedIdInfo", joSelectedInsuInfo));
+                    }
+
 
                     outparam = joOutparam.ToString();                    
 
@@ -838,7 +853,7 @@ namespace PTMedicalInsurance.Business
    
                 //登记面板实例
                 OutpatientRegistration frmReg = new OutpatientRegistration();
-                frmReg.dblkcbxSettelmentWay.Enabled = false;
+                //frmReg.dblkcbxSettelmentWay.Enabled = false;
                 DataTable dt = (DataTable)frmReg.dblkcbxInsuranceType.DataSource;
                 int selectedIndex = 0;
                 for (int i = 0; i < dt.Rows.Count; i++)
@@ -1059,8 +1074,8 @@ namespace PTMedicalInsurance.Business
                     frmReg.dblkcbxInsuranceType.Enabled = false;
                 if (frmReg.dblkcbxMedicalType.Text != "")
                     frmReg.dblkcbxMedicalType.Enabled = false;
-                if (frmReg.dblkcbxDisease.Text != "")
-                    frmReg.dblkcbxDisease.Enabled = false;
+                //if (frmReg.dblkcbxDisease.Text != "")
+                //    frmReg.dblkcbxDisease.Enabled = false;
 
                 //  对诊断数组进行转换 转换下主要诊断
                 JArray jaConvertedDiagnoses = new JArray();
@@ -1169,6 +1184,7 @@ namespace PTMedicalInsurance.Business
                     //单病种出院登记 病种信息取入院登记入参
                     if (Global.pat.RYorCY == "2")
                     {
+                        // 单病种?
                         if (Global.pat.medType == "26")
                         {
                             diseCodg = Global.pat.DiseasecCode;
@@ -1738,6 +1754,8 @@ namespace PTMedicalInsurance.Business
                         pat.insuplc_admdvs = JsonHelper.getDestValue(joInparam, "insuAdmObj.insuplc_admdvs");
                         pat.name = JsonHelper.getDestValue(joInparam, "insuAdmObj.psn_name");
                         pat.billID = JsonHelper.getDestValue(joInparam, "params[0].billID");
+                        pat.hisDischargeTime = Convert.ToDateTime(JsonHelper.getDestValue(joInparam, "insuAdmObj.disDateTime")).ToString("yyyy-MM-dd HH:mm:ss");
+
                         break;
                     }
                 case "Z4C"://住院预结算撤销
@@ -1760,6 +1778,43 @@ namespace PTMedicalInsurance.Business
                         pat.name = JsonHelper.getDestValue(joInparam, "insuAdmObj.psn_name");
                         pat.billID = JsonHelper.getDestValue(joInparam, "params[0].billID");
                         pat.hisDischargeTime = Convert.ToDateTime(JsonHelper.getDestValue(joInparam, "insuAdmObj.disDateTime")).ToString("yyyy-MM-dd HH:mm:ss");
+
+                        if (string.IsNullOrEmpty(JsonHelper.getDestValue(joInparam, "insuAdmObj.inDays")))
+                        {
+                            Global.Set.hospitalizationsDays = 0;
+                        }
+                        else
+                        {
+                            Global.Set.hospitalizationsDays = int.Parse(JsonHelper.getDestValue(joInparam, "insuAdmObj.inDays"));
+                        }
+
+                        if (string.IsNullOrEmpty(JsonHelper.getDestValue(joInparam, "insuAdmObj.inTimes")))
+                        {
+                            Global.Set.hospitalizationsTimes = 0;
+                        }
+                        else
+                        {
+                            Global.Set.hospitalizationsTimes = int.Parse(JsonHelper.getDestValue(joInparam, "insuAdmObj.inTimes"));
+                        }
+
+                        if (string.IsNullOrEmpty(JsonHelper.getDestValue(joInparam, "insuAdmObj.admDateTime")))
+                        {
+                            Global.Set.hisAdmTime = "";
+                        }
+                        else
+                        {
+                            Global.Set.hisAdmTime = Convert.ToDateTime(JsonHelper.getDestValue(joInparam, "insuAdmObj.admDateTime")).ToString("yyyy-MM-dd HH:mm:ss");
+                        }
+
+                        if (string.IsNullOrEmpty(pat.hisDischargeTime))
+                        {
+                            Global.Set.hisDischargeTime = "";
+                        }
+                        else
+                        {
+                            Global.Set.hisDischargeTime = pat.hisDischargeTime;
+                        }
+
                         break;
                     }
                 case "Z5C"://住院结算撤销
@@ -1998,7 +2053,7 @@ namespace PTMedicalInsurance.Business
             Global.pat.psn_type = Global.pat.insuType;   //后面再改
             Global.pat.ExpContent = JsonHelper.getDestValue(joReg, "data.ExpContent");
 
-            if ((Global.pat.RYorCY == "2") && (Global.pat.medType == "26"))
+            if ((Global.pat.RYorCY == "2"))
             {
                 Global.pat.DiseasecCode = JsonHelper.getDestValue(joReg, "data.DiseasecCode");
                 Global.pat.DiseasecName = JsonHelper.getDestValue(joReg, "data.DiseasecName");

+ 6 - 0
Business/IrisServices.cs

@@ -1349,6 +1349,12 @@ namespace PTMedicalInsurance.Business
                 joSetlinfo.Add("insuplc_admdvs", Global.pat.insuplc_admdvs);
                 joSetlinfo.Add("ExpContent", Global.pat.ExpContent);
 
+                joSetlinfo.Add("HospitalizationsDays", Global.Set.hospitalizationsDays);
+                joSetlinfo.Add("HospitalizationsTimes", Global.Set.hospitalizationsTimes);
+                joSetlinfo.Add("HISAdmTime", Global.Set.hisAdmTime);
+                joSetlinfo.Add("HISDischargeTime", Global.Set.hisDischargeTime);
+
+
                 JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010051", joSetlinfo).ToString(), "插入结算信息");
 
                 if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)

+ 0 - 1
Common/CardReader.cs

@@ -228,7 +228,6 @@ namespace PTMedicalInsurance.Common
             {
                 StringBuilder sbOutData = new StringBuilder(1024);
 
-                //MessageBox.Show("dao");
                 IntPtr pRtn = FastReportDll(sbOutData);
                 OutData = sbOutData.ToString();
                 string rtn = Marshal.PtrToStringAnsi(pRtn);

+ 5 - 4
Common/ECTokenReader.cs

@@ -66,9 +66,9 @@ namespace PTMedicalInsurance.Common
             //callECQuery(eCToken,"ec.query",out sOutPar);
 
             // 医保接口
-            call1162(eCToken, out sOutPar);
+            int ret = call1162(eCToken, out sOutPar);
 
-            if (!string.IsNullOrEmpty(sOutPar)) 
+            if (ret == 0) 
             {
                 JObject joRtn = JObject.Parse(sOutPar);
                 Resp1101 info = JsonHelper.getOutput<Resp1101>(joRtn);
@@ -100,7 +100,7 @@ namespace PTMedicalInsurance.Common
             callECQuery(data, "cn.nhsa.ec.auth", out outParam);
         }
 
-        private static void call1162(ECTokenData eCToken, out string sOutPar)
+        private static int call1162(ECTokenData eCToken, out string sOutPar)
         {
             InvokeHelper invoker = new InvokeHelper();
             ECTokenInput joData = new ECTokenInput();
@@ -112,9 +112,10 @@ namespace PTMedicalInsurance.Common
             if (JsonHelper.parseCenterRtnValue(joRtn, out errorMsg) != 0)
             {
                 Global.writeLog("获取电子凭证信息失败:" + errorMsg);
-                return;
+                return -1;
             }
             sOutPar = joRtn.ToString();
+            return 0;
         }
 
         private static void callECQuery(ECTokenData eCToken,string transType,out string sOutPar)

+ 21 - 3
Common/FastReportScript.cs

@@ -10,6 +10,14 @@ namespace PTMedicalInsurance.Common
 {
     public class FastReportFunction
     {
+        /// <summary>
+        /// 兼容方法
+        /// </summary>
+        /// <returns></returns>
+        public static string moneyToChinese(object money)
+        {
+            return MoneyToUpper(string.Format("{0}", money));
+        }
         /// <summary>
         /// 金额转换成中文大写金额
         /// </summary>
@@ -223,11 +231,21 @@ namespace PTMedicalInsurance.Common
             
             Type funType = typeof(FastReportFunction);
 
-            MethodInfo method = funType.GetMethod("MoneyToUpper");
-            if(!FastReport.Utils.RegisteredObjects.IsTypeRegistered(funType) && method != null)
+            MethodInfo methodUpper = funType.GetMethod("MoneyToUpper");
+            MethodInfo methodChinese = funType.GetMethod("moneyToChinese");
+
+            if (!FastReport.Utils.RegisteredObjects.IsTypeRegistered(funType))
             {
                 FastReport.Utils.RegisteredObjects.Add(funType, "Functions,CustomFunctions",0x34);
-                FastReport.Utils.RegisteredObjects.AddFunction(method, "CustomFunctions");
+                if(methodUpper != null)
+                {
+                    FastReport.Utils.RegisteredObjects.AddFunction(methodUpper, "CustomFunctions");
+                }
+                if(methodChinese != null)
+                {
+                    FastReport.Utils.RegisteredObjects.AddFunction(methodChinese, "CustomFunctions");
+                }
+                
             }
             
         }

+ 10 - 2
FormSetter/ComboxSetter.cs

@@ -21,9 +21,17 @@ namespace PTMedicalInsurance.FormSetter
         {
 
             DataTable dt = new DataTable();
-            JObject joRtn = mIS.getInterface();
+            
             JArray jaParams = new JArray();
-            jaParams = JArray.Parse(JsonHelper.getDestValue(joRtn, "result.data"));
+            try
+            {
+                JObject joRtn = mIS.getInterface();
+                jaParams = JArray.Parse(JsonHelper.getDestValue(joRtn, "result.data"));
+            }
+            catch (Exception e)
+            {
+                MessageBox.Show(e.Message);
+            }
             if (jaParams.Count == 0)
             {
                 DataTableSetter dts = new DataTableSetter();

+ 11 - 3
FormSetter/GridViewSetter.cs

@@ -676,6 +676,7 @@ namespace PTMedicalInsurance.FormSetter
             AddDGVColumn(dgv, "单位", "itemUnitDesc",70);
             AddDGVColumn(dgv, "批准文号", "pprovalNo", 200);
             AddDGVColumn(dgv, "厂家", "manfDesc", 200);
+            AddDGVColumn(dgv, "价格", "itemPrice", 200);
         }
 
         /// <summary>
@@ -727,9 +728,16 @@ namespace PTMedicalInsurance.FormSetter
             dgv.AutoGenerateColumns = false;
             dgv.Columns.Clear();
             AddDGVColumn(dgv, "医疗费总额", "medfee_sumamt", 150);
-            AddDGVColumn(dgv, "基金支付总额", "fund_pay_sumamt", 200);
+            AddDGVColumn(dgv, "统筹基金支付总额", "fund_pay_sumamt", 200);
             AddDGVColumn(dgv, "个人账户支付金额", "acct_pay", 200);
             AddDGVColumn(dgv, "定点医药机构结算笔数", "fixmedins_setl_cnt", 280);
+
+            AddDGVColumn(dgv, "公务员补助金额", "CivilserviceAllowancePay", 150);
+            AddDGVColumn(dgv, "医疗救助金额", "MedicalAssistPay", 150);
+            AddDGVColumn(dgv, "共济账户支付金额", "AccountMutualAidAmount", 150);
+            AddDGVColumn(dgv, "企业补充医疗金额", "EnterpriseSupplementPay", 150);
+            AddDGVColumn(dgv, "职工大额医疗金额", "LargeExpensesSupplementPay", 150);
+
             AddDGVColumn(dgv, "清算类别", "clr_type",100);
             AddDGVColumn(dgv, "接口ID", "Interface_dr", 80);
             AddDGVColumn(dgv, "结算经办机构", "setl_optins", 180);
@@ -745,8 +753,8 @@ namespace PTMedicalInsurance.FormSetter
             dgv.AutoGenerateColumns = false;
             dgv.Columns.Clear();
             AddDGVColumn(dgv, "医疗费总额", "medfee_sumamt", 80);
-            AddDGVColumn(dgv, "基金支付总额", "fund_appy_sum", 200);
-            AddDGVColumn(dgv, "医保认可费用总额", "med_sumfee", 300);
+            AddDGVColumn(dgv, "统筹基金支付总额", "fund_appy_sum", 200);
+            AddDGVColumn(dgv, "统筹医保认可费用总额", "med_sumfee", 300);
             AddDGVColumn(dgv, "个人账户支付金额", "acct_pay", 300);
             AddDGVColumn(dgv, "现金支付金额", "cash_payamt", 300);
             AddDGVColumn(dgv, "清算人次", "psntime", 100);

+ 18 - 2
Forms/BasicData.cs

@@ -36,6 +36,7 @@ namespace PTMedicalInsurance.Forms
         public JObject joSelectedInsuInfo;
         public int insuInfoIndex = 0;
         public int idInfoIndex = 0;
+        int currentPageIndex = 0;
         DataTable dtExport;
 
         public BasicData()
@@ -1018,9 +1019,24 @@ namespace PTMedicalInsurance.Forms
         private void btnQueryHISDirectory_Click(object sender, EventArgs e)
         {
             int iCount = 50;
-            if (rbNoMaped.Checked) iCount = 300;
+            if (rbNoMaped.Checked)
+            {
+                try
+                {
+                    if (Int32.Parse(numPage.Text) > currentPageIndex && pgHISDirect.TotalCount > 0)
+                    {
+                        currentPageIndex = Int32.Parse(numPage.Text);
+                    }
+                }
+                catch (Exception ex)
+                {
+                    MessageBox.Show(ex.Message);
+                    return;
+                }
+                iCount = 300;
+            }
             string errMsg;
-            if (queryHISDirectory(1, iCount, out errMsg) != 0)
+            if (queryHISDirectory(currentPageIndex, iCount, out errMsg) != 0)
             {
                 MessageBox.Show(errMsg);
                 return;

+ 164 - 113
Forms/BasicData.designer.cs

@@ -28,21 +28,21 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
             System.Windows.Forms.DataGridViewCellStyle 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();
+            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();
             this.tabControl1 = new System.Windows.Forms.TabControl();
             this.tabPage1 = new System.Windows.Forms.TabPage();
             this.panel1 = new System.Windows.Forms.Panel();
@@ -88,6 +88,9 @@
             this.panel3 = new System.Windows.Forms.Panel();
             this.dgvHISDirectory = new Sunny.UI.UIDataGridView();
             this.panel5 = new System.Windows.Forms.Panel();
+            this.lblPage = new Sunny.UI.UILabel();
+            this.lblPageOrder = new Sunny.UI.UILabel();
+            this.numPage = new Sunny.UI.UITextBox();
             this.btnExport = new Sunny.UI.UIButton();
             this.btnCancelUpShip = new Sunny.UI.UIButton();
             this.btnUpShip = new Sunny.UI.UIButton();
@@ -198,28 +201,28 @@
             // 
             this.dgvDirectoy.AllowUserToAddRows = false;
             this.dgvDirectoy.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvDirectoy.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvDirectoy.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
             this.dgvDirectoy.BackgroundColor = System.Drawing.Color.White;
             this.dgvDirectoy.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvDirectoy.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            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.dgvDirectoy.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
             this.dgvDirectoy.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.dgvDirectoy.ContextMenuStrip = this.cmsUpdateInsuDir;
-            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.dgvDirectoy.DefaultCellStyle = dataGridViewCellStyle3;
+            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.dgvDirectoy.DefaultCellStyle = dataGridViewCellStyle8;
             this.dgvDirectoy.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvDirectoy.EnableHeadersVisualStyles = false;
             this.dgvDirectoy.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -227,18 +230,18 @@
             this.dgvDirectoy.Location = new System.Drawing.Point(0, 0);
             this.dgvDirectoy.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.dgvDirectoy.Name = "dgvDirectoy";
-            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.dgvDirectoy.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
+            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.dgvDirectoy.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
             this.dgvDirectoy.RowHeadersWidth = 51;
-            dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvDirectoy.RowsDefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvDirectoy.RowsDefaultCellStyle = dataGridViewCellStyle10;
             this.dgvDirectoy.RowTemplate.Height = 23;
             this.dgvDirectoy.SelectedIndex = -1;
             this.dgvDirectoy.Size = new System.Drawing.Size(1822, 334);
@@ -774,7 +777,7 @@
             this.tabPage2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.tabPage2.Name = "tabPage2";
             this.tabPage2.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.tabPage2.Size = new System.Drawing.Size(1702, 689);
+            this.tabPage2.Size = new System.Drawing.Size(1830, 689);
             this.tabPage2.TabIndex = 1;
             this.tabPage2.Text = "数据对照";
             this.tabPage2.UseVisualStyleBackColor = true;
@@ -786,7 +789,7 @@
             this.panel7.Location = new System.Drawing.Point(242, 3);
             this.panel7.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.panel7.Name = "panel7";
-            this.panel7.Size = new System.Drawing.Size(1456, 683);
+            this.panel7.Size = new System.Drawing.Size(1584, 683);
             this.panel7.TabIndex = 3;
             // 
             // uiSplitContainer1
@@ -807,7 +810,7 @@
             // uiSplitContainer1.Panel2
             // 
             this.uiSplitContainer1.Panel2.Controls.Add(this.panel4);
-            this.uiSplitContainer1.Size = new System.Drawing.Size(1456, 683);
+            this.uiSplitContainer1.Size = new System.Drawing.Size(1584, 683);
             this.uiSplitContainer1.SplitterDistance = 344;
             this.uiSplitContainer1.SplitterWidth = 13;
             this.uiSplitContainer1.TabIndex = 3;
@@ -822,35 +825,35 @@
             this.panel3.Location = new System.Drawing.Point(0, 0);
             this.panel3.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.panel3.Name = "panel3";
-            this.panel3.Size = new System.Drawing.Size(1456, 344);
+            this.panel3.Size = new System.Drawing.Size(1584, 344);
             this.panel3.TabIndex = 2;
             // 
             // dgvHISDirectory
             // 
             this.dgvHISDirectory.AllowUserToAddRows = false;
             this.dgvHISDirectory.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvHISDirectory.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvHISDirectory.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16;
             this.dgvHISDirectory.BackgroundColor = System.Drawing.Color.White;
             this.dgvHISDirectory.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvHISDirectory.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
+            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.dgvHISDirectory.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17;
             this.dgvHISDirectory.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.dgvHISDirectory.ContextMenuStrip = this.cmsMapping;
-            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.dgvHISDirectory.DefaultCellStyle = dataGridViewCellStyle8;
+            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.dgvHISDirectory.DefaultCellStyle = dataGridViewCellStyle18;
             this.dgvHISDirectory.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvHISDirectory.EnableHeadersVisualStyles = false;
             this.dgvHISDirectory.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -858,22 +861,22 @@
             this.dgvHISDirectory.Location = new System.Drawing.Point(0, 57);
             this.dgvHISDirectory.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.dgvHISDirectory.Name = "dgvHISDirectory";
-            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.dgvHISDirectory.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
+            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.dgvHISDirectory.RowHeadersDefaultCellStyle = dataGridViewCellStyle19;
             this.dgvHISDirectory.RowHeadersWidth = 51;
             this.dgvHISDirectory.RowHeight = 25;
-            dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvHISDirectory.RowsDefaultCellStyle = dataGridViewCellStyle10;
+            dataGridViewCellStyle20.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle20.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvHISDirectory.RowsDefaultCellStyle = dataGridViewCellStyle20;
             this.dgvHISDirectory.RowTemplate.Height = 25;
             this.dgvHISDirectory.SelectedIndex = -1;
-            this.dgvHISDirectory.Size = new System.Drawing.Size(1456, 244);
+            this.dgvHISDirectory.Size = new System.Drawing.Size(1584, 244);
             this.dgvHISDirectory.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
             this.dgvHISDirectory.TabIndex = 4;
             this.dgvHISDirectory.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
@@ -882,6 +885,9 @@
             // 
             // panel5
             // 
+            this.panel5.Controls.Add(this.lblPage);
+            this.panel5.Controls.Add(this.lblPageOrder);
+            this.panel5.Controls.Add(this.numPage);
             this.panel5.Controls.Add(this.btnExport);
             this.panel5.Controls.Add(this.btnCancelUpShip);
             this.panel5.Controls.Add(this.btnUpShip);
@@ -895,14 +901,55 @@
             this.panel5.Location = new System.Drawing.Point(0, 0);
             this.panel5.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.panel5.Name = "panel5";
-            this.panel5.Size = new System.Drawing.Size(1456, 57);
+            this.panel5.Size = new System.Drawing.Size(1584, 57);
             this.panel5.TabIndex = 1;
             // 
+            // lblPage
+            // 
+            this.lblPage.AutoSize = true;
+            this.lblPage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblPage.Location = new System.Drawing.Point(1035, 14);
+            this.lblPage.Name = "lblPage";
+            this.lblPage.Size = new System.Drawing.Size(24, 20);
+            this.lblPage.TabIndex = 15;
+            this.lblPage.Text = "页";
+            this.lblPage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.lblPage.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // lblPageOrder
+            // 
+            this.lblPageOrder.AutoSize = true;
+            this.lblPageOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblPageOrder.Location = new System.Drawing.Point(955, 14);
+            this.lblPageOrder.Name = "lblPageOrder";
+            this.lblPageOrder.Size = new System.Drawing.Size(24, 20);
+            this.lblPageOrder.TabIndex = 15;
+            this.lblPageOrder.Text = "第";
+            this.lblPageOrder.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.lblPageOrder.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // numPage
+            // 
+            this.numPage.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.numPage.DoubleValue = 1D;
+            this.numPage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.numPage.IntValue = 1;
+            this.numPage.Location = new System.Drawing.Point(982, 11);
+            this.numPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.numPage.MinimumSize = new System.Drawing.Size(1, 16);
+            this.numPage.Name = "numPage";
+            this.numPage.ShowText = false;
+            this.numPage.Size = new System.Drawing.Size(50, 27);
+            this.numPage.TabIndex = 14;
+            this.numPage.Text = "1";
+            this.numPage.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.numPage.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
             // btnExport
             // 
             this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnExport.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnExport.Location = new System.Drawing.Point(987, 10);
+            this.btnExport.Location = new System.Drawing.Point(1094, 10);
             this.btnExport.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.btnExport.MinimumSize = new System.Drawing.Size(2, 2);
             this.btnExport.Name = "btnExport";
@@ -919,7 +966,7 @@
             this.btnCancelUpShip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnCancelUpShip.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnCancelUpShip.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnCancelUpShip.Location = new System.Drawing.Point(1259, 10);
+            this.btnCancelUpShip.Location = new System.Drawing.Point(1387, 10);
             this.btnCancelUpShip.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.btnCancelUpShip.MinimumSize = new System.Drawing.Size(2, 2);
             this.btnCancelUpShip.Name = "btnCancelUpShip";
@@ -935,7 +982,7 @@
             this.btnUpShip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.btnUpShip.Cursor = System.Windows.Forms.Cursors.Hand;
             this.btnUpShip.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.btnUpShip.Location = new System.Drawing.Point(1106, 10);
+            this.btnUpShip.Location = new System.Drawing.Point(1234, 10);
             this.btnUpShip.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.btnUpShip.MinimumSize = new System.Drawing.Size(2, 2);
             this.btnUpShip.Name = "btnUpShip";
@@ -1048,7 +1095,7 @@
             this.pgHISDirect.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
             this.pgHISDirect.ShowJumpButton = false;
             this.pgHISDirect.ShowText = false;
-            this.pgHISDirect.Size = new System.Drawing.Size(1456, 43);
+            this.pgHISDirect.Size = new System.Drawing.Size(1584, 43);
             this.pgHISDirect.TabIndex = 6;
             this.pgHISDirect.Text = "uiPagination2";
             this.pgHISDirect.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1062,7 +1109,7 @@
             this.LabExplain.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.LabExplain.Location = new System.Drawing.Point(741, 3);
             this.LabExplain.Name = "LabExplain";
-            this.LabExplain.Size = new System.Drawing.Size(288, 30);
+            this.LabExplain.Size = new System.Drawing.Size(416, 30);
             this.LabExplain.TabIndex = 26;
             this.LabExplain.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             this.LabExplain.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
@@ -1076,34 +1123,34 @@
             this.panel4.Location = new System.Drawing.Point(0, 0);
             this.panel4.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.panel4.Name = "panel4";
-            this.panel4.Size = new System.Drawing.Size(1456, 326);
+            this.panel4.Size = new System.Drawing.Size(1584, 326);
             this.panel4.TabIndex = 3;
             // 
             // dgvCenterDirectory
             // 
             this.dgvCenterDirectory.AllowUserToAddRows = false;
             this.dgvCenterDirectory.AllowUserToDeleteRows = false;
-            dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
-            this.dgvCenterDirectory.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
+            this.dgvCenterDirectory.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
             this.dgvCenterDirectory.BackgroundColor = System.Drawing.Color.White;
             this.dgvCenterDirectory.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle12.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvCenterDirectory.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvCenterDirectory.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
             this.dgvCenterDirectory.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvCenterDirectory.DefaultCellStyle = dataGridViewCellStyle13;
+            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.dgvCenterDirectory.DefaultCellStyle = dataGridViewCellStyle3;
             this.dgvCenterDirectory.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvCenterDirectory.EnableHeadersVisualStyles = false;
             this.dgvCenterDirectory.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1111,21 +1158,21 @@
             this.dgvCenterDirectory.Location = new System.Drawing.Point(0, 50);
             this.dgvCenterDirectory.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.dgvCenterDirectory.Name = "dgvCenterDirectory";
-            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.dgvCenterDirectory.RowHeadersDefaultCellStyle = dataGridViewCellStyle14;
+            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.dgvCenterDirectory.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
             this.dgvCenterDirectory.RowHeadersWidth = 51;
-            dataGridViewCellStyle15.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.dgvCenterDirectory.RowsDefaultCellStyle = dataGridViewCellStyle15;
+            dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvCenterDirectory.RowsDefaultCellStyle = dataGridViewCellStyle5;
             this.dgvCenterDirectory.RowTemplate.Height = 23;
             this.dgvCenterDirectory.SelectedIndex = -1;
-            this.dgvCenterDirectory.Size = new System.Drawing.Size(1456, 233);
+            this.dgvCenterDirectory.Size = new System.Drawing.Size(1584, 233);
             this.dgvCenterDirectory.StripeOddColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
             this.dgvCenterDirectory.TabIndex = 3;
             this.dgvCenterDirectory.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
@@ -1144,7 +1191,7 @@
             this.panel6.Location = new System.Drawing.Point(0, 0);
             this.panel6.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.panel6.Name = "panel6";
-            this.panel6.Size = new System.Drawing.Size(1456, 50);
+            this.panel6.Size = new System.Drawing.Size(1584, 50);
             this.panel6.TabIndex = 2;
             // 
             // tbManufacturer
@@ -1360,7 +1407,7 @@
             this.pgCenterDirect.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
             this.pgCenterDirect.ShowJumpButton = false;
             this.pgCenterDirect.ShowText = false;
-            this.pgCenterDirect.Size = new System.Drawing.Size(1456, 43);
+            this.pgCenterDirect.Size = new System.Drawing.Size(1584, 43);
             this.pgCenterDirect.TabIndex = 0;
             this.pgCenterDirect.Text = "uiPagination3";
             this.pgCenterDirect.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
@@ -1372,7 +1419,7 @@
             this.uiButton1.ContextMenuStrip = this.cmsMapping;
             this.uiButton1.Cursor = System.Windows.Forms.Cursors.Hand;
             this.uiButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiButton1.Location = new System.Drawing.Point(1232, 4);
+            this.uiButton1.Location = new System.Drawing.Point(1360, 4);
             this.uiButton1.Margin = new System.Windows.Forms.Padding(4);
             this.uiButton1.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiButton1.Name = "uiButton1";
@@ -1479,6 +1526,7 @@
             this.panel3.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.dgvHISDirectory)).EndInit();
             this.panel5.ResumeLayout(false);
+            this.panel5.PerformLayout();
             this.pgHISDirect.ResumeLayout(false);
             this.panel4.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.dgvCenterDirectory)).EndInit();
@@ -1577,6 +1625,9 @@
         private Sunny.UI.UITextBox uiTextBox3;
         private Sunny.UI.UITextBox uiTextBox5;
         private Sunny.UI.UILabel LabExplain;
+        private Sunny.UI.UILabel lblPage;
+        private Sunny.UI.UILabel lblPageOrder;
+        private Sunny.UI.UITextBox numPage;
     }
 }
 

+ 3 - 3
Forms/BasicData.resx

@@ -117,12 +117,12 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="cmsUpdateInsuDir.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>310, 17</value>
-  </metadata>
   <metadata name="cmsMapping.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
+  <metadata name="cmsUpdateInsuDir.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>310, 17</value>
+  </metadata>
   <metadata name="cmsUpdateAuxInfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>146, 17</value>
   </metadata>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 228 - 220
Forms/Clearing.Designer.cs


+ 75 - 62
Forms/Clearing.cs

@@ -54,7 +54,7 @@ namespace PTMedicalInsurance.Forms
             cbInterface_2.SelectedValueChanged += new EventHandler(cbInterface_2_SelectedValueChanged);
             cbInterface_3.SelectedValueChanged += new EventHandler(cbInterface_3_SelectedValueChanged);
             GridViewSetter grdSetter = new GridViewSetter();
-            grdSetter.SetHeaderTextOfCheck(dgvSettlSummary);
+            grdSetter.SetHeaderTextOfCheck(dgvSettlSummary);            
             grdSetter.SetHeaderTextOfClearing(dgvClearingSum);
             grdSetter.SetHeaderTextOfClearingData(dgvClearingData);
             grdSetter.SetHeaderTextOfOthPlcCheck(dgvOthCheck);
@@ -66,6 +66,7 @@ namespace PTMedicalInsurance.Forms
             cbValid_2.SelectedIndex = 1;
             cbValid_3.SelectedIndex = 0;
             rbgTimeWay.SelectedIndex = 0;
+            cbOtherPlaceFlag.SelectedIndex = 2;
 
             dpST.Text = DateTime.Now.ToString("yyyy-MM-01 00:00:00");
             dpED.Value = DateTime.Now.AddDays(1 - DateTime.Now.Day).AddMonths(1).AddDays(-1);
@@ -189,7 +190,7 @@ namespace PTMedicalInsurance.Forms
         /// <returns></returns>
         private int Check_Single(out string error)
         {
-            error = "";
+            error = "";string setlOptins = "";
             DataTable dt = (DataTable)dgvSettlSummary.DataSource;
             int i = dgvSettlSummary.CurrentRow.Index;
 
@@ -200,10 +201,12 @@ namespace PTMedicalInsurance.Forms
             if (tbSettlOption.Text != "")
             {
                 joCheck.setl_optins = tbSettlOption.Text; //dt.Rows[i]["setl_optins"].ToString();  //结算经办机构
+                setlOptins = tbSettlOption.Text;
             }
             else
             {
-                joCheck.setl_optins = dt.Rows[i]["setl_optins"].ToString();                 //结算经办机构
+                joCheck.setl_optins = dt.Rows[i]["setl_optins"].ToString();             //结算经办机构
+                setlOptins = dt.Rows[i]["setl_optins"].ToString();
             }
             
             joCheck.medfee_sumamt = dt.Rows[i]["medfee_sumamt"].ToString();             //医疗费总额
@@ -221,6 +224,8 @@ namespace PTMedicalInsurance.Forms
             JObject jo9001Rtn = new JObject();
             cBus.signIn(out jo9001Rtn);
 
+            Global.pat.insuplc_admdvs = setlOptins;
+
             InvokeHelper invoker = new InvokeHelper();
             JObject joRtn = invoker.invokeCenterService("3201", JsonHelper.setCenterInpar("3201", joData.ToString())); 
             if (JsonHelper.parseCenterReturnJson(joRtn, out error) != 0)
@@ -293,30 +298,40 @@ namespace PTMedicalInsurance.Forms
             error = "";
             DataTable dt = (DataTable)dgvClearingSum.DataSource;
             int i = dgvClearingSum.CurrentRow.Index;
-
             dynamic joClearing = new JObject();
-            joClearing.clr_type = dt.Rows[i]["clr_type"].ToString();
+
+            //双定点必须分开申请,通过报文头中insuplc_admdvs参保地行政区划区分。比如郑州省直双定点,向郑州申请时insuplc_admdvs传410100,向省直申请时insuplc_admdvs传419900。
+            //异地申请:清算类别传9909,报文头中参保地行政区划省内传410000,跨省不需要清算申请
+
+            Global.pat.insuplc_admdvs = dt.Rows[i]["clr_optins"].ToString();
+
+            if (dt.Rows[i]["clr_optins"].ToString() == "410000")
+                joClearing.clr_type = "9909";
+            else
+                joClearing.clr_type = dt.Rows[i]["clr_type"].ToString();
+
             joClearing.clr_way = dt.Rows[i]["clr_way"].ToString();
             joClearing.setlym = dpST_2.Value.ToString("yyyyMM");
-            joClearing.med_sumfee = dt.Rows[i]["med_sumfee"].ToString();
+            joClearing.psntime = dt.Rows[i]["psntime"].ToString();            
             joClearing.medfee_sumamt = dt.Rows[i]["medfee_sumamt"].ToString();
+            joClearing.med_sumfee = dt.Rows[i]["med_sumfee"].ToString();
             joClearing.fund_appy_sum = dt.Rows[i]["fund_appy_sum"].ToString();
-            joClearing.acct_pay = dt.Rows[i]["acct_pay"].ToString();
             joClearing.cash_payamt = dt.Rows[i]["cash_payamt"].ToString();
-            joClearing.psntime = dt.Rows[i]["psntime"].ToString();
+            joClearing.acct_pay = dt.Rows[i]["acct_pay"].ToString();                       
             joClearing.begndate = dpST_2.Value.ToString("yyyy-MM-dd");
             joClearing.enddate = dpED_2.Value.ToString("yyyy-MM-dd");
 
             JObject joData = new JObject();
             joData.Add("data", joClearing);
-            //上传给中心
+
             //先签到
-            CenterBusiness cBus = new CenterBusiness();
-            JObject jo9001Rtn = new JObject();
-            cBus.signIn(out jo9001Rtn);
+            //CenterBusiness cBus = new CenterBusiness();
+            //JObject jo9001Rtn = new JObject();
+            //cBus.signIn(out jo9001Rtn);
 
             InvokeHelper invoker = new InvokeHelper();
-            JObject joRtn = invoker.invokeCenterService("3203", joData.ToString());
+            string input = JsonHelper.setCenterInpar("3203", joData.ToString());
+            JObject joRtn = invoker.invokeCenterService("3203", input);
             if (JsonHelper.parseCenterReturnJson(joRtn, out error) != 0)
             {
                 return -1;
@@ -362,8 +377,6 @@ namespace PTMedicalInsurance.Forms
                 else
                     return 0;
             }
-
-
         }
 
         private int OthPlcClearing_Single(out string error)
@@ -438,7 +451,6 @@ namespace PTMedicalInsurance.Forms
                 else
                     return 0;
             }
-
         }
 
         private int CancleClearing_Single(out string error)
@@ -506,8 +518,6 @@ namespace PTMedicalInsurance.Forms
                 else
                     return 0;
             }
-
-
         }
 
         private int CancleOthPlcClearing_Single(out string error)
@@ -634,10 +644,10 @@ namespace PTMedicalInsurance.Forms
                 }
 
                 //省医保和市医保对账一样,异地对账需要用到另外的对账交易
-                if (Global.inf.interfaceDr == 1)
-                {
-                    sqlStr = sqlStr + " and (InsuranceAreaCode='539900' or InsuranceAreaCode='530100')";
-                }
+                //if (Global.inf.interfaceDr == 1)
+                //{
+                //    sqlStr = sqlStr + " and (InsuranceAreaCode='539900' or InsuranceAreaCode='530100')";
+                //}
 
                 //conditionStr = conditionStr.Substring(0,conditionStr.Length -1 );
                 //conditionStr = conditionStr.Remove(conditionStr.Length - 1, 1);
@@ -879,13 +889,16 @@ namespace PTMedicalInsurance.Forms
 
         private void tsm3202_Click(object sender, EventArgs e)
         {
+            if (string.IsNullOrEmpty(Global.inf.areaCode))
+            {
+                MessageBox.Show("请先签到!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning);
+                return;
+            }
+
             string outParam = "";
             DataTable dt = (DataTable)dgvSettlSummary.DataSource;
             int i = dgvSettlSummary.CurrentRow.Index;
 
-
-            MessageBox.Show(dt.Rows[i]["clr_type"].ToString());
-
             dynamic joCheck = new JObject();
             joCheck.file_qury_no = JObject.Parse(tbTmp.Text);
             joCheck.clr_type = dt.Rows[i]["clr_type"].ToString();
@@ -1075,15 +1088,10 @@ namespace PTMedicalInsurance.Forms
                 DataTable dt = (DataTable)dgvSettlSummary.DataSource;
                 int i = dgvSettlSummary.CurrentRow.Index;
 
-                Global.inf.areaCode = "";
-
-                string setlOptins = dt.Rows[i]["setl_optins"].ToString();
-                if (setlOptins == "") setlOptins = tbSettlOption.Text;
-
                 dynamic joCheck = new JObject();
                 joCheck.file_qury_no = file_qury_no.Replace(@"\\", @"\");
                 joCheck.clr_type = dt.Rows[i]["clr_type"].ToString();
-                joCheck.setl_optins = setlOptins;
+                joCheck.setl_optins = dt.Rows[i]["setl_optins"].ToString();
                 joCheck.stmt_begndate = dpST.Value.ToString("yyyy-MM-dd HH:mm:ss");
                 joCheck.stmt_enddate = dpED.Value.ToString("yyyy-MM-dd HH:mm:ss");
                 joCheck.medfee_sumamt = dt.Rows[i]["medfee_sumamt"].ToString();
@@ -1378,11 +1386,10 @@ namespace PTMedicalInsurance.Forms
             DataTable dtInteface = (DataTable)cbInterface_2.DataSource;
             int i = cbInterface_2.SelectedIndex;
 
-            //
-            string sqlStr = "SELECT SUM(Billtype*Sumamt) AS medfee_sumamt,SUM(Billtype*(0.00+FundPaySumamt+AccountPaySumamt+PersonCashPay)) AS med_sumfee, SUM(billtype*PersonCashPay) AS cash_payamt, ";
-            sqlStr = sqlStr + " count(*) AS psntime,";
-            sqlStr = sqlStr + " SUM(billtype*AccountPaySumamt) AS acct_pay,SUM(billtype*FundPaySumamt) AS fund_appy_sum, ";
-            sqlStr = sqlStr + " ClearingType as clr_type,ClearingWay as clr_way,Interface_Dr ";
+            string sqlStr = " SELECT SUM(Billtype*Sumamt) AS medfee_sumamt,SUM(Billtype*(0.00+FundPaySumamt+AccountPaySumamt+PersonCashPay)) AS med_sumfee, "
+                          + " SUM(billtype*PersonCashPay) AS cash_payamt,count(*) AS psntime, ";            
+            sqlStr = sqlStr + " SUM(billtype*AccountPaySumamt) AS acct_pay,SUM(Billtype*(0.00+FundPaySumamt+AccountPaySumamt)) AS fund_appy_sum, ";
+            sqlStr = sqlStr + " ClearingType as clr_type,ClearingWay as clr_way,Interface_Dr,ClearingOrgan as clr_optins ";
             sqlStr = sqlStr + " FROM  BS_MedInsuSettlement WHERE Hospital_Dr=" + dtInteface.Rows[i]["HospitalDr"].ToString();
             sqlStr = sqlStr + " and OccurTime>'" + dpST_2.Text + "'";
             sqlStr = sqlStr + " and OccurTime<'" + dpED_2.Text + "'";
@@ -1419,19 +1426,21 @@ namespace PTMedicalInsurance.Forms
                 else
                     sqlStr = sqlStr + " and ValidFlag =-1";
             }
-            //省医保本地
-            if ((Global.inf.interfaceDr == 1) && (cbOtherPlaceFlag.SelectedIndex == 2))
-            {
-                sqlStr = sqlStr + " and (InsuranceAreaCode='539900' or InsuranceAreaCode='530100')";
-            }
-            //省医保异地
-            if ((Global.inf.interfaceDr == 1) && (cbOtherPlaceFlag.SelectedIndex == 1))
-            {
-                sqlStr = sqlStr + " and (InsuranceAreaCode<>'539900' and InsuranceAreaCode<>'530100')";
-            }
 
-            sqlStr = sqlStr + " Group By Interface_Dr,ClearingType,ClearingWay";
+            //省医保本地            
+            //if ((Global.inf.interfaceDr == 10) && (cbOtherPlaceFlag.SelectedIndex == 2))
+            //{
+            //    sqlStr = sqlStr + " and (left(InsuranceAreaCode,4)='4101' or left(InsuranceAreaCode,4)='4199')";
+            //}
+            ////省医保异地
+            //if ((Global.inf.interfaceDr == 10) && (cbOtherPlaceFlag.SelectedIndex == 1))
+            //{
+            //    sqlStr = sqlStr + " and (left(InsuranceAreaCode,4)<>'4199' and left(InsuranceAreaCode,4)<>'4101')";
+            //}
+            
+            sqlStr = sqlStr + " Group By Interface_Dr,ClearingType,ClearingWay,ClearingOrgan";
             JObject joSqlstr = new JObject();
+
             joSqlstr.Add("sqlStr", sqlStr);
             JArray jaParam = new JArray();
             jaParam.Add(joSqlstr);
@@ -1445,6 +1454,7 @@ namespace PTMedicalInsurance.Forms
             dgvClearingSum.DataSource = dt;
         }
 
+
         private void tmsClearing_2_Click(object sender, EventArgs e)
         {
             string error = "";
@@ -1475,7 +1485,7 @@ namespace PTMedicalInsurance.Forms
 
         private void btnClose_3_Click(object sender, EventArgs e)
         {
-            Close();
+
         }
 
         private void btnQueryClearing_Click(object sender, EventArgs e)
@@ -1483,9 +1493,8 @@ namespace PTMedicalInsurance.Forms
             DataTable dtInteface = (DataTable)cbInterface_3.DataSource;
             int i = cbInterface_3.SelectedIndex;
 
-            //
-            string sqlStr = "SELECT * from  MedInsu_Tables.ClearingRecord where Hosp_Dr=" + dtInteface.Rows[i]["HospitalDr"].ToString(); ;
-            sqlStr = sqlStr + " and interface_dr =" + dtInteface.Rows[i]["ID"].ToString();
+            string sqlStr = "SELECT * from  BS_MedInsuClearingRecord where Hosp_Dr=" + dtInteface.Rows[i]["HospitalDr"].ToString(); ;
+            sqlStr = sqlStr + " and interface_Dr =" + dtInteface.Rows[i]["ID"].ToString();
             if (rbgTimeWay.SelectedIndex == 0)
             {
                 sqlStr = sqlStr + " and OccurTime>'" + dpST_3.Value.ToString("yyyy-MM-dd 00:00:00") + "'";
@@ -1505,7 +1514,6 @@ namespace PTMedicalInsurance.Forms
                     sqlStr = sqlStr + " and ValidFlag =-1";
             }
 
-
             JObject joSqlstr = new JObject();
             joSqlstr.Add("sqlStr", sqlStr);
             JArray jaParam = new JArray();
@@ -1567,7 +1575,7 @@ namespace PTMedicalInsurance.Forms
             sqlStr = sqlStr + " and OccurTime>'" + dpST_O.Text + "'";
             sqlStr = sqlStr + " and OccurTime<'" + dpED_O.Text + "'";
             sqlStr = sqlStr + " and Interface_dr =1";
-            sqlStr = sqlStr + " and (left(InsuranceAreaCode,4)<>'5399' and left(InsuranceAreaCode,4)<>'5301')";
+            sqlStr = sqlStr + " and (left(InsuranceAreaCode,2)<>'50')";
 
             //if (cbxInsuType.Text != "")
             //{
@@ -1762,6 +1770,9 @@ namespace PTMedicalInsurance.Forms
             string sqlStr = "SELECT SUM(BillType*Sumamt) AS medfee_sumamt,count(*) AS fixmedins_setl_cnt,SUM(BillType*PersonCashPay) AS cash_payamt,  ";
             sqlStr = sqlStr + " SUM(billType*AccountPaySumamt) AS acct_pay,SUM(BillType*FundPaySumamt) AS fund_pay_sumamt ";
             //sqlStr = sqlStr + " Interface_dr,clearingWay AS clr_way,clearingType AS clr_type ";
+            // 增加先行自付金额、医疗救助基金、公务员医疗补助、个人账户共济支付、企业补充、职工大额
+            sqlStr += ",Sum(BillType*PreSelfPayAmount) as PreSelfPayAmount,sum(BillType*MedicalAssistPay) as MedicalAssistPay,sum(BillType*CivilserviceAllowancePay) as CivilserviceAllowancePay,sum(BillType*AccountMutualAidAmount) as AccountMutualAidAmount ,sum(BillType*LargeExpensesSupplementPay) as LargeExpensesSupplementPay,sum(BillType*EnterpriseSupplementPay) as EnterpriseSupplementPay ";
+
             string conditionStr = " Group By";
             if (cbgGroupSet.GetItemCheckState(0))
             {
@@ -1822,10 +1833,10 @@ namespace PTMedicalInsurance.Forms
                     sqlStr = sqlStr + " and ValidFlag =0 and BillType=-1";
             }
 
-            if (Global.inf.interfaceDr == 1)
-            {
-                sqlStr = sqlStr + " and (left(InsuranceAreaCode,4)='5399' or left(InsuranceAreaCode,4)='5301')";
-            }
+            //if (Global.inf.interfaceDr == 1)
+            //{
+            //    sqlStr = sqlStr + " and (left(InsuranceAreaCode,4)='6201' or left(InsuranceAreaCode,4)='6299')";
+            //}
 
             //conditionStr = conditionStr.Substring(0,conditionStr.Length -1 );
             conditionStr = conditionStr.Remove(conditionStr.Length - 1, 1);
@@ -1833,7 +1844,7 @@ namespace PTMedicalInsurance.Forms
             sqlStr = sqlStr + conditionStr;
             JObject joSqlstr = new JObject();
 
-            MessageBox.Show(sqlStr);
+            //MessageBox.Show(sqlStr);
 
             joSqlstr.Add("sqlStr", sqlStr);
             JArray jaParam = new JArray();
@@ -1849,10 +1860,6 @@ namespace PTMedicalInsurance.Forms
 
             //初始化HIS结算明细View数据
             dgvHisSettlRec.DataSource = null;
-        }
-
-        private void uiButton1_Click_1(object sender, EventArgs e)
-        {
 
         }
 
@@ -1879,5 +1886,11 @@ namespace PTMedicalInsurance.Forms
                 MessageBox.Show(error);
             }
         }
+
+        private void btnQueryClrSum_Click_1(object sender, EventArgs e)
+        {
+          
+
+        }
     }
 }

+ 6 - 3
Forms/Clearing.resx

@@ -117,6 +117,9 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="cmsCheck.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>21, 25</value>
+  </metadata>
   <data name="cbgGroupSet.SelectedIndexes" mimetype="application/x-microsoft.net.object.binary.base64">
     <value>
         AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
@@ -126,15 +129,15 @@
         bXMFX3NpemUIX3ZlcnNpb24HAAAICAgCAAAACQMAAAAAAAAAAAAAAA8DAAAAAAAAAAgL
 </value>
   </data>
-  <metadata name="cmsCheck.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>21, 25</value>
-  </metadata>
   <metadata name="cmdOthPlcCheck.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>256, 25</value>
   </metadata>
   <metadata name="cmsClearing.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>132, 25</value>
   </metadata>
+  <metadata name="uiContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>408, 25</value>
+  </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>38</value>
   </metadata>

+ 21 - 4
Forms/OutpatientRegistration.cs

@@ -33,7 +33,12 @@ namespace PTMedicalInsurance.Forms
                               + " WHERE B.Code='" + Global.pat.insuType + "' and A.InsuCode = 'insutype'" + sqlCondition;
                 SetDBLKCombox(ref dblkcbxInsuranceType, sqlStr);
 
-                sqlStr = "select A.Code, A.Name FROM HB_MedInsuDirectory A where A.Code='" + Global.pat.DiseasecCode + "' and A.ValidFlag='1' And A.HisType=7" + sqlCondition;
+                sqlStr = "select A.Code, A.Name FROM HB_MedInsuDirectory A where A.ValidFlag='1' And A.HisType=7" + sqlCondition;
+                // 如果登记选择了,则直接用登记的病种
+                if(!string.IsNullOrEmpty(Global.pat.DiseasecCode))
+                {
+                    sqlStr += " and A.Code='" + Global.pat.DiseasecCode + "' ";
+                }
                 SetDBLKCombox(ref dblkcbxDisease, sqlStr);
 
                 sqlStr = " SELECT B.Code,B.Descripts AS Name FROM HB_Dictionary A JOIN HB_DictionaryDataDetail B ON A.ID = B.HBDictionary_Dr"
@@ -65,8 +70,7 @@ namespace PTMedicalInsurance.Forms
                 SetDBLKCombox(ref dblkcbxHospType, sqlStr);
             }
             
-            cbxAccountPay.Checked = true;
-            personAccountUsedFlag = "1";
+            cbxAccountPay.Checked = false;
         }
 
         public Boolean b2001 = false;
@@ -185,7 +189,20 @@ namespace PTMedicalInsurance.Forms
             //包干标准类型
             if (cbxUnifPayStdType.Text!="")
                 unifPayStdType = (cbxUnifPayStdType.SelectedIndex).ToString();
-      
+
+            // 选择病种后,必须选择医疗类别
+            if (!string.IsNullOrEmpty(diseCodg) && string.IsNullOrEmpty(med_type))
+            {
+                MessageBox.Show("请选择医疗类别!");
+                return;
+            }
+
+            // 是否使用个人账户金额
+            if (cbxAccountPay.Checked)
+            {
+                personAccountUsedFlag = "1";
+            }
+
             this.DialogResult = DialogResult.OK;
         }
 

+ 274 - 14
Forms/SettlementChecklist.cs

@@ -16,7 +16,6 @@ using FastReport;
 using Newtonsoft.Json;
 using System.Threading;
 using PTMedicalInsurance.Business;
-using PTMedicalInsurance.Common;
 
 namespace PTMedicalInsurance.Forms
 {
@@ -374,10 +373,14 @@ namespace PTMedicalInsurance.Forms
         {
             Close();
         }
-
+        /// <summary>
+        /// 点击打印
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         public void btnPrint_Click(object sender, EventArgs e)
         {
-    
+
             try
             {
                 Thread thread = new Thread(new ThreadStart(print));
@@ -390,25 +393,282 @@ namespace PTMedicalInsurance.Forms
                 Global.writeLog("结算单打印异常:" + ex.Message);
                 MessageBox.Show("打印异常:" + ex.Message);
             }
-       
 
-            //CardReader CardRead = new CardReader();
-            //string sOutPar;
-            //CardRead.FastReportPrint(out sOutPar);
-            //if (JsonHelper.getDestValue(JObject.Parse(sOutPar), "code") != "0")
-            //{
-            //    MessageBox.Show("调用FastReportDLL失败:" + sOutPar);
-            //    return;
-            //}
+            //printReport();
+            
         }
 
+        /// <summary>
+        /// 调用正版FastReport打印
+        /// </summary>
+        private void printReport()
+        {
+            if (dgvSettlRecord.RowCount <= 0)
+            {
+                MessageBox.Show("请先查询结算数据!");
+                return;
+            }
+
+            try
+            {
+                int i = dgvSettlRecord.CurrentRow.Index;
+                DataTable dt = (DataTable)dgvSettlRecord.DataSource;
+                string AdmID = dt.Rows[i]["AdmID"].ToString();
+                string SettlementID = dt.Rows[i]["SettlementID"].ToString();
+                string ValidFlag = dt.Rows[i]["ValidFlag"].ToString();
+                string MdtrtID = dt.Rows[i]["MdtrtID"].ToString();
+
+                JObject joRtn = GetFastReportParams("", AdmID, MdtrtID, SettlementID, ValidFlag);
+                if (JsonHelper.parseIrisRtnValue(joRtn, out string errMsg) != 0)
+                {
+                    MessageBox.Show("获取FastReport入参失败:" + errMsg);
+                    return;
+                }
+
+                string sFastReportParam = JsonHelper.getDestValue(joRtn, "result");
+                if (FastReportPrint(sFastReportParam, out errMsg) != 0)
+                {
+                    MessageBox.Show("调用FastReport打印失败!" + errMsg);
+                    return;
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+                return;
+            }
+        }
+
+        /// <summary>
+        /// 组织正版FastReport需要的参数
+        /// </summary>
+        /// <param name="designFlag"></param>
+        /// <param name="admID"></param>
+        /// <param name="MdtrtID"></param>
+        /// <param name="settlementID"></param>
+        /// <param name="validFlag"></param>
+        /// <returns></returns>
+        public JObject GetFastReportParams(string designFlag, string admID, string MdtrtID, string settlementID, string validFlag)
+        {
+            try
+            {
+                if (designFlag == "") { designFlag = "N"; }
+
+                #region【获取HIS医保结算信息】
+                JObject joSettel = new JObject();
+                joSettel.Add("HospitalDr", Global.inf.hospitalDr);
+                joSettel.Add("interfaceDr", Global.inf.interfaceDr);
+                joSettel.Add("admID", admID);
+                joSettel.Add("SettlementID", settlementID);
+                joSettel.Add("ValidFlag", validFlag);
+                joSettel.Add("MdtrtID", MdtrtID);
+
+                JObject joRtnSettle = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010066", joSettel).ToString(), "获取结算单信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtnSettle, out string errMsg) != 0)
+                {
+                    JObject joRtnSet = new JObject();
+                    joRtnSet.Add("errorCode", -1);
+                    joRtnSet.Add("errorMessage", errMsg);
+                    joRtnSet.Add("result", "");
+
+                    return joRtnSet;
+                }
+                #endregion                
+
+                #region【组织FastReport调用入参】               
+                JArray jachargeItemLvFee = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.chargeItemLvFee"));
+                JArray jaClassification = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.classification"));
+                JArray jaSettlement = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement"));
+                JArray jaReginfo = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.reginfo"));
+                JArray japatinsuinfo = JArray.Parse(JsonHelper.getDestValue(joRtnSettle, "result.data.patinsuinfo"));
+
+                ////转换金额大写
+                //string Sumamt = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].Sumamt").ToString());
+                //string ActualPayDeductible = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].ActualPayDeductible").ToString());
+                //string PersonCashPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].PersonCashPay").ToString());
+                //string AccountPaySumamt = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].AccountPaySumamt").ToString());
+                //string FundPaySumamt = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].FundPaySumamt").ToString());
+                //string LargeExpensesSupplementPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].LargeExpensesSupplementPay").ToString());
+                //string SeriousIllnessPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].SeriousIllnessPay").ToString());
+                //string CivilserviceAllowancePay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].CivilserviceAllowancePay").ToString());
+                //string MedicalAssistPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].MedicalAssistPay").ToString());
+                //string OtherPay = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].OtherPay").ToString());
+                //string HospitalPartAmount = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].HospitalPartAmount").ToString());
+                //string AccountMutualAidAmount = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].AccountMutualAidAmount").ToString());
+                //string InPolicyRangeAmount = FastReportFunction.MoneyToUpper(JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].InPolicyRangeAmount").ToString());
+
+                ////string BeginDate = JsonHelper.getDestValue(joRtnSettle, "result.data.reginfo[0].RegDate").ToString();
+                ////string EndDate = JsonHelper.getDestValue(joRtnSettle, "result.data.settlement[0].HISDischargeTime").ToString();
+                ////string InHosDays = FastReportFunction.DateDiff(Convert.ToDateTime(BeginDate), Convert.ToDateTime(EndDate));  
+
+                //JObject jaAmountChiness = new JObject();
+                //jaAmountChiness.Add("Sumamt", Sumamt);
+                //jaAmountChiness.Add("ActualPayDeductible", ActualPayDeductible);
+                //jaAmountChiness.Add("PersonCashPay", PersonCashPay);
+                //jaAmountChiness.Add("AccountPaySumamt", AccountPaySumamt);
+                //jaAmountChiness.Add("FundPaySumamt", FundPaySumamt);
+                //jaAmountChiness.Add("LargeExpensesSupplementPay", LargeExpensesSupplementPay);
+                //jaAmountChiness.Add("SeriousIllnessPay", SeriousIllnessPay);
+                //jaAmountChiness.Add("CivilserviceAllowancePay", CivilserviceAllowancePay);
+                //jaAmountChiness.Add("MedicalAssistPay", MedicalAssistPay);
+                //jaAmountChiness.Add("OtherPay", OtherPay);
+                //jaAmountChiness.Add("HospitalPartAmount", HospitalPartAmount);
+                //jaAmountChiness.Add("AccountMutualAidAmount", AccountMutualAidAmount);
+                //jaAmountChiness.Add("InPolicyRangeAmount", InPolicyRangeAmount); //合规费用
+                //jaAmountChiness.Add("SettlOpter", Global.user.name);
+
+                //JArray jachinessParams = new JArray();
+                //jachinessParams.Add(jaAmountChiness);
+
+                JObject joDataResult = new JObject();
+                joDataResult.Add("SettlementInfo", jaSettlement);
+                joDataResult.Add("ChargeItemLvFee", jachargeItemLvFee);
+                joDataResult.Add("ClassificationInfo", jaClassification);
+                joDataResult.Add("RegInfo", jaReginfo);
+                joDataResult.Add("Patinsuinfo", japatinsuinfo);
+                //joDataResult.Add("ChinessSummat", jachinessParams);
+
+                JObject joParams = new JObject();
+                joParams.Add("fastReportCode", "SP11"); //这个要从表取值
+                joParams.Add("hospID", Global.inf.hisHospitalDr.ToString());
+                joParams.Add("printCode", Global.inf.interfaceDr.ToString());
+                joParams.Add("templateID", "");
+
+                JArray jaParams = new JArray();
+                jaParams.Add(joParams);
+
+                JObject joReportParams = new JObject();
+                joReportParams.Add("params", jaParams);
+                joReportParams.Add("code", "01040306");
+
+                JObject joParam = new JObject();
+                joParam.Add("designFlag", designFlag);
+                joParam.Add("logFlag", "N");
+                joParam.Add("dataParams", "");
+                joParam.Add("pdfName", "");
+                joParam.Add("reportparams", joReportParams);
+                joParam.Add("dataResult", joDataResult);
+
+                JObject joDataURL = new JObject();
+                joDataURL.Add("dataIP", Global.hisConfig.ip);
+                joDataURL.Add("urlAddress", Global.hisConfig.url);
+                joDataURL.Add("authorization", Global.hisConfig.authorization);
+
+                joParam.Add("dataURL", joDataURL);
+
+                JArray jaParam = new JArray();
+                jaParam.Add(joParam);
+
+                JObject joInparam = new JObject();
+                joInparam.Add("params", JArray.FromObject(jaParam));
+                joInparam.Add("session", Global.curEvt.jaSession);
+                #endregion
+
+                JObject joRtn = new JObject();
+                joRtn.Add("errorCode", 0);
+                joRtn.Add("errorMessage", "");
+                joRtn.Add("result", joInparam.ToString());
+
+                return joRtn;
+            }
+            catch (Exception ex)
+            {
+                JObject joRtnEx = new JObject();
+                joRtnEx.Add("errorCode", -1);
+                joRtnEx.Add("errorMessage", ex.Message);
+                joRtnEx.Add("result", "");
+                return joRtnEx;
+            }
+        }
+
+        /// <summary>
+        /// FastReport正版打印开始
+        /// </summary>
+        /// <param name="InParams"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int FastReportPrint(string InParams, out string OutMsg)
+        {
+            Global.writeLog("调用FastReport入参:" + InParams);
+            try
+            {
+                #region【调用正版FastReport打印】                
+                FastReportFrom.FastReportDll FrDll = new FastReportFrom.FastReportDll();
+                string sRtnFr = FrDll.FastReport(InParams);
+                JObject joRetObj = JObject.Parse(sRtnFr);
+
+                if (JsonHelper.parseIrisRtnValue(joRetObj, out string errMsg) != 0)
+                {
+                    OutMsg = "调用FastReport打印失败!" + errMsg;
+                    return -1;
+                }
+                else
+                {
+                    OutMsg = "";
+                    return 0;
+                }
+                #endregion
+            }
+            catch (Exception ex)
+            {
+                OutMsg = "调用FastReport打印失败!" + ex.Message;
+                return -1;
+            }
+        }
+
+        /// <summary>
+        /// 调用正版FastReport的设计模式
+        /// </summary>
+        private void designReport()
+        {
+            if (dgvSettlRecord.RowCount <= 0)
+            {
+                MessageBox.Show("请先查询结算数据!");
+                return;
+            }
+
+            try
+            {
+                int i = dgvSettlRecord.CurrentRow.Index;
+                DataTable dt = (DataTable)dgvSettlRecord.DataSource;
+
+                string AdmID = dt.Rows[i]["AdmID"].ToString();
+                string SettlementID = dt.Rows[i]["SettlementID"].ToString();
+                string ValidFlag = dt.Rows[i]["ValidFlag"].ToString();
+                string MdtrtID = dt.Rows[i]["MdtrtID"].ToString();
+
+                JObject joRtn = GetFastReportParams("Y", AdmID, MdtrtID, SettlementID, ValidFlag);
+                if (JsonHelper.parseIrisRtnValue(joRtn, out string errMsg) != 0)
+                {
+                    MessageBox.Show("获取FastReport入参失败:" + errMsg);
+                    return;
+                }
+
+                string sFastReportParam = JsonHelper.getDestValue(joRtn, "result");
+                if (FastReportPrint(sFastReportParam, out errMsg) != 0)
+                {
+                    MessageBox.Show("调用FastReport设计失败!" + errMsg);
+                    return;
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+                return;
+            }
+        }
+        /// <summary>
+        /// 点击设计
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void btnDesign_Click(object sender, EventArgs e)
         {
-   
+
             thread_test = new Thread(new ThreadStart(design));
             thread_test.SetApartmentState(ApartmentState.STA); //重点
             thread_test.Start();
-   
         }
 
         private void SettlementChecklist_FormClosed(object sender, FormClosedEventArgs e)

+ 18 - 4
InsuBusiness.cs

@@ -40,6 +40,7 @@ namespace PTMedicalInsurance
         InvokeHelper invoker = new InvokeHelper();
         //
         private string businessType;
+        private string operationType;
 
         public InsuBusiness()
         {
@@ -64,6 +65,7 @@ namespace PTMedicalInsurance
                 joInterface = JObject.Parse(JsonHelper.getDestValue(joInParam, "interfaceinfo"));
 
                 businessType = JsonHelper.getDestValue(joInParam, "businessType");
+                operationType = JsonHelper.getDestValue(joInParam, "operationType");
                 if ((businessType == "M6") || (businessType == "M6C") || (businessType == "M6Confirm"))
                 {
                     Environment.CurrentDirectory = @"D:\HttpServerAPI\bin\libs";
@@ -206,6 +208,11 @@ namespace PTMedicalInsurance
                             {
                                 rtnResult = JsonHelper.setExceptionJson(-100, "读卡失败!", outParam).ToString();
                             }
+                            else if (string.IsNullOrEmpty(outParam))
+                            {
+                                // 点击取消或关闭
+                                rtnResult = JsonHelper.setExceptionJson(-100, "读卡失败!", "读卡信息为空").ToString();
+                            }
                             else
                             {
                                 //展示患者信息界面
@@ -214,7 +221,7 @@ namespace PTMedicalInsurance
                                     rtnResult = outParam;
                                 }
                                 else
-                                {           
+                                {
                                     rtnResult = JsonHelper.setIrisReturnValue(0, "", JObject.Parse(outParam)).ToString();
                                 }
                             }
@@ -731,6 +738,7 @@ namespace PTMedicalInsurance
                         }
                     case "M5"://门诊结算
                         {
+                            
                             #region 读卡
                             string patInfo = "";
 
@@ -747,7 +755,7 @@ namespace PTMedicalInsurance
                             JObject jo2201Inpar_plain = JObject.Parse(JsonHelper.getDestProperty(joReg, "data"));
                             jo2201Inpar_plain = JObject.Parse(JsonHelper.setCenterInpar("2201", jo2201Inpar_plain));
                             JObject jo2201Rtn = OutpatientReg(joReg, patInfo);
-
+                            
                             //此处先取到就诊信息上传的入参,只要挂号成功就保存到云HIS后台(保存后台需要用到2203入参)
                             JObject jo2203Inpar = new JObject();
                             JObject jo2203Inpar_plain = new JObject();
@@ -772,7 +780,7 @@ namespace PTMedicalInsurance
 
                             #region 就诊信息上传[2203]/[2203A]
 
-                           
+
                             //门诊就诊信息上传                            
                             JObject jo2203Rtn = invoker.invokeCenterService("2203A", jo2203Inpar );
                             if (JsonHelper.parseCenterRtnValue(jo2203Rtn, out errMsg) != 0)
@@ -863,7 +871,13 @@ namespace PTMedicalInsurance
                             JObject joSettlement = JObject.Parse(JsonHelper.getDestValue(joReg, "settlement"));
                             //修改joSettlement的就诊ID ,总金额等
                             joSettlement["mdtrt_id"] = Global.pat.mdtrtID;
-                            joSettlement["medfee_sumamt"] = JsonHelper.getDestValue(joSumFee, "data.Sumamt");       
+                            joSettlement["medfee_sumamt"] = JsonHelper.getDestValue(joSumFee, "data.Sumamt");
+
+                            if ("RegisterOP".Equals(operationType))
+                            {
+                                // 门诊挂号(医疗类别)
+                                joSettlement["med_type"] = "12";
+                            }
 
                             //预结算2206
                             if (hBus.preSettlement_OutPat(joSettlement, out outParam) != 0)

+ 16 - 7
Readme.md

@@ -1,20 +1,29 @@
 ## 医保业务DLL库使用说明:
   该项目遵循以下原则:
 
- #### 1.Master为空项目,仅保留说明文件,便于其他新分支的建立
+  1. Master为空项目,仅保留说明文件,便于其他新分支的建立
 
- #### 2.按市+医保类型建立代码分支,如“安徽基线版”,分支名为:AnHui_Base,医保类型包括:Base(基线版)、工伤(Injury)、异地(Offsite)、其它(Other),如果没有可适当增加
+  2. 按市+医保类型建立代码分支,如“安徽基线版”,分支名为:AnHui_Base,医保类型包括:Base(基线版)、工伤(Injury)、异地(Offsite)、其它(Other),如果没有可适当增加
 
- #### 3.每个分支下存放每个省的业务逻辑代码项目,项目名应遵循与分支名保持一致,如AnHui_Base
+  3. 每个分支下存放每个省的业务逻辑代码项目,项目名应遵循与分支名保持一致,如AnHui_Base
 
- #### 4.每个分支的根目录应保留本Readme.md文档,同时应将各个分支的特殊业务场景或版本更新日志放到此文档
+  4. 每个分支的根目录应保留本Readme.md文档,同时应将各个分支的特殊业务场景或版本更新日志放到此文档
 
- #### 5.使用手册见文档:https://dqqslxaq2y.feishu.cn/docx/VxZhdSrFDonnwTxxTPZctr7onSb?from=from_copylink
+  5. 使用手册见文档:https://dqqslxaq2y.feishu.cn/docx/VxZhdSrFDonnwTxxTPZctr7onSb?from=from_copylink
  
 
-
 ## 业务分支说明(分支特性,请做相应调整)
- 名称:XXX医保
+ 名称:重庆医保
+	接口开发:东软
+	上线范围:结算(社保、身份证、电子医保卡)、进销存、事前事中、Lis项目、清单上传
 
 ### 版本特性:
+  - 住院结算,默认不采用个人账户支付(结算界面默认不选中)
+
+  - 本地和异地结算单打印样式不同
+
+  - 对码界面增加了“价格”显示
+
+  - 只有省外异地(直辖市)
 
+  

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác