Ver código fonte

签约管理相关修改

8 anos atrás
pai
commit
07f1959a28

+ 77 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/wechat/process/WeiXinEventProcess.java

@ -64,7 +64,9 @@ public class WeiXinEventProcess {
            String result2 = tempStr.substring(secondIndex-1);*/
            result=tempStr.replace("<ArticleCount>5</ArticleCount>","<ArticleCount>4</ArticleCount>");
        }
        if(message.get("EventKey").equals("jiankangdangan")){
            result  = clickEventProcessMenu(message);
        }
        return result;
    }
@ -165,6 +167,80 @@ public class WeiXinEventProcess {
        return result;
    }
    /**
     * 菜单点击消息发送
     *
     * @param message
     * @return
     * @throws Exception
     */
    private static String clickEventProcessMenu(Map<String,String> message) throws Exception{
        String result = "";
        // 配置信息
        Properties systemConf = SystemConf.getInstance().getSystemProperties();
        // 图文信息
        List<Map<String,String>> articles =  new ArrayList<>();
        //就诊记录
        Map<String,String> articleVisit = new HashMap<>();
        String visit = systemConf.getProperty("patient_visit_url");
        // 图文消息图片URL
        String visit_pic = systemConf.getProperty("patient_visit_pic");
        // URL设置服务器URL、AppId
        visit = visit.replace("{server}", systemConf.getProperty("wechat_base_url"))
                .replace("{appId}", systemConf.getProperty("appId"));
        //图片地址
        visit_pic = visit_pic.replace("{server}", systemConf.getProperty("server_url"));
        articleVisit.put("Url",visit);
        articleVisit.put("Title", "就诊记录");
        articleVisit.put("Description","就诊记录");
        articleVisit.put("PicUrl",visit_pic);
        articles.add(articleVisit);
        //#检查检验
        Map<String,String> articleInspect = new HashMap<>();
        // 图文URL
        String inspect = systemConf.getProperty("patient_inspect_url");
        // 图文消息图片URL
        String inspect_pic = systemConf.getProperty("patient_inspect_pic");
        // URL设置服务器URL、AppId
        inspect = inspect.replace("{server}", systemConf.getProperty("wechat_base_url"))
                .replace("{appId}", systemConf.getProperty("appId"));
        //图片地址
        inspect_pic = inspect_pic.replace("{server}", systemConf.getProperty("server_url"));
        articleInspect.put("Url",inspect);
        articleInspect.put("Title", "检查检验");
        articleInspect.put("Description","检查检验");
        articleInspect.put("PicUrl",inspect_pic);
        articles.add(articleInspect);
        Map<String,String> articleExamination = new HashMap<>();
        // 图文URL
        String examination = systemConf.getProperty("patient_examination_url");
        // 图文消息图片URL
        String examination_pic = systemConf.getProperty("patient_examination_pic");
        // URL设置服务器URL、AppId
        examination = examination.replace("{server}", systemConf.getProperty("wechat_base_url"))
                .replace("{appId}", systemConf.getProperty("appId"));
        //图片地址
        examination_pic = examination_pic.replace("{server}", systemConf.getProperty("server_url"));
        articleExamination.put("Url",examination);
        articleExamination.put("Title", "体征设备管理功能使用说明");
        articleExamination.put("Description","功能使用说明");
        articleExamination.put("PicUrl",examination_pic);
        articles.add(articleExamination);
        // 构建回复消息XML
        result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"),message.get("ToUserName"),articles);
        return result;
    }
    /**
     * 关注事件消息发送
     * @param message

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

@ -18,7 +18,19 @@ doctor_subscribe_url=https://open.weixin.qq.com/connect/oauth2/authorize?appid={
doctor_town_qrcode_url=https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri={server}%2fwx%2fhtml%2fqygl%2fhtml%2fsearch-community.html&amp;response_type=code&amp;scope=snsapi_base&amp;state={town}#wechat_redirect
doctor_qrcode_pic_url={server}/images/familycontract.png
doctor_invitel_url=https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&redirect_uri={server}%2fwx%2fhtml%2fssgg%2fhtml%2fdoctor-homepage-new.html&response_type=code&scope=snsapi_base&state={doctorCode}__{invilogcode}__{currentPatient}__{currentZH}__{currentName}#wechat_redirect
#就诊记录
patient_visit_url = https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&redirect_uri={server}%2fwx%2fhtml%2fjkda%2fhtml%2fjiuzhenjilu.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect
#检查检验
patient_inspect_url =https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&redirect_uri={server}%2fwx%2fhtml%2fjkda%2fhtml%2fjianchajianyan.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect
#社区体检
patient_examination_url=
#就诊记录
patient_visit_pic ={server}/images/booking.png
#检查检验
patient_inspect_pic ={server}/images/booking.png
#社区体检
patient_examination_pic={server}/images/booking.png
patient_operatinginstrutions_pic_url={server}/images/operatinginstructions.png
patient_booking_pic_url={server}/images/booking.png

+ 13 - 18
patient-co-wlyy/src/main/resources/weixin_menu.txt

@ -22,11 +22,6 @@
            "type":"view",
            "name":"健康文章",
            "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkjy%2fhtml%2farticle_list.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
          },
          {
               "type":"view",
               "name":"热量查询",
               "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2frlcx%2fhtml%2fserach-index.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
          }
	  ]
@ -41,24 +36,24 @@
			  "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fwdyy%2fhtml%2fappointment-register.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		 },
		 {
			"type":"view",
			"name":"疾病社区",
			"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjbsq%2fhtml%2fdisease-community.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		},
		{
			"type":"view",
			"name":"健康记录",
			"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkjl%2fhtml%2fhealth-record.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		},
               "type":"view",
               "name":"健康记录",
               "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkjl%2fhtml%2fhealth-record.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
		{
			"type":"view",
			"name":"就诊记录",
			"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkda%2fhtml%2fjiuzhenjilu.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
			"name":"健康档案",
			"key":"jiankangdangan"
		},
         {
            "type":"view",
            "name":"疾病社区",
            "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjbsq%2fhtml%2fdisease-community.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
        },
        {
            "type":"view",
            "name":"检查检验",
            "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkda%2fhtml%2fjianchajianyan.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
            "name":"热量查询",
            "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2frlcx%2fhtml%2fserach-index.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
        }
	  ]
   },