Kaynağa Gözat

图片上传

trick9191 7 yıl önce
ebeveyn
işleme
d00e598bb7

+ 1 - 1
classes/production/JkEdu/Article.sql.xml

@ -32,7 +32,7 @@ User_ArticleStatistics n on aa.ArticleId=n.ArticleId where 1=1 @Condition
		<Sql name='getCollectionArticleList'>
			<![CDATA[
select aa.* ,n.BrowseNumber,n.PointNumber,n.CollectionNumber,IFNULL(n.CommentNumber,0) as CommentNumber, IFNULL(n.PushNumber,0) as PushNumber from (
select m.* from Org_Article m  INNER JOIN User_ArticleCollection n on  m.articleid=n.ArticleId and  1=1 and  m.ArticleState =1  @UserParam) as aa LEFT JOIN
select m.*,n.InsertTime as collectionInsertTime from Org_Article m  INNER JOIN User_ArticleCollection n on  m.articleid=n.ArticleId and  1=1 and  m.ArticleState =1  @UserParam) as aa LEFT JOIN
User_ArticleStatistics n on aa.ArticleId=n.ArticleId where 1=1 @Condition
			]]>
		</Sql>

+ 139 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ImgWebapp.java

@ -0,0 +1,139 @@
package com.yihu.wlyy.util;
import org.springframework.beans.factory.annotation.Value;
/**
 * Created by Trick on 2018/8/1.
 */
public class ImgWebapp {
    @Value("${server.server_img_url}")
    private String serverUrl;
    @Value("${wechat.imgUrl.patient_wifi_pic_url}")
    private String patient_wifi_pic_url;
    @Value("${wechat.imgUrl.patient_draw_pic_url}")
    private String patient_draw_pic_url;
    @Value("${wechat.imgUrl.specialist_sign_url}")
    private String specialist_sign_url;
    @Value("${wechat.imgUrl.doctor_activity_url}")
    private String doctor_activity_url;
    @Value("${wechat.imgUrl.currency_url}")
    private String currency_url;
    @Value("${wechat.imgUrl.patient_visit_pic}")
    private String patient_visit_pic;
    @Value("${wechat.imgUrl.patient_inspect_pic}")
    private String patient_inspect_pic;
    @Value("${wechat.imgUrl.patient_examination_pic}")
    private String patient_examination_pic;
    @Value("${wechat.imgUrl.patient_prescription_pic}")
    private String patient_prescription_pic;
    @Value("${wechat.imgUrl.patient_QRCode_pic}")
    private String patient_QRCode_pic;
    @Value("${wechat.imgUrl.patient_prenata_pic}")
    private String patient_prenata_pic;
    @Value("${wechat.imgUrl.patient_immune_pic}")
    private String patient_immune_pic;
    @Value("${wechat.imgUrl.patient_operatinginstrutions_pic_url}")
    private String patient_operatinginstrutions_pic_url;
    @Value("${wechat.imgUrl.patient_booking_pic_url}")
    private String patient_booking_pic_url;
    @Value("${wechat.imgUrl.patient_device_pic_url}")
    private String patient_device_pic_url;
    @Value("${wechat.imgUrl.patient_family_pic_url}")
    private String patient_family_pic_url;
    @Value("${wechat.imgUrl.patient_sign_again_pic_url}")
    private String patient_sign_again_pic_url;
    @Value("${wechat.imgUrl.doctor_qrcode_pic_url}")
    private String doctor_qrcode_pic_url;
    public String getPatient_wifi_pic_url() {
        return serverUrl+patient_wifi_pic_url;
    }
    public String getPatient_draw_pic_url() {
        return serverUrl+patient_draw_pic_url;
    }
    public String getSpecialist_sign_url() {
        return serverUrl+specialist_sign_url;
    }
    public String getDoctor_activity_url() {
        return serverUrl+doctor_activity_url;
    }
    public String getCurrency_url() {
        return serverUrl+currency_url;
    }
    public String getPatient_visit_pic() {
        return serverUrl+patient_visit_pic;
    }
    public String getPatient_inspect_pic() {
        return serverUrl+patient_inspect_pic;
    }
    public String getPatient_examination_pic() {
        return serverUrl+patient_examination_pic;
    }
    public String getPatient_prescription_pic() {
        return serverUrl+patient_prescription_pic;
    }
    public String getPatient_QRCode_pic() {
        return serverUrl+patient_QRCode_pic;
    }
    public String getPatient_prenata_pic() {
        return serverUrl+patient_prenata_pic;
    }
    public String getPatient_immune_pic() {
        return serverUrl+patient_immune_pic;
    }
    public String getPatient_operatinginstrutions_pic_url() {
        return serverUrl+patient_operatinginstrutions_pic_url;
    }
    public String getPatient_booking_pic_url() {
        return serverUrl+patient_booking_pic_url;
    }
    public String getPatient_device_pic_url() {
        return serverUrl+patient_device_pic_url;
    }
    public String getPatient_family_pic_url() {
        return serverUrl+patient_family_pic_url;
    }
    public String getPatient_sign_again_pic_url() {
        return serverUrl+patient_sign_again_pic_url;
    }
    public String getDoctor_qrcode_pic_url() {
        return serverUrl+doctor_qrcode_pic_url;
    }
}

