|
@@ -273,46 +273,30 @@ namespace PTMedicalInsurance.Business
|
|
|
}
|
|
|
public int MobilePayCancelSettlement(out string outPar)
|
|
|
{
|
|
|
- string errMsg;
|
|
|
+ string inParam,errMsg;
|
|
|
outPar = "";
|
|
|
try
|
|
|
{
|
|
|
-
|
|
|
- /**目前从微信那边处理退费
|
|
|
- if (Get6203Inpar(out errMsg) != 0)
|
|
|
- {
|
|
|
-
|
|
|
- }
|
|
|
- YH6203Inpar = errMsg;
|
|
|
- JObject jo6203Rtn = invoker.invokeMPService("6203", M6203Inpar);
|
|
|
- //M6202
|
|
|
- if (ParseCenterRtnValue(jo6203Rtn, out errMsg) != 0)
|
|
|
- {
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- string newSettlID = JsonHelper.getDestValue(jo6203Rtn,"");
|
|
|
- //撤销医保平台结算数据
|
|
|
- cancleSettlement(newSettlID,out errMsg);
|
|
|
- //撤销医保平台费用,登记,
|
|
|
- }
|
|
|
- **/
|
|
|
- //处理撤销数据
|
|
|
-
|
|
|
- if (cancleSettlement(MPat.settlID, out errMsg) != 0)
|
|
|
+ if (Get6203Inpar(out errMsg) != 0)
|
|
|
{
|
|
|
outPar = errMsg;
|
|
|
return -1;
|
|
|
}
|
|
|
- else
|
|
|
+ inParam = errMsg;
|
|
|
+ JObject jo6203Rtn = invoker.invokeMPService("6203", inParam);
|
|
|
+ //M6202
|
|
|
+ if (JsonHelper.parseMPRtnValue(jo6203Rtn, out errMsg) != 0)
|
|
|
{
|
|
|
outPar = errMsg;
|
|
|
- return 0;
|
|
|
+ return -1;
|
|
|
}
|
|
|
+
|
|
|
+ //撤销医保平台结算数据
|
|
|
+ return cancleSettlement(MPat.settlID, out outPar);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
+ outPar = ex.Message;
|
|
|
return -1;
|
|
|
}
|
|
|
}
|
|
@@ -720,16 +704,16 @@ namespace PTMedicalInsurance.Business
|
|
|
return -1;
|
|
|
}
|
|
|
JObject joRtn = JObject.Parse(errMsg);
|
|
|
- JObject joSettl = JObject.Parse(JsonHelper.getDestValue(joRtn, "data"));
|
|
|
+ JObject joSettl = JObject.Parse(JsonHelper.getDestValue(joRtn, "result.data[0]"));
|
|
|
|
|
|
//入参
|
|
|
joInpar.Add("payOrdId", JsonHelper.getDestValue(joSettl, "SettlementID"));//支付订单号
|
|
|
- joInpar.Add("appRefdSn", JsonHelper.getDestValue(joSettl, ""));//应用退款流水号
|
|
|
- joInpar.Add("appRefdTime", JsonHelper.getDestValue(joSettl, ""));//应用退费时间
|
|
|
+ joInpar.Add("appRefdSn", Utils.GetTradeNo());//应用退款流水号
|
|
|
+ joInpar.Add("appRefdTime", JsonHelper.getDestValue(joInsuAdmObj, "appRefdTime"));//应用退费时间
|
|
|
joInpar.Add("totlRefdAmt", JsonHelper.getDestValue(joSettl, "Sumamt"));//总退费金额
|
|
|
joInpar.Add("psnAcctRefdAmt", JsonHelper.getDestValue(joSettl, "AccountPaySumamt"));//医保个人账户支付
|
|
|
joInpar.Add("fundRefdAmt", JsonHelper.getDestValue(joSettl, "FundPaySumamt"));//基金支付
|
|
|
- joInpar.Add("cashRefdAmt", JsonHelper.getDestValue(joInsuAdmObj, "PersonCashPay"));//现金退费金额
|
|
|
+ joInpar.Add("cashRefdAmt", JsonHelper.getDestValue(joSettl, "PersonCashPay"));//现金退费金额
|
|
|
joInpar.Add("ecToken", MPat.token);//电子凭证授权Token 前端传入
|
|
|
joInpar.Add("refdType", "ALL");//退费类型 前端传入
|
|
|
joInpar.Add("expData", "");//扩展数据 前端传入
|
|
@@ -1422,10 +1406,10 @@ namespace PTMedicalInsurance.Business
|
|
|
joSetlinfo.Add("OtherPay", MSettl.otherPay);//其他支出
|
|
|
joSetlinfo.Add("FundPaySumamt", MSettl.fundPaySumamt);//基金支付总额
|
|
|
joSetlinfo.Add("PersonPaySumamt", MSettl.personPaySumamt);//个人负担总金额
|
|
|
- joSetlinfo.Add("AccountPaySumamt", MSettl.accountMutualAidAmount);//个人账户支出
|
|
|
+ joSetlinfo.Add("AccountPaySumamt", MSettl.accountPaySumamt);//个人账户支出
|
|
|
joSetlinfo.Add("PersonCashPay", MSettl.personCashPay);//个人现金支出
|
|
|
joSetlinfo.Add("Balance", MSettl.balance);// 余额
|
|
|
- joSetlinfo.Add("AccountMutualAidAmount", "");//个人账户共济支付金额
|
|
|
+ joSetlinfo.Add("AccountMutualAidAmount", MSettl.accountMutualAidAmount);//个人账户共济支付金额
|
|
|
joSetlinfo.Add("OrganSettlementID", "");//医药机构结算ID
|
|
|
joSetlinfo.Add("ClearingOrgan", MSettl.clearingOrgan);//清算经办机构
|
|
|
joSetlinfo.Add("ClearingWay", MSettl.clearingWay);//清算方式
|
|
@@ -1580,26 +1564,5 @@ namespace PTMedicalInsurance.Business
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
- #region 解析中心返回
|
|
|
- /// <summary>
|
|
|
- /// 解析银海移动支付返参
|
|
|
- /// </summary>
|
|
|
- /// <param name="joRtn"></param>
|
|
|
- /// <param name="errorMsg"></param>
|
|
|
- /// <returns></returns>
|
|
|
- public int ParseCenterRtnValue(JObject joRtn, out string errorMsg)
|
|
|
- {
|
|
|
- try
|
|
|
- {
|
|
|
- errorMsg = JsonHelper.getDestValue(joRtn, "message");
|
|
|
- return int.Parse(JsonHelper.getDestValue(joRtn, "code")); //0 成功-1 失败
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- errorMsg = "解析银海移动支付返参发生异常:" + ex.Message;
|
|
|
- return -1;
|
|
|
- }
|
|
|
- }
|
|
|
- #endregion
|
|
|
}
|
|
|
}
|