1、加密算法根据系统进行区分、调整类名

2、挂号公用获取参数方法移动到对象下。
3、调整部分静态方法为普通方法。
4、支付宝医保接口新增下单、查询订单、退费等。
5、查询区域接口传递的areaCode的位数根据区域级别调整,5级传递为9位。
debug
wangsq 1 week ago
parent c935b675fb
commit 2afb724ed5
  1. 4
      pom.xml
  2. 16
      src/main/java/com/ynxbd/ali/config/AliConfig.java
  3. 6
      src/main/java/com/ynxbd/ali/helper/AliHelper.java
  4. 287
      src/main/java/com/ynxbd/ali/helper/AliMedicalHelper.java
  5. 4
      src/main/java/com/ynxbd/common/action/AccountsAction.java
  6. 4
      src/main/java/com/ynxbd/common/action/ApiAction.java
  7. 22
      src/main/java/com/ynxbd/common/action/AuthAgentAction.java
  8. 68
      src/main/java/com/ynxbd/common/action/HealthCodeAction.java
  9. 20
      src/main/java/com/ynxbd/common/action/InHospAction.java
  10. 6
      src/main/java/com/ynxbd/common/action/MeTechnologyReAction.java
  11. 2
      src/main/java/com/ynxbd/common/action/MedToolAction.java
  12. 10
      src/main/java/com/ynxbd/common/action/PatientAction.java
  13. 20
      src/main/java/com/ynxbd/common/action/RecipeAction.java
  14. 22
      src/main/java/com/ynxbd/common/action/RegisterAction.java
  15. 2
      src/main/java/com/ynxbd/common/action/SelfHelpAction.java
  16. 12
      src/main/java/com/ynxbd/common/action/TreatAction.java
  17. 4
      src/main/java/com/ynxbd/common/action/XBDAction.java
  18. 7
      src/main/java/com/ynxbd/common/action/base/BaseAction.java
  19. 48
      src/main/java/com/ynxbd/common/action/pay/AliPayAction.java
  20. 60
      src/main/java/com/ynxbd/common/action/pay/MedicalAction.java
  21. 10
      src/main/java/com/ynxbd/common/action/pay/MedicalTestAction.java
  22. 17
      src/main/java/com/ynxbd/common/action/pay/PayAction.java
  23. 8
      src/main/java/com/ynxbd/common/action/pay/ThirdPartyPayAction.java
  24. 24
      src/main/java/com/ynxbd/common/action/report/LisReportAction.java
  25. 5
      src/main/java/com/ynxbd/common/action/report/PacsReportAction.java
  26. 22
      src/main/java/com/ynxbd/common/action/report/ReportAction.java
  27. 4
      src/main/java/com/ynxbd/common/action/test/TestAction.java
  28. 6
      src/main/java/com/ynxbd/common/bean/HisRecipe.java
  29. 8
      src/main/java/com/ynxbd/common/bean/enums/MerchantEnum.java
  30. 23
      src/main/java/com/ynxbd/common/bean/his/HisArea.java
  31. 12
      src/main/java/com/ynxbd/common/bean/pay/Order.java
  32. 149
      src/main/java/com/ynxbd/common/bean/pay/Register.java
  33. 4
      src/main/java/com/ynxbd/common/bean/report/CheckReport.java
  34. 45
      src/main/java/com/ynxbd/common/dao/his/HisPatientDao.java
  35. 4
      src/main/java/com/ynxbd/common/dao/lis/RMLisDao.java
  36. 39
      src/main/java/com/ynxbd/common/helper/common/AesHelper.java
  37. 18
      src/main/java/com/ynxbd/common/helper/common/AesMicroHelper.java
  38. 48
      src/main/java/com/ynxbd/common/service/HCodeService.java
  39. 141
      src/main/java/com/ynxbd/common/service/MedicalService.java
  40. 10
      src/main/java/com/ynxbd/common/service/MicroService.java
  41. 10
      src/main/java/com/ynxbd/common/service/PatientService.java
  42. 2
      src/main/java/com/ynxbd/common/service/RecipeService.java
  43. 2
      src/main/java/com/ynxbd/common/service/RegService.java
  44. 21
      src/main/java/com/ynxbd/common/service/cache/AreaCache.java
  45. 158
      src/main/java/com/ynxbd/common/service/params/RegParams.java
  46. 11
      src/main/java/com/ynxbd/common/service/params/RequestParams.java
  47. 6
      src/main/java/com/ynxbd/wx/servlet/QServlet.java
  48. 6
      src/main/java/com/ynxbd/wx/wxfactory/AesWxHelper.java
  49. 4
      src/main/java/com/ynxbd/wx/wxfactory/WxAuthHelper.java
  50. 43
      src/main/java/com/ynxbd/wx/wxfactory/WxMedicalHelper.java
  51. 4
      src/main/java/com/ynxbd/wx/wxfactory/WxMessageHelper.java
  52. 31
      src/main/java/com/ynxbd/wx/wxfactory/bean/OrderMIEnum.java
  53. 28
      src/main/java/com/ynxbd/wx/wxfactory/bean/OrderTypeEnum.java
  54. 13
      src/main/java/com/ynxbd/wx/wxfactory/medical/Client.java
  55. 4
      src/main/java/com/ynxbd/wx/wxfactory/medical/MIConfig.java
  56. 52
      src/main/resources/ali.properties
  57. 2
      src/main/resources/webservice.properties

@ -6,7 +6,7 @@
<groupId>com.ynxbd</groupId>
<artifactId>wx</artifactId>
<version>5.3.0</version>
<version>6.0.1</version>
<packaging>war</packaging>
<name>wx Maven Webapp</name>
@ -306,7 +306,7 @@
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>4.40.54.ALL</version>
<version>4.40.393.ALL</version>
<exclusions>
<exclusion>
<artifactId>fastjson</artifactId>

@ -1,5 +1,6 @@
package com.ynxbd.ali.config;
import com.alipay.api.AlipayConfig;
import com.alipay.easysdk.factory.Factory;
import com.alipay.easysdk.kernel.Config;
import com.ynxbd.common.helper.ProperHelper;
@ -14,7 +15,9 @@ public class AliConfig {
// 消息推送开关
public static boolean IS_PUSH_MSG;
public static final boolean IS_NEW_USER_ID_VERSION; // 是否为新版userId版本
public static final String APP_ID;
public static final String APP_PRIVATE_KEY;
public static final String ALI_PUBLIC_KEY;
public static final String SYS_SERVICE_PROVIDER_ID;
@ -50,6 +53,7 @@ public class AliConfig {
IS_PUSH_MSG = config.getBoolean("ali.is_push_msg", false);
// 盒子支付开关
IS_PAY_ENABLE = config.getBoolean("ali.is_pay_enable", false);
IS_NEW_USER_ID_VERSION = config.getBoolean("ali.is_new_user_id_version", false);
APP_ID = config.getString("ali.app_id");
ALI_PUBLIC_KEY = config.getString("ali.public_key");
@ -109,4 +113,16 @@ public class AliConfig {
// config.encryptKey = "<-- 请填写您的AES密钥,例如:aa4BtZ4tspm2wnXLb1ThQA== -->";
Factory.setOptions(config);
}
public static AlipayConfig getAlipayConfig() {
AlipayConfig alipayConfig = new AlipayConfig();
alipayConfig.setServerUrl(SERVICE_URL);
alipayConfig.setAppId(AliConfig.APP_ID);
alipayConfig.setPrivateKey(AliConfig.APP_PRIVATE_KEY);
alipayConfig.setAlipayPublicKey(AliConfig.ALI_PUBLIC_KEY);
alipayConfig.setFormat("json");
alipayConfig.setCharset("UTF-8");
alipayConfig.setSignType("RSA2");
return alipayConfig;
}
}

@ -620,12 +620,10 @@ public class AliHelper {
}
}
/**
* 异步通知验签
* 支付宝模板消息推送
*
* @return 是否成功
*/
/**
* @param toUserId
* @param fromId *支付消息模板需传入用户发生的交易行为的支付宝交易号 trade_no
* *表单提交模板需传入用户在小程序触发表单提交事件获得的表单号

@ -0,0 +1,287 @@
package com.ynxbd.ali.helper;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.domain.AlipayCommerceMedicalAuthinfoAuthQueryModel;
import com.alipay.api.domain.AuthExtendParams;
import com.alipay.api.request.AlipayCommerceMedicalAuthinfoAuthQueryRequest;
import com.alipay.api.request.AlipayTradeAppPayRequest;
import com.alipay.api.response.AlipayCommerceMedicalAuthinfoAuthQueryResponse;
import com.alipay.api.response.AlipayTradeAppPayResponse;
import com.ynxbd.ali.config.AliConfig;
import com.ynxbd.common.helper.common.DateHelper;
import com.ynxbd.common.helper.common.ErrorHelper;
import com.ynxbd.wx.wxfactory.bean.OrderMIEnum;
import com.ynxbd.wx.wxfactory.medical.MIConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@Slf4j
public class AliMedicalHelper {
/**
* 国家医保局线上业务身份核验信息授权查询接口[alipay_commerce_medical_authinfo_auth_query_response]
*
* @param openId openId
* @param accessToken accessToken
* @param patientName 用户姓名
* @param patientCardNo 用户证件号
* @param callUrl 回调地址
* @return
*/
public static String queryMIAuth(String openId, String accessToken, String patientName, String patientCardNo, String callUrl) {
try {
// 初始化SDK
AlipayClient alipayClient = new DefaultAlipayClient(AliConfig.getAlipayConfig());
// 构造请求参数以调用接口
AlipayCommerceMedicalAuthinfoAuthQueryRequest request = new AlipayCommerceMedicalAuthinfoAuthQueryRequest();
AlipayCommerceMedicalAuthinfoAuthQueryModel model = new AlipayCommerceMedicalAuthinfoAuthQueryModel();
// 设置用户标识
if (AliConfig.IS_NEW_USER_ID_VERSION) { // 新版
// model.setOpenId("074a1CcTG1LelxKe4xQC0zgNdId0nxi95b5lsNpazWYoCo5");
model.setOpenId(openId);
} else {
// uid参数未来计划废弃,存量商户可继续使用,新商户请使用openid。请根据应用-开发配置-openid配置选择支持的字段。
model.setAlipayUserId(openId);
}
// 设置商户请求流水号
model.setReqBizNo(UUID.randomUUID().toString());
// 设置机构编码-固定为NATHSA
model.setInsCode("NATHSA");
// 设置线上业务类型编码
model.setOlBizTypeCode("04107");
// 设置授权回调地址{url}?resultCode=SUCCESS&openapiAppId=2021**3&reqBizNo=20230***
model.setCallUrl(callUrl);
// 设置olBizTypeCode=04107(医保移动支付业务)时必传
model.setOrgAppId(MIConfig.ORG_APP_ID);
// 设置机构渠道认证编码
model.setOrgChnlCrtfCode(MIConfig.ORG_CHNL_CRTF_CODG);
// 设置定点医药机构代码
model.setOrgCode(MIConfig.ORG_NO);
// 设置扩展信息-亲情账户支付场景增加
AuthExtendParams extendParams = new AuthExtendParams();
// 系统商签约协议的PID
extendParams.setSysServiceProviderId(AliConfig.ISV_PARTNER_ID);
// 就诊人证件类型
extendParams.setPatientCertType("01");
// 就诊人真实姓名
extendParams.setPatientName(patientName);
// 就诊人证件号
extendParams.setPatientCertNo(patientCardNo);
model.setExtendParams(extendParams);
// 设置线上购药渠道ID
// odel.setOnlineDrugChnlAppId("1DBHJRS5I01E0F34A8C00000B959FA87");
request.setBizModel(model);
// 第三方代调用模式下请设置app_auth_token
// request.putOtherTextParam("app_auth_token", "<-- 请填写应用授权令牌 -->");
// 设置auth_token,同access_token(用户访问令牌)
request.putOtherTextParam("auth_token", accessToken);
AlipayCommerceMedicalAuthinfoAuthQueryResponse response = alipayClient.execute(request);
log.info("[支付宝]国家医保局线上业务身份核验信息授权查询接口-返回{}", response.getBody());
if (response.isSuccess()) {
System.out.println("调用成功");
return response.getBody();
} else {
System.out.println("调用失败");
// sdk版本是"4.38.0.ALL"及以上,可以参考下面的示例获取诊断链接
// String diagnosisUrl = DiagnosisUtils.getDiagnosisUrl(response);
// System.out.println(diagnosisUrl);
}
} catch (Exception e) {
ErrorHelper.println(e);
}
return null;
}
public static AlipayClient getGBKAliClient() {
return new DefaultAlipayClient(AliConfig.SERVICE_URL, AliConfig.APP_ID, AliConfig.APP_PRIVATE_KEY, "json", "GBK", AliConfig.ALI_PUBLIC_KEY, "RSA2");
}
/**
* 5.2.2.4 APP支付接口alipay.trade.app.pay
*
* @param orderMIEnum 医保订单类型
* @param openid openid
* @param outTradeNo 商户订单号
* @param payOrdId 医保订单id
* @param payAuthNo 医保授权
* @param totalAmount 总金额
* @param cashFee 现金部分
* @param subject 订单标题
* @param notifyUrl 携带了业务类型用于区分挂号和处方缴费
* @param notifyType 业务类型
* @param familyType 保卡类型"1":亲情支付"0":"本人支付"为空默认本人支付
* @param familyName 家属姓名这里不使用
* @param familyCardNo 医保电子凭证授权码 获取线上医保业务授权接口返回medicalCardId参数"6638aabe-7b4d-4d10-bdf0-b44804da3dab"
* @return
*/
public static Map<String, Object> createOrder(OrderMIEnum orderMIEnum, String openid, String outTradeNo, String payOrdId, String payAuthNo, BigDecimal totalAmount, BigDecimal cashFee, String subject, String notifyUrl, String notifyType, String familyType, String familyName, String familyCardNo) {
try {
AlipayClient alipayClient = new DefaultAlipayClient(AliConfig.getAlipayConfig());
AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
request.setNotifyUrl(notifyUrl);
JSONObject bizContent = new JSONObject();
bizContent.put("out_trade_no", outTradeNo);
// 订单总金额
bizContent.put("total_amount", totalAmount);
// 订单标题
bizContent.put("subject", subject);
bizContent.put("product_code", "JSAPI_PAY"); // JSAPI_PAY
//亲情账户增加 start
bizContent.put("query_options", new String[]{"medical_insurance_info"});
//亲情账户增加 end
JSONObject extendParams = new JSONObject();
extendParams.put("sys_service_provider_id", AliConfig.ISV_PARTNER_ID);
extendParams.put("IS_INSURANCE_PAY", "T"); // 是否使用医保支付
extendParams.put("medical_card_inst_id", ObjectUtils.isEmpty(familyType) ? "0" : familyType); // 医保电子凭证机构号 获取线上医保业务授权接口返回medicalCardInstId参数。医保卡类型"1":”亲情支付“,"0":"本人支付",为空默认本人支付。
extendParams.put("medical_card_id", familyCardNo); // 医保电子凭证授权码 获取线上医保业务授权接口返回medicalCardId参数。"6638aabe-7b4d-4d10-bdf0-b44804da3dab"
JSONObject medicalRequestContent = new JSONObject(); // 医保参数透传体,没有需传空对象串
extendParams.put("medical_request_content", JSONObject.toJSONString(medicalRequestContent));
JSONObject medicalRequestExt = new JSONObject(); //医保扩展参数
medicalRequestExt.put("gmt_out_create", DateHelper.getCurDateTime());//医疗机构下单时间
medicalRequestExt.put("out_trade_no", outTradeNo); //商户网站唯一订单号 医院订单号medOrgOrd
medicalRequestExt.put("serial_no", payOrdId); // 移动支付中心订单号payOrdId
medicalRequestExt.put("bill_no", payOrdId); // 移动支付中心订单号payOrdId
medicalRequestExt.put("pay_auth_no", payAuthNo); // 移动支付中心返回授权编号 获取线上医保业务授权接口返回payAuthNo参数
//
medicalRequestExt.put("org_no", MIConfig.ORG_NO); //医药机构编号
medicalRequestExt.put("org_name", MIConfig.HOSPITAL_NAME); // 医药机构名称
medicalRequestExt.put("payment_city_code", MIConfig.CITY_CODE); // 医保结算地城市编码(国标)
//
medicalRequestExt.put("industry", "HOSPITAL"); //行业标识 医院:HOSPITAL
medicalRequestExt.put("chinfo", "gjydzf"); // 渠道标识-默认为gjydzf
medicalRequestExt.put("scene", "TREATMENT"); //使用场景
medicalRequestExt.put("insurance_pay_scene", orderMIEnum.ALI_MI_CODE); // 医保结算场景 是 医保结算场景:OUTPATIENT - 门诊;INPATIENT - 住院;APPOINTMENT- 挂号;DRUGSTORE- 药店
extendParams.put("medical_request_ext", JSONObject.toJSONString(medicalRequestExt));
bizContent.put("extend_params", extendParams);
//如需补充资产,如院内预交金等 begin
JSONArray merchantCardZkt = new JSONArray();
JSONObject zkt = new JSONObject();
zkt.put("amount", cashFee); // 现金部分
zkt.put("templateId", "2023062500391002246600206403");
zkt.put("forceUse", "Y"); // 固定为Y
merchantCardZkt.add(zkt);
JSONObject presetPayTool = new JSONObject();
presetPayTool.put("MERCHANTCARD_ZKT", merchantCardZkt);
extendParams.put("preset_pay_tool", JSONObject.toJSONString(presetPayTool));
extendParams.put("scene", "PLATFORM_DRUG_STORE"); //场景(有三方购药渠道场景使用)
// 如需补充资产,如院内预交金等 end
request.setBizContent(JSONObject.toJSONString(bizContent));
log.info("[支付宝]医保下单-入参 {}", JSONObject.toJSONString(request));
AlipayTradeAppPayResponse response = alipayClient.sdkExecute(request);
log.info("[支付宝]医保下单-返回 {}", response.getBody());
if (response.isSuccess()) {
Map<String, Object> map = new HashMap<>();
map.put("tradeNo", response.getTradeNo());
map.put("outTradeNo", response.getOutTradeNo());
return map;
}
} catch (AlipayApiException e) {
ErrorHelper.println(e);
}
return null;
}
// 5.2.2.5 线下交易查询alipay.trade.query
public static String queryTrade(String outTradeNo, String tradeNo) {
try {
AlipayClient alipayClient = new DefaultAlipayClient(AliConfig.getAlipayConfig());
AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
JSONObject bizContent = new JSONObject();
bizContent.put("trade_no", tradeNo);
bizContent.put("out_trade_no", outTradeNo);
bizContent.put("query_options", new String[]{"fund_bill_list", "medical_insurance_info"}); //查询本次交易用户付款的支付渠道和亲情账户关系
request.setBizContent(JSONObject.toJSONString(bizContent));
AlipayTradeAppPayResponse response = alipayClient.sdkExecute(request);
log.info("[支付宝]线下交易查询-返回 {}", response.getBody());
if (response.isSuccess()) {
return response.getBody();
}
} catch (AlipayApiException e) {
ErrorHelper.println(e);
}
return null;
}
// 5.2.2.6 交易退款接口alipay.trade.refund.apply
public static String refundTrade(String outRefundNo, BigDecimal refundAmount, String refundReason, String outTradeNo, String tradeNo) {
try {
AlipayClient alipayClient = new DefaultAlipayClient(AliConfig.getAlipayConfig());
AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
JSONObject bizContent = new JSONObject();
bizContent.put("trade_no", tradeNo);
bizContent.put("out_trade_no", outTradeNo);
bizContent.put("refund_amount", refundAmount.toString());
bizContent.put("out_request_no", outRefundNo); // 退款请求号-如需部分退款,则此参数必传
// 退款原因说明
bizContent.put("refund_reason", refundReason);
//亲情账户增加 end
JSONObject extendParams = new JSONObject();
extendParams.put("cancel_serial_no", outRefundNo);
extendParams.put("cancel_bill_no", outRefundNo);
bizContent.put("extend_params", extendParams);
request.setBizContent(JSONObject.toJSONString(bizContent));
AlipayTradeAppPayResponse response = alipayClient.sdkExecute(request);
log.info("[支付宝]交易退款接口-返回 {}", response.getBody());
if (response.isSuccess()) {
return response.getBody();
}
} catch (AlipayApiException e) {
ErrorHelper.println(e);
}
return null;
}
// 5.2.2.7 交易退款查询alipay.trade.fastpay.refund.query
public static String queryRefund(String outRefundNo, String outTradeNo, String tradeNo) {
try {
AlipayClient alipayClient = new DefaultAlipayClient(AliConfig.getAlipayConfig());
AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
JSONObject bizContent = new JSONObject();
bizContent.put("out_request_no", outRefundNo);
bizContent.put("trade_no", tradeNo);
bizContent.put("out_trade_no", outTradeNo);
bizContent.put("query_options", new String[]{"refund_detail_item_list"}); // 查询本次交易用户付款的支付渠道和亲情账户关系
request.setBizContent(JSONObject.toJSONString(bizContent));
AlipayTradeAppPayResponse response = alipayClient.sdkExecute(request);
log.info("[支付宝]交易退款查询-返回 {}", response.getBody());
if (response.isSuccess()) {
return response.getBody();
}
} catch (AlipayApiException e) {
ErrorHelper.println(e);
}
return null;
}
}

