|
@@ -360,14 +360,14 @@ namespace PTMedicalInsurance.Business
|
|
|
outPar = ECTokenReader.ECQuery("1");
|
|
|
JObject jo1161Rtn = JObject.Parse(outPar);
|
|
|
|
|
|
- if (JsonHelper.parseCenterRtnValue(jo1161Rtn, out errMsg) != 0)
|
|
|
+ if (string.IsNullOrEmpty(Global.pat.ecToken))
|
|
|
{
|
|
|
outPar = errMsg;
|
|
|
return -1;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- JObject joOutput = JObject.Parse(JsonHelper.getDestValue(jo1161Rtn, "output"));
|
|
|
+ JObject joOutput = JObject.Parse(JsonHelper.getDestValue(jo1161Rtn, "data"));
|
|
|
outPar = joOutput.ToString();
|
|
|
setPatientByEc(joOutput);
|
|
|
return 0;
|
|
@@ -392,7 +392,6 @@ namespace PTMedicalInsurance.Business
|
|
|
MPat.gend = JsonHelper.getDestValue(jo, "gender");
|
|
|
MPat.brdy = JsonHelper.getDestValue(jo, "birthday");
|
|
|
MPat.naty = JsonHelper.getDestValue(jo, "nationality");
|
|
|
- MPat.payOrdId = "";
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -805,11 +804,25 @@ namespace PTMedicalInsurance.Business
|
|
|
return -1;
|
|
|
}
|
|
|
JObject joRtn = JObject.Parse(errMsg);
|
|
|
- JObject joSettl = JObject.Parse(JsonHelper.getDestValue(joRtn, "data"));
|
|
|
+ String settlInfo = JsonHelper.getDestValue(joRtn, "result.data[0]");
|
|
|
+ if (string.IsNullOrEmpty(settlInfo))
|
|
|
+ {
|
|
|
+ outparam = "没有查询到结算信息,请检查参数";
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
|
|
|
- joInpar.Add("payOrdId", JsonHelper.getDestValue(joSettl, "SettlementID"));//支付订单号
|
|
|
+ JObject joSettl = JObject.Parse(settlInfo);
|
|
|
+
|
|
|
+ MPat.settlID = JsonHelper.getDestValue(joSettl, "SettlementID");
|
|
|
+ //入参
|
|
|
+ joInpar.Add("payOrdId", JsonHelper.getDestValue(joSettl, "PayOrdID"));//支付订单号
|
|
|
joInpar.Add("appRefdSn", Utils.GetTradeNo());//应用退款流水号
|
|
|
- joInpar.Add("appRefdTime", JsonHelper.getDestValue(joInsuAdmObj, "appRefdTime"));//应用退费时间
|
|
|
+ string appRefdTime = JsonHelper.getDestValue(joInsuAdmObj, "appRefdTime");
|
|
|
+ if (string.IsNullOrEmpty(appRefdTime))
|
|
|
+ {
|
|
|
+ appRefdTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
+ }
|
|
|
+ joInpar.Add("appRefdTime", appRefdTime);//应用退费时间
|
|
|
joInpar.Add("totlRefdAmt", JsonHelper.getDestValue(joSettl, "Sumamt"));//总退费金额
|
|
|
joInpar.Add("psnAcctRefdAmt", JsonHelper.getDestValue(joSettl, "AccountPaySumamt"));//医保个人账户支付
|
|
|
joInpar.Add("fundRefdAmt", JsonHelper.getDestValue(joSettl, "FundPaySumamt"));//基金支付
|
|
@@ -1213,7 +1226,7 @@ namespace PTMedicalInsurance.Business
|
|
|
try
|
|
|
{
|
|
|
string sqlStr = "SELECT * FROM BS_MedInsuSettlement WHERE Hospital_Dr= " + Global.inf.hospitalDr;
|
|
|
- sqlStr = sqlStr + " and AdmType = 3 and Adm_Dr= " + MPat.adm_Dr + " and SettlementID= '" + MPat.payOrdId + "'";
|
|
|
+ sqlStr = sqlStr + " and AdmType = 3 and Adm_Dr= " + MPat.adm_Dr + " and PayOrdID = '" + MPat.payOrdId + "'";
|
|
|
JObject joSqlstr = new JObject();
|
|
|
joSqlstr.Add("sqlStr", sqlStr);
|
|
|
JObject joRtn = mIS.DynamicQuerySettlInfo(joSqlstr);
|
|
@@ -1476,7 +1489,7 @@ namespace PTMedicalInsurance.Business
|
|
|
joSetlinfo.Add("AdmDr", MPat.adm_Dr);
|
|
|
joSetlinfo.Add("MdtrtID", MPat.mdtrtID);
|
|
|
joSetlinfo.Add("SettlementID", MSettl.settlID);//
|
|
|
- joSetlinfo.Add("PayOrdID", MSettl.payOrdId);
|
|
|
+ joSetlinfo.Add("PayOrdID", MSettl.settlID);
|
|
|
joSetlinfo.Add("PersonnelNO", MPat.psn_no);
|
|
|
joSetlinfo.Add("PatientName", MPat.name);
|
|
|
//joSetlinfo.Add("CertificateType", JsonHelper.getDestValue(joRtnSetlinfo, "mdtrt_cert_type"));
|