1、体检扫码支付新增匹配开始查询日期

2、患者监护人信息新增进行加密处理
3、挂号缺失电话号码信息调整,对入参电话信息进行加密
debug
王绍全 2 weeks ago
parent f2e244f25b
commit 424cf697ec
  1. 2
      src/main/java/com/ynxbd/common/action/ApiAction.java
  2. 8
      src/main/java/com/ynxbd/common/action/PatientAction.java
  3. 25
      src/main/java/com/ynxbd/common/action/SmsAction.java
  4. 16
      src/main/java/com/ynxbd/common/bean/Patient.java
  5. 12
      src/main/java/com/ynxbd/common/bean/pay/Register.java
  6. 64
      src/main/java/com/ynxbd/common/helper/common/SmsHelper.java
  7. 14
      src/main/java/com/ynxbd/common/helper/common/SmsRsaHelper.java
  8. 2
      src/main/java/com/ynxbd/common/service/SmsService.java
  9. 24
      src/main/java/com/ynxbd/wx/servlet/QServlet.java
  10. 2
      src/main/java/com/ynxbd/wx/wxfactory/AesWxHelper.java

@ -61,7 +61,7 @@ public class ApiAction extends BaseAction {
/**
* 创建公众号二维码
* 创建公众号二维码=>触发scan事件
*/
@Action("getWxScanQRCode")
public Result getWxScanQRCode(String accessToken, Integer size) {

@ -55,7 +55,7 @@ public class PatientAction extends BaseAction {
* [HIS患者]根据证件号查询信息
*/
@Action("getHisInfoByCardNo")
public Result getHisInfoByCardNo(@AesDecode String openId, @AesDecode String cardNo) {
public Result getHisInfoByCardNo(@AesDecode String openId, @AesDecode String cardNo, boolean isCardNo) {
try {
log.info("[HIS患者]根据证件号查询信息 openId={}, cardNo={}", openId, cardNo);
if (cardNo == null || openId == null) {
@ -63,10 +63,10 @@ public class PatientAction extends BaseAction {
}
Patient patient = new PatientService().queryPatientByCardNo(cardNo);
String encode = Base64Helper.encode(patient, true);
if (encode == null) {
return Result.error();
if (patient == null) {
return Result.error(ResultEnum.PATIENT_NOT_FOUND);
}
patient.filterData(!isCardNo);
return Result.success(patient);
} catch (ServiceException e) {
return Result.error(e);

@ -204,6 +204,31 @@ public class SmsAction extends BaseAction {
return Result.isOK(isResult);
}
// /**
// * [短信]模板推送测试
// *
// * @param sys 系统编码[CRM]
// * @param tel 电话号码
// * @param templateCode 模板编码
// * @param temParamsJson 模板参数
// */
// @Action("smsTemplateTest")
// public Result smsTemplateTest(String sys, String tel, String templateCode, String temParamsJson) {
// log.warn("[{}][模板短信测试]入参 tel={}, templateCode={}, temParamsJson={}", sys, tel, templateCode, temParamsJson);
//
// String deTel = SmsHelper.decodeRSA(tel);
// String deTemplateCode = SmsHelper.decodeRSA(templateCode);
// log.warn("[{}][模板短信测试]解密参数 deTel={}, deTemplateCode={}, temParamsJson={}", sys, deTel, deTemplateCode, temParamsJson);
// Map<Object, Object> data = new HashMap<>();
//
// data.put("tel", tel);
// data.put("templateCode", templateCode);
//
// data.put("deTel", deTel);
// data.put("deTemplateCode", deTemplateCode);
// return Result.success(data);
// }
/**
* 德宏州中医院每日候诊推送
*

@ -54,10 +54,14 @@ public class Patient implements Serializable {
private String fatherName;
private String fatherIdCardNo;
private String fatherTel;
private String fatherEnTel;
private String fatherEnIdCardNo;
private String motherName;
private String motherIdCardNo;
private String motherTel;
private String motherEnTel;
private String motherEnIdCardNo;
private String uuid;
//
private String healthCardId;
@ -128,20 +132,26 @@ public class Patient implements Serializable {
boolean noneCardNo = ObjectUtils.isEmpty(this.idCardNo); // 无证件号
// 患者ID
this.enPatientId = AesWxHelper.encode(this.patientId, true);
// 身份证
this.showCardNo = ParamHelper.hideIdCardNo(this.idCardNo);
this.enCardNo = AesWxHelper.encode(this.idCardNo, true);
// 电话
this.showTel = ParamHelper.hideTel(this.tel);
this.enTel = AesWxHelper.encode(this.tel, true);
if (noneCardNo) { // 无证绑定数据显示过滤
this.fatherEnTel = AesWxHelper.encode(this.fatherTel, true);
this.fatherEnIdCardNo = AesWxHelper.encode(this.fatherIdCardNo, true);
this.fatherIdCardNo = ParamHelper.hideIdCardNo(this.fatherIdCardNo);
this.fatherTel = ParamHelper.hideTel(this.fatherTel);
this.motherEnTel = AesWxHelper.encode(this.motherTel, true);
this.motherEnIdCardNo = AesWxHelper.encode(this.motherIdCardNo, true);
this.motherIdCardNo = ParamHelper.hideIdCardNo(this.motherIdCardNo);
this.motherTel = ParamHelper.hideTel(this.motherTel);
} else {
// 身份证过滤
this.idCardNo = this.idCardNo.toUpperCase();
this.showCardNo = ParamHelper.hideIdCardNo(this.idCardNo);
this.enCardNo = AesWxHelper.encode(this.idCardNo, true);
}
if (this.cardType == null) {

@ -143,6 +143,11 @@ public class Register extends Order {
cardNo = params.getString("cardNo");
}
String tel = AesWxHelper.decode(params.getString("enTel"));
if (ObjectUtils.isEmpty(tel)) {
tel = params.getString("tel");
}
BigDecimal payMoney = params.getBigDecimal("payMoney");
BigDecimal totalFee = params.getBigDecimal("totalFee");
String enPayMoney = params.getString("enPayMoney");
@ -209,14 +214,13 @@ public class Register extends Order {
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);
log.info("[挂号]参数缺失 patientId={}, deptName={}, hospitalArea={}", patientId, deptName, hospitalArea);
throw new ServiceException(ResultEnum.PARAM_IS_DEFECT);
}
this.regFee = regFee;
@ -228,10 +232,9 @@ public class Register extends Order {
this.deptName = deptName;
this.doctName = doctName;
this.regType = RegService.setRegType(regDate, isSplitTime);
this.setTel(tel);
}
this.deptCode = deptCode;
this.subDeptCode = subDeptCode;
this.doctCode = doctCode;
@ -249,6 +252,7 @@ public class Register extends Order {
this.setPatientId(patientId);
this.setPatientName(patientName);
this.setIdCardNo(cardNo);
this.setTel(tel);
return this;
}

@ -9,8 +9,6 @@ import com.ynxbd.common.bean.sms.SmsTemplate;
import com.ynxbd.common.config.EhCacheConfig;
import com.ynxbd.common.helper.ProperHelper;
import com.ynxbd.common.helper.http.OkHttpHelper;
import com.ynxbd.common.result.Result;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.common.service.UsageCountService;
import lombok.extern.slf4j.Slf4j;
import okhttp3.FormBody;
@ -337,68 +335,6 @@ public class SmsHelper {
return RSAHelper.decrypt(data, PRIVATE_KEY);
}
public static void main(String[] args) {
// Map<String,String> sms = new HashMap<>();
// sms.put("name","李进才");
// sms.put("item_name","血常规");
// send("SMS_462460638","18206787486",sms);
// Map<String,String> sms = new HashMap<>();
// sms.put("name","李进才");
// sms.put("item_name","胃镜");
// send("SMS_462460638","18206787486",sms);
// Map<String,String> sms = new HashMap<>();
// sms.put("address", "四号楼2楼6号诊室骨伤科(脊柱)");
// sms.put("deptName", "骨伤科-骨伤科专家门诊");
// sms.put("doctorName", "陈应东");
// sms.put("hosp_tel", "0692-2991794");
// sms.put("hosp_tip", "提前15分钟到医院门诊各导医服务台签到后排队候诊");
// sms.put("seq", "41");
// sms.put("time", "2024-12-05 10:00:00-10:03:00");
// send("SMS_475980406","18206787486",sms);
// sendDanMi("1000000002608", "13608818101", "影像报告已经出,请及时到医院自助机进行报告打印或点击链接 https://wx.hhzyy.com/smsPacs?token=A88A6D089&inHosNum=1579733");
// Map<String,String> sms = new HashMap<>();
// sms.put("name","李进才");
// sms.put("item_name","血常规");
// send("SMS_462460638","18206787486",sms);
//
//
// Map<String,String> sms = new HashMap<>();
// sms.put("name","李进才");
// sms.put("item_name","血常规");
// send("SMS_462460638","18206787486",sms);
//
//
// Map<String,String> sms = new HashMap<>();
// sms.put("name","李进才");
// sms.put("item_name","血常规");
// send("SMS_462460638","18206787486",sms);
//
//
// Map<String,String> sms = new HashMap<>();
// sms.put("name","李进才");
// sms.put("item_name","血常规");
// send("SMS_462460638","18206787486",sms);
//
//
// Map<String,String> sms = new HashMap<>();
// sms.put("name","李进才");
// sms.put("item_name","血常规");
// send("SMS_462460638","18206787486",sms);
//
//
// Map<String,String> sms = new HashMap<>();
// sms.put("name","李进才");
// sms.put("item_name","血常规");
// send("SMS_462460638","18206787486",sms);
}
// private void isCache() {

@ -0,0 +1,14 @@
package com.ynxbd.common.helper.common;
public class SmsRsaHelper {
// 公私钥
public static final String PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCSOdXfNEpwP5AVJuDFqYObO73LH92cymsgiRlcSEvz2UDkYpn38qL1mRSCYoZ0O4CK/r1RJexPBE2lK6WF3+jgaOc5uV59OSwfOwqbLtOyjJi/V16fPTf5JCO/FbkM63d/mI7gnjR46P7rxbq60woCnRXAf1Nb/kAK+hQLrnX1swIDAQAB";
public static final String PRIVATE_KEY = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJI51d80SnA/kBUm4MWpg5s7vcsf3ZzKayCJGVxIS/PZQORimffyovWZFIJihnQ7gIr+vVEl7E8ETaUrpYXf6OBo5zm5Xn05LB87Cpsu07KMmL9XXp89N/kkI78VuQzrd3+YjuCeNHjo/uvFurrTCgKdFcB/U1v+QAr6FAuudfWzAgMBAAECgYEAgm3WKE8DKtZ3lXZlPcpzWo7SPxHAYe9n2NCRb3AJV4vsxwpwXeruknUmBxsM5TaB9Pk+MtjJzL2A6Jhi/2P22oMtv3z+4Uza4t9mUuJS/2JgQm9VtBPzf7Xd75AhrYqOa3cTMkcni4yesvEyea68QaUm6jMyp2q2pNhMOML6tukCQQDJEx4LQND6wKmpEaxN3K4DPWUx4of/tjFTAoi713CTcFr7pdJkVd8fslkm+VvKLVFjMOq6ak4AuGBN+ENQYRffAkEAuis3zheDpiRyKFEc+ydQU8YAcn+Or9SBuqye44aO2anqqf4nR0Z6jXJBCNMB1E54CQXhLT4/IhMoXeqC1RGsrQJBAIX4D89tmw9G6IN1+/hQrTwJXvASv4wXRtvI13NYAnCprmT2QayKLkQ/HvlBsO+OrChLgkk75MbEEZ5BaBAY8L8CQHwiYyR9k1/N/3yYkV16WlpxtUyjd04QwavqfEu0Jj5GyV0uRZyGByOXonuyzw50gB9sFzhmwAwFgC4XN8PA9EUCQQCryDJYpqBHH6aU49wl8hPmGQqmwN6aERWA6SS82ZKuARWQX6TpAxHRaU9LDL6ANEVSWXKS4oncIOz8Iha/02Zz";
public static void main(String[] args) {
System.out.println(RSAHelper.encrypt("15559603353", PUBLIC_KEY));
System.out.println(RSAHelper.decrypt("ZzUjwAcFQvcM5F408Ygze13DfeJ7nprWbHfDfCg+6rwD+oFNkbvPDSrphqvsIZWPQ6+VJSS/19xMiU+oP4ZHDQjTK2zBh+zrZWXX4qINp5r+JeUPrmhGAMj8dcAyDF9ddE+yxD2VGgoH0D3u3jZqkwYx522CECPRORaJiK4nBLI=", PRIVATE_KEY));
}
}

@ -34,7 +34,7 @@ public class SmsService {
sms.setDoctorName(reg.getDoctName());
sms.setSeq(reg.getQueueNum());
sms.setHosp_tip("提前15分钟到医院门诊各导医服务台签到后排队候诊");
log.info("[挂号]发送预约短信通知 sms={}, appId={}, tel-{}", JsonHelper.toJsonString(sms), WeChatConfig.APP_ID, tel);
log.info("[挂号]发送预约短信通知 sms={}, appId={}, tel={}", JsonHelper.toJsonString(sms), WeChatConfig.APP_ID, tel);
isResult = SmsHelper.send(SmsTempEnum.SMS_501641217, tel, sms);
}
return isResult;

@ -3,6 +3,7 @@ package com.ynxbd.wx.servlet;
import com.ynxbd.common.bean.enums.MerchantEnum;
import com.ynxbd.common.helper.common.Base64Helper;
import com.ynxbd.common.helper.common.HttpHelper;
import com.ynxbd.common.helper.common.URLHelper;
import com.ynxbd.common.result.ResultEnum;
import com.ynxbd.wx.config.WeChatConfig;
import com.ynxbd.wx.wxfactory.AesWxHelper;
@ -16,6 +17,8 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* 多处方支付跳转
@ -54,6 +57,7 @@ public class QServlet extends HttpServlet {
String patientId = request.getParameter("p");
String cardNo = request.getParameter("t");
String groupTreatNum = request.getParameter("g");
String begDate = request.getParameter("beg"); // 开始日期
boolean hasTreatNum = !ObjectUtils.isEmpty(groupTreatNum);
@ -75,14 +79,24 @@ public class QServlet extends HttpServlet {
log.info("[支付]多张处方扫码请求 参数无效");
return;
}
cardNo = ObjectUtils.isEmpty(cardNo) ? "" : Base64Helper.decode(cardNo);
Map<String, Object> map = new HashMap<>();
map.put("p", patientId);
map.put("enp", AesWxHelper.encode(patientId));
if (!ObjectUtils.isEmpty(begDate)) {
map.put("begDate", begDate);
}
if (hasTreatNum) {
map.put("treatNum", groupTreatNum);
}
if (!ObjectUtils.isEmpty(cardNo)) {
cardNo = "&ent=" + AesWxHelper.encode(cardNo);
cardNo = Base64Helper.decode(cardNo);
if (!ObjectUtils.isEmpty(cardNo)) {
map.put("ent", AesWxHelper.encode(cardNo));
}
}
groupTreatNum = hasTreatNum ? ("&treatNum=" + groupTreatNum) : "";
String params = "?p=" + patientId + "&enp=" + AesWxHelper.encode(patientId) + cardNo + groupTreatNum;
String params = URLHelper.mapParamsToUrl(map, true);
if (MerchantEnum.WX.equals(merchantEnum)) {
response.sendRedirect(WeChatConfig.getWebReqURL() + "pay-qr-recipe.html" + params);
}

@ -57,7 +57,7 @@ public class AesWxHelper extends AesHelper {
}
public static void main(String[] args) {
System.out.println(encode("2088732153433283"));
System.out.println(decode("3806267E84D1FF06A6C17FCA60FAFD22"));
// System.out.println(decode("E6835E243069406F53EC8464898B37C0"));
}
}

Loading…
Cancel
Save