| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using Newtonsoft.Json.Linq;
- using PTMedicalInsurance.Variables;
- using PTMedicalInsurance.Business;
- using PTMedicalInsurance.Common;
- using PTMedicalInsurance.Helper;
- using PTMedicalInsurance.FormSetter;
- namespace PTMedicalInsurance.Forms
- {
- public partial class SettlementForm : Form
- {
- //1.声明自适应类实例
- AutoResizeForm asc = new AutoResizeForm();
- private InvokeHelper invoker = new InvokeHelper();
- public DataTable dtSettlmentDetail;
- //险种
- public string insuType { get; set; }
- public SettlementForm()
- {
- InitializeComponent();
- //this.StartPosition = FormStartPosition.CenterParent;
- asc.controllInitializeSize(this);
- asc.controlAutoSize(this);
- }
- public SettlementForm(JObject jo)
- {
- InitializeComponent();
- JObject joSettlmentInfo = JObject.FromObject(jo["setlinfo"]);
- dtSettlmentDetail = (DataTable)jo["setldetail"].ToObject(typeof(DataTable));
- this.tbAdmCertType.Text = joSettlmentInfo["mdtrt_cert_type"].Text();
- this.tbPsnCertType.Text = joSettlmentInfo["psn_cert_type"].Text();
- this.tbPsnCertNO.Text = joSettlmentInfo["certno"].Text();
- this.tbInsuType.Text = joSettlmentInfo["insutype"].Text();
- this.tbPersonType.Text = joSettlmentInfo["psn_type"].Text();
- this.tbMedType.Text = joSettlmentInfo["med_type"].Text();
- this.tbSumamt.Text = joSettlmentInfo["medfee_sumamt"].Text();
- this.tbFullOwnPay.Text = joSettlmentInfo["fulamt_ownpay_amt"].Text();
- this.tbOverLimitOwnPay.Text = joSettlmentInfo["overlmt_selfpay"].Text();
- this.tbPreSelfPay.Text = joSettlmentInfo["preselfpay_amt"].Text();
- this.tbInScopyAmount.Text = joSettlmentInfo["inscp_scp_amt"].Text();
- this.tbActualPayDeduLine.Text = joSettlmentInfo["act_pay_dedc"].Text();
- this.tbInsuFundPay.Text = joSettlmentInfo["hifp_pay"].Text();
- this.tbInsuFundPayRito.Text = joSettlmentInfo["pool_prop_selfpay"].Text();
- this.tbCvlserv_pay.Text = joSettlmentInfo["cvlserv_pay"].Text();
- this.tbHifes_pay.Text = joSettlmentInfo["hifes_pay"].Text();
- this.tbHifmi_pay.Text = joSettlmentInfo["hifmi_pay"].Text();
- this.tbWorkerLargeMedical.Text = joSettlmentInfo["hifob_pay"].Text();
- this.tbAssian.Text = joSettlmentInfo["maf_pay"].Text();
- this.tbOtherPay.Text = joSettlmentInfo["oth_pay"].Text();
- this.tbFundPaySummat.Text = joSettlmentInfo["fund_pay_sumamt"].Text();
- this.tbPsnSummat.Text = joSettlmentInfo["psn_part_amt"].Text();
- this.tbPsnAccountPaySummat.Text = joSettlmentInfo["acct_pay"].Text();
- this.tbPsnCashPay.Text = joSettlmentInfo["psn_cash_pay"].Text();
- this.tbHospitalPartAmount.Text = joSettlmentInfo["hosp_part_amt"].Text();
- this.tbBalc.Text = joSettlmentInfo["balc"].Text();
- this.tbAccountMutualAidAmount.Text = joSettlmentInfo["acct_mulaid_pay"].Text();
- this.tbClearingWay.Text = joSettlmentInfo["clr_way"].Text();
- this.tbClearingType.Text = joSettlmentInfo["clr_type"].Text();
- Global.Set.acctPay = joSettlmentInfo["acct_pay"].Text();
- this.tbMinpacuntDrugTracCnt.Text = Global.Set.minpacunt_drug_trac_cnt;
- this.tbMcsTracCnt.Text = Global.Set.mcs_trac_cnt;
- setDgvSettlDetailHeader();
- dgvSetlDetail.DataSource = dtSettlmentDetail;
- tcMain.SelectedIndex = 0;
- }
- private void AddDGVColumn(DataGridView dgv, string headerText, string dataPropertyName, int width = 120)
- {
- DataGridViewColumn newColumn = new DataGridViewTextBoxColumn();
- newColumn.HeaderText = headerText;
- newColumn.Width = width;
- newColumn.DataPropertyName = dataPropertyName;
- newColumn.Name = dataPropertyName;
- dgv.Columns.Add(newColumn);
- }
- private void setDgvSettlDetailHeader()
- {
- AddDGVColumn(dgvSetlDetail, "基金支付类型", "fund_pay_type", 80);
- AddDGVColumn(dgvSetlDetail, "符合政策范围金额", "inscp_scp_amt");
- AddDGVColumn(dgvSetlDetail, "本次可支付限额金额", "crt_payb_lmt_amt");
- AddDGVColumn(dgvSetlDetail, "基金支付金额", "fund_payamt");
- AddDGVColumn(dgvSetlDetail, "基金支付类型名称", "fund_pay_type_name", 300);
- AddDGVColumn(dgvSetlDetail, "结算过程信息", "setl_proc_info", 200);
- dgvSetlDetail.ColumnHeadersDefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Bold);
- dgvSetlDetail.ColumnHeadersHeight = 40;
- }
- private void btnInsuFeel_Click(object sender, EventArgs e)
- {
- if (tcMain.SelectedIndex == 0)
- {
- GridViewSetter grdSetter = new GridViewSetter();
- grdSetter.SetHeaderTextOfSettltMentFeelDetailInfo(dgvInsuFeeUpload);
- string sqlStr;
- sqlStr = " SELECT distinct b.SerialNO, b.AdmID AS Adm_Dr,a.InsuName AS HISName,'' as Name,b.HISCode,b.MedInsuNO,b.Price,b.Sumamt,";
- sqlStr = sqlStr + " b.ChargeItemLevel,'' ChargeItemLevelName,b.SelfPayProp,b.UpLimitAmount,b.OverLimitAmount,";
- sqlStr = sqlStr + " b.InScopeAmount,b.FullOwnPayAmount,b.PreSelfPayAmount,b.LimitUsedFlag,b.MedicalChargeItemType,\"Count\" ";
- sqlStr = sqlStr + " FROM BS_MedInsuFeeUploadRecord b LEFT JOIN HB_MedInsuMapRelation a ";
- sqlStr = sqlStr + " ON a.Hospital_Dr=b.Hospital_Dr AND b.MedInsuNO=a.InsuCode ";
- sqlStr = sqlStr + " where b.MedInsuNO<>'' AND b.Hospital_Dr= " + Global.inf.hospitalDr;
- sqlStr = sqlStr + " and b.MdtrtID='" + Global.pat.mdtrtID + "'";
- JObject joSqlstr = new JObject();
- joSqlstr.Add("sqlStr", sqlStr);
- JArray jaParam = new JArray();
- jaParam.Add(joSqlstr);
- JObject joSettlQuery = new JObject();
- joSettlQuery.Add("params", jaParam);
- joSettlQuery.Add("code", "09010118");
- JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询医保结算费用信息");
- DataTable dt = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
- dgvInsuFeeUpload.DataSource = dt;
- tcMain.SelectedIndex = 1;
- }
- else
- tcMain.SelectedIndex = 0;
- }
- private void tcMain_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (tcMain.SelectedIndex == 0)
- btnInsuFeel.Text = "结算费用信息查询";
- else
- btnInsuFeel.Text = "返 回";
- }
- private void btn_OK_Click(object sender, EventArgs e)
- {
- DialogResult = DialogResult.OK;
- }
- private void btn_Cancel_Click(object sender, EventArgs e)
- {
- DialogResult = DialogResult.Cancel;
- }
- }
- }
|