|
@@ -33,6 +33,31 @@ namespace MedicalInsurance.Forms
|
|
|
public string relation; //亲属关系
|
|
|
public string set_flag; //结算标志 预结正结标志
|
|
|
public string mutualAidPay; //共济金额
|
|
|
+ private string oldAreaCode = "";
|
|
|
+ private int oldInterfaceDr = 0;
|
|
|
+ private string oldMdtrtID = "";
|
|
|
+ private string oldSetleID = "";
|
|
|
+
|
|
|
+ private void CacheVariables()
|
|
|
+ {
|
|
|
+ // 共济可能会同时使用不同的医保接口类型,此时由共济选择后指定
|
|
|
+ Global.curEvt.MustConvertURL = false;
|
|
|
+ oldAreaCode = Global.inf.areaCode;
|
|
|
+ oldInterfaceDr = Global.inf.interfaceDr;
|
|
|
+ oldMdtrtID = Global.pat.mdtrtID;
|
|
|
+ oldSetleID = Global.pat.settlID;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void RestoreVariables()
|
|
|
+ {
|
|
|
+ Global.curEvt.MustConvertURL = true;
|
|
|
+ Global.inf.areaCode = oldAreaCode;
|
|
|
+ Global.inf.interfaceDr = oldInterfaceDr;
|
|
|
+ Global.pat.insuplc_admdvs = Global.inf.areaCode;
|
|
|
+ Global.pat.mdtrtID = oldMdtrtID;
|
|
|
+ Global.pat.settlID = oldSetleID;
|
|
|
+ }
|
|
|
+
|
|
|
public MutualAid(JObject jo)
|
|
|
{
|
|
|
InitializeComponent();
|
|
@@ -44,7 +69,8 @@ namespace MedicalInsurance.Forms
|
|
|
string errMsg;
|
|
|
getSettlInfo(out errMsg);
|
|
|
getSumamtInfo(out errMsg);
|
|
|
-
|
|
|
+ CacheVariables();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public MutualAid(string settlId)
|
|
@@ -58,15 +84,8 @@ namespace MedicalInsurance.Forms
|
|
|
string errMsg;
|
|
|
getSettlInfo(out errMsg);
|
|
|
getSumamtInfo(out errMsg);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- public MutualAid()
|
|
|
- {
|
|
|
- InitializeComponent();
|
|
|
- GridViewSetter grdSetter = new GridViewSetter();
|
|
|
- grdSetter.SetHeaderTextOfDgvMutualAidSettleInfo(dgvSettlInfo);
|
|
|
- grdSetter.SetHeaderTextOfDgvMutualAidSumamtInfo(dgvSumamt);
|
|
|
+ // 共济可能会同时使用不同的医保接口类型,此时由共济选择后指定
|
|
|
+ CacheVariables();
|
|
|
}
|
|
|
|
|
|
#region 方法封装
|
|
@@ -82,7 +101,7 @@ namespace MedicalInsurance.Forms
|
|
|
|
|
|
JObject joRtn = iris.QuerySettlementInfo(joSqlStr);
|
|
|
dtSumumt = (DataTable)JsonConvert.DeserializeObject(joRtn["result"]["data"].ToString(), (typeof(DataTable)));
|
|
|
- decimal accountPay=0, cashPay=0, mutualAidPay = 0;
|
|
|
+ decimal accountPay=0, mutualAidPay = 0;
|
|
|
for (int i = 1; i < dtSettlInfo.Rows.Count; i++)
|
|
|
{
|
|
|
int billType = int.Parse(dtSettlInfo.Rows[i]["BillType"].ToString());
|
|
@@ -152,7 +171,7 @@ namespace MedicalInsurance.Forms
|
|
|
mPsnNO = joBaseInfo["psn_no"].ToString();
|
|
|
mCertType = joComInfo["mdtrt_cert_type"].ToString();
|
|
|
mCertNO = joComInfo["mdtrt_cert_no"].ToString();
|
|
|
- mInsutype = joSelectedInsuInfo["insutype_old"].ToString();
|
|
|
+ mInsutype = joSelectedInsuInfo["insutypeNo"].ToString();
|
|
|
|
|
|
Global.pat.insuplc_admdvs = JsonHelper.getDestValue(joSelectedInsuInfo, "insuplc_admdvs");
|
|
|
|
|
@@ -160,8 +179,6 @@ namespace MedicalInsurance.Forms
|
|
|
|
|
|
|
|
|
//弹出共济结算选择框
|
|
|
-
|
|
|
- {
|
|
|
//组织入参
|
|
|
JObject joData = new JObject();
|
|
|
joData.Add("psn_no", mPsnNO); //人员编号
|
|
@@ -198,10 +215,6 @@ namespace MedicalInsurance.Forms
|
|
|
output = joRtn.ToString();
|
|
|
return 0;
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- return 0;
|
|
|
}
|
|
|
catch (Exception e)
|
|
|
{
|
|
@@ -227,12 +240,12 @@ namespace MedicalInsurance.Forms
|
|
|
errMsg = "当前结算为主结算,请选择正确的共济支付结算!";
|
|
|
return -1;
|
|
|
}
|
|
|
- if (dtSettlInfo.Rows[i]["InterfaceDr"].ToString() == "1")
|
|
|
+ if (dtSettlInfo.Rows[i]["InterfaceDr"].ToString() == "38")
|
|
|
{
|
|
|
Global.curEvt.URL = @"http://10.109.103.59:8080/mss/web/api/fsi/callService";
|
|
|
Global.inf.areaCode = "519900";
|
|
|
}
|
|
|
- if (dtSettlInfo.Rows[i]["InterfaceDr"].ToString() == "5")
|
|
|
+ if (dtSettlInfo.Rows[i]["InterfaceDr"].ToString() == "37")
|
|
|
{
|
|
|
Global.curEvt.URL = @"http://10.109.103.61:8080/mss/web/api/fsi/callService";
|
|
|
Global.inf.areaCode = "510106";
|
|
@@ -320,7 +333,7 @@ namespace MedicalInsurance.Forms
|
|
|
jaTmp.Add(joSetlinfo);
|
|
|
joTmp.Add("params", jaTmp);
|
|
|
JObject joRtn = invoker.invokeInsuService(joTmp.ToString(), "插入结算信息");
|
|
|
- if (JsonHelper.parseCenterRtnValue(joRtn, out errMsg) != 0)
|
|
|
+ if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
|
|
|
{
|
|
|
return -1;
|
|
|
}
|
|
@@ -339,7 +352,7 @@ namespace MedicalInsurance.Forms
|
|
|
jaTmp.Add(joSetlDetail);
|
|
|
joTmp.Add("params", jaTmp);
|
|
|
JObject joInsertSetlDetail = invoker.invokeInsuService(joTmp.ToString(), "插入结算明细信息");
|
|
|
- if (JsonHelper.parseCenterRtnValue(joInsertSetlDetail, out errMsg) != 0)
|
|
|
+ if (JsonHelper.parseIrisRtnValue(joInsertSetlDetail, out errMsg) != 0)
|
|
|
{
|
|
|
MessageBox.Show("插入结算明细信息:" + errMsg);
|
|
|
}
|
|
@@ -437,7 +450,7 @@ namespace MedicalInsurance.Forms
|
|
|
try
|
|
|
{
|
|
|
//读卡
|
|
|
- string patInfo,funNO="S2101";
|
|
|
+ string patInfo, funNO = "S2101";
|
|
|
//if (dtSettlInfo.Rows[0]["admType"].ToString() == "2")
|
|
|
//{
|
|
|
// funNO = "1101";
|
|
@@ -450,16 +463,6 @@ namespace MedicalInsurance.Forms
|
|
|
set_flag = frm.set_flag;
|
|
|
int i = frm.cbxInterface.SelectedIndex;
|
|
|
DataTable dtInteface = (DataTable)frm.cbxInterface.DataSource;
|
|
|
-
|
|
|
- if (i != 2)
|
|
|
- {
|
|
|
- Global.pat.insuplc_admdvs = "";
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Global.pat.insuplc_admdvs = "519900";
|
|
|
- }
|
|
|
-
|
|
|
Global.curEvt.URL = dtInteface.Rows[i]["CenterURL"].ToString();
|
|
|
Global.inf.areaCode = dtInteface.Rows[i]["AreaCode"].ToString();
|
|
|
Global.inf.interfaceDr = int.Parse(dtInteface.Rows[i]["ID"].ToString());
|
|
@@ -485,7 +488,7 @@ namespace MedicalInsurance.Forms
|
|
|
return;
|
|
|
}
|
|
|
//保存到医保平台
|
|
|
- if (saveMutualAidSettlementToCloudPlatform(patInfo,centerReturn,out errMsg) != 0)
|
|
|
+ if (saveMutualAidSettlementToCloudPlatform(patInfo, centerReturn, out errMsg) != 0)
|
|
|
{
|
|
|
MessageBox.Show(errMsg);
|
|
|
return;
|
|
@@ -524,17 +527,24 @@ namespace MedicalInsurance.Forms
|
|
|
{
|
|
|
outParam = "";
|
|
|
JObject joSignRtn = new JObject();
|
|
|
- CallResult ret = new SignInProcess().Process(joSignRtn);
|
|
|
- if (!ret.Success)
|
|
|
+ if (!iris.isSigned(ref Global.curEvt.signno))
|
|
|
{
|
|
|
- Global.writeLog(joSignRtn.ToString());
|
|
|
- outParam = ret.Data;
|
|
|
- return -1;
|
|
|
+ CallResult ret = new SignInProcess().Process(joSignRtn);
|
|
|
+ Global.writeLog("共济签到:" + ret.Data);
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- Global.writeLog(joSignRtn.ToString());
|
|
|
+ else {
|
|
|
+ Global.writeLog("收费员已签到!");
|
|
|
}
|
|
|
+
|
|
|
+ //if (!ret.Success)
|
|
|
+ //{
|
|
|
+ // outParam = ret.Data;
|
|
|
+ // return -1;
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // Global.writeLog(ret.Data);
|
|
|
+ //}
|
|
|
|
|
|
try
|
|
|
{
|
|
@@ -748,5 +758,11 @@ namespace MedicalInsurance.Forms
|
|
|
if (getSettlInfo(out errMsg) != 0) { MessageBox.Show(errMsg); }
|
|
|
if (getSumamtInfo(out errMsg) != 0) { MessageBox.Show(errMsg); }
|
|
|
}
|
|
|
+
|
|
|
+ private void MutualAid_FormClosing(object sender, FormClosingEventArgs e)
|
|
|
+ {
|
|
|
+ // 恢复转换规则
|
|
|
+ RestoreVariables();
|
|
|
+ }
|
|
|
}
|
|
|
}
|