Переглянути джерело

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

chenweida 7 роки тому
батько
коміт
3f7059cec0

+ 40 - 39
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/wechat/process/WeiXinEventProcess.java

@ -23,13 +23,14 @@ public class WeiXinEventProcess {
    private String appId;
    private String appId;
    @Value("${server.server_url}")
    @Value("${server.server_url}")
    private String serverUrl;
    private String serverUrl;
    /**
    /**
     * 微信推送事件处理
     * 微信推送事件处理
     *
     *
     * @param message
     * @param message
     * @return
     * @return
     */
     */
    public  String eventProcess(Map<String, String> message) throws Exception {
    public String eventProcess(Map<String, String> message) throws Exception {
        String result = "";
        String result = "";
        String event = message.get("Event");
        String event = message.get("Event");
@ -60,7 +61,7 @@ public class WeiXinEventProcess {
     * @param message
     * @param message
     * @return
     * @return
     */
     */
    public  String clickProcess(Map<String, String> message) throws Exception {
    public String clickProcess(Map<String, String> message) throws Exception {
        String result = "";
        String result = "";
        if (message.get("EventKey").equals("caozuoshuoming")) {
        if (message.get("EventKey").equals("caozuoshuoming")) {
@ -84,7 +85,7 @@ public class WeiXinEventProcess {
     * @return
     * @return
     * @throws Exception
     * @throws Exception
     */
     */
    private  String clickEventProcess(Map<String, String> message) throws Exception {
    private String clickEventProcess(Map<String, String> message) throws Exception {
        String result = "";
        String result = "";
        // 配置信息
        // 配置信息
        Properties systemConf = SystemConf.getInstance().getSystemProperties();
        Properties systemConf = SystemConf.getInstance().getSystemProperties();
@ -98,7 +99,7 @@ public class WeiXinEventProcess {
        // 图文消息图片URL
        // 图文消息图片URL
        String picUrlConsult = systemConf.getProperty("patient_operatinginstrutions_pic_url");
        String picUrlConsult = systemConf.getProperty("patient_operatinginstrutions_pic_url");
        // URL设置服务器URL、AppId
        // URL设置服务器URL、AppId
        urlConsult = urlConsult.replace("{server}",wechat_base_url)
        urlConsult = urlConsult.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
                .replace("{appId}", appId);
        //图片地址
        //图片地址
        picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
        picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
@ -134,7 +135,7 @@ public class WeiXinEventProcess {
        // 图文消息图片URL
        // 图文消息图片URL
        String picUrlDevice = systemConf.getProperty("patient_device_pic_url");
        String picUrlDevice = systemConf.getProperty("patient_device_pic_url");
        // URL设置服务器URL、AppId
        // URL设置服务器URL、AppId
        urlDevice = urlDevice.replace("{server}",wechat_base_url)
        urlDevice = urlDevice.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
                .replace("{appId}", appId);
        //图片地址
        //图片地址
        picUrlDevice = picUrlDevice.replace("{server}", serverUrl);
        picUrlDevice = picUrlDevice.replace("{server}", serverUrl);
@ -153,7 +154,7 @@ public class WeiXinEventProcess {
        String picUrlFamily = systemConf.getProperty("patient_family_pic_url");
        String picUrlFamily = systemConf.getProperty("patient_family_pic_url");
        // URL设置服务器URL、AppId
        // URL设置服务器URL、AppId
        urlFamily = urlFamily.replace("{server}", wechat_base_url)
        urlFamily = urlFamily.replace("{server}", wechat_base_url)
                .replace("{appId}",appId);
                .replace("{appId}", appId);
        //图片地址
        //图片地址
        picUrlFamily = picUrlFamily.replace("{server}", serverUrl);
        picUrlFamily = picUrlFamily.replace("{server}", serverUrl);
@ -178,7 +179,7 @@ public class WeiXinEventProcess {
     * @return
     * @return
     * @throws Exception
     * @throws Exception
     */
     */
    private  String clickEventProcessMenu(Map<String, String> message) throws Exception {
    private String clickEventProcessMenu(Map<String, String> message) throws Exception {
        String result = "";
        String result = "";
        // 配置信息
        // 配置信息
        Properties systemConf = SystemConf.getInstance().getSystemProperties();
        Properties systemConf = SystemConf.getInstance().getSystemProperties();
@ -208,8 +209,8 @@ public class WeiXinEventProcess {
        // 图文消息图片URL
        // 图文消息图片URL
        String inspect_pic = systemConf.getProperty("patient_inspect_pic");
        String inspect_pic = systemConf.getProperty("patient_inspect_pic");
        // URL设置服务器URL、AppId
        // URL设置服务器URL、AppId
        inspect = inspect.replace("{server}",wechat_base_url)
                .replace("{appId}",appId);
        inspect = inspect.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
        //图片地址
        //图片地址
        inspect_pic = inspect_pic.replace("{server}", serverUrl);
        inspect_pic = inspect_pic.replace("{server}", serverUrl);
@ -225,10 +226,10 @@ public class WeiXinEventProcess {
        // 图文消息图片URL
        // 图文消息图片URL
        String examination_pic = systemConf.getProperty("patient_examination_pic");
        String examination_pic = systemConf.getProperty("patient_examination_pic");
        // URL设置服务器URL、AppId
        // URL设置服务器URL、AppId
        examination = examination.replace("{server}",wechat_base_url)
        examination = examination.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
                .replace("{appId}", appId);
        //图片地址
        //图片地址
        examination_pic = examination_pic.replace("{server}",serverUrl);
        examination_pic = examination_pic.replace("{server}", serverUrl);
        articleExamination.put("Url", examination);
        articleExamination.put("Url", examination);
        articleExamination.put("Title", "社区体检");
        articleExamination.put("Title", "社区体检");
@ -237,22 +238,22 @@ public class WeiXinEventProcess {
        articles.add(articleExamination);
        articles.add(articleExamination);
//        新增处方记录图文消息
//        新增处方记录图文消息
//        Map<String, String> articlePrescription = new HashMap<>();
//        // 图文URL
//        String prescription = systemConf.getProperty("patient_prescription_url");
//        // 图文消息图片URL
//        String prescription_pic = systemConf.getProperty("patient_prescription_pic");
//        // URL设置服务器URL、AppId
//        prescription = prescription.replace("{server}",wechat_base_url)
//                .replace("{appId}",appId);
//        //图片地址
//        prescription_pic = prescription_pic.replace("{server}",serverUrl);
//
//        articlePrescription.put("Url", prescription);
//        articlePrescription.put("Title", "处方记录");
//        articlePrescription.put("Description", "处方记录");
//        articlePrescription.put("PicUrl", prescription_pic);
//        articles.add(articlePrescription);
        Map<String, String> articlePrescription = new HashMap<>();
        // 图文URL
        String prescription = systemConf.getProperty("patient_prescription_url");
        // 图文消息图片URL
        String prescription_pic = systemConf.getProperty("patient_prescription_pic");
        // URL设置服务器URL、AppId
        prescription = prescription.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
        //图片地址
        prescription_pic = prescription_pic.replace("{server}", serverUrl);
        articlePrescription.put("Url", prescription);
        articlePrescription.put("Title", "处方记录");
        articlePrescription.put("Description", "处方记录");
        articlePrescription.put("PicUrl", prescription_pic);
        articles.add(articlePrescription);
        // 构建回复消息XML
        // 构建回复消息XML
        result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"), message.get("ToUserName"), articles);
        result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"), message.get("ToUserName"), articles);
@ -268,7 +269,7 @@ public class WeiXinEventProcess {
     * @return
     * @return
     * @throws Exception
     * @throws Exception
     */
     */
    private  String subscribeEventProcess(Map<String, String> message) throws Exception {
    private String subscribeEventProcess(Map<String, String> message) throws Exception {
        String result = "";
        String result = "";
        // 配置信息
        // 配置信息
        Properties systemConf = SystemConf.getInstance().getSystemProperties();
        Properties systemConf = SystemConf.getInstance().getSystemProperties();
@ -307,7 +308,7 @@ public class WeiXinEventProcess {
     *
     *
     * @param articles
     * @param articles
     */
     */
    public  void setUrlItems(List<Map<String, String>> articles, Properties systemConf) {
    public void setUrlItems(List<Map<String, String>> articles, Properties systemConf) {
        Map<String, String> articleConsult = new HashMap<>();
        Map<String, String> articleConsult = new HashMap<>();
        // 图文URL
        // 图文URL
        String urlConsult = systemConf.getProperty("patient_consult_url");
        String urlConsult = systemConf.getProperty("patient_consult_url");
@ -335,7 +336,7 @@ public class WeiXinEventProcess {
        urlBooking = urlBooking.replace("{server}", wechat_base_url)
        urlBooking = urlBooking.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
                .replace("{appId}", appId);
        //图片地址
        //图片地址
        picUrlBooking = picUrlBooking.replace("{server}",serverUrl);
        picUrlBooking = picUrlBooking.replace("{server}", serverUrl);
        articleBooking.put("Url", urlBooking);
        articleBooking.put("Url", urlBooking);
        articleBooking.put("Title", "预约挂号功能使用说明");
        articleBooking.put("Title", "预约挂号功能使用说明");
@ -369,9 +370,9 @@ public class WeiXinEventProcess {
        String picUrlFamily = systemConf.getProperty("patient_family_pic_url");
        String picUrlFamily = systemConf.getProperty("patient_family_pic_url");
        // URL设置服务器URL、AppId
        // URL设置服务器URL、AppId
        urlFamily = urlFamily.replace("{server}", wechat_base_url)
        urlFamily = urlFamily.replace("{server}", wechat_base_url)
                .replace("{appId}",appId);
                .replace("{appId}", appId);
        //图片地址
        //图片地址
        picUrlFamily = picUrlFamily.replace("{server}",serverUrl);
        picUrlFamily = picUrlFamily.replace("{server}", serverUrl);
        articleFamily.put("Url", urlFamily);
        articleFamily.put("Url", urlFamily);
        articleFamily.put("Title", "我的家庭功能使用说明");
        articleFamily.put("Title", "我的家庭功能使用说明");
@ -388,7 +389,7 @@ public class WeiXinEventProcess {
     * @return
     * @return
     * @throws Exception
     * @throws Exception
     */
     */
    private  String scanEventProcess(Map<String, String> message) throws Exception {
    private String scanEventProcess(Map<String, String> message) throws Exception {
        String result = "";
        String result = "";
        // 场景值
        // 场景值
        String eventKey = message.get("EventKey");
        String eventKey = message.get("EventKey");
@ -443,7 +444,7 @@ public class WeiXinEventProcess {
            String[] keys = eventKey.replace("qrscene_hs_", "").replace("hs_", "").split("_");
            String[] keys = eventKey.replace("qrscene_hs_", "").replace("hs_", "").split("_");
            // 图文消息URL
            // 图文消息URL
            url = url.replace("{server}",wechat_base_url)
            url = url.replace("{server}", wechat_base_url)
                    .replace("{appId}", appId)
                    .replace("{appId}", appId)
                    .replace("{hospital}", keys[0] + ":" + keys[1]);
                    .replace("{hospital}", keys[0] + ":" + keys[1]);
            //图片地址
            //图片地址
@ -478,7 +479,7 @@ public class WeiXinEventProcess {
            // 图文消息URL
            // 图文消息URL
            url = url.replace("{server}", wechat_base_url)
            url = url.replace("{server}", wechat_base_url)
                    .replace("{appId}",appId)
                    .replace("{appId}", appId)
                    .replace("{town}", keys[0]);
                    .replace("{town}", keys[0]);
            //图片地址
            //图片地址
            picUrl = picUrl.replace("{server}", serverUrl);
            picUrl = picUrl.replace("{server}", serverUrl);
@ -510,7 +511,7 @@ public class WeiXinEventProcess {
     * @param description 图文描述
     * @param description 图文描述
     * @return
     * @return
     */
     */
    public  Map getNews(String url, String picUrl, String title, String description) {
    public Map getNews(String url, String picUrl, String title, String description) {
        Properties systemConf = SystemConf.getInstance().getSystemProperties();
        Properties systemConf = SystemConf.getInstance().getSystemProperties();
        Map<String, String> news = new HashMap<>();
        Map<String, String> news = new HashMap<>();
        // 图文URL
        // 图文URL
@ -518,8 +519,8 @@ public class WeiXinEventProcess {
        // 图文消息图片URL
        // 图文消息图片URL
        String pictureUrl = systemConf.getProperty(picUrl);
        String pictureUrl = systemConf.getProperty(picUrl);
        // URL设置服务器URL、AppId
        // URL设置服务器URL、AppId
        targetUrl = targetUrl.replace("{server}",wechat_base_url)
                .replace("{appId}",appId);
        targetUrl = targetUrl.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
        //图片地址
        //图片地址
        pictureUrl = pictureUrl.replace("{server}", serverUrl);
        pictureUrl = pictureUrl.replace("{server}", serverUrl);
        System.out.println("url ====> " + targetUrl);
        System.out.println("url ====> " + targetUrl);
@ -541,7 +542,7 @@ public class WeiXinEventProcess {
     * @param message
     * @param message
     * @return
     * @return
     */
     */
    public  String replyKeyword(Map<String, String> message) throws Exception {
    public String replyKeyword(Map<String, String> message) throws Exception {
        String result = "";
        String result = "";
        String description = "您的家庭医生签约将于6月30日到期,为了能继续给您提供健康服务,诚邀您续签家庭医生。";
        String description = "您的家庭医生签约将于6月30日到期,为了能继续给您提供健康服务,诚邀您续签家庭医生。";
        String description1 = "为了能给您提供健康服务,诚邀您签签约家庭医生。";
        String description1 = "为了能给您提供健康服务,诚邀您签签约家庭医生。";

+ 1 - 1
patient-co/patient-co-wlyy-job/src/main/resources/system.properties

@ -25,7 +25,7 @@ patient_inspect_url =https://open.weixin.qq.com/connect/oauth2/authorize?appid={
#社区体检
#社区体检
patient_examination_url=https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri={server}%2fwx%2fhtml%2fjkda%2fhtml%2fjiankangtijian.html&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect
patient_examination_url=https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri={server}%2fwx%2fhtml%2fjkda%2fhtml%2fjiankangtijian.html&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect
#处方记录
#处方记录
patient_prescription_url=https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri={server}%2fwx%2fhtml%2fjkda%2fhtml%2fjiankangtijian.html&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect
patient_prescription_url=https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri={server}%2fwx%2fhtml%2fprescription%2fhtml%2fprescription_records.html&amp;response_type=code&amp;scope=snsapi_base&amp;state=STATE#wechat_redirect
#就诊记录
#就诊记录
patient_visit_pic ={server}/images/visit.png
patient_visit_pic ={server}/images/visit.png

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/DoctorInterceptor.java

@ -34,7 +34,7 @@ public class DoctorInterceptor extends BaseInterceptor {
    @Override
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        boolean flag = true;
        boolean flag = true;
        /*try {
        try {
            request.setCharacterEncoding("UTF-8");
            request.setCharacterEncoding("UTF-8");
            request.setAttribute("log-start", new Date().getTime());
            request.setAttribute("log-start", new Date().getTime());
            response.setCharacterEncoding("UTF-8");
            response.setCharacterEncoding("UTF-8");
@ -153,7 +153,7 @@ public class DoctorInterceptor extends BaseInterceptor {
            }
            }
        } catch (Exception e) {
        } catch (Exception e) {
            e.printStackTrace();
            e.printStackTrace();
        }*/
        }
        return flag;
        return flag;
    }
    }

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/PatientInterceptor.java

@ -31,7 +31,7 @@ public class PatientInterceptor extends BaseInterceptor {
	@Override
	@Override
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
		boolean flag = true;
		boolean flag = true;
		/*try {
		try {
			request.setCharacterEncoding("UTF-8");
			request.setCharacterEncoding("UTF-8");
			request.setAttribute("log-start", new Date().getTime());
			request.setAttribute("log-start", new Date().getTime());
			if(request.getRequestURI().contains("/patient/hosptail/getHositalByTownCode")||request.getRequestURI().contains("/patient/feedback/saveAppeal")){
			if(request.getRequestURI().contains("/patient/hosptail/getHositalByTownCode")||request.getRequestURI().contains("/patient/feedback/saveAppeal")){
@ -101,7 +101,7 @@ public class PatientInterceptor extends BaseInterceptor {
			}
			}
		} catch (Exception e) {
		} catch (Exception e) {
			e.printStackTrace();
			e.printStackTrace();
		}*/
		}
		return flag;
		return flag;
	}
	}

+ 14 - 10
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -30,7 +30,7 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    Integer amountUnreadHealthByReceiver(String doctor);
    Integer amountUnreadHealthByReceiver(String doctor);
    @Query("select a from Message a where a.type =2 and a.read= 1 and a.receiver=?1 order by a.czrq desc")
    @Query("select a from Message a where a.type =2 and a.read= 1 and a.receiver=?1 order by a.czrq desc")
    List<Message> amountUnreadHealthLastByReceiver(String doctor,Pageable pageRequest);
    List<Message> amountUnreadHealthLastByReceiver(String doctor, Pageable pageRequest);
    @Modifying
    @Modifying
    @Query("update Message a set a.read = 0,a.over='0' where a.id = ?1")
    @Query("update Message a set a.read = 0,a.over='0' where a.id = ?1")
@ -40,17 +40,17 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    List<Message> findUnreadSign(String sender, String receiver, String signStatus);
    List<Message> findUnreadSign(String sender, String receiver, String signStatus);
    @Query(" from Message a where a.read = 1 and over ='1' and a.sender = ?1 and a.receiver=?2 and a.signStatus='1'")
    @Query(" from Message a where a.read = 1 and over ='1' and a.sender = ?1 and a.receiver=?2 and a.signStatus='1'")
    List<Message> findByPatient(String patient,String doctor);
    List<Message> findByPatient(String patient, String doctor);
    @Query(" from Message a where a.read = 1 and over ='1' and a.sender = ?1 and a.receiver=?2 ")
    @Query(" from Message a where a.read = 1 and over ='1' and a.sender = ?1 and a.receiver=?2 ")
    List<Message> findByPatientRenew(String patient,String doctor);
    List<Message> findByPatientRenew(String patient, String doctor);
    @Query("select a from Message a where a.receiver = ?1 and a.sender=?2 and a.tzType=?3 order by a.createTime desc")
    @Query("select a from Message a where a.receiver = ?1 and a.sender=?2 and a.tzType=?3 order by a.createTime desc")
    List<Message> getHealthIndexMessageByPatient(String doctor,String patient,String type,Pageable pageRequest);
    List<Message> getHealthIndexMessageByPatient(String doctor, String patient, String type, Pageable pageRequest);
    @Modifying
    @Modifying
    @Query("update Message a set a.read = 0 where a.receiver = ?1 and a.sender=?2 and a.tzType=?3")
    @Query("update Message a set a.read = 0 where a.receiver = ?1 and a.sender=?2 and a.tzType=?3")
    int updateHealthIndexMessageByPatient(String doctor,String patient,String type);
    int updateHealthIndexMessageByPatient(String doctor, String patient, String type);
    @Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6) order by a.czrq desc")
    @Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6) order by a.czrq desc")
    List<Message> getSystemMessageUnread(String doctor);
    List<Message> getSystemMessageUnread(String doctor);
@ -59,26 +59,30 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    List<Message> getSysTemMessageByPrescription(String doctor, String prescriptionStatus);
    List<Message> getSysTemMessageByPrescription(String doctor, String prescriptionStatus);
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6)")
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6)")
    List<Message> getSystemMessage(String doctor,Pageable pageRequest);
    List<Message> getSystemMessage(String doctor, Pageable pageRequest);
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 and a.prescriptionStatus='0' ")
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 and a.prescriptionStatus='0' ")
    List<Message> getPrescriptionMessage(String doctor,Integer type,Pageable pageRequest);
    List<Message> getPrescriptionMessage(String doctor, Integer type, Pageable pageRequest);
    @Query("select count(a) from Message a where a.read = 0 and a.over ='0'  and a.receiver=?1 and a.type=?2 ")
    @Query("select count(a) from Message a where a.read = 0 and a.over ='0'  and a.receiver=?1 and a.type=?2 ")
    int findMessageNum(String doctor, Integer type);
    int findMessageNum(String doctor, Integer type);
    @Query("update Message a set a.prescriptionStatus=?2 where a.relationCode = ?1 and a.type=6 ")
    @Query("update Message a set a.prescriptionStatus=?2 where a.relationCode = ?1 and a.type=6 ")
    int updatePreScriptionMessage(String relateCode,String prescriptionStatus);
    int updatePreScriptionMessage(String relateCode, String prescriptionStatus);
    @Query("update Message a set a.read = 0,a.over = '0' where a.receiver = ?1 and a.type = ?2")
    @Query("update Message a set a.read = 0,a.over = '0' where a.receiver = ?1 and a.type = ?2")
    @Modifying
    @Modifying
    int setMessageReaded(String doctor,Integer type);
    int setMessageReaded(String doctor, Integer type);
    @Query("update Message a set a.read = 0,a.over = '0' where a.receiver = ?1 and a.type not in (1,2,6)")
    @Query("update Message a set a.read = 0,a.over = '0' where a.receiver = ?1 and a.type not in (1,2,6)")
    @Modifying
    @Modifying
    int setSysMessageReaded(String doctor);
    int setSysMessageReaded(String doctor);
    //查询患者最近7天的体征异常记录
    //查询患者最近7天的体征异常记录
    @Query(value = "SELECT COUNT(1) FROM wlyy_message WHERE type = '2' and sender = ?1 and create_time>=date_add(now(),interval -7 day) ",nativeQuery = true)
    @Query(value = "SELECT COUNT(1) FROM wlyy_message WHERE type = '2' and sender = ?1 and create_time>=date_add(now(),interval -7 day) ", nativeQuery = true)
    int findTzMessage(String patient);
    int findTzMessage(String patient);
    //根据续方关联code查询团队长分配健管师消息
    @Query("from Message a where a.type = 3 and a.state=0 and a.del='1' and a.over='0' and relationCode = ?1  ")
    Message findByRelationCode(String relationCode);
}
}

Різницю між файлами не показано, бо вона завелика
+ 141 - 37
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PatientPrescriptionPayService.java


+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionPayController.java

@ -73,11 +73,12 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
            @RequestParam(required = true) @ApiParam(value = "配送地址json", name = "addressJson",defaultValue = "{\"townName\":\"海沧区\",\"code\":\"3502050100\",\"address\":" +
            @RequestParam(required = true) @ApiParam(value = "配送地址json", name = "addressJson",defaultValue = "{\"townName\":\"海沧区\",\"code\":\"3502050100\",\"address\":" +
                    "\"冰岛\",\"cityName\":\"厦门市\",\"townCode\":\"350205\",\"provinceCode\":\"350000\",\"cityCode\":\"350200\",\"name\":\"海沧区嵩屿街道社区卫生服务中心\"," +
                    "\"冰岛\",\"cityName\":\"厦门市\",\"townCode\":\"350205\",\"provinceCode\":\"350000\",\"cityCode\":\"350200\",\"name\":\"海沧区嵩屿街道社区卫生服务中心\"," +
                    "\"provinceName\":\"福建省\",\"streeCode\":\"35020501\",\"streeName\":\"皇后大道东\",\"phone\":\"13253541190\"}") String addressJson,
                    "\"provinceName\":\"福建省\",\"streeCode\":\"35020501\",\"streeName\":\"皇后大道东\",\"phone\":\"13253541190\"}") String addressJson,
            @RequestParam(required = true) @ApiParam(value = "页面回调地址", name = "returnUrl") String returnUrl,
            @RequestParam(required = true) @ApiParam(value = "订单总金额", name = "totalAmount") int totalAmount) throws Exception {
            @RequestParam(required = true) @ApiParam(value = "订单总金额", name = "totalAmount") int totalAmount) throws Exception {
        try {
        try {
            String accessToken = getAccessToken();
            String accessToken = getAccessToken();
            String patient = getUID();
            String patient = getUID();
            payService.charge(type,addressJson,orgCode, prescriptionCode, totalAmount, patient, accessToken);
            payService.charge(type,addressJson,orgCode, prescriptionCode, totalAmount, patient, accessToken,returnUrl);
            return write(200, "支付成功!");
            return write(200, "支付成功!");
        } catch (Exception e) {
        } catch (Exception e) {
            return error(-1, "支付失败!");
            return error(-1, "支付失败!");
@ -128,12 +129,11 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
     */
     */
    @RequestMapping(value = "/receiveRecipeNotify", method = RequestMethod.POST)
    @RequestMapping(value = "/receiveRecipeNotify", method = RequestMethod.POST)
    @ApiOperation(value = "对接方异步回调接口")
    @ApiOperation(value = "对接方异步回调接口")
    public String receiveRecipeNotify(HttpServletRequest request, HttpServletResponse response) throws Exception {
    public void receiveRecipeNotify(HttpServletRequest request, HttpServletResponse response) throws Exception {
        try {
        try {
            payService.receiveRecipeNotify(request, response);
            payService.receiveRecipeNotify(request, response);
            return write(200, "回调成功!");
        } catch (Exception e) {
        } catch (Exception e) {
            return error(-1, "回调失败!");
            error(e);
        }
        }
    }
    }