+ 91 - 85
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/wechat/process/WeiXinEventProcess.java

@ -6,6 +6,7 @@ import com.yihu.wlyy.repository.dict.SystemDictDao;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.ImgWebapp;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.wechat.util.WeiXinMessageReplyUtils;
import com.yihu.wlyy.wechat.util.WeiXinMessageUtils;
@ -18,6 +19,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.*;
@ -49,6 +51,8 @@ public class WeiXinEventProcess {
    private PatientService patientService;
    @Autowired
    private DoctorDao doctorDao;
    @Autowired
    private ImgWebapp imgWebapp;
    /**
     * 微信推送事件处理
@ -146,17 +150,17 @@ public class WeiXinEventProcess {
        // 图文URL
        String urlBooking = systemConf.getProperty("patient_booking_url");
        // 图文消息图片URL
        String picUrlBooking = systemConf.getProperty("patient_booking_pic_url");
//        String picUrlBooking = systemConf.getProperty("patient_booking_pic_url");
        // URL设置服务器URL、AppId
        urlBooking = urlBooking.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
        //图片地址
        picUrlBooking = picUrlBooking.replace("{server}", serverUrl);
//        picUrlBooking = picUrlBooking.replace("{server}", serverUrl);
        articleBooking.put("Url", urlBooking);
        articleBooking.put("Title", "预约挂号功能使用说明");
        articleBooking.put("Description", "功能使用说明");
        articleBooking.put("PicUrl", picUrlBooking);
        articleBooking.put("PicUrl", imgWebapp.getPatient_booking_pic_url());
        articles.add(articleBooking);
@ -164,17 +168,17 @@ public class WeiXinEventProcess {
        // 图文URL
        String urlDevice = systemConf.getProperty("patient_device_url");
        // 图文消息图片URL
        String picUrlDevice = systemConf.getProperty("patient_device_pic_url");
//        String picUrlDevice = systemConf.getProperty("patient_device_pic_url");
        // URL设置服务器URL、AppId
        urlDevice = urlDevice.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
        //图片地址
        picUrlDevice = picUrlDevice.replace("{server}", serverUrl);
//        picUrlDevice = picUrlDevice.replace("{server}", serverUrl);
        articleDevice.put("Url", urlDevice);
        articleDevice.put("Title", "体征设备管理功能使用说明");
        articleDevice.put("Description", "功能使用说明");
        articleDevice.put("PicUrl", picUrlDevice);
        articleDevice.put("PicUrl", imgWebapp.getPatient_device_pic_url());
        articles.add(articleDevice);
@ -182,17 +186,17 @@ public class WeiXinEventProcess {
        // 图文URL
        String urlFamily = systemConf.getProperty("patient_family_url");
        // 图文消息图片URL
        String picUrlFamily = systemConf.getProperty("patient_family_pic_url");
//        String picUrlFamily = systemConf.getProperty("patient_family_pic_url");
        // URL设置服务器URL、AppId
        urlFamily = urlFamily.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
        //图片地址
        picUrlFamily = picUrlFamily.replace("{server}", serverUrl);
//        picUrlFamily = picUrlFamily.replace("{server}", serverUrl);
        articleFamily.put("Url", urlFamily);
        articleFamily.put("Title", "我的家庭功能使用说明");
        articleFamily.put("Description", "功能使用说明");
        articleFamily.put("PicUrl", picUrlFamily);
        articleFamily.put("PicUrl", imgWebapp.getPatient_family_pic_url());
        articles.add(articleFamily);
@ -223,17 +227,17 @@ public class WeiXinEventProcess {
            Map<String, String> articleVisit = new HashMap<>();
            String visit = systemConf.getProperty("patient_visit_url");
            // 图文消息图片URL
            String visit_pic = systemConf.getProperty("patient_visit_pic");
//            String visit_pic = systemConf.getProperty("patient_visit_pic");
            // URL设置服务器URL、AppId
            visit = visit.replace("{server}", wechat_base_url)
                    .replace("{appId}", appId);
            //图片地址
            visit_pic = visit_pic.replace("{server}", serverUrl);
//            visit_pic = visit_pic.replace("{server}", serverUrl);
            articleVisit.put("Url", visit);
            articleVisit.put("Title", "就诊记录");
            articleVisit.put("Description", "就诊记录");
            articleVisit.put("PicUrl", visit_pic);
            articleVisit.put("PicUrl", imgWebapp.getPatient_visit_pic());
            articles.add(articleVisit);
            //#检查检验
@ -241,34 +245,34 @@ public class WeiXinEventProcess {
            // 图文URL
            String inspect = systemConf.getProperty("patient_inspect_url");
            // 图文消息图片URL
            String inspect_pic = systemConf.getProperty("patient_inspect_pic");
//            String inspect_pic = systemConf.getProperty("patient_inspect_pic");
            // URL设置服务器URL、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);
            articleInspect.put("Url", inspect);
            articleInspect.put("Title", "检查检验");
            articleInspect.put("Description", "检查检验");
            articleInspect.put("PicUrl", inspect_pic);
            articleInspect.put("PicUrl", imgWebapp.getPatient_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");
//            String examination_pic = systemConf.getProperty("patient_examination_pic");
            // URL设置服务器URL、AppId
            examination = examination.replace("{server}", wechat_base_url)
                    .replace("{appId}", appId);
            //图片地址
            examination_pic = examination_pic.replace("{server}", serverUrl);
//            examination_pic = examination_pic.replace("{server}", serverUrl);
            articleExamination.put("Url", examination);
            articleExamination.put("Title", "社区体检");
            articleExamination.put("Description", "社区体检");
            articleExamination.put("PicUrl", examination_pic);
            articleExamination.put("PicUrl", imgWebapp.getPatient_examination_pic());
            articles.add(articleExamination);
            //        新增处方记录图文消息
@ -276,17 +280,17 @@ public class WeiXinEventProcess {
            // 图文URL
            String prescription = systemConf.getProperty("patient_prescription_url");
            // 图文消息图片URL
            String prescription_pic = systemConf.getProperty("patient_prescription_pic");
//            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);
//            prescription_pic = prescription_pic.replace("{server}", serverUrl);
            articlePrescription.put("Url", prescription);
            articlePrescription.put("Title", "处方记录");
            articlePrescription.put("Description", "处方记录");
            articlePrescription.put("PicUrl", prescription_pic);
            articlePrescription.put("PicUrl", imgWebapp.getPatient_prescription_pic());
            articles.add(articlePrescription);
            //        新增居民取药码图文消息 by wjj 2017.08.25
@ -294,17 +298,17 @@ public class WeiXinEventProcess {
            // 图文URL
            String patientQRCode = systemConf.getProperty("patient_QRCode_url");
            // 图文消息图片URL
            String patientQRCode_pic = systemConf.getProperty("patient_QRCode_pic");
//            String patientQRCode_pic = systemConf.getProperty("patient_QRCode_pic");
            // URL设置服务器URL、AppId
            patientQRCode = patientQRCode.replace("{server}", wechat_base_url)
                    .replace("{appId}", appId);
            //图片地址
            patientQRCode_pic = patientQRCode_pic.replace("{server}", serverUrl);
//            patientQRCode_pic = patientQRCode_pic.replace("{server}", serverUrl);
            articlePatientQRCode.put("Url", patientQRCode);
            articlePatientQRCode.put("Title", "我的取药码");
            articlePatientQRCode.put("Description", "我的取药码");
            articlePatientQRCode.put("PicUrl", patientQRCode_pic);
            articlePatientQRCode.put("PicUrl", imgWebapp.getPatient_QRCode_pic());
            articles.add(articlePatientQRCode);
            // 构建回复消息XML
@ -315,17 +319,17 @@ public class WeiXinEventProcess {
            // 图文URL
            String prenata = systemConf.getProperty("patient_prenata_url");
            // 图文消息图片URL
            String prenata_pic = systemConf.getProperty("patient_prenata_pic");
//            String prenata_pic = systemConf.getProperty("patient_prenata_pic");
            // URL设置服务器URL、AppId
            prenata = prenata.replace("{server}", wechat_base_url)
                    .replace("{appId}", appId);
            //图片地址
            prenata_pic = prenata_pic.replace("{server}", serverUrl);
//            prenata_pic = prenata_pic.replace("{server}", serverUrl);
            articlePrenata.put("Url", prenata);
            articlePrenata.put("Title", "产检计划");
            articlePrenata.put("Description", "产检计划");
            articlePrenata.put("PicUrl", prenata_pic);
            articlePrenata.put("PicUrl", imgWebapp.getPatient_prenata_pic());
            articles.add(articlePrenata);
            //        新增免疫计划图文消息
@ -333,17 +337,17 @@ public class WeiXinEventProcess {
            // 图文URL
            String immune = systemConf.getProperty("patient_immune_url");
            // 图文消息图片URL
            String immune_pic = systemConf.getProperty("patient_immune_pic");
//            String immune_pic = systemConf.getProperty("patient_immune_pic");
            // URL设置服务器URL、AppId
            immune = immune.replace("{server}", wechat_base_url)
                    .replace("{appId}", appId);
            //图片地址
            immune_pic = immune_pic.replace("{server}", serverUrl);
//            immune_pic = immune_pic.replace("{server}", serverUrl);
            articleImmune.put("Url", immune);
            articleImmune.put("Title", "免疫计划");
            articleImmune.put("Description", "免疫计划");
            articleImmune.put("PicUrl", immune_pic);
            articleImmune.put("PicUrl", imgWebapp.getPatient_immune_pic());
            articles.add(articleImmune);
            // 构建回复消息XML
@ -412,17 +416,17 @@ public class WeiXinEventProcess {
            // 图文URL
            String url = systemConf.getProperty("doctor_subscribe_url");
            // 图文消息图片URL
            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
//            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
            // URL设置服务器URL、AppId
            url = url.replace("{server}", wechat_base_url)
                    .replace("{appId}", appId);
            //图片地址
            picUrl = picUrl.replace("{server}", serverUrl);
//            picUrl = picUrl.replace("{server}", serverUrl);
            article.put("Url", url);
            article.put("Title", "欢迎关注厦门i健康,快来签约家庭医生吧~");
            article.put("Description", "请点击查看家庭签约");
            article.put("PicUrl", picUrl);
            article.put("PicUrl", imgWebapp.getDoctor_qrcode_pic_url());
            articles.add(article);
@ -476,17 +480,17 @@ public class WeiXinEventProcess {
            // 图文URL
            String url = systemConf.getProperty("doctor_subscribe_url");
            // 图文消息图片URL
            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
//            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
            // URL设置服务器URL、AppId
            url = url.replace("{server}", wechat_base_url)
                    .replace("{appId}", appId);
            //图片地址
            picUrl = picUrl.replace("{server}", serverUrl);
//            picUrl = picUrl.replace("{server}", serverUrl);
            article.put("Url", url);
            article.put("Title", "欢迎关注厦门i健康,快来签约家庭医生吧~");
            article.put("Description", "请点击查看家庭签约");
            article.put("PicUrl", picUrl);
            article.put("PicUrl", imgWebapp.getDoctor_qrcode_pic_url());
            articles.add(article);
@ -524,17 +528,18 @@ public class WeiXinEventProcess {
                    String urlConsult = getSystemWifiUrl();
                    logger.info("hslq_Wifi_total_URL:"+urlConsult);
                    // 图文消息图片URL
                    String picUrlConsult = systemConf.getProperty("patient_wifi_pic_url");
                    //String picUrlConsult = systemConf.getProperty("patient_wifi_pic_url");
                    // URL设置服务器URL、AppId
//                    urlConsult = urlConsult.replace("{server}", wechat_base_url)
//                            .replace("{appId}", appId);
                    //图片地址
                    picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
                    //picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
                    articleConsult.put("Url", urlConsult);
                    articleConsult.put("Title", "一键上网(莲前卫生服务中心家庭医生为您服务)");
                    articleConsult.put("Description", "一键上网(莲前卫生服务中心家庭医生为您服务)");
                    articleConsult.put("PicUrl", picUrlConsult);
                    //articleConsult.put("PicUrl", picUrlConsult);
                    articleConsult.put("PicUrl", imgWebapp.getPatient_wifi_pic_url());
                    articles.add(articleConsult);
                }
@ -556,13 +561,13 @@ public class WeiXinEventProcess {
        logger.info("pstient_Draw_url:"+urlConsult);
        // 图文消息图片URL
        String picUrlConsult = systemConf.getProperty("patient_draw_pic_url");
        picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
//        String picUrlConsult = systemConf.getProperty("patient_draw_pic_url");
//        picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
        articleConsult.put("Url", urlConsult);
        articleConsult.put("Title", "新市民健康城市行,网上回访问卷赢电影票");
        articleConsult.put("Description", "数量有限,小伙伴们千万不要错过!");
        articleConsult.put("PicUrl", picUrlConsult);
        articleConsult.put("PicUrl", imgWebapp.getPatient_draw_pic_url());
        articles.add(articleConsult);
    }
@ -586,17 +591,17 @@ public class WeiXinEventProcess {
        // 图文URL
        String urlConsult = systemConf.getProperty("patient_consult_url");
        // 图文消息图片URL
        String picUrlConsult = systemConf.getProperty("patient_operatinginstrutions_pic_url");
//        String picUrlConsult = systemConf.getProperty("patient_operatinginstrutions_pic_url");
        // URL设置服务器URL、AppId
        urlConsult = urlConsult.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
        //图片地址
        picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
//        picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
        articleConsult.put("Url", urlConsult);
        articleConsult.put("Title", "医生咨询功能使用说明");
        articleConsult.put("Description", "功能使用说明");
        articleConsult.put("PicUrl", picUrlConsult);
        articleConsult.put("PicUrl", imgWebapp.getPatient_operatinginstrutions_pic_url());
        articles.add(articleConsult);
@ -604,17 +609,17 @@ public class WeiXinEventProcess {
        // 图文URL
        String urlBooking = systemConf.getProperty("patient_booking_url");
        // 图文消息图片URL
        String picUrlBooking = systemConf.getProperty("patient_booking_pic_url");
//        String picUrlBooking = systemConf.getProperty("patient_booking_pic_url");
        // URL设置服务器URL、AppId
        urlBooking = urlBooking.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
        //图片地址
        picUrlBooking = picUrlBooking.replace("{server}", serverUrl);
//        picUrlBooking = picUrlBooking.replace("{server}", serverUrl);
        articleBooking.put("Url", urlBooking);
        articleBooking.put("Title", "预约挂号功能使用说明");
        articleBooking.put("Description", "功能使用说明");
        articleBooking.put("PicUrl", picUrlBooking);
        articleBooking.put("PicUrl", imgWebapp.getPatient_booking_pic_url());
        articles.add(articleBooking);
@ -622,17 +627,17 @@ public class WeiXinEventProcess {
        // 图文URL
        String urlDevice = systemConf.getProperty("patient_device_url");
        // 图文消息图片URL
        String picUrlDevice = systemConf.getProperty("patient_device_pic_url");
//        String picUrlDevice = systemConf.getProperty("patient_device_pic_url");
        // URL设置服务器URL、AppId
        urlDevice = urlDevice.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
        //图片地址
        picUrlDevice = picUrlDevice.replace("{server}", serverUrl);
//        picUrlDevice = picUrlDevice.replace("{server}", serverUrl);
        articleDevice.put("Url", urlDevice);
        articleDevice.put("Title", "体征设备管理功能使用说明");
        articleDevice.put("Description", "功能使用说明");
        articleDevice.put("PicUrl", picUrlDevice);
        articleDevice.put("PicUrl", imgWebapp.getPatient_device_pic_url());
        articles.add(articleDevice);
@ -640,17 +645,17 @@ public class WeiXinEventProcess {
        // 图文URL
        String urlFamily = systemConf.getProperty("patient_family_url");
        // 图文消息图片URL
        String picUrlFamily = systemConf.getProperty("patient_family_pic_url");
//        String picUrlFamily = systemConf.getProperty("patient_family_pic_url");
        // URL设置服务器URL、AppId
        urlFamily = urlFamily.replace("{server}", wechat_base_url)
                .replace("{appId}", appId);
        //图片地址
        picUrlFamily = picUrlFamily.replace("{server}", serverUrl);
//        picUrlFamily = picUrlFamily.replace("{server}", serverUrl);
        articleFamily.put("Url", urlFamily);
        articleFamily.put("Title", "我的家庭功能使用说明");
        articleFamily.put("Description", "功能使用说明");
        articleFamily.put("PicUrl", picUrlFamily);
        articleFamily.put("PicUrl", imgWebapp.getPatient_family_pic_url());
        articles.add(articleFamily);
    }
@ -677,7 +682,7 @@ public class WeiXinEventProcess {
            // 医生二维码跳转URL
            String url = systemConf.getProperty("doctor_qrcode_url");
            // 图片URL
            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
//            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
            // 二维码参数
            String[] keys = eventKey.replace("qrscene_qr_", "").replace("qr_", "").split("_");
@ -686,12 +691,12 @@ public class WeiXinEventProcess {
                    .replace("{appId}", appId)
                    .replace("{doctorCode}", keys[0]);
            //图片地址
            picUrl = picUrl.replace("{server}", serverUrl);
//            picUrl = picUrl.replace("{server}", serverUrl);
            article.put("Url", url);
            article.put("Title", keys[1] + "医生签约");
            article.put("Description", "请点击查看医生详情并申请签约");
            article.put("PicUrl", picUrl);
            article.put("PicUrl", imgWebapp.getDoctor_qrcode_pic_url());
            articles.add(article);
@ -700,7 +705,7 @@ public class WeiXinEventProcess {
            //设置通用链接
            setUrlItems(articles, systemConf);
            //加入续签图文
            Map videoText = getNews("patient_sign_again_url", "patient_sign_again_pic_url", "家庭医生续签提醒", null);
            Map videoText = getNews("patient_sign_again_url", imgWebapp.getPatient_sign_again_pic_url(), "家庭医生续签提醒", null);
            articles.add(videoText);
            // 消息XML
            result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"), message.get("ToUserName"), articles);
@ -714,7 +719,7 @@ public class WeiXinEventProcess {
            // 社区二维码跳转URL
            String url = systemConf.getProperty("doctor_hos_qrcode_url");
            // 图片URL
            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
//            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
            // 二维码参数
            String[] keys = eventKey.replace("qrscene_hs_", "").replace("hs_", "").split("_");
@ -723,18 +728,18 @@ public class WeiXinEventProcess {
                    .replace("{appId}", appId)
                    .replace("{hospital}", keys[0] + ":" + keys[1]);
            //图片地址
            picUrl = picUrl.replace("{server}", serverUrl);
//            picUrl = picUrl.replace("{server}", serverUrl);
            article.put("Url", url);
            article.put("Title", keys[1]);
            article.put("Description", "请点击查看社区详情");
            article.put("PicUrl", picUrl);
            article.put("PicUrl", imgWebapp.getDoctor_qrcode_pic_url());
            articles.add(article);
            //设置通用链接
            setUrlItems(articles, systemConf);
            //加入续签图文
            Map videoText = getNews("patient_sign_again_url", "patient_sign_again_pic_url", "家庭医生续签提醒", null);
            Map videoText = getNews("patient_sign_again_url",imgWebapp.getPatient_sign_again_pic_url(), "家庭医生续签提醒", null);
            articles.add(videoText);
            // 消息XML
            result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"), message.get("ToUserName"), articles);
@ -748,7 +753,7 @@ public class WeiXinEventProcess {
            // 区二维码跳转URL
            String url = systemConf.getProperty("doctor_town_qrcode_url");
            // 图片URL
            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
//            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
            // 二维码参数
            String[] keys = eventKey.replace("qrscene_tw_", "").replace("tw_", "").split("_");
@ -757,18 +762,18 @@ public class WeiXinEventProcess {
                    .replace("{appId}", appId)
                    .replace("{town}", keys[0]);
            //图片地址
            picUrl = picUrl.replace("{server}", serverUrl);
//            picUrl = picUrl.replace("{server}", serverUrl);
            article.put("Url", url);
            article.put("Title", keys[1]);
            article.put("Description", "请点击查看区详情");
            article.put("PicUrl", picUrl);
            article.put("PicUrl", imgWebapp.getDoctor_qrcode_pic_url());
            articles.add(article);
            //设置通用链接
            setUrlItems(articles, systemConf);
            //加入续签图文
            Map videoText = getNews("patient_sign_again_url", "patient_sign_again_pic_url", "家庭医生续签提醒", null);
            Map videoText = getNews("patient_sign_again_url", imgWebapp.getPatient_sign_again_pic_url(), "家庭医生续签提醒", null);
            articles.add(videoText);
            // 消息XML
            result = WeiXinMessageReplyUtils.replyNewsMessage(message.get("FromUserName"), message.get("ToUserName"), articles);
@ -798,17 +803,17 @@ public class WeiXinEventProcess {
            // 图文URL
            String url = systemConf.getProperty("doctor_subscribe_url");
            // 图文消息图片URL
            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
//            String picUrl = systemConf.getProperty("doctor_qrcode_pic_url");
            // URL设置服务器URL、AppId
            url = url.replace("{server}", wechat_base_url)
                    .replace("{appId}", appId);
            //图片地址
            picUrl = picUrl.replace("{server}", serverUrl);
//            picUrl = picUrl.replace("{server}", serverUrl);
            article.put("Url", url);
            article.put("Title", "欢迎关注厦门i健康,快来签约家庭医生吧~");
            article.put("Description", "请点击查看家庭签约");
            article.put("PicUrl", picUrl);
            article.put("PicUrl", imgWebapp.getDoctor_qrcode_pic_url());
            articles.add(article);
@ -873,14 +878,14 @@ public class WeiXinEventProcess {
        logger.info("setSpDisease:"+url);
        // 图文消息图片URL
        String picUrlConsult = systemConf.getProperty("specialist_sign_url");
        picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
//        String picUrlConsult = systemConf.getProperty("specialist_sign_url");
//        picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
        Map<String, String> articleConsult = new HashMap<>();
        articleConsult.put("Url", url);
        articleConsult.put("Title", "您有一个开通专科服务的邀请,点击查看");
        articleConsult.put("Description", "家庭医生协助专科医生团队为您提供专项服务");
        articleConsult.put("PicUrl", picUrlConsult);
        articleConsult.put("PicUrl", imgWebapp.getSpecialist_sign_url());
        articles.add(articleConsult);
    }
@ -900,15 +905,15 @@ public class WeiXinEventProcess {
        logger.info("setCurrency:"+url);
        // 图文消息图片URL
        String picUrlConsult = systemConf.getProperty("currency_url");
        picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
//        String picUrlConsult = systemConf.getProperty("currency_url");
//        picUrlConsult = picUrlConsult.replace("{server}", serverUrl);
        Map<String, String> articleConsult = new HashMap<>();
        articleConsult.put("Url", url);
        articleConsult.put("Title", title);
        articleConsult.put("Description", content);
        articleConsult.put("PicUrl", picUrlConsult);
        logger.info("setCurrency:"+url+"_"+picUrlConsult+"_"+content+"_"+title);
        articleConsult.put("PicUrl", imgWebapp.getCurrency_url());
        logger.info("setCurrency:"+url+"_"+imgWebapp.getCurrency_url()+"_"+content+"_"+title);
        articles.add(articleConsult);
    }
@ -921,14 +926,14 @@ public class WeiXinEventProcess {
                    .replace("{data}",doctor);
            logger.info("setDoctorActivity:"+url);
            // 图文消息图片URL
            String activityPath = systemConf.getProperty("doctor_activity_url");
            activityPath = activityPath.replace("{server}", serverUrl);
//            String activityPath = systemConf.getProperty("doctor_activity_url");
//            activityPath = activityPath.replace("{server}", serverUrl);
            Map<String, String> articleConsult = new HashMap<>();
            articleConsult.put("Url", url);
            articleConsult.put("Title", "家庭医生签约,红包来助力");
            articleConsult.put("Description", "数量有限,先到先得");
            articleConsult.put("PicUrl", activityPath);
            articleConsult.put("PicUrl", imgWebapp.getDoctor_activity_url());
            articles.add(articleConsult);
        }
    }
@ -942,19 +947,20 @@ public class WeiXinEventProcess {
     * @return
     */
    public Map getNews(String url, String picUrl, String title, String description) {
        Properties systemConf = SystemConf.getInstance().getSystemProperties();
        Map<String, String> news = new HashMap<>();
        // 图文URL
        String targetUrl = systemConf.getProperty(url);
        // 图文消息图片URL
        String pictureUrl = systemConf.getProperty(picUrl);
//        String pictureUrl = systemConf.getProperty(picUrl);
        // URL设置服务器URL、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("picurl ======> " + pictureUrl);
        System.out.println("picurl ======> " + picUrl);
        news.put("Url", targetUrl);
        if (StringUtils.isNotEmpty(title)) {
            news.put("Title", title);
@ -962,7 +968,7 @@ public class WeiXinEventProcess {
        if (StringUtils.isNotEmpty(description)) {
            news.put("Description", description);
        }
        news.put("PicUrl", pictureUrl);
        news.put("PicUrl", picUrl);
        return news;
    }
@ -978,8 +984,8 @@ public class WeiXinEventProcess {
        String description1 = "为了能给您提供健康服务,诚邀您签签约家庭医生。";
        // 图文信息
        List<Map<String, String>> articles = new ArrayList<>();
        Map videoText = getNews("doctor_subscribe_url", "doctor_qrcode_pic_url", "欢迎关注厦门i健康,快来签约家庭医生吧~", null);
        Map videoText1 = getNews("patient_sign_again_url", "patient_sign_again_pic_url", "家庭医生续签提醒", null);
        Map videoText = getNews("doctor_subscribe_url", imgWebapp.getDoctor_qrcode_pic_url(), "欢迎关注厦门i健康,快来签约家庭医生吧~", null);
        Map videoText1 = getNews("patient_sign_again_url",imgWebapp.getPatient_sign_again_pic_url(), "家庭医生续签提醒", null);
        articles.add(videoText);
        articles.add(videoText1);
        // 构建回复消息XML

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -23,6 +23,8 @@ spring:
server:
  server_url: http://weixin.xmtyw.cn/wlyy-dev/
# 服务器图片改存FastDFS地址
  server_img_url: http://172.19.103.54/
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
doctorAssistant:
  api: http://192.168.131.113:8080/

+ 39 - 2
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -23,6 +23,8 @@ spring:
server:
  server_url: http://ehr.yihu.com/wlyy/
# 服务器图片改存FastDFS地址
  server_img_url: http://172.19.103.54/
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
doctorAssistant:
  api: http://ehr.yihu.com/wlyy/
@ -97,8 +99,43 @@ wechat:
    template_patient_bind_device: 1GWPw6LFcSuz2LFTo6LhE-YY8abtmcKRvor1fUzfxBE
    #积分到账通知
    template_healthbank_credit: A2L6WBm1p6bDPYGkGnUmoMvpWlRruP2lapYwHfLV7Rg
  imgUrl:
    #居民wifi图片地址
    patient_wifi_pic_url: group1/M00/0E/F7/rBFuWltgKzGAKylNAABYgyiykZs261.png
    #居民抽奖图片地址
    patient_draw_pic_url: group1/M00/0E/F7/rBFuWltgJpqAeo07AADhRnoXe38234.png
    #专科医生签约图片地址
    specialist_sign_url: group1/M00/0E/F7/rBFuWltgKvCAPxXcAAH7mgUpbH0884.png
    #专科医生签约图片地址
    doctor_activity_url: group1/M00/0E/F7/rBFuWltgJpqAfaACAAAde0sVAJk366.png
    #通用活动图片地址
    currency_url: group1/M00/0E/F7/rBFuWltgJpqAANMzAAD7PWeBzLo094.png
    #就诊记录
    patient_visit_pic: group1/M00/0E/F7/rBFuWltgKw6AZJW1AAEML2dpBxA257.png
    #检查检验
    patient_inspect_pic: group1/M00/0E/F7/rBFuWltgKSWAa1a8AAAxJl28nU8869.png
    #社区体检
    patient_examination_pic: group1/M00/0E/F7/rBFuWltgJpuAK_SHAAAg8pVTY9s754.png
    #处方记录
    patient_prescription_pic: group1/M00/0E/F7/rBFuWltgKSWAOMYgAAAyHL8RzEU644.png
    #居民取药码
    patient_QRCode_pic: group1/M00/0E/F7/rBFuWltgKSWAJjy9AAAV7lNAUpY601.png
    #居民产检计划
    patient_prenata_pic: group1/M00/0E/F7/rBFuWltgKSWAIWR8AACK6PRmuEE302.png
    #居民免疫计划
    patient_immune_pic: group1/M00/0E/F7/rBFuWltgKSWATOx4AAAckaOvfLQ859.png
    #医生咨询操作指南
    patient_operatinginstrutions_pic_url: group1/M00/0E/F7/rBFuWltgKSWAJ54UAAFkoQR6sbI604.png
    #预约挂号
    patient_booking_pic_url: group1/M00/0E/F7/rBFuWltgJpqAK7-XAAAh07_OGxo319.png
    #设备绑定
    patient_device_pic_url: group1/M00/0E/F7/rBFuWltgJpqASrw0AAArKMof5DE070.png
    #我的家庭
    patient_family_pic_url: group1/M00/0E/F7/rBFuWltgKSWAW0VsAAA5I5LejjI640.png
    #续签
    patient_sign_again_pic_url: group1/M00/0E/F7/rBFuWltgKSWAX54yAAAc2gFIWBc839.png
    #家庭医生签约1+1+N
    doctor_qrcode_pic_url: group1/M00/0E/F7/rBFuWltgJpuALDe2AAD3GkV403w048.png
yihu:
  #yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/
  yihu_OpenPlatform_url: http://58.22.123.195:1480/OpenPlatform/cgiBin/1.0/

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-local.yml

@ -19,6 +19,8 @@ spring:
server:
  server_url: http://10.95.22.10:8011/wlyy/
# 服务器图片改存FastDFS地址
  server_img_url: http://172.19.103.54/
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
doctorAssistant:
  api: http://10.95.22.10:8011/wlyy/

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-localtest.yml

@ -19,6 +19,8 @@ spring:
server:
  server_url: http://ehr.yihu.com/wlyy/
# 服务器图片改存FastDFS地址
  server_img_url: http://172.19.103.54/
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
doctorAssistant:
  api: http://ehr.yihu.com/wlyy/

+ 2 - 0
patient-co/patient-co-wlyy/src/main/resources/application-prod.yml

@ -22,6 +22,8 @@ spring:
server:
  server_url: http://www.xmtyw.cn/wlyy/
# 服务器图片改存FastDFS地址
  server_img_url: http://www.xmtyw.cn/
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
doctorAssistant:
  api: http://www.xmtyw.cn/assistant/

+ 39 - 1
patient-co/patient-co-wlyy/src/main/resources/application-test.yml

@ -19,6 +19,8 @@ spring:
server:
  server_url: http://ehr.yihu.com/wlyy/
# 服务器图片改存FastDFS地址
  server_img_url: http://172.19.103.54/
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
doctorAssistant:
  api: http://172.19.103.88:443/assistant/
@ -89,7 +91,43 @@ wechat:
   template_patient_bind_device: 1GWPw6LFcSuz2LFTo6LhE-YY8abtmcKRvor1fUzfxBE
   #积分到账通知
   template_healthbank_credit: A2L6WBm1p6bDPYGkGnUmoMvpWlRruP2lapYwHfLV7Rg
  imgUrl:
    #居民wifi图片地址
    patient_wifi_pic_url: group1/M00/0E/F7/rBFuWltgKzGAKylNAABYgyiykZs261.png
    #居民抽奖图片地址
    patient_draw_pic_url: group1/M00/0E/F7/rBFuWltgJpqAeo07AADhRnoXe38234.png
    #专科医生签约图片地址
    specialist_sign_url: group1/M00/0E/F7/rBFuWltgKvCAPxXcAAH7mgUpbH0884.png
    #专科医生签约图片地址
    doctor_activity_url: group1/M00/0E/F7/rBFuWltgJpqAfaACAAAde0sVAJk366.png
    #通用活动图片地址
    currency_url: group1/M00/0E/F7/rBFuWltgJpqAANMzAAD7PWeBzLo094.png
    #就诊记录
    patient_visit_pic: group1/M00/0E/F7/rBFuWltgKw6AZJW1AAEML2dpBxA257.png
    #检查检验
    patient_inspect_pic: group1/M00/0E/F7/rBFuWltgKSWAa1a8AAAxJl28nU8869.png
    #社区体检
    patient_examination_pic: group1/M00/0E/F7/rBFuWltgJpuAK_SHAAAg8pVTY9s754.png
    #处方记录
    patient_prescription_pic: group1/M00/0E/F7/rBFuWltgKSWAOMYgAAAyHL8RzEU644.png
    #居民取药码
    patient_QRCode_pic: group1/M00/0E/F7/rBFuWltgKSWAJjy9AAAV7lNAUpY601.png
    #居民产检计划
    patient_prenata_pic: group1/M00/0E/F7/rBFuWltgKSWAIWR8AACK6PRmuEE302.png
    #居民免疫计划
    patient_immune_pic: group1/M00/0E/F7/rBFuWltgKSWATOx4AAAckaOvfLQ859.png
    #医生咨询操作指南
    patient_operatinginstrutions_pic_url: group1/M00/0E/F7/rBFuWltgKSWAJ54UAAFkoQR6sbI604.png
    #预约挂号
    patient_booking_pic_url: group1/M00/0E/F7/rBFuWltgJpqAK7-XAAAh07_OGxo319.png
    #设备绑定
    patient_device_pic_url: group1/M00/0E/F7/rBFuWltgJpqASrw0AAArKMof5DE070.png
    #我的家庭
    patient_family_pic_url: group1/M00/0E/F7/rBFuWltgKSWAW0VsAAA5I5LejjI640.png
    #续签
    patient_sign_again_pic_url: group1/M00/0E/F7/rBFuWltgKSWAX54yAAAc2gFIWBc839.png
    #家庭医生签约1+1+N
    doctor_qrcode_pic_url: group1/M00/0E/F7/rBFuWltgJpuALDe2AAD3GkV403w048.png
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/
  yihu_OpenPlatform_appId: 9000276