2、名医馆功能新增,调整查询医生和查询号源的数据返回。 3、扫码缴费新增无数据时跳转到页面进行提示。 4、医共体患者信息同步和删除调整。 5、武定忠爱医院和景洪第三人民医院新增关注返回消息,服务号可以生成二维码,扫码后推送消息。debug
parent
683d29bae8
commit
c692f7fef5
22 changed files with 497 additions and 256 deletions
@ -1,138 +0,0 @@ |
|||||||
package com.ynxbd.wx.utils; |
|
||||||
|
|
||||||
import com.google.zxing.BarcodeFormat; |
|
||||||
import com.google.zxing.EncodeHintType; |
|
||||||
import com.google.zxing.MultiFormatWriter; |
|
||||||
import com.google.zxing.common.BitMatrix; |
|
||||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; |
|
||||||
|
|
||||||
import javax.imageio.ImageIO; |
|
||||||
import java.awt.image.BufferedImage; |
|
||||||
import java.io.File; |
|
||||||
import java.io.IOException; |
|
||||||
import java.util.Hashtable; |
|
||||||
import java.util.Map; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author 张剑峰 |
|
||||||
* @date 2018年6月4日下午12:38:39 |
|
||||||
* @version v1.0.0 |
|
||||||
* @Copyright: 2018云南新八达科技有限公司 All rights reserved. |
|
||||||
*/ |
|
||||||
public class QRCodeUtil { |
|
||||||
|
|
||||||
private static final int BLACK = 0xFF000000; |
|
||||||
private static final int WHITE = 0xFFFFFFFF; |
|
||||||
private static final int GREEN = 0xFFAAAAAA; |
|
||||||
|
|
||||||
private static BufferedImage toBufferedImage(BitMatrix matrix) { |
|
||||||
int width = matrix.getWidth(); |
|
||||||
int height = matrix.getHeight(); |
|
||||||
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); |
|
||||||
for (int x = 0; x < width; x++) { |
|
||||||
for (int y = 0; y < height; y++) { |
|
||||||
image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE); |
|
||||||
} |
|
||||||
} |
|
||||||
return image; |
|
||||||
} |
|
||||||
|
|
||||||
private static void writeToFile(BitMatrix matrix, String format, File file) throws IOException { |
|
||||||
BufferedImage image = toBufferedImage(matrix); |
|
||||||
if (!ImageIO.write(image, format, file)) { |
|
||||||
throw new IOException("Could not write an image of format " + format + " to " + file); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 将内容contents生成长宽均为width的图片,图片路径由imgPath指定 |
|
||||||
*/ |
|
||||||
public static File getQRCodeImage(String contents, int size, String imgPath) { |
|
||||||
return getQRCodeImage(contents, size, size, imgPath); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 将内容contents生成长为width,宽为width的图片,图片路径由imgPath指定 |
|
||||||
*/ |
|
||||||
public static File getQRCodeImage(String contents, int width, int height, String imgPath) { |
|
||||||
try { |
|
||||||
Map<EncodeHintType, Object> hints = new Hashtable<>(); |
|
||||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L); |
|
||||||
hints.put(EncodeHintType.CHARACTER_SET, "UTF8"); |
|
||||||
|
|
||||||
BitMatrix bitMatrix = new MultiFormatWriter().encode(contents, BarcodeFormat.QR_CODE, width, height, hints); |
|
||||||
|
|
||||||
File imageFile = new File(imgPath); |
|
||||||
writeToFile(bitMatrix, "png", imageFile); |
|
||||||
return imageFile; |
|
||||||
} catch (Exception e) { |
|
||||||
return null; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 将内容contents生成长为width,宽为width的图片,图片路径由imgPath指定 |
|
||||||
*/ |
|
||||||
public static String getQRCodeImgBase64(String contents, int width, int height) { |
|
||||||
String resultBase64 = null; |
|
||||||
try { |
|
||||||
Map<EncodeHintType, Object> hints = new Hashtable<>(); |
|
||||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L); |
|
||||||
hints.put(EncodeHintType.CHARACTER_SET, "UTF8"); |
|
||||||
|
|
||||||
BitMatrix bitMatrix = new MultiFormatWriter().encode(contents, BarcodeFormat.QR_CODE, width, height, hints); |
|
||||||
|
|
||||||
// File imageFile = new File(imgPath);
|
|
||||||
// writeToFile(bitMatrix, "svg", imageFile);
|
|
||||||
return resultBase64; |
|
||||||
} catch (Exception e) { |
|
||||||
return null; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) { |
|
||||||
|
|
||||||
// String product_id = "999981XBD100XBD200XBD0.01XBD1";
|
|
||||||
// // product_id = MD5Util.MD5Encode(product_id, "UTF-8");
|
|
||||||
// String sec = Long.toString(System.currentTimeMillis());
|
|
||||||
// String timeStamp = Long.toString(System.currentTimeMillis() / 1000);
|
|
||||||
// SimpleDateFormat formatter = new SimpleDateFormat("yyyy年-MM月dd日-HH时mm分ss秒");
|
|
||||||
// Date date = new Date(System.currentTimeMillis());
|
|
||||||
// String s = formatter.format(date);
|
|
||||||
// String nonceStr = Long.toString(System.currentTimeMillis());
|
|
||||||
// Map<String, String> packageParams = new HashMap<>();
|
|
||||||
// packageParams.put("appid", WeChatConfig.getAppId());
|
|
||||||
// packageParams.put("mch_id", WeChatConfig.getMchId());
|
|
||||||
// packageParams.put("product_id", product_id);
|
|
||||||
// packageParams.put("time_stamp", timeStamp);
|
|
||||||
// packageParams.put("nonce_str", nonceStr);
|
|
||||||
// String sign = SignatureUtil.generateSign(packageParams, WeChatConfig.getMchKey());
|
|
||||||
// String url = "weixin://wxpay/bizpayurl?sign=" + sign + "&appid=" +
|
|
||||||
// WxConfig.getInstance().getAppId()
|
|
||||||
// + "&mch_id=" + WxConfig.getInstance().getMchId() + "&product_id=" +
|
|
||||||
// product_id + "&time_stamp="
|
|
||||||
// + timeStamp + "&nonce_str=" + nonceStr;
|
|
||||||
//// String url = "http://lhxrmyy1.natapp1.cc/wx/q?p=10000005";
|
|
||||||
// // String url =
|
|
||||||
// // "weixin:/pay/bizpayurl?sign=38128468EEFC56C19EDEAD077E8BD38B&appid=wx940ec0975be0daf4&mchid=1354195702&product_id=123815|814994|2074382|0.90|1&time_stamp=1533309475&nonce_str=1533309475421&";
|
|
||||||
//
|
|
||||||
// // String[] array = product_id.split("\\|");
|
|
||||||
// // String patientId = array[0];
|
|
||||||
// // String mzNum = array[1];
|
|
||||||
// // String recipeId = array[2];
|
|
||||||
// // String payMoney = array[3];
|
|
||||||
// // if (patientId.equals("") || mzNum.equals("") || recipeId.equals("")
|
|
||||||
// // || payMoney.equals("")) {
|
|
||||||
// // System.out.println("扫码支付:参数中有空值,不允许支付!product_id=" + product_id);
|
|
||||||
// // return;
|
|
||||||
// // }
|
|
||||||
|
|
||||||
getQRCodeImage("http://www.wsxrmyy.cn/wx/qr-questionnaire.html", 300, "C:\\Users\\Administrator\\Desktop\\qr_questionnaire"); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
@ -0,0 +1,20 @@ |
|||||||
|
package com.ynxbd.wx.wxfactory.base.auth.models; |
||||||
|
|
||||||
|
import lombok.Getter; |
||||||
|
import lombok.NoArgsConstructor; |
||||||
|
import lombok.Setter; |
||||||
|
import lombok.ToString; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
|
||||||
|
@Getter |
||||||
|
@Setter |
||||||
|
@ToString |
||||||
|
@NoArgsConstructor |
||||||
|
@Slf4j |
||||||
|
public class QRCodeInfo { |
||||||
|
private String ticket; |
||||||
|
|
||||||
|
private String url; |
||||||
|
|
||||||
|
private String qrcode; |
||||||
|
} |
||||||
@ -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
# \u672C\u5730
#his.url=127.0.0.1:8888
# HIS\u662F\u5426\u5F00\u542F\u652F\u4ED8\u5B9D\u5206\u5F00\u5BF9\u8D26
his.is_ali_mer=false
# \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
#-------------------------------
# \u6D4B\u8BD5\u73AF\u5883
his.dev_url=200.200.200.105:8888
# \u533B\u4FDD===========================
# \u65E7\u914D\u7F6E
his.md_url=127.0.0.1:7777
# \u5FAE\u4FE1\u533B\u4FDD
his.wx_med_url=10.20.10.7:7885
# \u652F\u4ED8\u5B9D\u533B\u4FDD
his.ali_med_url=10.20.10.7:7885
# \u516C\u53F8\u6D4B\u8BD5
#his.url=192.168.12.10:8888
# \u77F3\u6797\u6D4B\u8BD5
#his.url=200.200.200.105:8888
# \u6D4B\u8BD5============================================================
# \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
#
#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
# \u672C\u5730
#his.url=127.0.0.1:8888
# HIS\u662F\u5426\u5F00\u542F\u652F\u4ED8\u5B9D\u5206\u5F00\u5BF9\u8D26
his.is_ali_mer=false
# \u662F\u5426\u5F3A\u5236\u6253\u5370webservice\u7684xml\u8FD4\u56DE\u6570\u636E
his.is_log_resp=false
# \u662F\u5426\u4F20\u9012openid\u7ED9his\u63A8\u9001\u6D88\u606F
his.is_push_msg=false
#-------------------------------
# \u6D4B\u8BD5\u73AF\u5883
his.dev_url=200.200.200.105:8888
# \u533B\u4FDD===========================
# \u65E7\u914D\u7F6E
his.md_url=127.0.0.1:7777
# \u5FAE\u4FE1\u533B\u4FDD
his.wx_med_url=10.20.10.7:7885
# \u652F\u4ED8\u5B9D\u533B\u4FDD
his.ali_med_url=10.20.10.7:7885
# \u516C\u53F8\u6D4B\u8BD5
#his.url=192.168.12.10:8888
# \u77F3\u6797\u6D4B\u8BD5
#his.url=200.200.200.105:8888
# \u6D4B\u8BD5============================================================
# \u5FB7\u5B8F\u4E2D\u533B
his.url=200.200.200.60:9999
# \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
#
#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…
Reference in new issue