|
@ -98,6 +98,9 @@ public class EntranceService {
|
|
|
|
|
|
private static String BS16018 = "BS16018";
|
|
|
|
|
|
//his退费接口
|
|
|
private static String BS15021 = "BS15021";
|
|
|
|
|
|
private String orgCode = "350211A1002";
|
|
|
private String orgName = "350211A1002";
|
|
|
@Value("${hospital.mqUser}")
|
|
@ -1387,6 +1390,123 @@ public class EntranceService {
|
|
|
return ConvertUtil.convertListEnvelopInBodyRow(resp);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 退费接口
|
|
|
*
|
|
|
* @param userId 操作员 N 必填
|
|
|
* @param userName 操作员姓名 N 必填
|
|
|
* @param cardType 卡类型 N 01社保卡02市民健康卡03院内就诊卡 必填
|
|
|
* @param cardNo 卡号 N 必填
|
|
|
* @param accountType 账户类型 N 01::门诊预交金账户 02:住院预交金账户必填
|
|
|
* @param idNo 身份证 Y必填
|
|
|
* @param withdrawMode 转出类型
|
|
|
* @param depositType 充值类型必填
|
|
|
* @param ServiceType 服务类型必填
|
|
|
* @param amount 退款金额 N 必填
|
|
|
* @param outRefundNo 退款流水号 支付平台唯一必填
|
|
|
* @param outChargeNo 原充值流水号 支付平台唯一必填
|
|
|
* @param origTraceNo 原支付平台流水号支付平台必填
|
|
|
* @param traceSerial 退款业务流水号 支付平台必填
|
|
|
* @param paydate 商户交易时间
|
|
|
* @param notes 备注信息 Y
|
|
|
* @param tradeState 交易状态
|
|
|
* @param failReason 失败原因
|
|
|
* @param failTime 失败时间
|
|
|
* @param extra 扩展参数
|
|
|
* @param demoFlag
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONArray BS15021(String userId, String userName, String cardType, String cardNo, String accountType,String idNo,
|
|
|
String withdrawMode,String depositType,String ServiceType,String amount,String outRefundNo,
|
|
|
String outChargeNo,String origTraceNo,String traceSerial,String paydate,String notes,String tradeState,
|
|
|
String failReason,String failTime,String extra, boolean demoFlag) throws Exception {
|
|
|
String fid = BS15021;
|
|
|
String resp = "";
|
|
|
if (demoFlag) {
|
|
|
resp = getJosnFileResullt(fid);
|
|
|
} else {
|
|
|
StringBuffer sbs = new StringBuffer();
|
|
|
//AccessControl :用户、密码、服务id
|
|
|
sbs.append("<ESBEntry><AccessControl><Fid>" + fid + "</Fid><UserName>" + mqUser + "</UserName><Password>" + mqPwd + "</Password></AccessControl>");
|
|
|
//MessageHeader :固定值 消费方系统编号 S60,提供方系统编号 S01
|
|
|
sbs.append("<MessageHeader><Fid>" + fid + "</Fid><MsgDate>" + DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS) + "</MsgDate><SourceSysCode>" + sourceSysCode + "</SourceSysCode><TargetSysCode>" + targetSysCode + "</TargetSysCode></MessageHeader>");
|
|
|
//查询信息拼接
|
|
|
sbs.append("<MsgInfo><endNum>20000</endNum><Msg/>");
|
|
|
if (StringUtils.isNotBlank(userId)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"userId\" splice=\"and\" value=\"'" + userId + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(userName)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"userName\" splice=\"and\" value=\"'" + userName + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(cardType)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"cardType\" splice=\"and\" value=\"'" + cardType + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(cardNo)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"cardNo\" splice=\"and\" value=\"'" + cardNo + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(accountType)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"accountType\" splice=\"and\" value=\"'" + accountType + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(idNo)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"idNo\" splice=\"and\" value=\"'" + idNo + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(withdrawMode)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"withdrawMode\" splice=\"and\" value=\"'" + withdrawMode + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(depositType)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"depositType\" splice=\"and\" value=\"'" + depositType + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(ServiceType)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"ServiceType\" splice=\"and\" value=\"'" + ServiceType + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(amount)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"amount\" splice=\"and\" value=\"'" + amount + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(outRefundNo)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"outRefundNo\" splice=\"and\" value=\"'" + outRefundNo + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(outChargeNo)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"outChargeNo\" splice=\"and\" value=\"'" + outChargeNo + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(origTraceNo)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"origTraceNo\" splice=\"and\" value=\"'" + origTraceNo + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(traceSerial)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"traceSerial\" splice=\"and\" value=\"'" + traceSerial + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(paydate)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"paydate\" splice=\"and\" value=\"'" + paydate + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(notes)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"notes\" splice=\"and\" value=\"'" + notes + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(tradeState)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"tradeState\" splice=\"and\" value=\"'" + tradeState + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(failReason)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"failReason\" splice=\"and\" value=\"'" + failReason + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(failTime)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"failTime\" splice=\"and\" value=\"'" + failTime + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(extra)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"extra\" splice=\"and\" value=\"'" + extra + "'\"/>");
|
|
|
}
|
|
|
sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
|
|
|
resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
|
|
|
resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
|
|
|
WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
|
|
|
wlyyHttpLogDO.setRequest(sbs.toString());
|
|
|
wlyyHttpLogDO.setResponse(resp);
|
|
|
wlyyHttpLogDO.setCode(BS15021);
|
|
|
wlyyHttpLogDO.setName("预交金退款");
|
|
|
wlyyHttpLogDO.setCreateTime(new Date());
|
|
|
wlyyHttpLogDao.save(wlyyHttpLogDO);
|
|
|
}
|
|
|
return ConvertUtil.convertListEnvelopInBodyRow(resp);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 检查检验
|
|
|
*
|
|
@ -2850,6 +2970,10 @@ public class EntranceService {
|
|
|
if (StringUtils.isNotBlank(archiveVO.getHsflag())) {
|
|
|
sbs.append(" hsflag=\"" + archiveVO.getHsflag() + "\" ");
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(archiveVO.getIdtype())) {
|
|
|
sbs.append(" idtype=\"" + archiveVO.getIdtype() + "\" ");
|
|
|
}
|
|
|
sbs.append(" />");
|
|
|
sbs.append("</root>");
|
|
|
sbs.append("</Msg>");
|