@ -12,7 +12,7 @@ import com.ynxbd.common.config.db.DataBase;
import com.ynxbd.common.dao.RecipeDao;
import com.ynxbd.common.dao.RegisterDao;
import com.ynxbd.common.dao.his.HisAccountDao;
import com.ynxbd.common.helper.common.AesHelper;
import com.ynxbd.common.helper.common.AesMicroHelper;
import com.ynxbd.common.helper.common.DateHelper;
import com.ynxbd.common.result.JsonResult;
import com.ynxbd.common.result.Result;
@ -404,7 +404,7 @@ public class AccountsAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
if (!DateHelper.getCurDate().equals(AesHelper.deCode(key))) {
if (!DateHelper.getCurDate().equals(AesMicroHelper.decode(key))) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}

@ -9,7 +9,7 @@ import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.utils.DesEncryptHelper;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import com.ynxbd.wx.wxfactory.WxCacheHelper;
import com.ynxbd.wx.wxfactory.bean.AccessToken;
import lombok.extern.slf4j.Slf4j;
@ -174,7 +174,7 @@ public class ApiAction extends BaseAction {
if (patientId == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
patientId = ReqParamHelper.encode(patientId);
patientId = AesWxHelper.encode(patientId);
for (int i = 0; i < 3; i++) {
patientId = Base64.getEncoder().encodeToString(patientId.getBytes());
}

@ -6,7 +6,7 @@ import com.ynxbd.common.dao.his.HisAuthAgentDao;
import com.ynxbd.common.helper.common.ParamHelper;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.struts2.convention.annotation.Action;
@ -25,10 +25,10 @@ public class AuthAgentAction extends BaseAction {
@Action("getAuthAgent")
public Result getAuthAgent(String treatNum, Integer treatType, String itemNo) {
try {
treatNum = getDecodeString(treatNum);
treatNum = decodeReqString(treatNum);
log.info("[委托人信息]查询 treatNum={}, treatType={}", treatNum, treatType);
if (!ObjectUtils.isEmpty(itemNo)) {
itemNo = getDecodeString(itemNo);
itemNo = decodeReqString(itemNo);
if (itemNo == null) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
@ -41,9 +41,9 @@ public class AuthAgentAction extends BaseAction {
dataList = dataList.stream().filter(o -> finalItemNo.equals(o.getItemNo())).collect(Collectors.toList());
}
for (HisAuthAgent item : dataList) {
item.setEnItemNo(ReqParamHelper.encode(item.getItemNo()));
item.setEnPersonId(ReqParamHelper.encode(item.getPersonId()));
item.setEnPersonTel(ReqParamHelper.encode(item.getPersonTel()));
item.setEnItemNo(AesWxHelper.encode(item.getItemNo()));
item.setEnPersonId(AesWxHelper.encode(item.getPersonId()));
item.setEnPersonTel(AesWxHelper.encode(item.getPersonTel()));
item.setShowPersonId(ParamHelper.hideIdCardNo(item.getPersonId()));
item.setShowPersonTel(ParamHelper.hidTel(item.getPersonTel()));
@ -59,7 +59,7 @@ public class AuthAgentAction extends BaseAction {
@Action("addAuthAgent")
public Result addAuthAgent(String openid, String treatNum, Integer treatType, String personName, String personSex, String personTel, String personId, String relationship, Integer personAge, String personAddress) {
try {
treatNum = getDecodeString(treatNum);
treatNum = decodeReqString(treatNum);
log.info("[委托人信息]添加 treatNum={}, treatType={}, personName={}, personSex={}, relationship={}", treatNum, treatType, personName, personSex, relationship);
new HisAuthAgentDao().addAuthAgent(treatNum, treatType, personName, personSex, personTel, personId, relationship, personAge, personAddress);
return Result.success();
@ -74,13 +74,13 @@ public class AuthAgentAction extends BaseAction {
if (personId == null || personTel == null || enPersonTel == null || enPersonId == null) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
itemNo = getDecodeString(itemNo);
itemNo = decodeReqString(itemNo);
log.info("[委托人信息]添加 itemNo={},personName={}, personSex={}, relationship={}, enPersonTel={}, enPersonId={}", itemNo, personName, personSex, relationship, enPersonTel, enPersonId);
if (personId.contains("*")) { // 数据没有变化
personId = getDecodeString(enPersonId);
personId = decodeReqString(enPersonId);
}
if (personTel.contains("*")) {
personTel = getDecodeString(enPersonTel);
personTel = decodeReqString(enPersonTel);
}
if (ObjectUtils.isEmpty(personId) || ObjectUtils.isEmpty(personTel) || ObjectUtils.isEmpty(itemNo)) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
@ -96,7 +96,7 @@ public class AuthAgentAction extends BaseAction {
@Action("delAuthAgent")
public Result delAuthAgent(String itemNo, String openid) {
try {
itemNo = getDecodeString(itemNo);
itemNo = decodeReqString(itemNo);
log.info("[委托人信息]修改 itemNo={}", itemNo);
new HisAuthAgentDao().delAuthAgent(itemNo);
return Result.success();

@ -72,7 +72,7 @@ public class HealthCodeAction extends BaseAction {
*/
@Action("getAppToken")
public Result getAppToken() {
String appToken = HCodeService.getAppToken();
String appToken = new HCodeService().getAppToken();
return appToken == null ? Result.error() : Result.success();
}
@ -82,7 +82,7 @@ public class HealthCodeAction extends BaseAction {
log.info("[新版电子健康卡]H5嵌入链接绑卡-通过healthCode获取健康卡数据 healthCode={}, openid={}", healthCode, openid);
if (healthCode == null || openid == null) return Result.error(ResultEnum.PARAM_IS_DEFECT); // 参数为空
Patient patient = HCodeService.appBindHealthCard(healthCode); // 通过健康卡授权码获取健康卡的用户信息
Patient patient = new HCodeService().appBindHealthCard(healthCode); // 通过健康卡授权码获取健康卡的用户信息
if (patient == null) {
log.info("[新版电子健康卡]H5嵌入链接绑卡 获取用户信息失败");
return Result.error("[新版电子健康卡]H5嵌入链接绑卡 获取用户信息失败");
@ -102,7 +102,7 @@ public class HealthCodeAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_DEFECT); // 参数为空
}
Patient patient = HCodeService.getHealthCardByQrCode(qrCode);
Patient patient = new HCodeService().getHealthCardByQrCode(qrCode);
return patient == null ? Result.error() : Result.success(patient);
}
@ -120,7 +120,7 @@ public class HealthCodeAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_DEFECT); // 参数缺失
}
JSONObject result = HCodeService.getDynamicQRCode(healthCardId, idCardNo, "0");
JSONObject result = new HCodeService().getDynamicQRCode(healthCardId, idCardNo, "0");
return result == null ? Result.error() : Result.success(result);
}
@ -134,12 +134,13 @@ public class HealthCodeAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_DEFECT); // 参数缺失
}
String qrCodeText = HCodeService.getQRCodeText(healthCardId, idCardNo);
HCodeService hCodeService = new HCodeService();
String qrCodeText = hCodeService.getQRCodeText(healthCardId, idCardNo);
if (qrCodeText == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT); // qrCodeText参数缺失
}
JSONObject result = HCodeService.getCardOrderId(qrCodeText);
JSONObject result = hCodeService.getCardOrderId(qrCodeText);
return result == null ? Result.error() : Result.success(result);
}
@ -167,17 +168,18 @@ public class HealthCodeAction extends BaseAction {
*/
@Action("reportHISData")
public Result reportHISData(String scene, String openid, String idCardNo, String healthCardId) {
idCardNo = getDecodeString(idCardNo);
idCardNo = decodeReqString(idCardNo);
if (scene == null || openid == null || healthCardId == null || idCardNo == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
String qrCodeText = HCodeService.getQRCodeText(healthCardId, idCardNo);
HCodeService hCodeService = new HCodeService();
String qrCodeText = hCodeService.getQRCodeText(healthCardId, idCardNo);
if (qrCodeText == null) {
return Result.error(ResultEnum.INTERFACE_OUTER_INVOKE_ERROR);
}
JSONObject jsonObject = HCodeService.reportHISData(qrCodeText, null, scene, HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS, null);
JSONObject jsonObject = hCodeService.reportHISData(qrCodeText, null, scene, HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS, null);
if (jsonObject == null) {
return Result.error();
}
@ -195,8 +197,9 @@ public class HealthCodeAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
HCodeService hCodeService = new HCodeService();
if (isFace) { // 实名认证
if (!HCodeService.checkUniformVerifyResult(orderId, registerOrderId)) {
if (!hCodeService.checkUniformVerifyResult(orderId, registerOrderId)) {
return Result.error(ResultEnum.FACE_VERIFY_ERROR);
}
}
@ -235,14 +238,14 @@ public class HealthCodeAction extends BaseAction {
String uuid = null;
if (HCodeService.isEnableHealthCard() && isHealthCard && healthCardId == null) { // 没有禁用电子健康卡
if (HCodeService.isEnableHCode() && isHealthCard && healthCardId == null) { // 没有禁用电子健康卡
log.info("[电子健康卡]绑定 weChatCode={}", weChatCode);
if (weChatCode == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
// 先注册,后修改-->先获取健康卡ID
JSONObject respObj = HCodeService.registerHealthCard(null, weChatCode, birthday, cardTypeEnum, address, sex, nation, name, idCardNo, tel);
JSONObject respObj = hCodeService.registerHealthCard(null, weChatCode, birthday, cardTypeEnum, address, sex, nation, name, idCardNo, tel);
if (respObj == null) {
log.info("[电子健康卡]注册健康卡失败,响应内容为空");
@ -254,7 +257,7 @@ public class HealthCodeAction extends BaseAction {
// 响应处理
String errMsg = respObj.getString("errMsg");
String resultCode = respObj.getString("resultCode");
HealthCardRespCodeEnum healthCardRespCodeEnum = HCodeService.resultCodeHandle(resultCode);
HealthCardRespCodeEnum healthCardRespCodeEnum = hCodeService.resultCodeHandle(resultCode);
log.info("[电子健康卡] 绑定失败原因 resultCode={}, errMsg={}, statusMsg={}", resultCode, errMsg, healthCardRespCodeEnum.MESSAGE);
//
if (!healthCardRespCodeEnum.IS_CONTINUE) { // 不继续执行
@ -287,7 +290,7 @@ public class HealthCodeAction extends BaseAction {
log.info("[电子健康卡]一键绑定 获取健康卡用户信息 healthCode={}, openid={}", healthCode, openid);
if (healthCode == null || openid == null) return Result.error(ResultEnum.PARAM_IS_DEFECT); // 参数为空
Patient patient = HCodeService.getInfoByHealthCode(healthCode); // 通过健康卡授权码获取健康卡的用户信息
Patient patient = new HCodeService().getInfoByHealthCode(healthCode); // 通过健康卡授权码获取健康卡的用户信息
if (patient == null) {
log.info("[电子健康卡]一键绑定 获取用户信息失败");
return Result.error("[电子健康卡]一键绑定 获取用户信息失败");
@ -334,8 +337,9 @@ public class HealthCodeAction extends BaseAction {
return Result.error(ResultEnum.PARAM_TYPE_ERROR);
}
HCodeService hCodeService = new HCodeService();
// 先注册,后修改-->先获取健康卡ID
JSONObject rspObj = HCodeService.registerHealthCard(patientId, weChatCode, birthday, cardTypeEnum, address, sex, nation, name, idCardNo, tel);
JSONObject rspObj = hCodeService.registerHealthCard(patientId, weChatCode, birthday, cardTypeEnum, address, sex, nation, name, idCardNo, tel);
if (rspObj == null) {
log.info("[电子健康卡]升级绑定失败, 响应内容为空");
return Result.error("[电子健康卡]升级绑定失败, 响应内容为空");
@ -346,7 +350,7 @@ public class HealthCodeAction extends BaseAction {
// 响应处理
String errMsg = rspObj.getString("errMsg");
String resultCode = rspObj.getString("resultCode");
HealthCardRespCodeEnum healthCardRespCodeEnum = HCodeService.resultCodeHandle(resultCode);
HealthCardRespCodeEnum healthCardRespCodeEnum = hCodeService.resultCodeHandle(resultCode);
log.info("[电子健康卡]升级绑定失败原因 resultCode={}, errMsg={}, statusMsg={}", resultCode, errMsg, healthCardRespCodeEnum.MESSAGE);
return Result.error(healthCardRespCodeEnum.MESSAGE);
@ -371,7 +375,7 @@ public class HealthCodeAction extends BaseAction {
if (image == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
Patient patient = HCodeService.orcInfo(image);
Patient patient = new HCodeService().orcInfo(image);
return Result.success(patient);
}
@ -386,8 +390,7 @@ public class HealthCodeAction extends BaseAction {
if (idCardNo == null || name == null || wechatCode == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT); // 参数为空
}
String orderId = HCodeService.registerUniformVerifyOrder(idCardNo, name, wechatCode);
String orderId = new HCodeService().registerUniformVerifyOrder(idCardNo, name, wechatCode);
return ObjectUtils.isEmpty(orderId) ? Result.error() : Result.success(orderId);
}
@ -401,7 +404,7 @@ public class HealthCodeAction extends BaseAction {
if (orderId == null || registerOrderId == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT); // 参数为空
}
return Result.isOK(HCodeService.checkUniformVerifyResult(orderId, registerOrderId));
return Result.isOK(new HCodeService().checkUniformVerifyResult(orderId, registerOrderId));
}
@ -414,7 +417,7 @@ public class HealthCodeAction extends BaseAction {
List<Patient> lstPatient = new PatientDao().selectPatient4BatchUpdateHealthCard();
JSONArray jsonArray = null;
try {
jsonArray = HCodeService.batchUpdate(lstPatient);
jsonArray = new HCodeService().batchUpdate(lstPatient);
} catch (Exception e) {
e.printStackTrace();
}
@ -433,39 +436,42 @@ public class HealthCodeAction extends BaseAction {
public static void main(String[] args) {
String qrCodeText = HCodeService.getQRCodeText("F43F5B90877116A61D3B960EDAECBCDDDDE7F452605C23DD425CC79BF4644F61", "530127199711211059");
HCodeService hCodeService = new HCodeService();
String qrCodeText = hCodeService.getQRCodeText("F43F5B90877116A61D3B960EDAECBCDDDDE7F452605C23DD425CC79BF4644F61", "530127199711211059");
HCodeService.reportHISData(qrCodeText, "口腔科", "0101011", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
hCodeService.reportHISData(qrCodeText, "口腔科", "0101011", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
null);
HCodeService.reportHISData(qrCodeText, "口腔科", "0101012", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
hCodeService.reportHISData(qrCodeText, "口腔科", "0101012", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
null);
HCodeService.reportHISData(qrCodeText, null, "0101013", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
hCodeService.reportHISData(qrCodeText, null, "0101013", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
null);
HCodeService.reportHISData(qrCodeText, null, "0101014", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
hCodeService.reportHISData(qrCodeText, null, "0101014", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
null);
// 门诊缴费
HCodeService.reportHISData(qrCodeText, "口腔科", "0101051", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
hCodeService.reportHISData(qrCodeText, "口腔科", "0101051", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
"0100");
// 门诊缴费记录
HCodeService.reportHISData(qrCodeText, null, "0101052", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
hCodeService.reportHISData(qrCodeText, null, "0101052", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
null);
HCodeService.reportHISData(qrCodeText, null, "0101081", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
hCodeService.reportHISData(qrCodeText, null, "0101081", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
null);
HCodeService.reportHISData(qrCodeText, null, "0101082", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
hCodeService.reportHISData(qrCodeText, null, "0101082", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
null);
HCodeService.reportHISData(qrCodeText, null, "0101083", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
hCodeService.reportHISData(qrCodeText, null, "0101083", HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS,
null);
}
//
// public static void main(String[] args){
// String resultCode = "-10044";

@ -7,7 +7,7 @@ import com.ynxbd.common.helper.common.DateHelper;
import com.ynxbd.common.result.JsonResult;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
@ -38,7 +38,7 @@ public class InHospAction extends BaseAction {
*/
@Action("getPreMoneyList")
public Result getPreMoneyList(String begDate, String endDate, String patientId) {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[住院]预交金缴费记录查询, patientId={}", patientId);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -75,7 +75,7 @@ public class InHospAction extends BaseAction {
@Action("getInHospSumFee")
public Result getInHospSumFee(String date, String patientId) {
log.info("[住院]查询住院日费用汇总 patientId={}, date={}", patientId, date);
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (patientId == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
@ -109,7 +109,7 @@ public class InHospAction extends BaseAction {
@Action("getInHospFee")
public Result getInHospFee(String date, String patientId) {
log.info("[住院]查询住院费用清单 patientId={}, date={}", patientId, date);
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (patientId == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
@ -149,7 +149,7 @@ public class InHospAction extends BaseAction {
*/
@Action("getInHospByTreatNum")
public Result getInHospByTreatNum(String treatNum) {
treatNum = getDecodeString(treatNum);
treatNum = decodeReqString(treatNum);
log.info("[住院]通过住院号查询患者信息(含预交金) treatNum={}", treatNum);
if (treatNum == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -177,7 +177,7 @@ public class InHospAction extends BaseAction {
*/
@Action("getInHospByPatientId")
public Result getInHospByPatientId(String patientId, String begDate, String endDate, String inHospState) {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[住院]通过患者ID查询在院患者信息 patientId={}, endDate={}, endDate={}", patientId, begDate, endDate);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -209,7 +209,7 @@ public class InHospAction extends BaseAction {
inDate = DateHelper.dateFormatShort(inDate);
if (inDate != null && DateHelper.inDateRange(begDate, endDate, inDate, DateHelper.DateEnum.yyyy_MM_dd)) {
item.setTreatNum(item.getInPatientNum());
item.setEnTreatNum(ReqParamHelper.encode(item.getTreatNum()));
item.setEnTreatNum(AesWxHelper.encode(item.getTreatNum()));
resultList.add(item);
}
}
@ -226,7 +226,7 @@ public class InHospAction extends BaseAction {
*/
@Action("getHospListByPatientId")
public Result getHospListByPatientId(String patientId) {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[住院]通过患者ID查询住院记录 patientId-{}", patientId);
if (patientId == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -237,7 +237,7 @@ public class InHospAction extends BaseAction {
}
List<InHospitalList> dataList = resp.getDataMapList(InHospitalList.class, "Items", "Item");
for (InHospitalList item : dataList) {
item.setEnTreatNum(ReqParamHelper.encode(item.getZyNum()));
item.setEnTreatNum(AesWxHelper.encode(item.getZyNum()));
}
return Result.success(dataList);
}
@ -250,7 +250,7 @@ public class InHospAction extends BaseAction {
*/
@Action("getAllFeeByTreat")
public Result getAllFeeByTreat(String treatNum) {
treatNum = getDecodeString(treatNum);
treatNum = decodeReqString(treatNum);
log.info("[住院]通过住院号查询所有费用明细 treatNum-{}", treatNum);
if (treatNum == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);

@ -33,7 +33,7 @@ public class MeTechnologyReAction extends BaseAction {
if (startDate == null || endDate == null || patientId == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
return TZReserveConfig.getCanBookOrders(patientId, startDate, endDate);
}
@ -53,7 +53,7 @@ public class MeTechnologyReAction extends BaseAction {
if (patientId == null || startDate == null || endDate == null || docDetailedNo == null || intervalTimeType == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
return TZReserveConfig.getNumberSourceStatistics(patientId, startDate, endDate, docDetailedNo, intervalTimeType);
}
@ -112,7 +112,7 @@ public class MeTechnologyReAction extends BaseAction {
if (appFormID == null || examRoomOrQueue == null || beginDateTime == null || endDateTime == null || patientId == null || patientName == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
return TZReserveConfig.getBookedDateTime(appFormID, examRoomOrQueue, beginDateTime, endDateTime, patientId, patientName);
}

@ -17,7 +17,7 @@ public class MedToolAction extends BaseAction {
*/
@Action("saveMedToolMarkByTreatNum")
public Result saveMedToolMarkByTreatNum(String treatNum, Integer type, String processMark) {
treatNum = getDecodeString(treatNum);
treatNum = decodeReqString(treatNum);
log.info("[就医助手]根据就诊号修改流程标记 treatNum={}, type={}, processMark={}", treatNum, type, processMark);
if (ObjectUtils.isEmpty(treatNum) || processMark == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);

@ -29,7 +29,7 @@ public class PatientAction extends BaseAction {
*/
@Action("getHisInfoByPatientId")
public Result getHisInfoByPatientId(String patientId) {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[患者]根据patientId查询HIS信息 patientId={}", patientId);
if (patientId == null) {
return Result.error(ResultEnum.PARAM_IS_BLANK);
@ -59,7 +59,7 @@ public class PatientAction extends BaseAction {
*/
@Action("getInfoByPatientId")
public Result getInfoByPatientId(String patientId) {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[患者]根据patientId查询信息 patientId={}", patientId);
if (patientId == null) {
return Result.error(ResultEnum.PARAM_IS_BLANK);
@ -121,7 +121,7 @@ public class PatientAction extends BaseAction {
@Action("getPatientsByOpenid")
public Result getPatientsByOpenid(String openid, String organizeName) {
log.info("[外部患者信息对接]根据openid查询信息 openid={},organizeName-{}", openid, organizeName);
organizeName = AesHelper.deCode(organizeName);
organizeName = AesMicroHelper.decode(organizeName);
if (organizeName == null) {
return Result.error(ResultEnum.PERMISSION_NO_ACCESS);
}
@ -141,9 +141,9 @@ public class PatientAction extends BaseAction {
*/
@Action("getPatientsByEncOpenid")
public Result getPatientsByEncOpenid(String enParams, String organizeName) {
String openid = AesHelper.deCode(enParams);
String openid = AesMicroHelper.decode(enParams);
log.info("[外部患者信息对接]根据openid查询信息 openid={},organizeName-{},emParams-{}", openid, organizeName, enParams);
organizeName = AesHelper.deCode(organizeName);
organizeName = AesMicroHelper.decode(organizeName);
if (organizeName == null) {
return Result.error(ResultEnum.PERMISSION_NO_ACCESS);
}

@ -18,7 +18,6 @@ import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.service.RecipeService;
import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.struts2.convention.annotation.Action;
@ -46,7 +45,7 @@ public class RecipeAction extends BaseAction {
@Action("getPayedList")
public Result getPayedList(String patientId, String personNo, String begDate, String endDate) {
log.info("[处方]已缴费项目查询 patientId={}, begDate={}, endDate={}, personNo-{}", patientId, begDate, endDate, personNo);
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
@ -61,12 +60,12 @@ public class RecipeAction extends BaseAction {
@Action("getRxPaidList")
public Result getRxPaidList(String patientId, String personNo, String begDate, String endDate) {
log.info("[处方]查询已缴费项目 patientId={}, begDate={}, endDate={}, personNo-{}", patientId, begDate, endDate, personNo);
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
if (!ObjectUtils.isEmpty(personNo)) {
personNo = getDecodeString(personNo);
personNo = decodeReqString(personNo);
if (personNo == null) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
@ -84,12 +83,12 @@ public class RecipeAction extends BaseAction {
@Action("getRxUnPayList")
public Result getRxUnPayList(String patientId, String personNo, String begDate, String endDate) {
log.info("[处方]未缴费项目查询 patientId={}, personNo={}, begDate={}, endDate={}", patientId, personNo, begDate, endDate);
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
if (!ObjectUtils.isEmpty(personNo)) {
personNo = getDecodeString(personNo);
personNo = decodeReqString(personNo);
if (personNo == null) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
@ -115,7 +114,7 @@ public class RecipeAction extends BaseAction {
@Action("getUnPayList")
public Result getUnPayList(String patientId, String personNo, String begDate, String endDate) {
log.info("[处方]未缴费项目查询 patientId={}, personNo={}, begDate={}, endDate={}", patientId, personNo, begDate, endDate);
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
@ -124,7 +123,8 @@ public class RecipeAction extends BaseAction {
List<HisRecipe> resultList = new ArrayList<>();
for (HisRecipe hisRecipe : hisRecipes) {
if (hisRecipe.getDate() != null && DateHelper.inDateRange(begDate, endDate, hisRecipe.getDate(), DateHelper.DateEnum.yyyy_MM_dd) && !"1".equals(hisRecipe.getSTDFlag()) && (!"1".equals(hisRecipe.getInternetHospFlag()) || "1".equals(hisRecipe.getYJSAuditFlag()))) {
if (hisRecipe.getDate() != null && DateHelper.inDateRange(begDate, endDate, hisRecipe.getDate(), DateHelper.DateEnum.yyyy_MM_dd)
&& !"1".equals(hisRecipe.getSTDFlag()) && (!"1".equals(hisRecipe.getInternetHospFlag()) || "1".equals(hisRecipe.getYJSAuditFlag()))) {
resultList.add(hisRecipe);
}
}
@ -142,7 +142,7 @@ public class RecipeAction extends BaseAction {
@Action("getOLRxList")
public Result getOLRxList(String patientId, String begDate, String endDate) {
log.info("[处方]未缴费项目查询 patientId={}", patientId);
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (patientId == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
@ -181,7 +181,7 @@ public class RecipeAction extends BaseAction {
*/
@Action("getRxInvoiceInfo")
public Result getRxInvoiceInfo(String invoiceNo) {
invoiceNo = getDecodeString(invoiceNo);
invoiceNo = decodeReqString(invoiceNo);
log.info("[处方]查询发票 invoiceNo={} ", invoiceNo);
if (invoiceNo == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);

@ -17,7 +17,7 @@ import com.ynxbd.common.service.DoctorService;
import com.ynxbd.common.service.MedToolService;
import com.ynxbd.common.service.PatientService;
import com.ynxbd.common.service.RegService;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.struts2.convention.annotation.Action;
@ -215,7 +215,7 @@ public class RegisterAction extends BaseAction {
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
List<Register> regRecords = new RegService().getHisRegRecordsByRegDate(patientId, begDate, endDate);
return Result.success(regRecords);
@ -230,7 +230,7 @@ public class RegisterAction extends BaseAction {
@Action("getHisRegHistoryRecords")
public Result getHisRegHistoryRecords(String begDate, String endDate, String patientId) {
try {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[挂号]查询挂号记录 patientId={}, begDate={},endDate={}", patientId, begDate, endDate);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -248,7 +248,7 @@ public class RegisterAction extends BaseAction {
*/
@Action("getHisRegReserveRecords")
public Result getHisRegReserveRecords(String begDate, String endDate, String patientId) {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[预约挂号]查询预约记录 patientId={}, begDate={},endDate={}", patientId, begDate, endDate);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -373,7 +373,7 @@ public class RegisterAction extends BaseAction {
*/
@Action("getReLineSignInRecord")
public Result getReLineSignInRecord(String patientId, String begDate, String endDate) {
String decodePatientId = getDecodeString(patientId);
String decodePatientId = decodeReqString(patientId);
log.info("[查询预约待签到记录(包含今日挂号)] patientId-{} begDate={}, endDate={}", decodePatientId, begDate, endDate);
if (decodePatientId == null) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
@ -405,7 +405,7 @@ public class RegisterAction extends BaseAction {
*/
@Action("getRegSignInByPatientId")
public Result getRegSignInByPatientId(String patientId, String begDate, String endDate) {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[挂号待签到记录]查询 patientId={} begDate={}, endDate={}", patientId, begDate, endDate);
if (patientId == null) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
@ -422,7 +422,7 @@ public class RegisterAction extends BaseAction {
*/
@Action("getRegSignInByTreatNum")
public Result getRegSignInByTreatNum(String treatNum) {
treatNum = getDecodeString(treatNum);
treatNum = decodeReqString(treatNum);
log.info("[挂号待签到记录]查询 treatNum={}", treatNum);
if (treatNum == null) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
@ -539,7 +539,7 @@ public class RegisterAction extends BaseAction {
}
regItem.setCurDate(curDate);
regItem.setPatientId(patientId);
regItem.setEnPatientId(ReqParamHelper.encode(patientId));
regItem.setEnPatientId(AesWxHelper.encode(patientId));
regItem.setPatientName(pItem.getName());
regItem.setBirthday(pItem.getBirthday());
regItem.setSex(pItem.getSex());
@ -576,7 +576,7 @@ public class RegisterAction extends BaseAction {
@Action("getHisRegInfo")
public Result getHisRegInfo(String regDate, String patientId, String hisTransNo, String openId) {
log.info("[就医助手]查询HIS挂号信息 regDate={}, patientId={}, hisTransNo={} openId={}", regDate, patientId, hisTransNo, openId);
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (ObjectUtils.isEmpty(regDate) || ObjectUtils.isEmpty(patientId)) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
@ -593,7 +593,7 @@ public class RegisterAction extends BaseAction {
*/
@Action("getRegOrder")
public Result getRegOrder(String patientId, String tradeNo, String hisTransNo) {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[挂号订单]查询信息 patientId={}, tradeNo={}, hisTransNo={}", patientId, tradeNo, hisTransNo);
if (ObjectUtils.isEmpty(patientId) || ObjectUtils.isEmpty(hisTransNo)) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -616,7 +616,7 @@ public class RegisterAction extends BaseAction {
@Action("completeRegTreatNum")
public Result completeRegTreatNum(String treatNum, String processMark, String openId, String patientId, String tradeNo, String hisTransNo, String orderFromOwner) {
try {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[就医助手]修改流程标记 treatNum={}, processMark={}, openId={}, patientId={}, tradeNo={}, hisTransNo={}, orderFromOwner={}", treatNum, processMark, openId, patientId, tradeNo, hisTransNo, orderFromOwner);
if (ObjectUtils.isEmpty(treatNum) || ObjectUtils.isEmpty(patientId)) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);

@ -38,7 +38,7 @@ public class SelfHelpAction extends BaseAction {
public Result createHisSelfHelp(String patientId, String items) {
try {
log.info("[HIS创建自助开单]");
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (ObjectUtils.isEmpty(patientId) || ObjectUtils.isEmpty(items)) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}

@ -4,7 +4,7 @@ package com.ynxbd.common.action;
import com.ynxbd.common.action.base.BaseAction;
import com.ynxbd.common.bean.his.HisTreat;
import com.ynxbd.common.dao.his.HisTreatDao;
import com.ynxbd.common.helper.common.AesHelper;
import com.ynxbd.common.helper.common.AesMicroHelper;
import com.ynxbd.common.result.JsonResult;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
@ -25,7 +25,7 @@ public class TreatAction extends BaseAction {
@Action("getTreatList")
public Result getTreatList(String patientId, String deptCode, Boolean isSCD) {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
log.info("[就诊记录]查询 patientId={}, deptCode={}, isSCD={}", patientId, deptCode, isSCD);
if (patientId == null || deptCode == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -107,11 +107,11 @@ public class TreatAction extends BaseAction {
@Action("getInfoByTreatNum")
public Result getInfoByTreatNum(String treatNum) {
try {
treatNum = getDecodeString(treatNum);
treatNum = decodeReqString(treatNum);
if (treatNum == null) {
return Result.error(ResultEnum.PARAM_IS_BLANK);
}
treatNum = AesHelper.deCode(treatNum);
treatNum = AesMicroHelper.decode(treatNum);
if (ObjectUtils.isEmpty(treatNum)) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
@ -126,7 +126,7 @@ public class TreatAction extends BaseAction {
@Action("getDoctCaSign")
public Result getDoctCaSign(String doctCode) {
try {
doctCode = getDecodeString(doctCode);
doctCode = decodeReqString(doctCode);
if (ObjectUtils.isEmpty(doctCode)) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
@ -134,7 +134,7 @@ public class TreatAction extends BaseAction {
String caSign = new HisTreatDao().getDoctCaSign(doctCode);
Map<String, Object> dataMap = new HashMap<>();
if (caSign != null) {
dataMap.put("caSign", AesHelper.enCode(caSign));
dataMap.put("caSign", AesMicroHelper.encode(caSign));
}
return Result.success(dataMap);
} catch (ServiceException e) {

@ -68,7 +68,7 @@ public class XBDAction extends BaseAction {
@Action("getMedicalRecordList")
public Result getMedicalRecordList(String patientId, Integer flagSh) {
try {
String realPatientId = getDecodeString(patientId);
String realPatientId = decodeReqString(patientId);
log.info("[病案]获取该病人已归档可以翻拍的病历 patientId={}", realPatientId);
if (ObjectUtils.isEmpty(realPatientId)) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -261,7 +261,7 @@ public class XBDAction extends BaseAction {
@Action("getPeisByCardNo")
public Result getPeisByCardNo(String cardNo, String begDate, String endDate) {
log.info("[查询体检记录] cardNo={}", cardNo);
cardNo = getDecodeString(cardNo);
cardNo = decodeReqString(cardNo);
if (ObjectUtils.isEmpty(cardNo) || ObjectUtils.isEmpty(begDate) || ObjectUtils.isEmpty(endDate)) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}

@ -3,9 +3,8 @@ package com.ynxbd.common.action.base;
import com.alibaba.fastjson.JSONObject;
import com.ynxbd.common.helper.common.HttpHelper;
import com.ynxbd.common.helper.common.JsonHelper;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.action.ServletRequestAware;
@ -87,8 +86,8 @@ public class BaseAction implements Serializable, ServletRequestAware {
return parameter;
}
protected String getDecodeString(String param) {
return ReqParamHelper.decode(param);
protected String decodeReqString(String param) {
return AesWxHelper.decode(param);
}

@ -1,6 +1,7 @@
package com.ynxbd.common.action.pay;
import com.ynxbd.ali.helper.AliHelper;
import com.ynxbd.ali.helper.AliMedicalHelper;
import com.ynxbd.common.action.base.BaseAction;
import com.ynxbd.common.bean.enums.MerchantEnum;
import com.ynxbd.common.bean.pay.Order;
@ -8,6 +9,7 @@ import com.ynxbd.common.helper.common.DateHelper;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ServiceException;
import com.ynxbd.common.service.InHospService;
import com.ynxbd.common.service.MedicalService;
import com.ynxbd.common.service.RecipeService;
import com.ynxbd.common.service.RegService;
import lombok.extern.slf4j.Slf4j;
@ -28,7 +30,7 @@ import java.util.Date;
public class AliPayAction extends BaseAction {
/**
* [支付宝]处方支付通知
* [支付宝]回调通知
*
* @return 是否成功
*/
@ -77,6 +79,50 @@ public class AliPayAction extends BaseAction {
return Result.respStr();
}
/**
* [支付宝-医保]回调通知
*
* @return 是否成功
*/
@Action("medical_notify")
public Result medical_notify(String outTradeNo, String notifyType) {
log.info("[支付宝][医保][收到通知] outTradeNo={}, notifyType={}", outTradeNo, notifyType);
if (outTradeNo == null || notifyType == null) {
return Result.respStr();
}
Order order = AliHelper.payNotify(outTradeNo);
if (!order.isSuccess()) {
log.info(order.getErrorMsg());
return Result.error(order.getErrorMsg());
}
String openid = order.getOpenid();
String bankTransNo = order.getBankTransNo();
String payInfo = order.getInfo();
BigDecimal totalFee = order.getTotalFee();
String payDate = DateHelper.getCurDate();
String payTime = DateHelper.getCurTime();
new MedicalService().commonNotify(MerchantEnum.ALI_MEDICAL, notifyType, outTradeNo, totalFee, bankTransNo, payDate, payTime, openid, payInfo);
return Result.respStr();
}
/**
* [支付宝]授权查询
*
* @return 是否成功
*/
@Action("queryMIAuth")
public Result queryMIAuth(String openId, String accessToken, String patientName, String patientCardNo, String callUrl) {
log.info("[支付宝][医保]授权查询 openId={}, accessToken={}, patientName={}, patientCardNo={}, callUrl={}", openId, accessToken, patientName, patientCardNo, callUrl);
String data = AliMedicalHelper.queryMIAuth(openId, accessToken, patientName, patientCardNo, callUrl);
if (data == null) {
return Result.error("授权查询失败");
}
return Result.success(data);
}
// /**
// * [支付宝]分时段挂号支付通知
// *

@ -8,7 +8,7 @@ import com.ynxbd.common.bean.pay.Recipe;
import com.ynxbd.common.bean.pay.Register;
import com.ynxbd.common.dao.RecipeDao;
import com.ynxbd.common.dao.his.HisMedicalDao;
import com.ynxbd.common.helper.common.AesHelper;
import com.ynxbd.common.helper.common.AesMicroHelper;
import com.ynxbd.common.helper.common.Base64Helper;
import com.ynxbd.common.helper.common.DateHelper;
import com.ynxbd.common.helper.common.HttpHelper;
@ -17,10 +17,10 @@ import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.result.ServiceException;
import com.ynxbd.common.service.MedicalService;
import com.ynxbd.common.service.params.RegParams;
import com.ynxbd.common.service.params.RequestParams;
import com.ynxbd.wx.wxfactory.*;
import com.ynxbd.wx.wxfactory.bean.*;
import com.ynxbd.wx.wxfactory.medical.MdConfig;
import com.ynxbd.wx.wxfactory.medical.MIConfig;
import com.ynxbd.wx.wxfactory.utils.MdRespHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
@ -53,7 +53,7 @@ public class MedicalAction extends BaseAction {
MedicalInfo medicalInfo;
switch (PEnum.toEnum(callNo)) {
case REG:
Register reg = RegParams.getRegParams(request, true);
Register reg = new Register().getRegParams(new RequestParams(request), true);
if ("*".equals(reg.getRegCode())) {
return Result.error("任意医师的号源不能进行医保支付");
}
@ -61,7 +61,7 @@ public class MedicalAction extends BaseAction {
if (!DateHelper.isToday(reg.getRegDate())) {
return Result.error("医保支付仅支持今日挂号");
}
medicalInfo = MedicalService.regMdUploadFeeDetails(qrCode, openid, patientId, cardNo, realName, reg, isSplitTime);
medicalInfo = new MedicalService().hisRegMIUploadFeeDetails(qrCode, openid, patientId, cardNo, realName, reg, isSplitTime);
break;
case RECIPE:
@ -70,7 +70,7 @@ public class MedicalAction extends BaseAction {
if (treatNum == null || recipeJson == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
medicalInfo = MedicalService.recipeMdUploadFeeDetails(qrCode, openid, patientId, cardNo, realName, treatNum, recipeJson, totalFee, ybAttrib, ybBZCode, ybBZName);
medicalInfo = new MedicalService().hisRxUploadFeeDetails(qrCode, openid, patientId, cardNo, realName, treatNum, recipeJson, totalFee, ybAttrib, ybBZCode, ybBZName);
break;
default:
@ -101,7 +101,7 @@ public class MedicalAction extends BaseAction {
if (ObjectUtils.isEmpty(url)) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
url = ReqParamHelper.decode(url);
url = decodeReqString(url);
if (ObjectUtils.isEmpty(url)) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
@ -113,7 +113,7 @@ public class MedicalAction extends BaseAction {
@Action("medicalAuth")
public Result medicalAuth(String openid, String qrCode) {
log.info("[医保建档] openid-{},qrCode={}", openid, qrCode);
MedicalUserInfo info = WxFactory.Medical.Common().getUserInfo(MdConfig.PARTNER_URL, openid, qrCode);
MedicalUserInfo info = WxFactory.Medical.Common().getUserInfo(MIConfig.PARTNER_URL, openid, qrCode);
log.info("[医保建档获取用户信息] resp-{}", info);
return Result.success(info);
}
@ -138,7 +138,7 @@ public class MedicalAction extends BaseAction {
if (billDate == null || billType == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
if (!DateHelper.getCurDate().equals(AesHelper.deCode(key))) {
if (!DateHelper.getCurDate().equals(AesMicroHelper.decode(key))) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
return Result.success(WxMedicalHelper.downBill(billDate, billType));
@ -160,7 +160,7 @@ public class MedicalAction extends BaseAction {
*/
@Action("order")
public Result order(String callNo, String payCode, String openid, String patientId, String cardNo, String realName, String treatNum, String payOrdId, String payAuthNo, String mdTrtId, String chrgBchno, String mdUserId,
BigDecimal totalFee, BigDecimal acctFee, BigDecimal hifpFee, BigDecimal insuranceFee, BigDecimal cashFee, String notifyType) {
BigDecimal totalFee, BigDecimal acctFee, BigDecimal hifpFee, BigDecimal insuranceFee, BigDecimal cashFee, String familyType, String familyName, String familyCardNo) {
try {
log.info("[医保]下单 callNo={}, payCode={}, openid={}, patientId={}, totalFee={}", callNo, payCode, openid, patientId, totalFee);
if (callNo == null || payCode == null || openid == null || patientId == null || cardNo == null || totalFee == null) {
@ -169,11 +169,11 @@ public class MedicalAction extends BaseAction {
String ip = HttpHelper.getIpAddress(request);
switch (PEnum.toEnum(callNo)) {
case REG:
Register reg = RegParams.getRegParams(request, true);
Register reg = new Register().getRegParams(new RequestParams(request), true);
return MedicalService.createRegOrder(payCode, openid, cardNo, realName, ip, payOrdId, payAuthNo, mdTrtId, chrgBchno, mdUserId,
return new MedicalService().createRegOrder(payCode, openid, cardNo, realName, ip, payOrdId, payAuthNo, mdTrtId, chrgBchno, mdUserId,
totalFee, acctFee, hifpFee, insuranceFee, cashFee,
callNo, reg);
callNo, reg, familyType, familyName, familyCardNo);
case RECIPE:
String recipeJson = getString("recipeJson");
@ -181,10 +181,10 @@ public class MedicalAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_BLANK);
}
String payWay = getString("payWay");
return MedicalService.createOrder(payCode, openid, patientId, cardNo, realName, ip,
return new MedicalService().createRxOrder(payCode, openid, patientId, cardNo, realName, ip,
payOrdId, payAuthNo, mdTrtId, chrgBchno, mdUserId,
totalFee, acctFee, hifpFee, insuranceFee, cashFee,
callNo, recipeJson, treatNum, payWay);
callNo, recipeJson, treatNum, payWay, familyType, familyName, familyCardNo);
default:
return Result.error("调用方式不存在");
@ -236,7 +236,7 @@ public class MedicalAction extends BaseAction {
// return Result.error(ResultEnum.PAY_ORDER_NO_PAY);
// }
Result result = MedicalService.refund(userInfo.getPayAuthNo(), chrgBchno.substring(1), outTradeNo, bankTransNo, tradeNo, mdUserId, cashFee, insuranceFee);
Result result = new MedicalService().refund(userInfo.getPayAuthNo(), chrgBchno.substring(1), outTradeNo, bankTransNo, tradeNo, mdUserId, cashFee, insuranceFee);
String message = result.isOK() ? WxPayHelper.OK : result.getMessage();
if (!recipeDao.updateRefundByTradeNo(tradeNo, message)) {
@ -318,45 +318,29 @@ public class MedicalAction extends BaseAction {
*/
@Action("payNotify")
public Result payNotify() {
log.info("[医保]回调通知------------------------------");
try {
log.info("[微信][医保]回调通知...");
MedicalNotify notifyInfo = WxMedicalHelper.medicalPayNotify(request);
// 成功返回
Result.respXml(MdRespHelper.respOk(MdConfig.PAY_KEY));
Result.respXml(MdRespHelper.respOk(MIConfig.PAY_KEY));
String openid = notifyInfo.getOpenid();
String bankTransNo = notifyInfo.getMedTransId();
String outTradeNo = notifyInfo.getHospOutTradeNo();
String payInfo = notifyInfo.getInfo();
// BigDecimal totalFee = notifyInfo.getTotalFee();
BigDecimal totalFee = notifyInfo.getTotalFee();
String payDate = notifyInfo.getPayDate();
String payTime = notifyInfo.getPayTime();
String notifyType = notifyInfo.getAttach();
log.info("[医保][{}] 收到通知 outTradeNo={}, bankTransNo={}, notifyType={}",
log.info("[微信][医保][{}] 收到通知 outTradeNo={}, bankTransNo={}, notifyType={}",
notifyType, outTradeNo, bankTransNo, notifyType);
switch (PEnum.toEnum(notifyType)) {
case RECIPE:
MedicalService.recipePayNotify(MerchantEnum.WX, outTradeNo, bankTransNo, payDate, payTime, openid, payInfo);
break;
case REG: // 挂号
MedicalService.regPayNotify(MerchantEnum.WX, outTradeNo, bankTransNo, payDate, payTime, openid, payInfo);
break;
case IN_HOSP:
break;
default:
log.info("[医保]通知类型错误");
break;
}
new MedicalService().commonNotify(MerchantEnum.WX_MEDICAL, notifyType, outTradeNo, totalFee, bankTransNo, payDate, payTime, openid, payInfo);
return null;
} catch (ServiceException e) {
return Result.respXml(MdRespHelper.resp(e, MdConfig.PAY_KEY));
return Result.respXml(MdRespHelper.resp(e, MIConfig.PAY_KEY));
}
}

@ -9,7 +9,7 @@ import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.service.RecipeService;
import com.ynxbd.wx.wxfactory.WxMedicalHelper;
import com.ynxbd.wx.wxfactory.bean.MedicalOrder;
import com.ynxbd.wx.wxfactory.medical.MdConfig;
import com.ynxbd.wx.wxfactory.medical.MIConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
@ -32,12 +32,12 @@ public class MedicalTestAction extends BaseAction {
@Action("getDevRxUnPayList")
public Result getDevRxUnPayList(String patientId, String begDate, String endDate) {
log.info("[处方Dev]未缴费项目查询 patientId={}, begDate={}, endDate={}", patientId, begDate, endDate);
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
if (!MdConfig.IS_DEV) {
if (!MIConfig.IS_DEV) {
return Result.error("环境错误");
}
@ -60,12 +60,12 @@ public class MedicalTestAction extends BaseAction {
@Action("getDevRxPaidList")
public Result getDevRxPaidList(String patientId, String begDate, String endDate) {
log.info("[处方Dev]已缴费项目查询 patientId={}, begDate={}, endDate={}", patientId, begDate, endDate);
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
}
if (!MdConfig.IS_DEV) {
if (!MIConfig.IS_DEV) {
return Result.error("环境错误");
}
List<HisRecipe> hisRecipeList = HisMedicalTestDao.devPaidRecipeList(patientId, begDate, endDate);

@ -18,9 +18,8 @@ import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.result.ServiceException;
import com.ynxbd.common.service.*;
import com.ynxbd.common.service.params.RegParams;
import com.ynxbd.common.service.params.RequestParams;
import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.WxPayHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
@ -53,7 +52,7 @@ public class PayAction extends BaseAction {
public Result regPay(String payCode, Boolean isOccupySource, Boolean isZeroPay) {
log.info("[挂号]下单 payCode={}, isOccupySource={}, isZeroPay={}", payCode, isOccupySource, isZeroPay);
try {
Register reg = RegParams.getRegParams(request, true);
Register reg = new Register().getRegParams(new RequestParams(request), true);
String ip = HttpHelper.getIpAddress(request);
@ -822,7 +821,7 @@ public class PayAction extends BaseAction {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
if (!outTradeNo.equals(ReqParamHelper.decode(enOutTradeNo))) {
if (!outTradeNo.equals(decodeReqString(enOutTradeNo))) {
return Result.error(ResultEnum.PARAM_IS_INVALID);
}
}
@ -860,10 +859,10 @@ public class PayAction extends BaseAction {
if (merchantEnum == null) {
return Result.error(ResultEnum.PAY_TYPE_NOT_SUPPORT);
}
bankTransNo = AesHelper.deCode(bankTransNo);
outTradeNo = AesHelper.deCode(outTradeNo);
totalFee = AesHelper.deCode(totalFee);
openid = AesHelper.deCode(openid);
bankTransNo = AesMicroHelper.decode(bankTransNo);
outTradeNo = AesMicroHelper.decode(outTradeNo);
totalFee = AesMicroHelper.decode(totalFee);
openid = AesMicroHelper.decode(openid);
log.info("[问诊]退费 outTradeNo={}, bankTransNo={}, totalFee={}, openid={}, patientId={}", outTradeNo, bankTransNo, totalFee, openid, patientId);
if (outTradeNo == null || bankTransNo == null || openid == null || totalFee == null) {
return Result.error(ResultEnum.PARAM_IS_BLANK);
@ -873,7 +872,7 @@ public class PayAction extends BaseAction {
String outRefundNo = HisHelper.getHisTradeNo(bankTransNo, PEnum.OL_REG);
Order orderRefund = PayService.refund(merchantEnum, outTradeNo, outRefundNo, totalFeeDecimal, totalFeeDecimal, refundDesc, new Date(), openid, patientId, null);
if (orderRefund.isSuccess()) {
return Result.success(AesHelper.enCode(outRefundNo));
return Result.success(AesMicroHelper.encode(outRefundNo));
}
return Result.error(orderRefund.getErrorMsg());
}

@ -13,7 +13,7 @@ import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.service.PayService;
import com.ynxbd.common.service.RegService;
import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.struts2.convention.annotation.Action;
@ -35,11 +35,11 @@ public class ThirdPartyPayAction extends BaseAction {
String params = URLHelper.mapToUrl(map -> {
map.put("partnerId", patientId);
map.put("enPatientId", ReqParamHelper.encode(patientId));
map.put("enPatientId", AesWxHelper.encode(patientId));
map.put("sourceId", sourceId);
map.put("enSourceId", ReqParamHelper.encode(sourceId));
map.put("enSourceId", AesWxHelper.encode(sourceId));
map.put("date", date);
map.put("enDate", ReqParamHelper.encode(date));
map.put("enDate", AesWxHelper.encode(date));
}, true);
return Result.redirect(WeChatConfig.getWebUrl() + "tpp-qr-reg.html" + params);
}

@ -25,7 +25,7 @@ import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.service.ReportService;
import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.ObjectUtils;
@ -50,7 +50,7 @@ public class LisReportAction extends BaseAction {
*/
@Action("report")
public Result getReportList(String treatNum, String treatNumPrefix, String flag, String patientType, String startTime, String endTime) {
treatNum = getDecodeString(treatNum);
treatNum = decodeReqString(treatNum);
log.info("[Lis报告单]查询: flag={{}}, treatNumPrefix={{}}, treatNum={{}}, patientType={{}}", flag, treatNumPrefix, treatNum, patientType);
if (flag == null || patientType == null || treatNum == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -109,10 +109,10 @@ public class LisReportAction extends BaseAction {
if (lstReport != null) {
for (XBDLisReport item : lstReport) {
if (item.getId() != null) {
item.setEnReportId(ReqParamHelper.encode(item.getId()));
item.setEnReportId(AesWxHelper.encode(item.getId()));
}
if (item.getSampleCode() != null) {
item.setEnSampleCode(ReqParamHelper.encode(item.getSampleCode()));
item.setEnSampleCode(AesWxHelper.encode(item.getSampleCode()));
}
}
}
@ -130,8 +130,8 @@ public class LisReportAction extends BaseAction {
*/
@Action("result")
public Result getResult(String reportId, String sampleCode, String flag, String testDate, String openid) {
reportId = getDecodeString(reportId);
sampleCode = getDecodeString(sampleCode);
reportId = decodeReqString(reportId);
sampleCode = decodeReqString(sampleCode);
log.info("[Lis结果]查询: flag={{}}, reportId={}, testDate={{}}, sampleCode={{}}", flag, reportId, testDate, sampleCode);
@ -176,8 +176,8 @@ public class LisReportAction extends BaseAction {
*/
@Action("image")
public Result getImage(String reportId, String sampleCode, String flag, String testDate, String openid) {
reportId = getDecodeString(reportId);
sampleCode = getDecodeString(sampleCode);
reportId = decodeReqString(reportId);
sampleCode = decodeReqString(sampleCode);
log.info("查询Lis图像: flag={{}}, reportId={}, testDate={{}}, sampleCode={{}}", flag, reportId, testDate, sampleCode);
if ("1".equals(flag) && (testDate == null || sampleCode == null)) {
@ -254,8 +254,8 @@ public class LisReportAction extends BaseAction {
*/
@Action("bact")
public Result getBactResult(String reportId, String sampleCode, String flag, String testDate, String openid) {
reportId = getDecodeString(reportId);
sampleCode = getDecodeString(sampleCode);
reportId = decodeReqString(reportId);
sampleCode = decodeReqString(sampleCode);
log.info("[Lis微生物结果]查询: flag={{}}, reportId={}, testDate={{}}, sampleCode={{}}", flag, reportId, testDate, sampleCode);
@ -303,7 +303,7 @@ public class LisReportAction extends BaseAction {
@Action("downLisReport")
public Result downLisReport(String callNo, String queryType, String reportId) {
// LIS类型 { 1:新八达LIS 2:瑞美LIS(需要加前缀M,红河不用加) 3:科华LIS }
reportId = getDecodeString(reportId);
reportId = decodeReqString(reportId);
log.info("[LIS报告]下载: callNo={}, queryType={}, reportId={}", callNo, queryType, reportId);
if ("2".equals(callNo)) { // 瑞美
if (queryType == null) queryType = "1";
@ -317,7 +317,7 @@ public class LisReportAction extends BaseAction {
*/
@Action("showLisReport")
public Result showLisReport(String queryCode) {
queryCode = getDecodeString(queryCode); // ReportID 报告单ID
queryCode = decodeReqString(queryCode); // ReportID 报告单ID
String queryType = "1";
return RMLisDao.downLisReport(queryType, queryCode);
}

@ -7,7 +7,6 @@ import com.ynxbd.common.helper.common.ImageHelper;
import com.ynxbd.common.helper.pacs.RISPacsHelper;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
@ -33,8 +32,8 @@ public class PacsReportAction extends BaseAction {
@Action("/list")
public Result list(String outPatientNum, String inPatientNum, Integer pageNum) {
outPatientNum = ReqParamHelper.decode(outPatientNum);
inPatientNum = ReqParamHelper.decode(inPatientNum);
outPatientNum = decodeReqString(outPatientNum);
inPatientNum = decodeReqString(inPatientNum);
if (outPatientNum == null && inPatientNum == null) {
return Result.error(ResultEnum.PARAM_IS_BLANK);
}

@ -11,7 +11,7 @@ import com.ynxbd.common.helper.common.DateHelper;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.service.ReportService;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.struts2.convention.annotation.Action;
@ -70,7 +70,7 @@ public class ReportAction extends BaseAction {
@Action("getCheckByPatient")
public Result getCheckByPatient(String begDate, String endDate, String patientId, String treatNum, String openid) {
try {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
// http://localhost:8080/wx/report/getCheckByPatient.do?patientId=153671&token=123
log.info("[检查报告]查询 patientId={}, begDate={}, endDate={}, treatNum={}", patientId, begDate, endDate, treatNum);
if (patientId == null || begDate == null || endDate == null) {
@ -97,7 +97,7 @@ public class ReportAction extends BaseAction {
report.setReportName(report.getName());
report.setReportType(report.getType());
report.setTreatNum(reportTreatNum);
report.setEnTreatNum(ReqParamHelper.encode(reportTreatNum));
report.setEnTreatNum(AesWxHelper.encode(reportTreatNum));
if (report.getApplyDate() != null && DateHelper.inDateRange(begDate, endDate, report.getApplyDate(), DateHelper.DateEnum.yyyy_MM_dd)) {
dataList.add(report);
}
@ -126,7 +126,7 @@ public class ReportAction extends BaseAction {
@Action("getHisCheckByTreat")
public Result getHisCheckByTreat(String begDate, String endDate, String patientId, String treatNum, Boolean isDistinctTreat, String openid) {
try {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
// http://localhost:8080/wx/report/getCheckByPatient.do?patientId=153671&token=123
log.info("[检查报告]查询 patientId={}, begDate={}, endDate={}, treatNum={}, isDistinctTreat={}", patientId, begDate, endDate, treatNum, isDistinctTreat);
if (patientId == null || begDate == null || endDate == null) {
@ -187,7 +187,7 @@ public class ReportAction extends BaseAction {
@Action("getTreatRecordList")
public Result getTreatRecordList(String begDate, String endDate, String patientId, String patientType, String reportType, Boolean isLately, String deptCode) {
try {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
// http://localhost:8081/wx/report/getTreatRecordList.do?patientId=406212&begDate=201801-01&endDate=2020-08-12&patientType=0&reportType=2
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -203,7 +203,7 @@ public class ReportAction extends BaseAction {
for (TreatRecord record : records) {
if (record.getTreatNum() != null) {
record.setEnTreatNum(ReqParamHelper.encode(record.getTreatNum()));
record.setEnTreatNum(AesWxHelper.encode(record.getTreatNum()));
}
}
return Result.success(records);
@ -226,7 +226,7 @@ public class ReportAction extends BaseAction {
@Action("getReportTreatRecords")
public Result getReportTreatRecords(String begDate, String endDate, String patientId, String treatType, String reportType, Boolean isLately, String deptCode) {
try {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
// http://localhost:8081/wx/report/getTreatRecords.do?patientId=406212&begDate=201801-01&endDate=2020-08-12&treatType=0&reportType=2
if (patientId == null || begDate == null || endDate == null) {
return Result.error(ResultEnum.PARAM_IS_DEFECT);
@ -238,7 +238,7 @@ public class ReportAction extends BaseAction {
}
for (TreatRecord record : records) {
if (record.getTreatNum() != null) {
record.setEnTreatNum(ReqParamHelper.encode(record.getTreatNum()));
record.setEnTreatNum(AesWxHelper.encode(record.getTreatNum()));
}
}
@ -260,7 +260,7 @@ public class ReportAction extends BaseAction {
@Action("getInspectByPatient")
public Result getInspectByPatient(String openid, String patientId, String begDate, String endDate) {
try {
patientId = getDecodeString(patientId);
patientId = decodeReqString(patientId);
// http://localhost:8080/wx/report/getInspectByPatient.do?patientId=153671&token=123
log.info("化验(检验)结果查询:patientId={}, begDate={}, endDate={}", patientId, begDate, endDate);
@ -288,8 +288,8 @@ public class ReportAction extends BaseAction {
@Action("getInspectByTreatNum")
public Result getInspectByTreatNum(String type, String treatNum, String patientId) {
try {
treatNum = getDecodeString(treatNum);
patientId = getDecodeString(patientId);
treatNum = decodeReqString(treatNum);
patientId = decodeReqString(patientId);
// http://localhost:8080/wx/report/getInspectByTreatNum.do?patientId=153671&token=123
log.info("[化验(检验)]结果查询:patientId={}, type={}, treatNum={}", patientId, type, treatNum);
if (patientId == null || type == null || treatNum == null) {

@ -8,7 +8,7 @@ import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.result.ServiceException;
import com.ynxbd.wx.wxfactory.WxMedicalHelper;
import com.ynxbd.wx.wxfactory.medical.MdConfig;
import com.ynxbd.wx.wxfactory.medical.MIConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
@ -74,7 +74,7 @@ public class TestAction extends BaseAction {
@Action("test03")
public Result test03() throws ServiceException {
System.out.println("开关" + MdConfig.IS_AUTO_REFUND);
System.out.println("开关" + MIConfig.IS_AUTO_REFUND);
log.info("日志测试");
System.out.println(System.getProperty("fileEncoding"));
System.out.println(System.getProperty("encoding"));

@ -1,6 +1,6 @@
package com.ynxbd.common.bean;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -63,7 +63,7 @@ public class HisRecipe {
// 院区名称
private String hospitalAreaName;
// 互联网医院处方标识
// 互联网医院处方标识[1:互联网处方]
private String internetHospFlag;
// 是否为双通道处方 [1:双通道处方]
private String sTDFlag;
@ -99,6 +99,6 @@ public class HisRecipe {
if (ObjectUtils.isEmpty(this.billNo)) {
return;
}
this.enBillNo = ReqParamHelper.encode(this.billNo);
this.enBillNo = AesWxHelper.encode(this.billNo);
}
}

@ -42,8 +42,14 @@ public enum MerchantEnum {
"10,11,12,13,14,15",
"medical/payNotify",
"",
"0", "1", "2");
"0", "1", "2"),
ALI_MEDICAL("ali_medical", "【支付宝医保】", "3",
"25,26,27,28,29,30",
"ali_pay/medical_notify",
"",
"10", "11", "12"),
;
public final String CODE;

@ -0,0 +1,23 @@
package com.ynxbd.common.bean.his;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
@Getter
@Setter
@ToString
@NoArgsConstructor
public class HisArea implements Serializable {
private static final long serialVersionUID = -2025081111550001L;
private String areaName;
private String areaCode;
private String level;
private String pym;
}

@ -1,7 +1,7 @@
package com.ynxbd.common.bean.pay;
import com.ynxbd.common.helper.common.ParamHelper;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -150,30 +150,30 @@ public class Order implements Serializable {
public void filterInfo() {
if (id != null) {
this.enId = ReqParamHelper.encode(String.valueOf(id));
this.enId = AesWxHelper.encode(String.valueOf(id));
this.id = null;
}
String _cardNo = this.idCardNo;
if (!ObjectUtils.isEmpty(_cardNo)) {
this.idCardNo = null;
this.enCardNo = ReqParamHelper.encode(_cardNo);
this.enCardNo = AesWxHelper.encode(_cardNo);
this.showCardNo = ParamHelper.hideIdCardNo(_cardNo);
}
String _tel = this.tel;
if (!ObjectUtils.isEmpty(_tel)) {
this.tel = null;
this.enTel = ReqParamHelper.encode(_tel);
this.enTel = AesWxHelper.encode(_tel);
this.showTel = ParamHelper.hidTel(_tel);
}
if (!ObjectUtils.isEmpty(this.patientId)) {
this.enPatientId = ReqParamHelper.encode(this.patientId);
this.enPatientId = AesWxHelper.encode(this.patientId);
}
if (!ObjectUtils.isEmpty(treatNum)) {
this.enTreatNum = ReqParamHelper.encode(String.valueOf(treatNum));
this.enTreatNum = AesWxHelper.encode(String.valueOf(treatNum));
}
}

@ -1,9 +1,14 @@
package com.ynxbd.common.bean.pay;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.result.ServiceException;
import com.ynxbd.common.service.RegService;
import com.ynxbd.common.service.params.RequestParams;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import java.math.BigDecimal;
@ -12,6 +17,8 @@ import java.math.BigDecimal;
* @Date 2020/11/27 10:02
* @Copyright @ 2020 云南新八达科技有限公司 All rights reserved.
*/
@Slf4j
@Setter
@Getter
@ToString(callSuper = true)
@ -85,4 +92,146 @@ public class Register extends Order {
public boolean hasIsTreat(int val) {
return isTreat != null && isTreat == val;
}
/**
* * // * @param regFee 金额
* * // * @param clinicFee 金额
* * // * @param payMoney 金额
* * // * @param tel 电话
* * // * @param openid openid
* * // * @param idCardNo 身份证号码
* * // * @param patientId 患者id
* * // * @param deptCode 科室编码
* * // * @param deptName 科室名称
* * // * @param doctCode 医生编码
* * // * @param doctName 医生名
* * // * @param address 地址
* * // * @param hospitalArea 院区
* * // * @param tid 时段名
* * // * @param tName 时段名
* * // * @param begTime 开始时间(分时段)
* * // * @param endTime 开始时间(分时段)
* * // * @param regCode 挂号编码
* * // * @param regDate 挂号日期
* * // * @param sourceId 号源id(分时段)
* * // * @param queueNum 序列号(分时段)
* * // * @param clinicCode 编码
*
* @param params 请求参数
* @param isDesc
*/
public Register getRegParams(RequestParams params, boolean isDesc) throws ServiceException {
String openid = params.getString("openid");
String patientId = params.getString("patientId");
String cardNo = params.getString("idCardNo");
String patientName = params.getString("patientName");
if (cardNo == null) {
cardNo = params.getString("cardNo");
}
BigDecimal payMoney = params.getBigDecimal("payMoney");
BigDecimal totalFee = params.getBigDecimal("totalFee");
String deptCode = params.getString("deptCode");
String subDeptCode = params.getString("subDeptCode");
String doctCode = params.getString("doctCode");
String regCode = params.getString("regCode");
String regDate = params.getString("regDate");
String tid = params.getString("tid");
if (openid == null || patientId == null || cardNo == null || deptCode == null || doctCode == null || regDate == null || tid == null) {
log.info("[挂号]参数缺失 patientId={}, deptCode={}, doctCode={}, regCode={}, regDate={}, tid={}",
patientId, deptCode, doctCode, regCode, regDate, tid);
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
if (payMoney == null || totalFee == null) {
log.info("[挂号]参数缺失 payMoney");
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
Boolean isSplitTime = params.getBoolean("isSplitTime");
if (isSplitTime == null) {
log.info("[挂号]挂号类型参数缺失isSplitTime");
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
log.info("[挂号类型]{}", (isSplitTime ? "分时段挂号" : "普通挂号"));
this.isSplitTime = isSplitTime;
if (isSplitTime) { // 分时段
String tName = params.getString("tName");
String queueNum = params.getString("queueNum");
String sourceId = params.getString("sourceId");
String begTime = params.getString("begTime");
String endTime = params.getString("endTime");
if (tName == null || queueNum == null || sourceId == null || begTime == null || endTime == null) {
log.info("[挂号]参数缺失 tName={}, queueNum={}, sourceId={}, begTime={}, endTime={}", tName, queueNum, sourceId, begTime, endTime);
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
this.tName = tName;
this.begTime = begTime;
this.endTime = endTime;
this.sourceId = sourceId;
this.queueNum = queueNum;
} else {
String clinicCode = params.getString("clinicCode");
if (clinicCode == null) {
log.info("[普通挂号]参数缺失clinicCode");
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
this.clinicCode = clinicCode;
}
if (isDesc) {
BigDecimal regFee = params.getBigDecimal("regFee");
BigDecimal clinicFee = params.getBigDecimal("clinicFee");
if (regFee == null || clinicFee == null) {
log.info("[挂号]参数缺失 regFee={}, clinicFee={}", regFee, clinicFee);
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
String tel = params.getString("tel");
String address = params.getString("address");
String deptName = params.getString("deptName");
String doctName = params.getString("doctName");
String hospitalArea = params.getString("hospitalArea");
if (deptName == null || doctName == null) {
log.info("[挂号]参数缺失 tel={}, address={}, deptName={}, hospitalArea={}", tel, address, deptName, hospitalArea);
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
this.regFee = regFee;
this.clinicFee = clinicFee;
this.address = address;
this.hospitalArea = hospitalArea;
this.deptName = deptName;
this.doctName = doctName;
this.regType = RegService.setRegType(regDate, isSplitTime);
this.setTel(tel);
}
this.deptCode = deptCode;
this.subDeptCode = subDeptCode;
this.doctCode = doctCode;
this.regCode = regCode;
this.regDate = regDate;
this.tid = tid;
// 金额
this.setPayMoney(payMoney);
this.setTotalFee(totalFee);
// 个人信息
this.setOpenid(openid);
this.setPatientId(patientId);
this.setPatientName(patientName);
this.setIdCardNo(cardNo);
return this;
}
}

@ -1,6 +1,6 @@
package com.ynxbd.common.bean.report;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -81,6 +81,6 @@ public class CheckReport implements Serializable {
this.treatNum = reportTreatNum;
this.reportName = this.name;
this.reportType = this.type;
this.enTreatNum = ReqParamHelper.encode(reportTreatNum);
this.enTreatNum = AesWxHelper.encode(reportTreatNum);
}
}

@ -165,11 +165,54 @@ public class HisPatientDao {
return HisHelper.getJsonResult(HisEnum.AP_Query_Patient, params);
}
private String substringAreaCode(String areaCode, Integer length) {
if (areaCode.length() >= length) {
return areaCode.substring(0, length);
}
return null;
}
private String getHisAreaCodeByLevel(Integer level, String areaCode) {
if (level == 1) {
if (areaCode == null) {
return "";
}
if (areaCode.length() < 2) {
return "";
}
return areaCode.substring(0, 2);
}
if (areaCode == null) {
return null;
}
if (level == 2) {
return substringAreaCode(areaCode, 2);
}
if (level == 3) {
return substringAreaCode(areaCode, 4);
}
if (level == 4) {
return substringAreaCode(areaCode, 6);
}
if (level == 5) {
return substringAreaCode(areaCode, 9);
}
return null;
}
public JSONArray getArea(Integer level, String areaCode) throws ServiceException {
if (level == null || ObjectUtils.isEmpty(areaCode)) {
if (level == null) {
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
areaCode = getHisAreaCodeByLevel(level, areaCode);
if (areaCode == null) {
throw new ServiceException(ResultEnum.PARAM_IS_INVALID);
}
Map<String, Object> params = new HashMap<>();
params.put("Level", level);

@ -9,7 +9,7 @@ import com.ynxbd.common.helper.lis.RMLisHelper;
import com.ynxbd.common.result.JsonResult;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
@ -90,7 +90,7 @@ public class RMLisDao {
xbdLisReport.setReqItemName(report.getOrderItems().get(0).getProjectName());
xbdLisReport.setReqDate(DateHelper.DateTimeToString(report.getOrderItems().get(0).getRequestTime()));
}
xbdLisReport.setEnReportId(ReqParamHelper.encode(report.getReportID()));
xbdLisReport.setEnReportId(AesWxHelper.encode(report.getReportID()));
xbdLisReport.setReportType(report.getReportType());
xbdLisReport.setPatientType(report.getPatientKind());
xbdLisReport.setReportDate(DateHelper.DateTimeToString(report.getRechkDate()));

@ -15,18 +15,14 @@ import java.nio.charset.StandardCharsets;
@Slf4j
public class AesHelper {
private final static String KEY = "ynxbdysdssjtwrin";
private final static String IV = "ynxbdqsdsbjtwrin";
public static String enCode(String data) {
return encryptHex(data, KEY, IV);
}
public static String deCode(String data) {
return decryptHex(data, KEY, IV);
}
/**
* 数据解密
*
* @param data 数据
* @param key 密钥(16位)
* @param iv 密钥偏移量(16位)
* @return str
*/
public static String decryptHex(String data, String key, String iv) {
try {
SecretKeySpec secretKey = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "AES");
@ -45,7 +41,7 @@ public class AesHelper {
*
* @param data 加密数据
* @param key 密钥16位
* @param iv 密钥偏移量
* @param iv 密钥偏移量(16位)
* @return 加密后的数据
*/
public static String encryptHex(String data, String key, String iv) {
@ -63,21 +59,4 @@ public class AesHelper {
}
}
public static void main(String[] args) throws Exception {
//PACS 那边的 加解密密钥 key:cqmygysdssjtwmyd iv:llyscysykryhsbjc
// long beg = System.currentTimeMillis();
// String encrypt = encryptHex("文字123", "wsqysqsdssjtwmyd", "xbzynydykkxxkkll");
// System.out.println(encrypt);
// long end = System.currentTimeMillis();
//
// System.out.println(end - beg);
// String a = decryptHex("111123", "wsqysqsdssjtwmyd", "xbzynydykkxxkkll");
// System.out.println(a);
System.out.println(enCode("11044955"));
System.out.println(deCode("4BCBEAAFDC5A36E7A5448FB4F471581E541FB64A336D3D83B30CFBD9B7959A4C"));
// String encrypt = decryptHex("A95C0ACF523B396D48857B85B82D3A47CA3DC877FEAAE4C6AB1A462C0F18D6BA537CE71511A651344B566B9CC65A06E04977EA167558E29B3AB2E7CF1ED993C62CA454E9566133712B92344B64C88B5B9260C287EA3712F6314F02738AD888C864271129DD5D83119509F2380ECACF0A2B8202C3F367711123FEADC6AEEE24A11AF79816F33E9A64DF10DDB0E2070B8204A8BC0D70C162515C1EA6FF69CABEED3ABFC3609B0EBC36FF8BA7868BE9B6767F23076876BB549829370DBD98DE52BD14E015F53F3E44574EA2F80B30B14C27414994DC852528BDC711F42379E0399C62A1983627A0765E7B51AB880B10BAE824C9A7F6DE096040A24D3C8ABD394E32C04EB78E8F05D95A122B447D91B65FCB738E41291F088FDD259DFE6B8E94D51F", "cqmygysdssjtwmyd", "llyscysykryhsbjc");
// System.out.println(encrypt);
}
}

@ -0,0 +1,18 @@
package com.ynxbd.common.helper.common;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class AesMicroHelper {
private final static String KEY = "ynxbdysdssjtwrin";
private final static String IV = "ynxbdqsdsbjtwrin";
public static String encode(String data) {
return AesHelper.encryptHex(data, KEY, IV);
}
public static String decode(String data) {
return AesHelper.decryptHex(data, KEY, IV);
}
}

@ -76,7 +76,7 @@ public class HCodeService {
*
* @return 是否使用
*/
public static boolean isEnableHealthCard() {
public static boolean isEnableHCode() {
if (!IS_ENABLE) {
log.info("hcode.properties中禁用电子健康卡isEnable={}", IS_ENABLE);
}
@ -89,8 +89,8 @@ public class HCodeService {
*
* @return token
*/
public static String getAppToken() {
if (!isEnableHealthCard()) {
public String getAppToken() {
if (!isEnableHCode()) {
return null;
}
@ -139,7 +139,7 @@ public class HCodeService {
}
public static Patient appBindHealthCard(String healthCode) {
public Patient appBindHealthCard(String healthCode) {
if (healthCode == null) {
return null;
}
@ -180,7 +180,7 @@ public class HCodeService {
* @param idCardNo 证件号码
* @param phone1 联系方式1
*/
public static JSONObject registerHealthCard(String patientId, String weChatCode,
public JSONObject registerHealthCard(String patientId, String weChatCode,
String birthday, HCardTypeEnum cardTypeEnum, String address,
String sex, String nation, String name, String idCardNo, String phone1) {
try {
@ -229,7 +229,7 @@ public class HCodeService {
*
* @param healthCode 健康卡授权码
*/
public static Patient getInfoByHealthCode(String healthCode) {
public Patient getInfoByHealthCode(String healthCode) {
try {
String appToken = getAppToken();
if (appToken == null) {
@ -282,7 +282,7 @@ public class HCodeService {
*
* @param qrCode 二维码
*/
public static Patient getHealthCardByQrCode(String qrCode) {
public Patient getHealthCardByQrCode(String qrCode) {
try {
log.info("[电子健康卡]查询健康卡信息 qrCode={}", qrCode);
if (ObjectUtils.isEmpty(qrCode)) {
@ -332,7 +332,7 @@ public class HCodeService {
/**
* 实人认证生成orderId接口
*/
public static String registerUniformVerifyOrder(String idCardNo, String name, String wechatCode) {
public String registerUniformVerifyOrder(String idCardNo, String name, String wechatCode) {
try {
log.info("[电子健康卡]实人认证生成orderId idCardNo={}, name={}", idCardNo, name);
if (ObjectUtils.isEmpty(idCardNo) || ObjectUtils.isEmpty(name)) {
@ -367,7 +367,7 @@ public class HCodeService {
/**
* 实人认证结果查询接口
*/
public static boolean checkUniformVerifyResult(String verifyOrderId, String registerOrderId) {
public boolean checkUniformVerifyResult(String verifyOrderId, String registerOrderId) {
try {
log.info("[电子健康卡]实人认证结果查询 verifyOrderId={}, registerOrderId={}", verifyOrderId, registerOrderId);
if (ObjectUtils.isEmpty(verifyOrderId) || ObjectUtils.isEmpty(registerOrderId)) {
@ -404,7 +404,7 @@ public class HCodeService {
*
* @param qrCodeText 二维码编码
*/
public static JSONObject getCardOrderId(String qrCodeText) {
public JSONObject getCardOrderId(String qrCodeText) {
try {
String appToken = getAppToken();
if (appToken == null) {
@ -439,7 +439,7 @@ public class HCodeService {
* @param cardType 卡类型
* @return JSONObject
*/
public static JSONObject reportHISData(String qrCodeText, String deptName, String scene, String cardType, String cardCostType) {
public JSONObject reportHISData(String qrCodeText, String deptName, String scene, String cardType, String cardCostType) {
if ("".equals(qrCodeText) || scene == null || cardType == null) {
log.info("[电子健康卡]用卡数据监测接口,参数为空");
return null;
@ -493,7 +493,7 @@ public class HCodeService {
* @param idCardNo 证件号码
* @param codeType 传0或者10返回动态码1返回静态码
*/
public static JSONObject getDynamicQRCode(String healthCardId, String idCardNo, String codeType) {
public JSONObject getDynamicQRCode(String healthCardId, String idCardNo, String codeType) {
if (healthCardId == null || idCardNo == null || codeType == null) {
log.info("[电子健康卡]获取健康卡二维码参数缺失 healthCardId={}, idCardNo={}, codeType={}", healthCardId, idCardNo, codeType);
return null;
@ -529,7 +529,7 @@ public class HCodeService {
* @param patientId 患者ID
* @param qrCodeText 标识IDhealthCardId = qrCodeText
*/
public static JSONObject bindCardRelation(String patientId, String qrCodeText) {
public JSONObject bindCardRelation(String patientId, String qrCodeText) {
if (patientId == null || "".equals(qrCodeText)) {
log.info("[电子健康卡]一键绑定绑定健康卡和医院关系参数缺失 patientId={}, qrCodeText={}", patientId, qrCodeText);
return null;
@ -566,7 +566,7 @@ public class HCodeService {
* @param idCardNo 身份证号
* @return 动态二维码
*/
public static String getQRCodeText(String healthCardId, String idCardNo) {
public String getQRCodeText(String healthCardId, String idCardNo) {
JSONObject QRResult = getDynamicQRCode(healthCardId, idCardNo, "0");
if (QRResult == null) {
log.info("用卡数据监测接口,获取二维码失败");
@ -591,9 +591,9 @@ public class HCodeService {
* @param regDate 挂号日期
* @return 是否上报成功
*/
public static boolean regPayReportHISData(String openid, String patientId, String deptName, String regDate) {
public boolean regPayReportHISData(String openid, String patientId, String deptName, String regDate) {
try {
if (!HCodeService.isEnableHealthCard()) { // 判断是否禁用电子健康卡
if (!HCodeService.isEnableHCode()) { // 判断是否禁用电子健康卡
return false;
}
@ -640,7 +640,7 @@ public class HCodeService {
* @param imageContent 身份证正面照片的base64编码数据头部信息需要删除如image/png;base64image/jpeg/png;base64等并且数据量建议压缩到百K级别上传
* @return 身份证信息
*/
public static Patient orcInfo(String imageContent) {
public Patient orcInfo(String imageContent) {
if (imageContent == null) {
return null;
}
@ -652,7 +652,7 @@ public class HCodeService {
Patient patient = new Patient();
try {
if (!HCodeService.isEnableHealthCard()) { // 判断是否禁用电子健康卡
if (!HCodeService.isEnableHCode()) { // 判断是否禁用电子健康卡
return null;
}
@ -695,7 +695,7 @@ public class HCodeService {
// FileHelper.saveBase64Image("data:image/png;base64," + imageContent, "idCard", (idNumber + ".png"), true, false);
// }
} catch (Exception e) {
e.printStackTrace();
ErrorHelper.println(e);
return null;
}
return patient;
@ -708,9 +708,9 @@ public class HCodeService {
* @param patientId patientId
* @return 是否成功
*/
public static boolean rxReportHISData(String openid, String patientId) {
public boolean rxReportHISData(String openid, String patientId) {
try {
if (!HCodeService.isEnableHealthCard()) { // 判断是否禁用电子健康卡
if (!HCodeService.isEnableHCode()) { // 判断是否禁用电子健康卡
return false;
}
@ -735,7 +735,7 @@ public class HCodeService {
}
// 门诊缴费
JSONObject jsonObject = HCodeService.reportHISData(qrCodeText, null, HealthCardEnum.SCENE_TOLL_OUTPATIENT_PAYMENT.STATUS, HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS, HealthCardEnum.CARD_COST_TYPE_OWN_EXPENSE.STATUS);
JSONObject jsonObject = reportHISData(qrCodeText, null, HealthCardEnum.SCENE_TOLL_OUTPATIENT_PAYMENT.STATUS, HealthCardEnum.CARD_TYPE_HEALTH_CARD.STATUS, HealthCardEnum.CARD_COST_TYPE_OWN_EXPENSE.STATUS);
if (jsonObject == null) {
log.info("挂号数据上报失败");
return false;
@ -752,7 +752,7 @@ public class HCodeService {
*
* @return json
*/
public static JSONArray batchUpdate(List<Patient> lstPatient) {
public JSONArray batchUpdate(List<Patient> lstPatient) {
HealthCardServerImpl healthCard = new HealthCardServerImpl(H_APP_SECRET);
//构造公共输入参数commonIn
String appToken = getAppToken();
@ -800,7 +800,7 @@ public class HCodeService {
* @param resultCode 响应码
* @return 返回响应码对应的消息
*/
public static HealthCardRespCodeEnum resultCodeHandle(String resultCode) {
public HealthCardRespCodeEnum resultCodeHandle(String resultCode) {
HealthCardRespCodeEnum healthCardRespCodeEnum = HealthCardRespCodeEnum.CONTINUE;
for (HealthCardRespCodeEnum e : HealthCardRespCodeEnum.values()) {

@ -1,6 +1,7 @@
package com.ynxbd.common.service;
import com.alibaba.fastjson.JSONObject;
import com.ynxbd.ali.helper.AliMedicalHelper;
import com.ynxbd.common.action.pay.PEnum;
import com.ynxbd.common.bean.enums.MerchantEnum;
import com.ynxbd.common.bean.pay.Recipe;
@ -20,8 +21,8 @@ import com.ynxbd.wx.wxfactory.WxPayHelper;
import com.ynxbd.wx.wxfactory.bean.MedicalInfo;
import com.ynxbd.wx.wxfactory.bean.MedicalOrder;
import com.ynxbd.wx.wxfactory.bean.MedicalUserInfo;
import com.ynxbd.wx.wxfactory.bean.OrderTypeEnum;
import com.ynxbd.wx.wxfactory.medical.MdConfig;
import com.ynxbd.wx.wxfactory.bean.OrderMIEnum;
import com.ynxbd.wx.wxfactory.medical.MIConfig;
import lombok.extern.slf4j.Slf4j;
import java.math.BigDecimal;
@ -30,6 +31,25 @@ import java.util.Map;
@Slf4j
public class MedicalService {
public void commonNotify(MerchantEnum merchantEnum, String notifyType, String outTradeNo, BigDecimal totalFee, String bankTransNo, String payDate, String payTime, String openid, String payInfo) {
switch (PEnum.toEnum(notifyType)) {
case RECIPE:
rxPayNotify(merchantEnum, outTradeNo, bankTransNo, payDate, payTime, openid, payInfo);
break;
case REG: // 挂号
regPayNotify(merchantEnum, outTradeNo, bankTransNo, payDate, payTime, openid, payInfo);
break;
case IN_HOSP:
break;
default:
log.info("{}[医保]通知类型错误", merchantEnum.NAME);
break;
}
}
/**
* [医保]挂号上报
@ -41,14 +61,14 @@ public class MedicalService {
* @param realName 真实姓名
* @param reg 挂号信息
*/
public static MedicalInfo regMdUploadFeeDetails(String qrCode, String openid, String patientId, String cardNo, String realName, Register reg, Boolean isSplitTime) throws ServiceException {
public MedicalInfo hisRegMIUploadFeeDetails(String qrCode, String openid, String patientId, String cardNo, String realName, Register reg, Boolean isSplitTime) throws ServiceException {
MedicalUserInfo userInfo = WxMedicalHelper.getUserInfo(openid, qrCode, cardNo, realName);
String payAuthNo = userInfo.getPayAuthNo();
log.info("[医保]上传明细:patientId={}, cardNo={}, realName={}, reg={}", patientId, cardNo, realName, reg);
JsonResult result = HisMedicalDao.regTimeMdUploadFeeDetails(reg, payAuthNo, cardNo, MerchantEnum.WX, isSplitTime);
return mdPlaceOrder(payAuthNo, result);
return hisMIPlaceOrder(payAuthNo, result);
}
/**
@ -63,22 +83,22 @@ public class MedicalService {
* @param recipeJson 处方json
* @param totalFee 订单金额
*/
public static MedicalInfo recipeMdUploadFeeDetails(String qrCode, String openid, String patientId, String cardNo, String realName, String treatNum, String recipeJson, BigDecimal totalFee, String ybAttrib, String ybBZCode, String ybBZName) throws ServiceException {
public MedicalInfo hisRxUploadFeeDetails(String qrCode, String openid, String patientId, String cardNo, String realName, String treatNum, String recipeJson, BigDecimal totalFee, String ybAttrib, String ybBZCode, String ybBZName) throws ServiceException {
MedicalUserInfo userInfo = WxMedicalHelper.getUserInfo(openid, qrCode, cardNo, realName);
String payAuthNo = userInfo.getPayAuthNo();
log.info("[医保]上传明细:patientId={}, totalFee={}, cardNo={}, recipeJson={}", patientId, totalFee, cardNo, recipeJson);
JsonResult result = HisMedicalDao.recipeMdUploadFeeDetails(payAuthNo, cardNo, openid, patientId, treatNum, recipeJson, totalFee, ybAttrib, ybBZCode, ybBZName);
return mdPlaceOrder(payAuthNo, result);
return hisMIPlaceOrder(payAuthNo, result);
}
/**
* [医保]下单
* [医保]his下单
*
* @param payAuthNo 授权码
*/
private static MedicalInfo mdPlaceOrder(String payAuthNo, JsonResult result) throws ServiceException {
private MedicalInfo hisMIPlaceOrder(String payAuthNo, JsonResult result) throws ServiceException {
if (result == null) {
throw new ServiceException("[医保]返回数据为空");
}
@ -138,10 +158,10 @@ public class MedicalService {
/**
* 微信下单
* [医保]处方下单
*/
public static Result createOrder(String payCode, String openid, String patientId, String cardNo, String realName, String ip, String payOrdId, String payAuthNo, String mdTrtId, String chrgBchno, String mdUserId, BigDecimal totalFee, BigDecimal acctFee, BigDecimal hifpFee, BigDecimal insuranceFee, BigDecimal cashFee, String notifyType,
String recipeJson, String treatNum, String payWay) {
public Result createRxOrder(String payCode, String openid, String patientId, String cardNo, String realName, String ip, String payOrdId, String payAuthNo, String mdTrtId, String chrgBchno, String mdUserId, BigDecimal totalFee, BigDecimal acctFee, BigDecimal hifpFee, BigDecimal insuranceFee, BigDecimal cashFee, String notifyType,
String recipeJson, String treatNum, String payWay, String familyType, String familyName, String familyCardNo) {
Result result = PayService.isPaymentPermittedByTime();
if (result != null) {
return result;
@ -168,11 +188,13 @@ public class MedicalService {
log.info("[医保]下单 openid={}, outTradeNo={}, payOrdId={}, payAuthNo={}, totalFee={}, acctFee={}, cashFee={}, idCardNo={}, realName={}", openid, outTradeNo, payOrdId, payAuthNo, totalFee, acctFee, cashFee, cardNo, realName);
try {
Map<String, Object> map = WxMedicalHelper.createOrder(
OrderTypeEnum.DIAG_PAY,
Map<String, Object> map = null;
String orderTitle = "门诊号:" + treatNum;
if (MerchantEnum.WX_MEDICAL.equals(merchantEnum)) {
map = WxMedicalHelper.createOrder(OrderMIEnum.DIAG_PAY,
openid,
outTradeNo,
chrgBchno,
openid,
cardNo,
realName,
ip,
@ -181,10 +203,29 @@ public class MedicalService {
totalFee,
insuranceFee,
cashFee,
orderTitle,
WeChatConfig.getWebUrl() + "pay-info.html#/rx-paid",
WeChatConfig.getBaseUrl() + merchantEnum.NOTIFY_URL,
WeChatConfig.getWebUrl() + "pay-info.html#/recipe-payed",
"门诊号:" + treatNum,
notifyType);
notifyType,
familyType, familyName, familyCardNo);
} else if (MerchantEnum.ALI_MEDICAL.equals(merchantEnum)) {
String notifyUrl = WeChatConfig.getHttpsBaseUrl() + merchantEnum.getNotifyUrl(outTradeNo, notifyType);
map = AliMedicalHelper.createOrder(OrderMIEnum.DIAG_PAY,
openid,
outTradeNo,
payOrdId,
payAuthNo,
totalFee,
cashFee,
orderTitle,
notifyUrl,
notifyType,
familyType, familyName, familyCardNo);
}
if (map == null) {
return Result.error(ResultEnum.PAY_ERROR_ORDER);
}
String bankTransNo = String.valueOf(map.get("bankTransNo"));
RecipeDao recipeDao = new RecipeDao();
// Recipe recipeInfo = recipeDao.selectByTradeNo(payOrdId);
@ -212,7 +253,7 @@ public class MedicalService {
addRecipe.setOpenid(openid);
addRecipe.setPatientId(patientId);
addRecipe.setTreatNum(treatNum);
addRecipe.setBankTransNo(String.valueOf(map.get("bankTransNo")));
addRecipe.setBankTransNo(bankTransNo);
addRecipe.setPayStatus(-1);
addRecipe.setHisStatus(-1);
@ -229,9 +270,9 @@ public class MedicalService {
/**
* 挂号下单
* [医保]挂号下单
*/
public static Result createRegOrder(String payCode, String openid, String cardNo, String realName, String ip, String payOrdId, String payAuthNo, String mdTrtId, String chrgBchno, String mdUserId, BigDecimal totalFee, BigDecimal acctFee, BigDecimal hifpFee, BigDecimal insuranceFee, BigDecimal cashFee, String notifyType, Register reg) {
public Result createRegOrder(String payCode, String openid, String cardNo, String realName, String ip, String payOrdId, String payAuthNo, String mdTrtId, String chrgBchno, String mdUserId, BigDecimal totalFee, BigDecimal acctFee, BigDecimal hifpFee, BigDecimal insuranceFee, BigDecimal cashFee, String notifyType, Register reg, String familyType, String familyName, String familyCardNo) {
Result result = PayService.isPaymentPermittedByTime();
if (result != null) {
return result;
@ -246,13 +287,45 @@ public class MedicalService {
log.info("[医保]挂号下单 openid={}, outTradeNo={}, payOrdId={}, payAuthNo={}, totalFee={}, acctFee={}, cashFee={}, idCardNo={}, realName={}", openid, outTradeNo, payOrdId, payAuthNo, totalFee, acctFee, cashFee, cardNo, realName);
try {
Map<String, Object> map = WxMedicalHelper.createOrder(OrderTypeEnum.REG_PAY,
outTradeNo, chrgBchno, openid, cardNo, realName, ip, payOrdId, payAuthNo,
totalFee, insuranceFee, cashFee,
WeChatConfig.getBaseUrl() + merchantEnum.NOTIFY_URL,
Map<String, Object> map = null;
String orderTitle = "挂号";
if (MerchantEnum.WX_MEDICAL.equals(merchantEnum)) {
map = WxMedicalHelper.createOrder(OrderMIEnum.REG_PAY,
openid,
outTradeNo,
chrgBchno,
cardNo,
realName,
ip,
payOrdId,
payAuthNo,
totalFee,
insuranceFee,
cashFee,
orderTitle,
WeChatConfig.getWebUrl() + "my-info.html",
"挂号",
notifyType);
WeChatConfig.getBaseUrl() + merchantEnum.NOTIFY_URL,
notifyType,
familyType, familyName, familyCardNo);
} else if (MerchantEnum.ALI_MEDICAL.equals(merchantEnum)) {
String notifyUrl = WeChatConfig.getHttpsBaseUrl() + merchantEnum.getNotifyUrl(outTradeNo, notifyType);
map = AliMedicalHelper.createOrder(OrderMIEnum.REG_PAY,
openid,
outTradeNo,
payOrdId,
payAuthNo,
totalFee,
cashFee,
orderTitle,
notifyUrl,
notifyType,
familyType, familyName, familyCardNo);
}
if (map == null) {
return Result.error(ResultEnum.PAY_ERROR_ORDER);
}
String bankTransNo = String.valueOf(map.get("bankTransNo"));
RegisterDao regDao = new RegisterDao();
reg.setOutTradeNo(outTradeNo);
@ -268,7 +341,7 @@ public class MedicalService {
reg.setPayDeviceId("mobile");
reg.setPayStatus(-1);
reg.setHisStatus(-1);
reg.setBankTransNo(String.valueOf(map.get("bankTransNo")));
reg.setBankTransNo(bankTransNo);
reg.setPayWay(merchantEnum.PAY_WAY_IN);
if (!regDao.insertMedical(reg)) {
@ -293,7 +366,7 @@ public class MedicalService {
* @param openid openid
* @param payInfo 支付信息
*/
public static boolean regPayNotify(MerchantEnum merchantEnum, String outTradeNo, String bankTransNo, String payDate, String payTime, String openid, String payInfo) {
public boolean regPayNotify(MerchantEnum merchantEnum, String outTradeNo, String bankTransNo, String payDate, String payTime, String openid, String payInfo) {
if (outTradeNo == null || bankTransNo == null || payDate == null || payTime == null) {
log.info("[医保][挂号]HIS结算参数缺失 outTradeNo={}, bankTransNo={}, payDate={}, payTime={}", outTradeNo, bankTransNo, payDate, payTime);
return false;
@ -358,7 +431,7 @@ public class MedicalService {
return false;
}
if (!MdConfig.IS_AUTO_REFUND) {
if (!MIConfig.IS_AUTO_REFUND) {
log.info("[医保][挂号]现金自动退费功能未开启 outTradeNo={}, bankTransNo={}, tradeNo={}", outTradeNo, bankTransNo, tradeNo);
return false;
}
@ -395,7 +468,7 @@ public class MedicalService {
* @param openid openid
* @param payInfo 支付信息
*/
public static boolean recipePayNotify(MerchantEnum merchantEnum, String outTradeNo, String bankTransNo, String payDate, String payTime, String openid, String payInfo) {
public boolean rxPayNotify(MerchantEnum merchantEnum, String outTradeNo, String bankTransNo, String payDate, String payTime, String openid, String payInfo) {
if (outTradeNo == null || bankTransNo == null || payDate == null || payTime == null) {
log.info("[医保][处方]HIS结算参数缺失 outTradeNo={}, bankTransNo={}, payDate={}, payTime={}", outTradeNo, bankTransNo, payDate, payTime);
return false;
@ -468,7 +541,7 @@ public class MedicalService {
return false;
}
if (!MdConfig.IS_AUTO_REFUND) {
if (!MIConfig.IS_AUTO_REFUND) {
log.info("[医保][处方][现金自动退费]功能未开启 outTradeNo={}, bankTransNo={}, tradeNo={}", outTradeNo, bankTransNo, tradeNo);
return false;
}
@ -506,7 +579,7 @@ public class MedicalService {
* @param cashFee 现金金额
* @param insuranceFee 医保金额
*/
public static Result refund(String payAuthNo, String fpNum, String outTradeNo, String bankTransNo, String tradeNo, String mdUserId, BigDecimal cashFee, BigDecimal insuranceFee) {
public Result refund(String payAuthNo, String fpNum, String outTradeNo, String bankTransNo, String tradeNo, String mdUserId, BigDecimal cashFee, BigDecimal insuranceFee) {
if (insuranceFee.compareTo(BigDecimal.ZERO) == 0 && cashFee.compareTo(BigDecimal.ZERO) == 0) {
log.info("[医保][处方]退费金额为0不退费");
return Result.error("[医保][处方]金额为0不退费");
@ -566,7 +639,7 @@ public class MedicalService {
// * @param payAuthNo 用户授权码
// * @param fpNum 发票号
// */
// public static Result medicalRefund(String payAuthNo, String fpNum) {
// public Result medicalRefund(String payAuthNo, String fpNum) {
// log.info("[医保]退费开始 payAuthNo={}, fpNum={}", payAuthNo, fpNum);
// JsonResult jsonResult = HisMedicalDao.medicalRefund(payAuthNo, fpNum);
// if (!jsonResult.success()) {
@ -584,7 +657,7 @@ public class MedicalService {
*
* @param mdUserId 用户ID
*/
public static MedicalInfo getMedicalAccounts(String mdUserId) {
public MedicalInfo getMedicalAccounts(String mdUserId) {
log.info("[医保]退费开始 mdUserId={}", mdUserId);
JsonResult jsonResult = HisMedicalDao.getMedicalAccounts(mdUserId);
if (!jsonResult.success()) { // 未找到

@ -1,6 +1,6 @@
package com.ynxbd.common.service;
import com.ynxbd.common.helper.common.AesHelper;
import com.ynxbd.common.helper.common.AesMicroHelper;
import com.ynxbd.common.helper.http.OkHttpHelper;
import lombok.extern.slf4j.Slf4j;
import okhttp3.FormBody;
@ -20,10 +20,10 @@ public class MicroService {
public void OLReg(String openid, BigDecimal totalFee, String outTradeNo, String bankTransNo, String payDate, String payTime) {
RequestBody body = new FormBody.Builder().
add("callNo", "ol_register").
add("outTradeNo", AesHelper.enCode(outTradeNo)).
add("bankTransNo", AesHelper.enCode(bankTransNo)).
add("openid", AesHelper.enCode(openid)).
add("totalFee", AesHelper.enCode(totalFee.toString())).
add("outTradeNo", AesMicroHelper.encode(outTradeNo)).
add("bankTransNo", AesMicroHelper.encode(bankTransNo)).
add("openid", AesMicroHelper.encode(openid)).
add("totalFee", AesMicroHelper.encode(totalFee.toString())).
add("payDate", payDate).
add("payTime", payTime).
build();

@ -13,7 +13,7 @@ import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.result.ServiceException;
import com.ynxbd.wx.utils.DesEncryptHelper;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import com.ynxbd.wx.wxfactory.WxCacheHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
@ -62,13 +62,13 @@ public class PatientService {
if (isEnPid) {
for (Patient item : patients) {
if (item.getPatientId() != null) {
item.setEnPatientId(ReqParamHelper.encode(item.getPatientId()));
item.setEnPatientId(AesWxHelper.encode(item.getPatientId()));
}
if (!ObjectUtils.isEmpty(item.getIdCardNo())) {
// 加密数据
item.setEnCardNo(ReqParamHelper.encode(item.getIdCardNo()));
item.setEnTel(ReqParamHelper.encode(item.getTel()));
item.setEnCardNo(AesWxHelper.encode(item.getIdCardNo()));
item.setEnTel(AesWxHelper.encode(item.getTel()));
// 显示数据----------------------
item.setShowCardNo(ParamHelper.hideIdCardNo(item.getIdCardNo()));
item.setShowTel(ParamHelper.hidTel(item.getTel()));
@ -151,7 +151,7 @@ public class PatientService {
}
} else {
if (healthCardId != null && HCodeService.bindCardRelation(patientId, healthCardId) == null) { // 绑定患者和院内关系
if (healthCardId != null && new HCodeService().bindCardRelation(patientId, healthCardId) == null) { // 绑定患者和院内关系
log.info("[电子健康卡]绑定患者和医院关系失败");
}

@ -379,7 +379,7 @@ public class RecipeService {
TZReserveConfig.reserveRun(patientId); // 天助医技预约
HCodeService.rxReportHISData(openid, patientId);
new HCodeService().rxReportHISData(openid, patientId);
return true;
}

@ -216,7 +216,7 @@ public class RegService {
// 电子健康卡上报数据
HCodeService.regPayReportHISData(openid, patientId, reg.getDeptName(), reg.getRegDate());
new HCodeService().regPayReportHISData(openid, patientId, reg.getDeptName(), reg.getRegDate());
}
if (MerchantEnum.ALI.equals(merchantEnum)) {

@ -0,0 +1,21 @@
package com.ynxbd.common.service.cache;
import com.ynxbd.common.bean.his.HisArea;
import com.ynxbd.common.config.EhCacheConfig;
import org.ehcache.Cache;
public class AreaCache {
static {
createHisAreaCache();
}
private static Cache<String, HisArea> AREA_CACHE;
private synchronized static void createHisAreaCache() {
if (AREA_CACHE == null) {
AREA_CACHE = EhCacheConfig.createCacheTTL(String.class, HisArea.class, "his_area_cache", (7100L)); // 一个半小时
}
}
}

@ -1,158 +0,0 @@
package com.ynxbd.common.service.params;
import com.ynxbd.common.bean.pay.Register;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.result.ServiceException;
import com.ynxbd.common.service.RegService;
import lombok.extern.slf4j.Slf4j;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
@Slf4j
public class RegParams {
/**
* * // * @param regFee 金额
* * // * @param clinicFee 金额
* * // * @param payMoney 金额
* * // * @param tel 电话
* * // * @param openid openid
* * // * @param idCardNo 身份证号码
* * // * @param patientId 患者id
* * // * @param deptCode 科室编码
* * // * @param deptName 科室名称
* * // * @param doctCode 医生编码
* * // * @param doctName 医生名
* * // * @param address 地址
* * // * @param hospitalArea 院区
* * // * @param tid 时段名
* * // * @param tName 时段名
* * // * @param begTime 开始时间(分时段)
* * // * @param endTime 开始时间(分时段)
* * // * @param regCode 挂号编码
* * // * @param regDate 挂号日期
* * // * @param sourceId 号源id(分时段)
* * // * @param queueNum 序列号(分时段)
* * // * @param clinicCode 编码
*
* @param request
* @param isDesc
*/
public static Register getRegParams(HttpServletRequest request, boolean isDesc) throws ServiceException {
Register reg = new Register();
RequestParams params = new RequestParams(request);
String openid = params.getString("openid");
String patientId = params.getString("patientId");
String cardNo = params.getString("idCardNo");
String patientName = params.getString("patientName");
if (cardNo == null) {
cardNo = params.getString("cardNo");
}
BigDecimal payMoney = params.getBigDecimal("payMoney");
BigDecimal totalFee = params.getBigDecimal("totalFee");
String deptCode = params.getString("deptCode");
String subDeptCode = params.getString("subDeptCode");
String doctCode = params.getString("doctCode");
String regCode = params.getString("regCode");
String regDate = params.getString("regDate");
String tid = params.getString("tid");
if (openid == null || patientId == null || cardNo == null || deptCode == null || doctCode == null || regDate == null || tid == null) {
log.info("[挂号]参数缺失 patientId={}, deptCode={}, doctCode={}, regCode={}, regDate={}, tid={}",
patientId, deptCode, doctCode, regCode, regDate, tid);
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
if (payMoney == null || totalFee == null) {
log.info("[挂号]参数缺失 payMoney");
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
Boolean isSplitTime = params.getBoolean("isSplitTime");
if (isSplitTime == null) {
log.info("[挂号]挂号类型参数缺失isSplitTime");
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
log.info("[挂号类型]{}", (isSplitTime ? "分时段挂号" : "普通挂号"));
reg.setIsSplitTime(isSplitTime);
if (isSplitTime) { // 分时段
String tName = params.getString("tName");
String queueNum = params.getString("queueNum");
String sourceId = params.getString("sourceId");
String begTime = params.getString("begTime");
String endTime = params.getString("endTime");
if (tName == null || queueNum == null || sourceId == null || begTime == null || endTime == null) {
log.info("[挂号]参数缺失 tName={}, queueNum={}, sourceId={}, begTime={}, endTime={}", tName, queueNum, sourceId, begTime, endTime);
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
reg.setTName(tName);
reg.setBegTime(begTime);
reg.setEndTime(endTime);
reg.setSourceId(sourceId);
reg.setQueueNum(queueNum);
} else {
String clinicCode = params.getString("clinicCode");
if (clinicCode == null) {
log.info("[普通挂号]参数缺失clinicCode");
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
reg.setClinicCode(clinicCode);
}
if (isDesc) {
BigDecimal regFee = params.getBigDecimal("regFee");
BigDecimal clinicFee = params.getBigDecimal("clinicFee");
if (regFee == null || clinicFee == null) {
log.info("[挂号]参数缺失 regFee={}, clinicFee={}", regFee, clinicFee);
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
String tel = params.getString("tel");
String address = params.getString("address");
String deptName = params.getString("deptName");
String doctName = params.getString("doctName");
String hospitalArea = params.getString("hospitalArea");
if (deptName == null || doctName == null) {
log.info("[挂号]参数缺失 tel={}, address={}, deptName={}, hospitalArea={}", tel, address, deptName, hospitalArea);
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
reg.setRegFee(regFee);
reg.setClinicFee(clinicFee);
reg.setTel(tel);
reg.setAddress(address);
reg.setHospitalArea(hospitalArea);
reg.setDeptName(deptName);
reg.setDoctName(doctName);
reg.setRegType(RegService.setRegType(regDate, isSplitTime));
}
reg.setRegCode(regCode);
reg.setPayMoney(payMoney);
// 信息
reg.setPatientId(patientId);
reg.setOpenid(openid);
reg.setIdCardNo(cardNo);
reg.setDeptCode(deptCode);
reg.setSubDeptCode(subDeptCode);
reg.setDoctCode(doctCode);
reg.setRegDate(regDate);
reg.setTid(tid);
reg.setPayMoney(payMoney);
reg.setTotalFee(totalFee);
return reg;
}
}

@ -12,7 +12,7 @@ public class RequestParams {
this.request = request;
}
protected String getString(String param) {
public String getString(String param) {
String parameter = this.request.getParameter(param);
if ("".equals(parameter)) {
return null;
@ -20,7 +20,7 @@ public class RequestParams {
return parameter;
}
protected Integer getInteger(String param) {
public Integer getInteger(String param) {
try {
String val = this.request.getParameter(param);
return StringUtils.isEmpty(val) ? null : Integer.valueOf(val);
@ -29,7 +29,7 @@ public class RequestParams {
}
}
protected Double getDouble(String param) {
public Double getDouble(String param) {
try {
String val = this.request.getParameter(param);
return StringUtils.isEmpty(val) ? null : Double.valueOf(val);
@ -38,7 +38,7 @@ public class RequestParams {
}
}
protected BigDecimal getBigDecimal(String param) {
public BigDecimal getBigDecimal(String param) {
try {
String val = this.request.getParameter(param);
return StringUtils.isEmpty(val) ? null : new BigDecimal(val);
@ -47,7 +47,7 @@ public class RequestParams {
}
}
protected Boolean getBoolean(String param) {
public Boolean getBoolean(String param) {
try {
String val = this.request.getParameter(param);
return StringUtils.isEmpty(val) ? null : Boolean.valueOf(val);
@ -55,5 +55,4 @@ public class RequestParams {
return null;
}
}
}

@ -5,7 +5,7 @@ import com.ynxbd.common.helper.common.Base64Helper;
import com.ynxbd.common.helper.common.HttpHelper;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.wxfactory.ReqParamHelper;
import com.ynxbd.wx.wxfactory.AesWxHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
@ -70,11 +70,11 @@ public class QServlet extends HttpServlet {
String cardNo = request.getParameter("t");
cardNo = ObjectUtils.isEmpty(cardNo) ? "" : Base64Helper.decode(cardNo);
if (!ObjectUtils.isEmpty(cardNo)) {
cardNo = "&ent=" + ReqParamHelper.encode(cardNo);
cardNo = "&ent=" + AesWxHelper.encode(cardNo);
}
if (MerchantEnum.WX.equals(merchantEnum)) {
response.sendRedirect(WeChatConfig.getWebUrl() + "pay-qr-recipe.html?p=" + patientId + "&enp=" + ReqParamHelper.encode(patientId) + cardNo);
response.sendRedirect(WeChatConfig.getWebUrl() + "pay-qr-recipe.html?p=" + patientId + "&enp=" + AesWxHelper.encode(patientId) + cardNo);
}
}

@ -4,9 +4,9 @@ import com.ynxbd.common.helper.common.AesHelper;
import org.apache.commons.lang3.ObjectUtils;
/**
* 请求参数处理-此处为参数解密
* 请求参数加密处理
*/
public class ReqParamHelper {
public class AesWxHelper {
private static final String KEY = "wsqysqsdssjtwmyd";
private static final String IV = "xbdynwdykkrinkll";
@ -23,6 +23,8 @@ public class ReqParamHelper {
public static void main(String[] args) {
// System.out.println(encode("397631"));
System.out.println(encode("847149"));
System.out.println(decode("9CDBAA0694E6DAED726B6783D51190F2"));
// System.out.println(decode("FC0E7CBB32E595E2C84D44CE8B79E5325FA2C20E1090E9E5A5D7FBEA974023EB"));
// System.out.println(encode("533103198603294034"));
// System.out.println(decode("EF6115C81C9EA8FF79E21180FEC20294"));
}

@ -1,7 +1,7 @@
package com.ynxbd.wx.wxfactory;
import com.ynxbd.common.bean.User;
import com.ynxbd.common.helper.common.AesHelper;
import com.ynxbd.common.helper.common.AesMicroHelper;
import com.ynxbd.common.helper.common.Base64Helper;
import com.ynxbd.common.helper.common.CodeHelper;
import com.ynxbd.common.helper.common.JsonHelper;
@ -136,7 +136,7 @@ public class WxAuthHelper {
map.put("nickName", user.getNickName());
map.put("patients", CodeHelper.get28UUID() + Base64Helper.encode(URLEncoder.encode(JsonHelper.toJsonString(user.getPatientList()), "UTF-8")));
map.put("hash", request.getParameter("hash"));
map.put("enParams", AesHelper.enCode(openid.toString()));
map.put("enParams", AesMicroHelper.encode(openid.toString()));
return Result.success(map);
}

@ -9,7 +9,7 @@ import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.wxfactory.base.auth.models.RespAccessToken;
import com.ynxbd.wx.wxfactory.base.auth.models.RespJsapiTicket;
import com.ynxbd.wx.wxfactory.bean.*;
import com.ynxbd.wx.wxfactory.medical.MdConfig;
import com.ynxbd.wx.wxfactory.medical.MIConfig;
import com.ynxbd.wx.wxfactory.medical.enums.MdRefundTypeEnum;
import com.ynxbd.wx.wxfactory.utils.WxSignHelper;
import lombok.extern.slf4j.Slf4j;
@ -34,7 +34,7 @@ public class WxMedicalHelper {
*/
public static MedicalUserInfo getUserInfo(String openid, String qrCode, String cardNo, String realName) throws ServiceException {
log.info("[医保]获取用户信息 openid={}, qrCode={}", openid, qrCode);
MedicalUserInfo info = WxFactory.Medical.Common().getUserInfo(MdConfig.PARTNER_URL, openid, qrCode);
MedicalUserInfo info = WxFactory.Medical.Common().getUserInfo(MIConfig.PARTNER_URL, openid, qrCode);
if (info == null || !info.isSuccess()) {
String message = info == null ? "授权失败" : info.getMessage();
log.info("[医保授权]失败 {}", message);
@ -78,7 +78,7 @@ public class WxMedicalHelper {
}
// 签名验证
if (!WxSignHelper.validateSign(paramsMap, MdConfig.PAY_KEY)) { // 验证未通过,通知支付失败
if (!WxSignHelper.validateSign(paramsMap, MIConfig.PAY_KEY)) { // 验证未通过,通知支付失败
throw new ServiceException("[医保]回调通知签名验证未通过!");
}
@ -134,6 +134,7 @@ public class WxMedicalHelper {
* [医保]创建订单
*
* @param outTradeNo 订单号
* @param serialNo 收费单据号
* @param openid openid
* @param cardNo 卡号
* @param realName 真实姓名
@ -147,15 +148,15 @@ public class WxMedicalHelper {
* @param body 说明
* @param attach 额外字段通知类型
*/
public static Map<String, Object> createOrder(OrderTypeEnum orderTypeEnum, String outTradeNo, String serialNo, String openid, String cardNo, String realName, String ip, String payOrdId, String payAuthNo,
BigDecimal totalFee, BigDecimal insuranceFee, BigDecimal cashFee, String notifyUrl, String callbackUrl, String body, String attach) throws ServiceException {
public static Map<String, Object> createOrder(OrderMIEnum OrderMIEnum, String openid, String outTradeNo, String serialNo, String cardNo, String realName, String ip, String payOrdId, String payAuthNo,
BigDecimal totalFee, BigDecimal insuranceFee, BigDecimal cashFee, String body, String callbackUrl, String notifyUrl, String attach, String familyType, String familyName, String familyCardNo) throws ServiceException {
Map<String, Object> map = new HashMap<>();
log.info("[微信医保]下单 outTradeNo={}, openid={}, cardNo={}, realName={}, payOrdId={}, payAuthNo={}, totalFee={}, insuranceFee={}, cashFee={}"
, outTradeNo, openid, cardNo, realName, payOrdId, payAuthNo, totalFee, insuranceFee, cashFee);
log.info("[微信医保]下单 outTradeNo={}, openid={}, cardNo={}, realName={}, payOrdId={}, payAuthNo={}, totalFee={}, insuranceFee={}, cashFee={}, familyType={}, familyName={}, familyCardNo={}"
, outTradeNo, openid, cardNo, realName, payOrdId, payAuthNo, totalFee, insuranceFee, cashFee, familyType, familyName, familyCardNo);
MedicalPayOrder order = WxFactory.Medical.Common().createOrder(orderTypeEnum, WxCacheHelper.getAccessToken(),
MdConfig.MD_APP_ID, WeChatConfig.MCH_ID, MdConfig.PAY_KEY,
MdConfig.CITY_CODE, MdConfig.HOSPITAL_NAME, MdConfig.ORG_NO, MdConfig.CHANNEL,
MedicalPayOrder order = WxFactory.Medical.Common().createOrder(OrderMIEnum, WxCacheHelper.getAccessToken(),
MIConfig.MD_APP_ID, WeChatConfig.MCH_ID, MIConfig.PAY_KEY,
MIConfig.CITY_CODE, MIConfig.HOSPITAL_NAME, MIConfig.ORG_NO, MIConfig.CHANNEL,
openid,
payAuthNo,
payOrdId,
@ -202,9 +203,9 @@ public class WxMedicalHelper {
public static MedicalOrder queryOrder(String accessToken, String outTradeNo, String medTransId) {
return WxFactory.Medical.Common().queryOrder(
accessToken,
MdConfig.MD_APP_ID,
MIConfig.MD_APP_ID,
WeChatConfig.MCH_ID,
MdConfig.PAY_KEY,
MIConfig.PAY_KEY,
outTradeNo,
medTransId);
}
@ -250,9 +251,9 @@ public class WxMedicalHelper {
public static MedicalOrder refund(String outTradeNo, String outRefundNo, String payOrdId, BigDecimal cashFee, String reason) {
return WxFactory.Medical.Common().refund(
WxCacheHelper.getAccessToken(),
MdConfig.MD_APP_ID,
MIConfig.MD_APP_ID,
WeChatConfig.MCH_ID,
MdConfig.PAY_KEY,
MIConfig.PAY_KEY,
outTradeNo,
outRefundNo,
payOrdId,
@ -268,9 +269,9 @@ public class WxMedicalHelper {
public static MedicalOrder refundCash(String outTradeNo, String outRefundNo, String payOrdId, BigDecimal cashFee, String reason) {
return WxFactory.Medical.Common().refund(
WxCacheHelper.getAccessToken(),
MdConfig.MD_APP_ID,
MIConfig.MD_APP_ID,
WeChatConfig.MCH_ID,
MdConfig.PAY_KEY,
MIConfig.PAY_KEY,
outTradeNo,
outRefundNo,
payOrdId,
@ -295,9 +296,9 @@ public class WxMedicalHelper {
return WxFactory.Medical.Common().downBill(
WxCacheHelper.getAccessToken(),
MdConfig.MD_APP_ID,
MIConfig.MD_APP_ID,
WeChatConfig.MCH_ID,
MdConfig.PAY_KEY,
MIConfig.PAY_KEY,
billDate,
billType);
}
@ -309,9 +310,9 @@ public class WxMedicalHelper {
public static MedicalRefundInfo queryRefund(String accessToken, String outTradeNo, String mdTransId) {
return WxFactory.Medical.Common().queryRefund(
accessToken,
MdConfig.MD_APP_ID,
MIConfig.MD_APP_ID,
WeChatConfig.MCH_ID,
MdConfig.PAY_KEY,
MIConfig.PAY_KEY,
outTradeNo,
mdTransId);
}
@ -328,7 +329,7 @@ public class WxMedicalHelper {
return cacheToken;
}
RespAccessToken response = WxFactory.Base.OAuth().getAccessToken(MdConfig.MD_APP_ID, MdConfig.MD_APP_SECRET);
RespAccessToken response = WxFactory.Base.OAuth().getAccessToken(MIConfig.MD_APP_ID, MIConfig.MD_APP_SECRET);
if (!response.isSuccess()) {
log.error("[微信]access_token请求失败 code={}, message={}", response.getErrCode(), response.getErrMsg());
return null;

@ -2,7 +2,7 @@ package com.ynxbd.wx.wxfactory;
import com.ynxbd.common.result.JsonResult;
import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.wxfactory.medical.MdConfig;
import com.ynxbd.wx.wxfactory.medical.MIConfig;
import com.ynxbd.wx.wxfactory.message.MdClient;
import lombok.extern.slf4j.Slf4j;
@ -26,7 +26,7 @@ public class WxMessageHelper {
public static void regPush(String url, Integer status, String patCardNo, String patName, String patHospitalId, String deptName, String docName, String appointmentTime, String memo) {
JsonResult result = new MdClient().push(WxCacheHelper.getAccessToken(), WeChatConfig.APP_ID, 9001, "123",
messageType -> messageType.reg(
MdConfig.HOSPITAL_NAME,
MIConfig.HOSPITAL_NAME,
url,
status,
patCardNo,

@ -0,0 +1,31 @@
package com.ynxbd.wx.wxfactory.bean;
import lombok.ToString;
@ToString
public enum OrderMIEnum {
REG_PAY("RegPay", "挂号支付", "APPOINTMENT"),
MED_PAY("MedPay", "药费支付", "OUTPATIENT"),
DIAG_PAY("DiagPay", "诊间支付", "OUTPATIENT"),
IN_HOSP_PAY("InHospPay", "住院费支付", "INPATIENT"),
PHARMACY_PAY("PharmacyPay", "药店支付", "DRUGSTORE"),
INSURANCE_PAY("InsurancePay", "保险费支付", "OUTPATIENT"),
INT_REG_PAY("IntRegPay", "互联网医院挂号支付", "APPOINTMENT"),
INT_RE_DIAG_PAY("IntReDiagPay", "互联网医院复诊支付", ""),
INT_PSC_PAY("IntPscPay", "互联网医院处方支付", "OUTPATIENT"),
COVID_EXAM_PAY("CovidExamPay", "新冠检测费用", "OUTPATIENT");
// 微信医保编码
public final String WX_MI_CODE;
// 名称
public final String NAME;
// 支付宝医保编码
public final String ALI_MI_CODE;
OrderMIEnum(String WX_MI_CODE, String NAME, String ALI_MI_CODE) {
this.WX_MI_CODE = WX_MI_CODE;
this.NAME = NAME;
this.ALI_MI_CODE = ALI_MI_CODE;
}
}

@ -1,28 +0,0 @@
package com.ynxbd.wx.wxfactory.bean;
import lombok.ToString;
@ToString
public enum OrderTypeEnum {
REG_PAY("RegPay", "挂号支付"),
MED_PAY("MedPay", "药费支付"),
DIAG_PAY("DiagPay", "诊间支付"),
IN_HOSP_PAY("InHospPay", "住院费支付"),
PHARMACY_PAY("PharmacyPay", "药店支付"),
INSURANCE_PAY("InsurancePay", "保险费支付"),
INT_REG_PAY("IntRegPay", "互联网医院挂号支付"),
INT_RE_DIAG_PAY("IntReDiagPay", "互联网医院复诊支付"),
INT_PSC_PAY("IntPscPay", "互联网医院处方支付"),
COVID_EXAM_PAY("CovidExamPay", "新冠检测费用");
// 编码
public final String CODE;
// 名称
public final String NAME;
OrderTypeEnum(String CODE, String NAME) {
this.CODE = CODE;
this.NAME = NAME;
}
}

@ -15,7 +15,6 @@ import com.ynxbd.wx.wxfactory.utils.WxSignHelper;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.ObjectUtils;
import java.math.BigDecimal;
import java.util.Date;
@ -33,7 +32,7 @@ public class Client {
* @param url url
*/
public String getAuthUrl(String url) {
String configUrl = MdConfig.getConfigUrl(url);
String configUrl = MIConfig.getConfigUrl(url);
log.info("[医保]免密授权地址-{}", configUrl);
return configUrl;
}
@ -42,7 +41,7 @@ public class Client {
/**
* 微信医保下单
*
* @param orderTypeEnum 订单类型
* @param OrderMIEnum 订单类型
* @param accessToken accessToken
* @param appId appId
* @param mchId mchId
@ -65,7 +64,7 @@ public class Client {
* @param body body
* @return MedicalPayOrder
*/
public MedicalPayOrder createOrder(OrderTypeEnum orderTypeEnum, String accessToken,
public MedicalPayOrder createOrder(OrderMIEnum OrderMIEnum, String accessToken,
String appId, String mchId, String mdPayKey,
String cityCode, String hospitalName, String orgNo, String channel,
String openid, String payAuthNo, String payOrdId,
@ -99,7 +98,7 @@ public class Client {
params.put("cash_fee", finalCashFee.movePointRight(2)); // 现金需要支付的金额 { 单位为分>=0 线上预结算模式金额填0; 线下预结算模式填实际自费金额 }
params.put("pay_type", payType); // 支付方式-医保 (1:现金 2:医保 3:现金+医保)
params.put("order_type", orderTypeEnum.CODE);
params.put("order_type", OrderMIEnum.WX_MI_CODE);
params.put("appid", appId);
params.put("mch_id", mchId);
params.put("openid", openid);
@ -120,7 +119,7 @@ public class Client {
//==========================================================
params.put("hospital_name", hospitalName); //
if (MdConfig.IS_DEV) {
if (MIConfig.IS_DEV) {
params.put("use_sandbox", 1);
}
@ -323,7 +322,7 @@ public class Client {
MedicalUserInfo info = new MedicalUserInfo();
String timestamp = Long.toString(System.currentTimeMillis());
String signature = MdConfig.createSignature(timestamp);
String signature = MIConfig.createSignature(timestamp);
if (signature == null) {
info.setMessage("signature签名错误");
return info;

@ -9,8 +9,8 @@ import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
public class MdConfig {
private MdConfig() {
public class MIConfig {
private MIConfig() {
}
// 免密授权

@ -1,42 +1,42 @@
ali.is_log=true
ali.is_enable=true
# 消息推送
# \u6D88\u606F\u63A8\u9001
ali.is_push_msg=true
# 公司isv_pid(唯一)
# \u7CFB\u7EDF\u5546\u7B7E\u7EA6\u534F\u8BAE\u7684PID-\u516C\u53F8isv_pid\uFF08\u552F\u4E00\uFF09
ali.isv_partner_id=2088041605229629
#-----------------------------------------
# appid(和商户相关-钱到的地方)
# appid\uFF08\u548C\u5546\u6237\u76F8\u5173-\u94B1\u5230\u7684\u5730\u65B9\uFF09
ali.app_id=2021003163655042
# 医院账号id = 商户pid
# \u533B\u9662\u8D26\u53F7id = \u5546\u6237pid
ali.hosp_id=2088541276656015
# 应用公钥->支付宝公钥
# \u5E94\u7528\u516C\u94A5->\u652F\u4ED8\u5B9D\u516C\u94A5
ali.public_key=miibijanbgkqhkig9w0baqefaaocaq8amiibcgkcaqeaiirkzafc4fuxbmtprisjiy/ongxhpkpqemhqjroehgydcd+fwsqmi4cougift27vktqokw23df2mnhjws/nbofswgqdkbstjr2eqhnmzhkyf6d30wnb1c19ocdrburaeaotctt7equamnz5updzpv5w6qoh1nwysshuoyzxdhpwsanjrw5a3gdsqtodikoxgfzrvw7yzszbtwsvnrezk7yxyi2nxalnehquoypbxe6a30kjcehlze9dn3eaho5/h2o3xxgqiunwltkqrc5uo785e6b7eyuswl2cky3eauguaiidzdkslavi+5bgfwhhexgskf4bd1acapc9bhmgiwwidaqab
# 应用私钥
# \u5E94\u7528\u79C1\u94A5
ali.app_private_key=miievgibadanbgkqhkig9w0baqefaascbkgwggskageaaoibaqdni1a+z5ha7msqjeim11covr3m0faybpsx82cmgh1soquq98mrtgybmj44fzitezkqsyu0auwbzke35aquncgdop9k0q5eeok4pzzo6dxgcp6gzsd/p6tiynaoqrxuroxy45stzvv32g/ufb6h9t2htx+qn33d0mnqtklm1buqim1iobnbsjmcrdbkewfx32qxxqxzeoq9eepphu7yuigohjya5tvpd6mykd7bwph6fvgy8rpl7shr+iwzt4kmq+qkyi5a93z51qa41d+i12hwgr4je25rlu6arhuoxu9uvzd57zsckn5wx6zkud+k6khklinv7utyqbrrrdiqsmlhagmbaaecggebamrptuyc96iev1q7woukxsmfwlezl8sjwklu63vezrro6r4bjdxyniozzmen/cqumuywcwjndksxzsncvt2pdsktkrcmh3k825dtcdati1ofstqdxd2uugt8u9l26c6i8rrkd9lcxdw8zzdlufvpphcnlzkg/ao9gwtkykwuqzzuimewk9rllgorp7bqxgth8r2cutdylzbue2aq2w3pf0xkhpkg82cgwmtnxhjbxfhoo+3ciyta5ncrymzc+icuqwersdktctp1+s83aks6cya66rxzlp2rz3eb2n4maj+y+dodkju4gok7askmxth+wgwwqxbvbftu+99jw5a9laecgyea5o8mjhfc7b04u/jn7y2hyfrqwixjqhzf8cqoogprrb/y5f3pvzlpiltfgtgkodnsvbc3ilt0svf56zganhrwf8rteyerun5tl8vzdutp5enjvqb1jxo0w1urklnrx13dysxcrt6maumvcu8w5em+jh2v+nv5qwu9w9vwwtddx3ecgyea5dmre5k1yuk3c8kppmul/quwououfswqnaz9z6ojaref9y6rdqdoruzgokmi4lu3s9jz3pmn0ezzd8svplzzr9gnrpo39jwag5zwnllysjjllk+yjijplb78fxz4/eey+s3ynspy0t73c0wcnfbpuwb4jeiaijw6iykd8dvfkdccgyea0x1qsjwmjhq4zjrxqevcqe5xun13aw7tg0p/oreu4wtzsgstcyod6fc1hzk6pu3i9hdsdck7x40ifk4wcda6qsolvnx9iyudmmsqh5/qtaddzazorgvnw95bhnuuxnqzvvkhl9knc8fib97is1ltczyydysf9gggyvyy5jgiceecgyadcue8wkovvw1zc9ggd8a3hduf3dj8gmilismvt0pvaopjjzpwaoembokwpuqwcd7tynmhbbrwpv4eanzrr6ridmvgcrtpndq5iyejefo8gzguek3wpyucurxz7fm5yzqcl7r8blpffnxcsq6g8vwiuwa6fndr6wgmyhgccex+zqkbgdjweqqx9m7zivj3dzbzn5bbs0fgbm0vascwcx1fgd2kml1qm6rj2unjaen2yi81bdrn5calu9eipvopia3jvxtfrubrf5l+0/vyaj9olqayumzgk6qf1a4rmfglxfugo7jd8ow9mq5tqtz3ldelaqlijkvyu+5ssphj2twgtzan
#------------------------------------------
# 医院登记号
# \u533B\u9662\u767B\u8BB0\u53F7
ali.hosp_register_id=43278598053310011a2101
# 租户应用id
# \u79DF\u6237\u5E94\u7528id
ali.tenant_app_id= 20221116560100034264
# 医院名称
ali.hosp_name=德宏州中医医院
# 医院别名
ali.hosp_alias=德宏州中医医院
# 医疗定点机构编号
# \u533B\u9662\u540D\u79F0
ali.hosp_name=\u5FB7\u5B8F\u5DDE\u4E2D\u533B\u533B\u9662
# \u533B\u9662\u522B\u540D
ali.hosp_alias=\u5FB7\u5B8F\u5DDE\u4E2D\u533B\u533B\u9662
# \u533B\u7597\u5B9A\u70B9\u673A\u6784\u7F16\u53F7
ali.hosp_standard_code=h53310300023
# 医院所在省份
ali.hosp_province=云南省
# 医院所在城市
ali.hosp_city=芒市
# 医院所在城市区划编码
# \u533B\u9662\u6240\u5728\u7701\u4EFD
ali.hosp_province=\u4E91\u5357\u7701
# \u533B\u9662\u6240\u5728\u57CE\u5E02
ali.hosp_city=\u8292\u5E02
# \u533B\u9662\u6240\u5728\u57CE\u5E02\u533A\u5212\u7F16\u7801
ali.hosp_district=530600
# 医院地址
ali.hosp_addr=云南省德宏傣族景颇族自治州芒市南蚌路87号
# 医院经度
# \u533B\u9662\u5730\u5740
ali.hosp_addr=\u4E91\u5357\u7701\u5FB7\u5B8F\u50A3\u65CF\u666F\u9887\u65CF\u81EA\u6CBB\u5DDE\u8292\u5E02\u5357\u868C\u8DEF87\u53F7
# \u533B\u9662\u7ECF\u5EA6
ali.hosp_lgt=98.574521
# 医院纬度
# \u533B\u9662\u7EAC\u5EA6
ali.hosp_lat=24.414922
# 医院类型
ali.hosp_type=公立
# 医院等级
ali.hosp_grade=三级
# \u533B\u9662\u7C7B\u578B
ali.hosp_type=\u516C\u7ACB
# \u533B\u9662\u7B49\u7EA7
ali.hosp_grade=\u4E09\u7EA7

@ -1 +1 @@
# \u5F00\u542F\u5904\u65B9\u9884\u7ED3\u7B97\uFF08\u7B2C2\u5F00\u5173\uFF09\uFF08\u6CE8\u610F\u8BE5\u914D\u7F6E\u9700\u8054\u7CFBhis\u5F00\u53D1\u8005\u786E\u8BA4\u652F\u6301\u624D\u80FD\u5F00\u542F\uFF0C\u5426\u5219\u5B58\u5728\u98CE\u9669\uFF01\uFF09 his.is_recipe_prepay=false lis.url=192.168.1.185:8090 lis.unifiedEntrance=true # \u672C\u5730 #his.url=127.0.0.1:8888 # \u6D4B\u8BD5\u73AF\u5883 ali_code=675448357 # \u662F\u5426\u5F3A\u5236\u6253\u5370webservice\u7684xml\u8FD4\u56DE\u6570\u636E his.is_log_resp=true # \u662F\u5426\u4F20\u9012openid\u7ED9his\u63A8\u9001\u6D88\u606F his.is_push_msg=false #------------------------------------------------------------- #\u672C\u5730 his.md_url=127.0.0.1:7777 his.dev_url=127.0.0.1:7777 ## \u5FB7\u5B8F\u4E2D\u533B his.url=200.200.200.60:8888 ## \u7EA2\u6CB3\u5DDE\u533B\u9662 #his.url=10.20.10.6:8888 # \u5B81\u8497\u5987\u5E7C #his.url=172.19.3.15:8888 # \u516C\u53F8\u6D4B\u8BD5 #his.url=192.168.12.39:8888 # \u516C\u53F8\u6D4B\u8BD5 #his.url=192.168.12.10:8888 # \u7EA2\u6CB3 #his.url=10.20.10.6:8888 # \u7EA2\u6CB3\u533B\u4FDD #his.url=10.20.10.6:8888 #his.url=192.168.12.10:8888 #his.md_url=192.168.1.128:7885 #his.dev_url=10.20.10.6:9988 # \u6C38\u80DC #his.url=200.200.200.20:8888 # \u5FB7\u5B8F\u4E2D\u533B #his.url=200.200.200.60:8888 # \u534E\u576A #his.url=192.168.1.115:8888 # \u8499\u81EA\u4E2D\u533B #his.url=192.168.0.228:8888 # \u7389\u9F99 #his.url=192.168.0.17:8888 # \u4E91\u9F99 #his.url=200.200.200.69:8888 # #his.url=172.16.10.15:8888 # \u7984\u529D\u949F\u7231 #his.url=200.200.200.5:8888 # \u8499\u81EA\u5E02\u4EBA\u6C11\u533B\u9662 #his.url=200.200.200.174:8080 # \u5143\u8C0B #his.url=200.200.200.29:8888 # \u5143\u8C0B\u533B\u4FDD #his.dev_url=200.200.200.36:9999 # \u8292\u5E02 #his.url=192.168.100.8:8888 # \u7EA2\u6CB3\u5987\u5E7C\u4FDD\u5065\u9662 #his.url=192.168.1.204:8888 # \u8292\u5E02\u5987\u5E7C #his.url=192.168.11.7:8888 # #his.url=10.10.11.23:8888 # \u77F3\u6797 #his.url=192.168.10.10:8888 # \u5BCC\u6C11 #his.url=200.200.201.27:8888 # \u897F\u53CC\u7248\u7EB3 #his.url=10.10.11.23:8888 #wx.password=ynxbd@6910
# \u5F00\u542F\u5904\u65B9\u9884\u7ED3\u7B97\uFF08\u7B2C2\u5F00\u5173\uFF09\uFF08\u6CE8\u610F\u8BE5\u914D\u7F6E\u9700\u8054\u7CFBhis\u5F00\u53D1\u8005\u786E\u8BA4\u652F\u6301\u624D\u80FD\u5F00\u542F\uFF0C\u5426\u5219\u5B58\u5728\u98CE\u9669\uFF01\uFF09 his.is_recipe_prepay=false lis.url=192.168.1.185:8090 lis.unifiedEntrance=true # \u672C\u5730 #his.url=127.0.0.1:8888 # \u6D4B\u8BD5\u73AF\u5883 ali_code=675448357 # \u662F\u5426\u5F3A\u5236\u6253\u5370webservice\u7684xml\u8FD4\u56DE\u6570\u636E his.is_log_resp=true # \u662F\u5426\u4F20\u9012openid\u7ED9his\u63A8\u9001\u6D88\u606F his.is_push_msg=false #------------------------------------------------------------- #\u672C\u5730 his.md_url=127.0.0.1:7777 his.dev_url=127.0.0.1:7777 ### \u5FB7\u5B8F\u4E2D\u533B #his.url=200.200.200.60:8888 # \u7EA2\u6CB3\u5DDE\u533B\u9662 #his.url=10.20.10.6:8888 # \u8292\u5E02\u5987\u5E7C his.url=192.168.11.7:8888 # \u5B81\u8497\u5987\u5E7C #his.url=172.19.3.15:8888 # \u516C\u53F8\u6D4B\u8BD5 #his.url=192.168.12.39:8888 # \u516C\u53F8\u6D4B\u8BD5 #his.url=192.168.12.10:8888 # \u7EA2\u6CB3 #his.url=10.20.10.6:8888 # \u7EA2\u6CB3\u533B\u4FDD #his.url=10.20.10.6:8888 #his.url=192.168.12.10:8888 #his.md_url=192.168.1.128:7885 #his.dev_url=10.20.10.6:9988 # \u6C38\u80DC #his.url=200.200.200.20:8888 # \u5FB7\u5B8F\u4E2D\u533B #his.url=200.200.200.60:8888 # \u534E\u576A #his.url=192.168.1.115:8888 # \u8499\u81EA\u4E2D\u533B #his.url=192.168.0.228:8888 # \u7389\u9F99 #his.url=192.168.0.17:8888 # \u4E91\u9F99 #his.url=200.200.200.69:8888 # #his.url=172.16.10.15:8888 # \u7984\u529D\u949F\u7231 #his.url=200.200.200.5:8888 # \u8499\u81EA\u5E02\u4EBA\u6C11\u533B\u9662 #his.url=200.200.200.174:8080 # \u5143\u8C0B #his.url=200.200.200.29:8888 # \u5143\u8C0B\u533B\u4FDD #his.dev_url=200.200.200.36:9999 # \u8292\u5E02 #his.url=192.168.100.8:8888 # \u7EA2\u6CB3\u5987\u5E7C\u4FDD\u5065\u9662 #his.url=192.168.1.204:8888 # \u8292\u5E02\u5987\u5E7C #his.url=192.168.11.7:8888 # #his.url=10.10.11.23:8888 # \u77F3\u6797 #his.url=192.168.10.10:8888 # \u5BCC\u6C11 #his.url=200.200.201.27:8888 # \u897F\u53CC\u7248\u7EB3 #his.url=10.10.11.23:8888 #wx.password=ynxbd@6910
Loading…
Cancel
Save