|
|
@@ -62,11 +62,12 @@ namespace PTMedicalInsurance.Forms
|
|
|
grdSetter.SetHeaderTextOfHisAndInsuCheckData(dgvHisAndInsuCheck);
|
|
|
grdSetter.SetHeaderTextOfHisSetlData(dgvHisSetlData);
|
|
|
grdSetter.SetHeaderTextOfInsuSetlData(dgvInsuSettlData);
|
|
|
+ grdSetter.SetHeaderTextOfDgvUnCheckData_O(dgvUnCheckData_O);
|
|
|
cbgGroupSet.SelectAll();
|
|
|
cbgGroupSet.SetItemCheckState(1, false);
|
|
|
cbgGroupSet.SetItemCheckState(4, false);
|
|
|
|
|
|
- cbxValid.SelectedIndex = 0;
|
|
|
+ cbxValid.SelectedIndex = 1;
|
|
|
cbValid_2.SelectedIndex = 1;
|
|
|
cbValid_3.SelectedIndex = 0;
|
|
|
rbgTimeWay.SelectedIndex = 0;
|
|
|
@@ -75,6 +76,7 @@ namespace PTMedicalInsurance.Forms
|
|
|
cbDivision.SelectedIndex = 4;
|
|
|
cbValidFlag.SelectedIndex = 2;
|
|
|
cbBillType.SelectedIndex = 2;
|
|
|
+
|
|
|
|
|
|
DateTime firstDayOfLastMonth = DateTime.Now.AddDays(1 - DateTime.Now.Day).AddMonths(-1);
|
|
|
DateTime lastDayOfLastMonth = DateTime.Now.AddDays(0 - DateTime.Now.Day);
|
|
|
@@ -103,8 +105,10 @@ namespace PTMedicalInsurance.Forms
|
|
|
dpED_Local.Text = DateTime.Now.ToString("2023-08-01 23:59:59");
|
|
|
dpED_3.Value = DateTime.Now;
|
|
|
WindowState = FormWindowState.Maximized;
|
|
|
+
|
|
|
cbxValid_O.SelectedIndex = 0;
|
|
|
rbgValidFlag.SelectedIndex = 0;
|
|
|
+ rbgSettlOrgan.SelectedIndex = 1;
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -253,17 +257,22 @@ namespace PTMedicalInsurance.Forms
|
|
|
|
|
|
if (dt.Rows[i]["clr_type"].ToString() == "99982")
|
|
|
{
|
|
|
- if (cbgGroupSet.GetItemCheckState(1))
|
|
|
- {
|
|
|
- joCheck.insutype = dt.Rows[i]["insutype"].ToString();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- error = "该条为生育项目,请勾选左侧面板险种类型,点击查询后再进行对账";
|
|
|
- return -1;
|
|
|
- }
|
|
|
+ joCheck.insutype = 1;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
if (dt.Rows[i]["clr_type"].ToString() == "03")
|
|
|
{
|
|
|
@@ -277,14 +286,9 @@ namespace PTMedicalInsurance.Forms
|
|
|
return -1;
|
|
|
}
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- joCheck.prm_yabtch = Global.pat.patExtend.prm_yabtch;
|
|
|
- }
|
|
|
|
|
|
-
|
|
|
+ joCheck.prm_yabtch = Global.pat.patExtend.prm_yabtch;
|
|
|
joCheck.clr_type = dt.Rows[i]["clr_type"].ToString();
|
|
|
-
|
|
|
joCheck.medfee_sumamt = dt.Rows[i]["medfee_sumamt"].ToString();
|
|
|
joCheck.fund_pay_sumamt = dt.Rows[i]["fund_pay_sumamt"].ToString();
|
|
|
joCheck.acct_pay = dt.Rows[i]["acct_pay"].ToString();
|
|
|
@@ -715,15 +719,20 @@ namespace PTMedicalInsurance.Forms
|
|
|
|
|
|
string sqlStr = "select Adm_Dr,PatientName ,Convert(VARCHAR(12),RecordID) as RecordID,MdtrtID,SettlementID,PersonnelNO,SettlementDateTime,Convert(decimal(18,2),Sumamt) as Sumamt,Convert(decimal(18,2),AccountPaySumamt) as AccountPaySumamt,ValidFlag,BillType,"
|
|
|
+ "Convert(decimal(18,2),(HealthInsurancePay + EnterpriseSupplementPay +CivilserviceAllowancePay +OtherPay +MedicalAssistPay)) AS JJZFZE,"
|
|
|
- + "InsuranceAreaCode,MedicalType,msgid,ClearingOrgan"
|
|
|
+ + "InsuranceAreaCode,MedicalType,msgid,ClearingOrgan,MainSettlementIDOfMutualAid"
|
|
|
+ " FROM BS_MedInsuSettlement WHERE Hospital_Dr=" + Global.inf.hospitalDr;
|
|
|
sqlStr = sqlStr + " and SettlementDateTime>'" + dpST_L.Text + "'";
|
|
|
sqlStr = sqlStr + " and SettlementDateTime<'" + dpED_L.Text + "'";
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ string ClearingOrganStr = "";
|
|
|
if (rbgSettlOrgan.SelectedIndex == 0)
|
|
|
- Global.pat.insuplc_admdvs = "529900";
|
|
|
+ ClearingOrganStr = " and ClearingOrgan='529900'";
|
|
|
else
|
|
|
- Global.pat.insuplc_admdvs = "520199";
|
|
|
- sqlStr = sqlStr + " and ClearingOrgan='" + Global.pat.insuplc_admdvs + "'";
|
|
|
+ ClearingOrganStr = $" and ClearingOrgan in ('520199','{Global.inf.areaCode}')";
|
|
|
+ sqlStr = sqlStr + ClearingOrganStr;
|
|
|
sqlStr = sqlStr + " and ClearingType <> '9902'";
|
|
|
sqlStr = sqlStr + " and BillType<>9 and((ConfirmFlag = 1 and AdmType IN('3', '4')) OR(AdmType IN('1', '2')))";
|
|
|
if (rbgValidFlag.SelectedIndex == 0) sqlStr = sqlStr + " and ValidFlag =1";
|
|
|
@@ -742,27 +751,36 @@ namespace PTMedicalInsurance.Forms
|
|
|
DataTable dt = (DataTable)JsonConvert.DeserializeObject(JsonHelper.getDestValue(joHisRtn, "result"), (typeof(DataTable)));
|
|
|
dgvHisSettlRec.DataSource = dt;
|
|
|
|
|
|
- for (int j = 0; j < dgvHisSettlRec.RowCount; j++)
|
|
|
- {
|
|
|
- string settlementID = dgvHisSettlRec.Rows[j].Cells["SettlementID"].Value.ToString();
|
|
|
- string validFlag = dgvHisSettlRec.Rows[j].Cells["ValidFlag"].Value.ToString();
|
|
|
- string billType = dgvHisSettlRec.Rows[j].Cells["BillType"].Value.ToString();
|
|
|
- string exist = dgvHisSettlRec.Rows[j].Cells["Exist"].Value.ToString();
|
|
|
-
|
|
|
- string status = dgvHisSettlRec.Rows[j].Cells["status"].Value.ToString();
|
|
|
-
|
|
|
-
|
|
|
- if ((validFlag == "1") && (status != "N"))
|
|
|
- {
|
|
|
- dgvHisSettlRec.Rows[j].DefaultCellStyle.BackColor = Color.Red;
|
|
|
- }
|
|
|
-
|
|
|
- if (exist != "存在")
|
|
|
- {
|
|
|
- dgvHisSettlRec.Rows[j].DefaultCellStyle.BackColor = Color.Red;
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
@@ -782,7 +800,16 @@ namespace PTMedicalInsurance.Forms
|
|
|
foreach (JObject jo in jaMiRecord)
|
|
|
{
|
|
|
JObject joTmp = new JObject();
|
|
|
- joTmp.Add("SettlementID", jo["SettlementID"].ToString());
|
|
|
+ string mainSettlementIDOfMutualAid = jo["MainSettlementIDOfMutualAid"].ToString();
|
|
|
+ if (string.IsNullOrEmpty(mainSettlementIDOfMutualAid))
|
|
|
+ {
|
|
|
+ joTmp.Add("SettlementID", jo["SettlementID"].ToString());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ joTmp.Add("SettlementID", mainSettlementIDOfMutualAid);
|
|
|
+ }
|
|
|
+
|
|
|
joTmp.Add("RecordID", jo["RecordID"].ToString());
|
|
|
joTmp.Add("ValidFlag", jo["ValidFlag"].ToString());
|
|
|
joTmp.Add("BillType", jo["BillType"].ToString());
|
|
|
@@ -798,21 +825,38 @@ namespace PTMedicalInsurance.Forms
|
|
|
JArray jaHisRtn = JArray.Parse(JsonHelper.getDestValue(JObject.Parse(errMsg), "result"));
|
|
|
foreach (JObject joMi in jaMiRecord)
|
|
|
{
|
|
|
+ string mainSettlementIDOfMutualAid = joMi["MainSettlementIDOfMutualAid"].ToString();
|
|
|
foreach (JObject joHis in jaHisRtn)
|
|
|
{
|
|
|
- if ((joMi["RecordID"].ToString() == joHis["RecordID"].ToString()) && (joMi["BillType"].ToString() == joHis["BillType"].ToString()))
|
|
|
+ if (string.IsNullOrEmpty(mainSettlementIDOfMutualAid))
|
|
|
{
|
|
|
- Global.writeLog(joMi.ToString());
|
|
|
- if (!joMi.ContainsKey("Exist"))
|
|
|
+ if ((joMi["RecordID"].ToString() == joHis["RecordID"].ToString()) && (joMi["SettlementID"].ToString() == joHis["SettlementID"].ToString()) && (joMi["BillType"].ToString() == joHis["BillType"].ToString()))
|
|
|
{
|
|
|
- joMi.Add("Exist", joHis["Exist"].ToString());
|
|
|
+ if (!joMi.ContainsKey("Exist"))
|
|
|
+ {
|
|
|
+ joMi.Add("Exist", joHis["Exist"].ToString());
|
|
|
+ }
|
|
|
+ if (!joMi.ContainsKey("status"))
|
|
|
+ {
|
|
|
+ joMi.Add("status", joHis["status"].ToString());
|
|
|
+ }
|
|
|
}
|
|
|
- if (!joMi.ContainsKey("status"))
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if ((joMi["RecordID"].ToString() == joHis["RecordID"].ToString()) && (joMi["MainSettlementIDOfMutualAid"].ToString() == joHis["SettlementID"].ToString()) && (joMi["BillType"].ToString() == joHis["BillType"].ToString()))
|
|
|
{
|
|
|
- joMi.Add("status", joHis["status"].ToString());
|
|
|
+ if (!joMi.ContainsKey("Exist"))
|
|
|
+ {
|
|
|
+ joMi.Add("Exist", joHis["Exist"].ToString());
|
|
|
+ }
|
|
|
+ if (!joMi.ContainsKey("status"))
|
|
|
+ {
|
|
|
+ joMi.Add("status", joHis["status"].ToString());
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -834,7 +878,12 @@ namespace PTMedicalInsurance.Forms
|
|
|
sqlStr = sqlStr + " FROM BS_MedInsuSettlement WHERE Hospital_Dr=" + Global.inf.hospitalDr;
|
|
|
sqlStr = sqlStr + " and SettlementDateTime>'" + dpST_L.Text + "'";
|
|
|
sqlStr = sqlStr + " and SettlementDateTime<'" + dpED_L.Text + "'";
|
|
|
- sqlStr = sqlStr + " and ClearingOrgan='" + Global.pat.insuplc_admdvs + "'";
|
|
|
+ string ClearingOrganStr;
|
|
|
+ if (rbgSettlOrgan.SelectedIndex == 0)
|
|
|
+ ClearingOrganStr = " and ClearingOrgan='529900'";
|
|
|
+ else
|
|
|
+ ClearingOrganStr = $" and ClearingOrgan in ('520199','{Global.inf.areaCode}')";
|
|
|
+ sqlStr = sqlStr + ClearingOrganStr;
|
|
|
sqlStr = sqlStr + " and ClearingType <> '9902'";
|
|
|
if (rbgValidFlag.SelectedIndex ==0) sqlStr = sqlStr + " and ValidFlag =1";
|
|
|
if (rbgValidFlag.SelectedIndex == 1) sqlStr = sqlStr + " and ValidFlag =0";
|
|
|
@@ -1151,6 +1200,11 @@ namespace PTMedicalInsurance.Forms
|
|
|
|
|
|
outParam = "";
|
|
|
|
|
|
+ if (dgvHisSettlRec.Rows.Count == 0)
|
|
|
+ {
|
|
|
+ outParam = "下载中心数据需要先查询本地数据!";
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
DataTable dt1 = (DataTable)dgvCenterSettlRec.DataSource;
|
|
|
if (dt1 != null ) dt1.Clear();
|
|
|
if (dpST_L.Value.Date != dpED_L.Value.Date)
|
|
|
@@ -1161,10 +1215,6 @@ namespace PTMedicalInsurance.Forms
|
|
|
|
|
|
try
|
|
|
{
|
|
|
- if (rbgSettlOrgan.SelectedIndex == 0)
|
|
|
- Global.pat.insuplc_admdvs = "529900";
|
|
|
- else
|
|
|
- Global.pat.insuplc_admdvs = "520199";
|
|
|
|
|
|
string filePath,error = "";
|
|
|
if (queryDetailSumInfo(out error) != 0)
|
|
|
@@ -1510,7 +1560,9 @@ namespace PTMedicalInsurance.Forms
|
|
|
private void uiButton3_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
string sqlStr = "SELECT Convert(decimal(18,2),(BillType*(HealthInsurancePay + EnterpriseSupplementPay +CivilserviceAllowancePay +OtherPay +MedicalAssistPay+AccountPaySumamt))) AS FundPaySumamt, ";
|
|
|
- sqlStr = sqlStr + "PatientName,PersonnelNO,Convert(decimal(18,2),Sumamt) as Sumamt,SettlementID,SettlementDateTime as SettlementTime,BillType,MdtrtID,InsuranceAreaCode ";
|
|
|
+ sqlStr = sqlStr + "Convert(decimal(18,2),Sumamt) as Sumamt ";
|
|
|
+ sqlStr = sqlStr + ",Adm_Dr,PatientName,Convert(VARCHAR(12),RecordID) as RecordID,MdtrtID,SettlementID,PersonnelNO,SettlementDateTime as SettlementTime,ValidFlag,BillType";
|
|
|
+ sqlStr = sqlStr + ",InsuranceAreaCode,MedicalType,msgid,ClearingOrgan,MainSettlementIDOfMutualAid";
|
|
|
sqlStr = sqlStr + " FROM BS_MedInsuSettlement WHERE Hospital_Dr=" + Global.inf.hospitalDr;
|
|
|
sqlStr = sqlStr + " and SettlementDateTime>'" + dpST_O.Text + "'";
|
|
|
sqlStr = sqlStr + " and SettlementDateTime<'" + dpED_O.Text + "'";
|
|
|
@@ -1519,7 +1571,6 @@ namespace PTMedicalInsurance.Forms
|
|
|
sqlStr = sqlStr + " and BillType<>9 and((ConfirmFlag = 1 and AdmType IN('3', '4')) OR(AdmType IN('1', '2')))";
|
|
|
|
|
|
|
|
|
-
|
|
|
if (cbxValid_O.SelectedIndex != 0)
|
|
|
{
|
|
|
if (cbxValid_O.SelectedIndex == 1)
|
|
|
@@ -1533,42 +1584,19 @@ namespace PTMedicalInsurance.Forms
|
|
|
joSqlstr.Add("sqlStr", sqlStr);
|
|
|
JObject joRtn = mIS.DynamicQuerySettlInfo(joSqlstr);
|
|
|
|
|
|
-
|
|
|
- DataTable dt = (DataTable)JsonConvert.DeserializeObject(joRtn["result"]["data"].ToString(), (typeof(DataTable)));
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ JObject joHisRtn = BatchHisRecord(joRtn);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ if (JsonHelper.parseIrisRtnValue(joHisRtn, out string error) != 0)
|
|
|
+ {
|
|
|
+ error = "查询HIS结算记录出错,请联系管理员!" + error;
|
|
|
+ MessageBox.Show(error);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ DataTable dt = (DataTable)JsonConvert.DeserializeObject(JsonHelper.getDestValue(joHisRtn, "result"), (typeof(DataTable)));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
dgvOthCheck.DataSource = dt;
|
|
|
tcOtherPlaceCheck.SelectedIndex = 0;
|
|
|
}
|
|
|
@@ -1706,26 +1734,144 @@ namespace PTMedicalInsurance.Forms
|
|
|
private void btDownloadUnCheckData_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
|
|
|
- dynamic joTmp = new JObject();
|
|
|
- joTmp.prm_date = dpST_O.Value.ToString("yyyy-MM-dd");
|
|
|
- joTmp.prm_yabtch = tbCBD_O.Text;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- string errMsg;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ DataLoader _dataLoader;
|
|
|
+ _dataLoader = new DataLoader((out string errMsg) => QueryOthplcUnCheckData(out errMsg), this);
|
|
|
+
|
|
|
+ _dataLoader.StartQueryExportData((result, errMsg) =>
|
|
|
+ {
|
|
|
+
|
|
|
+ if (result == 0)
|
|
|
+ {
|
|
|
+ MessageBox.Show(errMsg);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show(errMsg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private int QueryOthplcUnCheckData(out string errMsg)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ errMsg = "";
|
|
|
+
|
|
|
+ DataTable mergedDataTable = new DataTable();
|
|
|
+
|
|
|
+
|
|
|
+ DateTime dtBegin = dpST_O.Value;
|
|
|
+ DateTime dtEnd = dpED_O.Value;
|
|
|
+ string err;
|
|
|
+ for (DateTime date = dtBegin; date <= dtEnd; date = date.AddDays(1))
|
|
|
+ {
|
|
|
+ DataTable dailyData;
|
|
|
+ if (GetUnCheckData(date, out DataTable dt, out err) != 0)
|
|
|
+ {
|
|
|
+ Global.writeLog(err);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dailyData = dt;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (date == dtBegin)
|
|
|
+ {
|
|
|
+ mergedDataTable = dailyData.Clone();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ mergedDataTable.Merge(dailyData);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ this.Invoke((MethodInvoker)delegate {
|
|
|
+ dgvUnCheckData_O.DataSource = mergedDataTable;
|
|
|
+ tcOtherPlaceCheck.SelectedIndex = 1;
|
|
|
+ });
|
|
|
+
|
|
|
+ if ((mergedDataTable == null) || (mergedDataTable.Rows.Count ==0))
|
|
|
+ {
|
|
|
+ errMsg = "未查询到数据!";
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ errMsg = "查询完成";
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ errMsg = "异常:" + ex.Message;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private int GetUnCheckData(DateTime date,out DataTable dt, out string errMsg)
|
|
|
+ {
|
|
|
+ errMsg = "";
|
|
|
+ dt = null;
|
|
|
+ dynamic joTmp = new JObject();
|
|
|
+ joTmp.prm_date = date.ToString("yyyy-MM-dd");
|
|
|
+ joTmp.prm_yabtch = Global.pat.patExtend.prm_yabtch;
|
|
|
if (invoker.invokeYHCom("H7105", joTmp, out errMsg) != 0)
|
|
|
{
|
|
|
- MessageBox.Show(errMsg);
|
|
|
- return;
|
|
|
+ return -1;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- string centerRtn = errMsg;
|
|
|
-
|
|
|
- if (importToDgvUnCheckData_O(centerRtn,out errMsg) != 0)
|
|
|
+ JObject joRtn = JObject.Parse(xmler.ToJSON(errMsg));
|
|
|
+ dt = (DataTable)JsonConvert.DeserializeObject(JsonHelper.getDestValue(joRtn, "output.sqldata.row"), (typeof(DataTable)));
|
|
|
+ if (dt == null)
|
|
|
{
|
|
|
- MessageBox.Show(errMsg);
|
|
|
- return;
|
|
|
+ errMsg = "返回数据集为空";
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return 0;
|
|
|
}
|
|
|
- tcOtherPlaceCheck.SelectedIndex = 1;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1917,35 +2063,60 @@ namespace PTMedicalInsurance.Forms
|
|
|
return ;
|
|
|
}
|
|
|
|
|
|
- for (int i = 0; i < dgvHisSettlRec.RowCount; i++)
|
|
|
+ bool bFind = false;
|
|
|
+ if ((dgvHisSettlRec.RowCount > 0) && (tcLocalCheckDetail.SelectedIndex ==0))
|
|
|
{
|
|
|
- string settlID = tbSettlmentID.Text;
|
|
|
- string colValue = dgvHisSettlRec.Rows[i].Cells["SettlementID"].Value.ToString();
|
|
|
- if (settlID == colValue)
|
|
|
+ for (int i = 0; i < dgvHisSettlRec.RowCount; i++)
|
|
|
{
|
|
|
- dgvHisSettlRec.ClearSelection();
|
|
|
- dgvHisSettlRec.Rows[i].Selected = true;
|
|
|
+ string settlID = tbSettlmentID.Text;
|
|
|
+ string colValue = dgvHisSettlRec.Rows[i].Cells["SettlementID"].Value.ToString();
|
|
|
+ if (settlID == colValue)
|
|
|
+ {
|
|
|
+ dgvHisSettlRec.ClearSelection();
|
|
|
+ dgvHisSettlRec.Rows[i].Selected = true;
|
|
|
+
|
|
|
+
|
|
|
+ dgvHisSettlRec.CurrentCell = dgvHisSettlRec.Rows[i].Cells[1];
|
|
|
+ dgvHisSettlRec.CurrentRow.Selected = true;
|
|
|
|
|
|
-
|
|
|
- dgvHisSettlRec.CurrentCell = dgvHisSettlRec.Rows[i].Cells[1];
|
|
|
- dgvHisSettlRec.CurrentRow.Selected = true;
|
|
|
+ bFind = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!bFind)
|
|
|
+ {
|
|
|
+ MessageBox.Show("在His数据集中未定位到相关数据,请扩大查询范围或更改结算ID");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- for (int i = 0; i < dgvHisSettlRec.RowCount; i++)
|
|
|
+ bFind = false;
|
|
|
+ if ((dgvCenterSettlRec.RowCount > 0) && (tcLocalCheckDetail.SelectedIndex == 1))
|
|
|
{
|
|
|
- string settlID = tbSettlmentID.Text;
|
|
|
- string colValue = dgvCenterSettlRec.Rows[i].Cells["setl_id"].Value.ToString();
|
|
|
- if (settlID == colValue)
|
|
|
+ for (int i = 0; i < dgvCenterSettlRec.RowCount; i++)
|
|
|
{
|
|
|
- dgvCenterSettlRec.ClearSelection();
|
|
|
- dgvCenterSettlRec.Rows[i].Selected = true;
|
|
|
+ string settlID = tbSettlmentID.Text;
|
|
|
+ string colValue = dgvCenterSettlRec.Rows[i].Cells["setl_id"].Value.ToString();
|
|
|
+ if (settlID == colValue)
|
|
|
+ {
|
|
|
+ dgvCenterSettlRec.ClearSelection();
|
|
|
+ dgvCenterSettlRec.Rows[i].Selected = true;
|
|
|
+
|
|
|
+
|
|
|
+ dgvCenterSettlRec.CurrentCell = dgvCenterSettlRec.Rows[i].Cells[1];
|
|
|
+ dgvCenterSettlRec.CurrentRow.Selected = true;
|
|
|
+
|
|
|
+ bFind = true;
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
- dgvCenterSettlRec.CurrentCell = dgvCenterSettlRec.Rows[i].Cells[1];
|
|
|
- dgvCenterSettlRec.CurrentRow.Selected = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!bFind)
|
|
|
+ {
|
|
|
+ MessageBox.Show("在中心下载的数据集中未定位到相关数据,请扩大查询范围或更改结算ID");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void cmsCheck_Opening(object sender, CancelEventArgs e)
|
|
|
@@ -2370,5 +2541,105 @@ namespace PTMedicalInsurance.Forms
|
|
|
{
|
|
|
Close();
|
|
|
}
|
|
|
+
|
|
|
+ private void dgvHisSettlRec_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
|
|
+ {
|
|
|
+ int j = e.RowIndex;
|
|
|
+ string settlementID = dgvHisSettlRec.Rows[j].Cells["SettlementID"].Value.ToString();
|
|
|
+ string validFlag = dgvHisSettlRec.Rows[j].Cells["ValidFlag"].Value.ToString();
|
|
|
+ string billType = dgvHisSettlRec.Rows[j].Cells["BillType"].Value.ToString();
|
|
|
+ string recordID = dgvHisSettlRec.Rows[j].Cells["RecordID"].Value.ToString();
|
|
|
+ string exist = dgvHisSettlRec.Rows[j].Cells["Exist"].Value.ToString();
|
|
|
+
|
|
|
+ string status = dgvHisSettlRec.Rows[j].Cells["status"].Value.ToString();
|
|
|
+
|
|
|
+
|
|
|
+ if ((validFlag == "1") && (status != "N"))
|
|
|
+ {
|
|
|
+ dgvHisSettlRec.Rows[j].DefaultCellStyle.BackColor = Color.Yellow;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (exist != "存在")
|
|
|
+ {
|
|
|
+ if (recordID == "")
|
|
|
+ {
|
|
|
+ dgvHisSettlRec.Rows[j].DefaultCellStyle.BackColor = Color.Orange;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dgvHisSettlRec.Rows[j].DefaultCellStyle.BackColor = Color.Yellow;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void dgvCenterSettlRec_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
|
|
+ {
|
|
|
+ int i = e.RowIndex;
|
|
|
+ string stmt_rslt = dgvCenterSettlRec.Rows[i].Cells["stmt_rslt"].Value.ToString();
|
|
|
+ if (stmt_rslt == "101")
|
|
|
+ {
|
|
|
+ dgvCenterSettlRec.Rows[i].DefaultCellStyle.BackColor = Color.Yellow;
|
|
|
+ }
|
|
|
+ if (stmt_rslt == "102")
|
|
|
+ {
|
|
|
+ dgvCenterSettlRec.Rows[i].DefaultCellStyle.BackColor = Color.Yellow;
|
|
|
+ }
|
|
|
+ if (stmt_rslt == "103")
|
|
|
+ {
|
|
|
+ dgvCenterSettlRec.Rows[i].DefaultCellStyle.BackColor = Color.Orange;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void tsmAICheck_Click_1(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void uiButton1_Click_1(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ Close();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void btnClose_2_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ Close();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void uiButton4_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ Close();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void dgvOthCheck_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
|
|
+ {
|
|
|
+ int j = e.RowIndex;
|
|
|
+ string settlementID = dgvOthCheck.Rows[j].Cells["SettlementID"].Value.ToString();
|
|
|
+ string validFlag = dgvOthCheck.Rows[j].Cells["ValidFlag"].Value.ToString();
|
|
|
+ string billType = dgvOthCheck.Rows[j].Cells["BillType"].Value.ToString();
|
|
|
+ string recordID = dgvOthCheck.Rows[j].Cells["RecordID"].Value.ToString();
|
|
|
+ string exist = dgvOthCheck.Rows[j].Cells["Exist"].Value.ToString();
|
|
|
+
|
|
|
+ string status = dgvOthCheck.Rows[j].Cells["status"].Value.ToString();
|
|
|
+
|
|
|
+
|
|
|
+ if ((validFlag == "1") && (status != "N"))
|
|
|
+ {
|
|
|
+ dgvOthCheck.Rows[j].DefaultCellStyle.BackColor = Color.Yellow;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (exist != "存在")
|
|
|
+ {
|
|
|
+ if (recordID == "")
|
|
|
+ {
|
|
|
+ dgvOthCheck.Rows[j].DefaultCellStyle.BackColor = Color.Orange;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dgvOthCheck.Rows[j].DefaultCellStyle.BackColor = Color.Yellow;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|