Jelajahi Sumber

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

huangwenjie 7 tahun lalu
induk
melakukan
62cc7c5c79
38 mengubah file dengan 1438 tambahan dan 276 penghapusan
  1. 1 1
      classes/production/JkEdu/Article.sql.xml
  2. 11 0
      common/common-entity/src/main/java/com/yihu/es/entity/HealthEduArticleES.java
  3. 1 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/healthbank/TaskRuleController.java
  4. 1 1
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/task_modify_js.jsp
  5. 43 0
      patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/common/dao/DoctorDao.java
  6. 6 0
      patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/common/dao/MessageDao.java
  7. 463 0
      patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/model/Doctor.java
  8. 149 76
      patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/service/AsyncService.java
  9. 13 1
      patient-co-service/wlyy_device/src/main/resources/application.yml
  10. 2 6
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/activemq/HealthArtListener.java
  11. 32 5
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/wechat/util/WeiXinOpenIdUtils.java
  12. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java
  13. 3 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/kit/KitDrugUseRecordDao.java
  14. 8 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java
  15. 37 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/bank/CreditLogService.java
  16. 9 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/bank/TaskService.java
  17. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java
  18. 11 8
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java
  19. 5 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java
  20. 15 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java
  21. 43 23
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/kit/KitService.java
  22. 141 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/ImgWebapp.java
  23. 45 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/RedisController.java
  24. 86 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java
  25. 23 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java
  26. 4 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEdu/DoctorJMJkEduArticleController.java
  27. 4 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/kit/DoctorKitController.java
  28. 2 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/DoctorPatientGroupController.java
  29. 7 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/kit/PatientKitController.java
  30. 6 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/FamilyContractController.java
  31. 13 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/health/bank/AccountController.java
  32. 91 85
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/wechat/process/WeiXinEventProcess.java
  33. 2 0
      patient-co/patient-co-wlyy/src/main/resources/application-dev.yml
  34. 39 2
      patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml
  35. 2 0
      patient-co/patient-co-wlyy/src/main/resources/application-local.yml
  36. 2 0
      patient-co/patient-co-wlyy/src/main/resources/application-localtest.yml
  37. 75 37
      patient-co/patient-co-wlyy/src/main/resources/application-prod.yml
  38. 40 4
      patient-co/patient-co-wlyy/src/main/resources/application-test.yml

+ 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>

+ 11 - 0
common/common-entity/src/main/java/com/yihu/es/entity/HealthEduArticleES.java

@ -9,6 +9,7 @@ import org.springframework.data.annotation.Transient;
import java.util.Date;
import java.util.List;
import java.util.Set;
/**
 * 推送记录表
@ -66,6 +67,8 @@ public class HealthEduArticleES {
    @Transient
    private Boolean newArricleFlag;//新版文章推送标志(不保存ES)
    @Transient
    private Set<String> openidSet;//本次发送文章的openid的总集合
    //说明:如医生推送文章给5个居民,则保存5条userType=1的记录和1条userType=2的记录(共6条)
    //业务需求:userType=1为居民被推送文章列表;userType=2医生推送的文章列表;
@ -396,4 +399,12 @@ public class HealthEduArticleES {
    public HealthEduArticleES() {
    }
    public Set<String> getOpenidSet() {
        return openidSet;
    }
    public void setOpenidSet(Set<String> openidSet) {
        this.openidSet = openidSet;
    }
}

+ 1 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/healthbank/TaskRuleController.java

@ -72,6 +72,7 @@ public class TaskRuleController extends BaseController {
            @RequestParam(value = "page",required = false) Integer page,
            @RequestParam(value = "rows",required = false) Integer pageSize){
        try{
            taskRule = "{" + taskRule + "}";
            if(StringUtils.isNotBlank(name)){
                taskRule = taskRule.replace("}",",\"name\":"+name+"}");
            }

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/task_modify_js.jsp

@ -96,7 +96,7 @@
                            async:false,
                            dataType : "json",
                            // method: "post",
                            url: ctx + "/admin/taskRule/list?taskRule={\"status\":\"1\"}&page=1&rows=20",
                            url: ctx + '/admin/taskRule/list?taskRule="status":1&page=1&rows=20',
                            // data: {"taskRule":"{\"status\":\"1\"}","page":1,"rows":20},
                            processResults: function (data, page) {
                                if(data.status==200) {

+ 43 - 0
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/common/dao/DoctorDao.java

@ -0,0 +1,43 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.hos.device.common.dao;
import com.yihu.hos.device.model.Doctor;
import com.yihu.hos.device.model.Patient;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface DoctorDao extends PagingAndSortingRepository<Doctor, Long> {
    Doctor findByName(String name);
    // 按医生标识查询医生信息
    @Query("select p from Doctor p where p.code = ?1")
    Doctor findByCode(String code);
    Doctor findByCodeAndDel(String code, Integer del);
    @Query("select d from Doctor d where d.del = 1")
    List<Doctor> findAllDoctors();
    @Query("select d from Doctor d where d.del = 1 and d.name like ?1")
    List<Doctor> findDoctorsByName(String name);
    @Query("select d from Doctor d where d.del = 1 and d.hospital = ?1")
    Iterable<Doctor> findHospitalDoctors(String hospital);
    // 手机号查询医生信息
    @Query("select p from Doctor p where p.mobile = ?1 and p.status = 1")
    Doctor findByMobile(String mobile);
}

+ 6 - 0
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/common/dao/MessageDao.java

@ -13,6 +13,8 @@ import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface MessageDao extends PagingAndSortingRepository<Message, Long>, JpaSpecificationExecutor<Message> {
    @Query("select count(a) from Message a where a.type =1 and a.read= 1 and a.receiver=?1 ")
@ -42,4 +44,8 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("select count(a) from Message a where a.read = 0 and over ='0'  and a.receiver=?1 and a.type=?2 ")
    int findMessageNum(String doctor, Integer type);
    //查询医生下的签约居民未读体征异常消息
    @Query("SELECT a FROM Message a WHERE a.sender=?1 AND a.receiver = ?2 AND a.type = 2 and a.del = '1' and a.read=1 ORDER BY czrq DESC")
    List<Message> findUnreadHealthIndex(String sender, String receiver);
}

+ 463 - 0
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/model/Doctor.java

@ -0,0 +1,463 @@
package com.yihu.hos.device.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
/**
 * 医生信息
 *
 * @author George
 */
@Entity
@Table(name = "wlyy_doctor",schema="wlyy",catalog="wlyy")
public class Doctor extends IdEntity implements Serializable {
    private static final long serialVersionUID = -6585552029939285364L;
    private String code;        // 业务主键
    private String name;        //姓名
    private Integer sex;        // 性别(1男,2女)
    private Date birthday;      //生日
    private String photo;       //头像http地址
    private String mobile;      //手机号
    private String password;    //密码
    private String salt;        // 密码标识
    private Integer status;     // 状态(1正常,0禁用)
    private String province;    //省code
    private String city;         //市code
    private String town;         //区县code
    private String provinceName;//省名称
    private String cityName;    //市名称
    private String townName;    //区县名称
    private String hospital;        // 医院代码
    private String hospitalName;    //医院名称
    private String dept;            // 科室代码
    private String deptName;        //可是名称
    private String job;             // 职称代码
    private String jobName;         // 职称名
    private String expertise;       // 医生专长
    private String introduce;       // 医生介绍
    private Integer level;          // 类型:1专科医生,2全科医生,3健康管理师
    private Integer iscertified;   // 资格是否认证通过,1是,0否
    private String qrcode;          // 二维码
    private Date czrq;              // 更新时间
    private Integer del;            // 状态(1正常,0删除)
    private String idcard;          //身份证号
    private Integer isFamous;       //是否是名医 1是  0或者空不是
    private String isPasswordPrompt;// 是否提示密码信息 1是 0或者空是否
    private String isHelp;          //是否求助  1已经求助 0未求助
    private Double evaluateScore;//评分
    private String checkPassword;   //审方密码
    private String checkSalt;       //审方密码的盐
    private Date certifiedOvertime; //CA证书过期时间
    private String certificateNum;     //CA证书编号
    private String openid; //医生微信openID
    //=====================非hibernate字段=========================
    private String concernCode;//关注code
    private String activityPath;//活动路径
    public Double getEvaluateScore() {
        return evaluateScore;
    }
    public void setEvaluateScore(Double evaluateScore) {
        this.evaluateScore = evaluateScore;
    }
    public Doctor() {
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public Doctor(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Integer getSex() {
        return sex;
    }
    public void setSex(Integer sex) {
        this.sex = sex;
    }
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    public Date getBirthday() {
        return birthday;
    }
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
    public String getPhoto() {
        return photo;
    }
    public void setPhoto(String photo) {
        this.photo = photo;
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getSalt() {
        return salt;
    }
    public void setSalt(String salt) {
        this.salt = salt;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getProvince() {
        return province;
    }
    public void setProvince(String province) {
        this.province = province;
    }
    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }
    public String getTown() {
        return town;
    }
    public void setTown(String town) {
        this.town = town;
    }
    @Column(name = "province_name")
    public String getProvinceName() {
        return provinceName;
    }
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }
    @Column(name = "city_name")
    public String getCityName() {
        return cityName;
    }
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
    @Column(name = "town_name")
    public String getTownName() {
        return townName;
    }
    public void setTownName(String townName) {
        this.townName = townName;
    }
    public String getHospitalName() {
        return hospitalName;
    }
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }
    @Column(name = "dept_name")
    public String getDeptName() {
        return deptName;
    }
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }
    @Column(name = "job_name")
    public String getJobName() {
        return jobName;
    }
    public void setJobName(String jobName) {
        this.jobName = jobName;
    }
    public String getHospital() {
        return hospital;
    }
    public void setHospital(String hospital) {
        this.hospital = hospital;
    }
    public String getDept() {
        return dept;
    }
    public void setDept(String dept) {
        this.dept = dept;
    }
    public String getJob() {
        return job;
    }
    public void setJob(String job) {
        this.job = job;
    }
    public String getExpertise() {
        return expertise;
    }
    public void setExpertise(String expertise) {
        this.expertise = expertise;
    }
    public String getIntroduce() {
        return introduce;
    }
    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }
    public Integer getLevel() {
        return level;
    }
    public void setLevel(Integer level) {
        this.level = level;
    }
    @Column(name = "iscertified")
    public Integer getIscertified() {
        return iscertified;
    }
    public void setIscertified(Integer isCertified) {
        this.iscertified = isCertified;
    }
    public String getQrcode() {
        return qrcode;
    }
    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }
    // 设定JSON序列化时的日期格式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCzrq() {
        return czrq;
    }
    public void setCzrq(Date czrq) {
        this.czrq = czrq;
    }
    @Column(name = "del")
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    @Column(name = "is_famous")
    public Integer getIsFamous() {
        return isFamous;
    }
    public void setIsFamous(Integer isFamous) {
        this.isFamous = isFamous;
    }
    /**
     * 是否为专科医生。
     *
     * @return
     */
    @Transient
    public boolean isProfessionalDoctor() {
        if (level != null && level == 1) {
            return true;
        } else {
            return false;
        }
    }
    /**
     * 是否为全科医生。
     *
     * @return
     */
    @Transient
    public boolean isGeneralDoctor() {
        if (level != null && level == 2) {
            return true;
        } else {
            return false;
        }
    }
    /**
     * 是否为健康管理师。
     *
     * @return
     */
    @Transient
    public boolean isHealthDoctor() {
        if (level != null && level == 3) {
            return true;
        } else {
            return false;
        }
    }
    @Transient
    public String getIsHelp() {
        return isHelp;
    }
    public void setIsHelp(String isHelp) {
        this.isHelp = isHelp;
    }
    @Column(name = "is_password_prompt")
    public String getIsPasswordPrompt() {
        return isPasswordPrompt;
    }
    public void setIsPasswordPrompt(String isPasswordPrompt) {
        this.isPasswordPrompt = isPasswordPrompt;
    }
    public String getCheckPassword() {
        return checkPassword;
    }
    public void setCheckPassword(String checkPassword) {
        this.checkPassword = checkPassword;
    }
    public String getCheckSalt() {
        return checkSalt;
    }
    public void setCheckSalt(String checkSalt) {
        this.checkSalt = checkSalt;
    }
    public Date getCertifiedOvertime() {
        return certifiedOvertime;
    }
    public void setCertifiedOvertime(Date certifiedOvertime) {
        this.certifiedOvertime = certifiedOvertime;
    }
    public String getCertificateNum() {
        return certificateNum;
    }
    public void setCertificateNum(String certificateNum) {
        this.certificateNum = certificateNum;
    }
    public String getOpenid() {
        return openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
    @Transient
    public String getConcernCode() {
        return concernCode;
    }
    public void setConcernCode(String concernCode) {
        this.concernCode = concernCode;
    }
    public static long getSerialVersionUID() {
        return serialVersionUID;
    }
    public String getActivityPath() {
        return activityPath;
    }
    public void setActivityPath(String activityPath) {
        this.activityPath = activityPath;
    }
}

+ 149 - 76
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/service/AsyncService.java

@ -27,6 +27,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
/**
@ -44,6 +45,7 @@ public class AsyncService extends BaseService{
    private SignFamilyDao signFamilyDao;
    @Autowired
    private PatientDeviceDao patientDeviceDao;
    @Value("${systemConfig.server_url}")
    private String wlyyService;
    @Autowired
@ -78,6 +80,14 @@ public class AsyncService extends BaseService{
    private MessageDao messageDao;
    @Autowired
    private PushMsgTask pushMsgTask;
    @Autowired
    private DoctorDao doctorDao;
    @Value("${doctorAssistant.api}")
    private String doctorAssistant;
    @Value("${doctorAssistant.target_url}")
    private String targetUrl;
    @Autowired
    private HttpClientUtil httpClientUtil;
    /**
     * 校验指标是否超标,发送消息
@ -221,22 +231,35 @@ public class AsyncService extends BaseService{
     * 推送信息
     */
    private void sendMessage(String content, Patient patient, PatientHealthIndex model) {
        logger.info("======start sendMessage======");
        String patientCode = patient.getCode();
        String patientName = patient.getName();
        // 消息接收者
        List<String> receivers = new ArrayList<String>();
        // 查询病人家庭签约的健康管理师
        SignFamily signFamily = signFamilyDao.findByjiatingPatientYes(patientCode);
        logger.info("签约对象--全科医生code===="+signFamily.getDoctor());
        String healthDoctorFamily = "";
        String doctorFamily = "";
        String doctorName = "";
        String doctorOpenID = "";
        if (signFamily != null) {
            healthDoctorFamily = signFamily.getDoctorHealth();
            doctorFamily = signFamily.getDoctor();
            logger.info("全科医生code======"+doctorFamily);
            if (StringUtils.isNotEmpty(healthDoctorFamily)) {
                // 添加到消息接收人列表
                receivers.add(healthDoctorFamily);
            } else if (StringUtils.isNotEmpty(doctorFamily)){
                Doctor doctor = doctorDao.findByCode(healthDoctorFamily);
                doctorName = doctor.getName();
                doctorOpenID = doctor.getOpenid();
            }
            if (StringUtils.isNotEmpty(doctorFamily)){
                // 添加到消息接收人列表
                receivers.add(doctorFamily);
                Doctor doctor = doctorDao.findByCode(signFamily.getDoctor());
                doctorName = doctor.getName();
                doctorOpenID = doctor.getOpenid();
            }
        }
        // 查询病人三师签约中的健康管理师
@ -248,7 +271,7 @@ public class AsyncService extends BaseService{
                // 添加到消息接收人列表
                receivers.add(healthDoctorTeam);
            }
            if (StringUtils.isNotEmpty(signFamilySS.getDoctor())){
            if (StringUtils.isNotEmpty(signFamilySS.getDoctor())&& !StringUtils.equals(doctorFamily, signFamilySS.getDoctor())){
                receivers.add(signFamilySS.getDoctor());
            }
        }
@ -282,6 +305,9 @@ public class AsyncService extends BaseService{
            if(messageService.getMessageNoticeSettingByMessageType(receiver,"1",MessageNoticeSetting.MessageTypeEnum.healthSignSwitch.getValue())){
                // 异常通知
                if (receiver.equals(doctorFamily)){
                    logger.info("全科添加发送消息");
                }
                JSONObject json = new JSONObject();
                json.put("receiver", receiver);
                json.put("type", MessageType.MESSAGE_TYPE_DOCTOR_HEALTH_INDEX.D_HI_01.name());
@ -292,7 +318,35 @@ public class AsyncService extends BaseService{
            }
        }
        // 批量保存消息
        logger.info("消息数量---"+messages.size());
        messageDao.save(messages);
        for (String receiver : receivers) {
            if (StringUtils.isEmpty(receiver)) {
                continue;
            }
            if(messageService.getMessageNoticeSettingByMessageType(receiver,"1", MessageNoticeSetting.MessageTypeEnum.healthSignSwitch.getValue())){
                //            新增发送医生助手模板消息 v1.4.0 by wujunjie
                if (StringUtils.isNotEmpty(doctorOpenID)) {
                    List<Message> messagesList = messageDao.findUnreadHealthIndex(patientCode, receiver);
                    if (messagesList != null && messagesList.size()>0){
                        String url = doctorAssistant + "/wlyy/feldsher/sendDoctorTemplates";
                        List<NameValuePair> params = new ArrayList<>();
                        params.add(new BasicNameValuePair("type", "3"));
                        params.add(new BasicNameValuePair("openId", doctorOpenID));
                        params.add(new BasicNameValuePair("url", targetUrl));
                        params.add(new BasicNameValuePair("first", doctorName + "医生,您的签约居民" + patientName +
                                "有" + messagesList.size() + "条未读的体征异常消息"));
                        params.add(new BasicNameValuePair("remark", "请进入手机APP查看"));
                        SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
                        String date = format.format(new Date());
                        String keywords = date + "," + patientName;
                        params.add(new BasicNameValuePair("keywords", keywords));
                        httpClientUtil.post(url, params, "UTF-8");
                    }
                }
            }
        }
        // 推送消息给医生
        pushMsgTask.put(array);
    }
@ -459,6 +513,73 @@ public class AsyncService extends BaseService{
        }
    }
    /**
     * 设置
     * @param patient
     * @return
     */
    public int setTrackPatientByDoctor(String patient){
        SignFamily signFamily = signFamilyDao.findByjiatingPatientYes(patient);
        if(signFamily==null){
            return -1;
        }
        Patient p = patientDao.findByCode(patient);
        if(p==null){
            return -1;
        }
        //医生是否自动追踪居民
        DoctorSwitch sw =  doctorSwitchDao.findByDoctor(signFamily.getDoctor());
        DoctorSwitch swh =  doctorSwitchDao.findByDoctor(signFamily.getDoctorHealth());
        if(sw!=null){
            if("1".equals(sw.getAlertPatientSwitch())){
                //查询是否与医生建立重点跟踪关系,诺无关系则建立
                TrackPatient trackPatient = trackPatientDao.findByDoctorCodeAndPatientCode(signFamily.getDoctor(),patient);
                if(trackPatient == null){
                    TrackPatient t = new TrackPatient();
                    t.setCreateTime(new Date());
                    t.setDoctorCode(signFamily.getDoctor());
                    t.setDoctorName(signFamily.getDoctorName());
                    t.setIdcard(signFamily.getIdcard());
                    t.setSsc(signFamily.getSsc());
                    t.setTeamCode(signFamily.getAdminTeamId().intValue());
                    t.setPatientCode(patient);
                    t.setPatientName(p.getName());
                    t.setDel("1");
                    trackPatientDao.save(t);
                }else{
                    trackPatient.setDel("1");
                    trackPatientDao.save(trackPatient);
                }
            }
        }
        if(swh!=null){
            if("1".equals(swh.getAlertPatientSwitch())){
                //查询是否与医生建立重点跟踪关系,诺无关系则建立
                TrackPatient trackPatient = trackPatientDao.findByDoctorCodeAndPatientCode(signFamily.getDoctorHealth(),patient);
                if(trackPatient == null){
                    TrackPatient t = new TrackPatient();
                    t.setCreateTime(new Date());
                    t.setDoctorCode(signFamily.getDoctorHealth());
                    t.setDoctorName(signFamily.getDoctorHealthName());
                    t.setIdcard(signFamily.getIdcard());
                    t.setSsc(signFamily.getSsc());
                    t.setTeamCode(signFamily.getAdminTeamId().intValue());
                    t.setPatientCode(patient);
                    t.setPatientName(p.getName());
                    t.setDel("1");
                    trackPatientDao.save(t);
                }else{
                    trackPatient.setDel("1");
                    trackPatientDao.save(trackPatient);
                }
            }
        }
        return 1;
    }
    /**
     * 添加积分
     * @param deviceSn
@ -482,11 +603,11 @@ public class AsyncService extends BaseService{
                flagStr="GLU_MEASURE";
            }
            int dataUoloadCount = 0;
            PatientDevice patientDevice = patientDeviceDao.findByDeviceSnAndCategoryCodeAndUserType(deviceSn,type,userType);
            boolean dataUoloadCount = true;
            if (patientDevice!=null){
                String today = DateUtil.getStringDateShort();
                String startTime = today+" 00:00:00";
                /*String startTime = today+" 00:00:00";
                String endTime = today+" 23:59:59";
                int dateType =1;
                if (deviceType==1){
@ -496,19 +617,38 @@ public class AsyncService extends BaseService{
                }
                String countSql = "SELECT count(*) num FROM device.wlyy_patient_health_index where `user`='"+patientDevice.getUser()+"' and type = "+dateType+" AND record_date >'"+startTime+"' and record_date <= '"+endTime+"'";
                Map<String,Object> countMap = jdbcTemplate.queryForMap(countSql);
                dataUoloadCount = Integer.valueOf(String.valueOf(countMap.get("num")));
                dataUoloadCount = Integer.valueOf(String.valueOf(countMap.get("num")));*/
                //判断今天是否加过体征积分
                String urlSearch = wlyyService + "healthBank/selectByDate";
                List<NameValuePair> paramsSearch1 = new ArrayList<>();
                paramsSearch1.add(new BasicNameValuePair("objectStr", "{\"taskCode\":\"BP_MEASURE\",\"startTime\":\""+today+"\",\"endTime\":\""+today+"\",\"patientId\":\""+patientCode+"\"}"));
                String responseSearch1 = HttpClientUtil.post(urlSearch, paramsSearch1, "UTF-8");
                List<NameValuePair> paramsSearch2 = new ArrayList<>();
                paramsSearch2.add(new BasicNameValuePair("objectStr", "{\"taskCode\":\"GLU_MEASURE\",\"startTime\":\""+today+"\",\"endTime\":\""+today+"\",\"patientId\":\""+patientCode+"\"}"));
                String responseSearch2 = HttpClientUtil.post(urlSearch, paramsSearch2, "UTF-8");
                com.alibaba.fastjson.JSONObject object1 = com.alibaba.fastjson.JSONObject.parseObject(responseSearch1);
                com.alibaba.fastjson.JSONObject object2 = com.alibaba.fastjson.JSONObject.parseObject(responseSearch2);
                if(object1!=null && object2!=null){
                    com.alibaba.fastjson.JSONObject jsonObject1 = (com.alibaba.fastjson.JSONObject) object1.getJSONObject("data").getJSONArray("detailModelList").get(0);
                    com.alibaba.fastjson.JSONObject jsonObject2 = (com.alibaba.fastjson.JSONObject) object2.getJSONObject("data").getJSONArray("detailModelList").get(0);
                    if (jsonObject1.getJSONArray("creditsDetailDOS").size()==0 && jsonObject2.getJSONArray("creditsDetailDOS").size()==0){
                        dataUoloadCount = false;
                    }
                }
                logger.info("今日测量数量:"+dataUoloadCount);
            }
            //增加积分
            if (dataUoloadCount == 0 && "350205".equals(hospital.substring(0,6))){
            if (!dataUoloadCount && "350205".equals(hospital.substring(0,6))){
                logger.info("体征增加积分入口--------");
                String sql = "select count(*) num from device.wlyy_devices where device_code = '"+deviceSn+"'";
                Map<String,Object> deviceCountMap = jdbcTemplate.queryForMap(sql);
                if (Integer.valueOf(String.valueOf(deviceCountMap.get("num")))>0){
                    logger.info("开始体征增加积分------");
                    String url = wlyyService + "healthBank/insertCredits";
                    List<NameValuePair> params = new ArrayList<>();
                    params.add(new BasicNameValuePair("creditsDetail", "{\"tradeType\":\"ACTIVITY_TASK\",\"flag\":\""+flagStr+"\",\"tradeDirection\":1,\"status\":1,\"patientId\":\""+patientCode+"\",\"hospital\":\"350205\"}"));
                    String response = HttpClientUtil.post(url, params, "UTF-8");
                    logger.info("增加积分返回结果"+response);
                    com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(response);
                    String status = jsonObject.getString("status");
                    if (!"200".equals(status)){
@ -517,7 +657,7 @@ public class AsyncService extends BaseService{
                }
            }
            //增加活跃度
            if (dataUoloadCount == 0){
            if (!dataUoloadCount){
                String url = wlyyService + "healthBank/createActiveRecord";
                List<NameValuePair> params = new ArrayList<>();
                params.add(new BasicNameValuePair("activeRecord", "{\"taskCode\":\""+flagStr+"\",\"patientId\":\""+patientCode+"\"}"));
@ -534,73 +674,6 @@ public class AsyncService extends BaseService{
        }
    }
    /**
     * 设置
     * @param patient
     * @return
     */
    public int setTrackPatientByDoctor(String patient){
        SignFamily signFamily = signFamilyDao.findByjiatingPatientYes(patient);
        if(signFamily==null){
            return -1;
        }
        Patient p = patientDao.findByCode(patient);
        if(p==null){
            return -1;
        }
        //医生是否自动追踪居民
        DoctorSwitch sw =  doctorSwitchDao.findByDoctor(signFamily.getDoctor());
        DoctorSwitch swh =  doctorSwitchDao.findByDoctor(signFamily.getDoctorHealth());
        if(sw!=null){
            if("1".equals(sw.getAlertPatientSwitch())){
                //查询是否与医生建立重点跟踪关系,诺无关系则建立
                TrackPatient trackPatient = trackPatientDao.findByDoctorCodeAndPatientCode(signFamily.getDoctor(),patient);
                if(trackPatient == null){
                    TrackPatient t = new TrackPatient();
                    t.setCreateTime(new Date());
                    t.setDoctorCode(signFamily.getDoctor());
                    t.setDoctorName(signFamily.getDoctorName());
                    t.setIdcard(signFamily.getIdcard());
                    t.setSsc(signFamily.getSsc());
                    t.setTeamCode(signFamily.getAdminTeamId().intValue());
                    t.setPatientCode(patient);
                    t.setPatientName(p.getName());
                    t.setDel("1");
                    trackPatientDao.save(t);
                }else{
                    trackPatient.setDel("1");
                    trackPatientDao.save(trackPatient);
                }
            }
        }
        if(swh!=null){
            if("1".equals(swh.getAlertPatientSwitch())){
                //查询是否与医生建立重点跟踪关系,诺无关系则建立
                TrackPatient trackPatient = trackPatientDao.findByDoctorCodeAndPatientCode(signFamily.getDoctorHealth(),patient);
                if(trackPatient == null){
                    TrackPatient t = new TrackPatient();
                    t.setCreateTime(new Date());
                    t.setDoctorCode(signFamily.getDoctorHealth());
                    t.setDoctorName(signFamily.getDoctorHealthName());
                    t.setIdcard(signFamily.getIdcard());
                    t.setSsc(signFamily.getSsc());
                    t.setTeamCode(signFamily.getAdminTeamId().intValue());
                    t.setPatientCode(patient);
                    t.setPatientName(p.getName());
                    t.setDel("1");
                    trackPatientDao.save(t);
                }else{
                    trackPatient.setDel("1");
                    trackPatientDao.save(trackPatient);
                }
            }
        }
        return 1;
    }
    public int cancalTrackPatientByDoctor(String patient){
        SignFamily signFamily = signFamilyDao.findByjiatingPatientYes(patient);
        if(signFamily==null){

+ 13 - 1
patient-co-service/wlyy_device/src/main/resources/application.yml

@ -61,6 +61,10 @@ systemConfig:
  socket_server: http://192.168.131.102:3008
  server_url: http://192.168.131.24:8080/
# Specify the DBMS
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
doctorAssistant:
  api: http://ehr.yihu.com/wlyy/
  target_url: home/html/unreadMessageStatistic.html
---
spring:
@ -99,6 +103,10 @@ systemConfig:
  jw_server: http://172.19.103.88:8011/wlyy_service-1.0-SNAPSHOT
  socket_server: http://172.19.103.88:3000
  server_url: http://ehr.yihu.com/wlyy/
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
doctorAssistant:
  api: http://ehr.yihu.com/wlyy/
  target_url: home/html/unreadMessageStatistic.html
---
spring:
  profiles: production
@ -134,4 +142,8 @@ systemConfig:
  msg_push_server: http://127.0.0.1:3000/system/sendmsg.im
  jw_server: http://59.61.92.90:8072/wlyy_service
  socket_server: http://27.155.101.77:3000
  server_url: http://www.xmtyw.cn/wlyy/
  server_url: http://www.xmtyw.cn/wlyy/
#医生助手服务器地址及模板跳转链接(医生未读消息统计页)
doctorAssistant:
  api: http://www.xmtyw.cn/assistant/
  target_url: home/html/unreadMessageStatistic.html

+ 2 - 6
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/activemq/HealthArtListener.java

@ -153,7 +153,7 @@ public class HealthArtListener implements MessageListener {
                        json);
            }
            //发送代理人
            JSONArray jsonArray = weiXinOpenIdUtils.getAgentOpenId(patient.getCode(), patient.getOpenid());
            JSONArray jsonArray = weiXinOpenIdUtils.getAgentOpenId(patient.getCode(), one.getOpenidSet());
            if (jsonArray != null && jsonArray.length() > 0) {
                for (int i = 0; i < jsonArray.length(); i++) {
                    org.json.JSONObject j = jsonArray.getJSONObject(i);
@ -161,11 +161,7 @@ public class HealthArtListener implements MessageListener {
                    json.remove("toUser");
                    json.put("toUser", member.getCode());
                    json.remove("first");
                    try {
                        json.put("first", weiXinOpenIdUtils.getTitleMes(patient, j.isNull("relation") ? 1 : j.getInt("relation"), patient.getName()));
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    json.put("first", weiXinOpenIdUtils.getTitleMes(patient, j.isNull("relation") ? 1 : j.getInt("relation"), patient.getName()));
                    if (StringUtils.isNotBlank(member.getOpenid())) {
                        pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 9, member.getOpenid(), patient.getName(), json);
                    }

+ 32 - 5
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/wechat/util/WeiXinOpenIdUtils.java

@ -11,10 +11,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
 * Created by Trick on 2017/4/20.
@ -132,8 +129,38 @@ public class WeiXinOpenIdUtils {
        return result;
    }
    /**
     * 查找代理人的openId
     * @param code
     * @return
     */
    public JSONArray getAgentOpenId(String code,Set<String> openidSet) {
        JSONArray result = new JSONArray();
        StringBuffer sql = new StringBuffer("SELECT * FROM wlyy_patient_family_member t WHERE t.patient = '" + code + "' and t.is_authorize =1 ");
        List<Map<String, Object>> members = jdbcTemplate.queryForList(sql.toString());
        if (members != null && members.size() > 0) {
            for (Map<String, Object> member : members) {
                String memberCode = (String) member.get("family_member");
                if (StringUtils.isNotBlank(memberCode)) {
                    Patient p = patientDao.findByCode(memberCode);
                    if (StringUtils.isNotBlank(p.getOpenid())&&!openidSet.contains(p.getOpenid())) {
                        openidSet.add(p.getOpenid());
                        JSONObject json = new JSONObject();
                        json.put("member", p);
                        json.put("relation", (int) member.get("family_relation"));
                        result.put(json);
                    }
                }
            }
        }
        return result;
    }
    public String getTitleMes(Patient p, int ralation, String dealerName) throws Exception {
        return "因您是" + relations.get(familyRelationTrans(p, ralation)) + p.getName() + "的代理人,故请将该消息传达给" + dealerName + ":";
//        return "因您是" + relations.get(familyRelationTrans(p, ralation)) + p.getName() + "的代理人,故请将该消息传达给" + dealerName + ":";
        return "因您是家人"  + p.getName() + "的代理人,故请将该消息传达给" + dealerName + ":";
    }
    /**

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java

@ -35,8 +35,8 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
    public void addInterceptors(InterceptorRegistry registry) {
        // 多个拦截器组成一个拦截器链
        // addPathPatterns 用于添加拦截规则
        // excludePathPatterns 用户排除拦截
        registry.addInterceptor(gateWayInterceptor).addPathPatterns("/wlyygc/**","/third/juye/kit/**").excludePathPatterns("/wlyygc/doctor/**", "/wlyygc/patient/**");
        // excludePathPatterns 用户排除拦截 ,/third/juye/kit/**
        registry.addInterceptor(gateWayInterceptor).addPathPatterns("/wlyygc/**").excludePathPatterns("/wlyygc/doctor/**", "/wlyygc/patient/**");
        registry.addInterceptor(doctorInterceptor).addPathPatterns("/doctor/**", "/statistics/province/**", "/statistics/**", "wlyygc/doctor/**");
        registry.addInterceptor(patientInterceptor).addPathPatterns("/patient/**", "/wlyygc/patient/**");

+ 3 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/kit/KitDrugUseRecordDao.java

@ -20,6 +20,9 @@ public interface KitDrugUseRecordDao extends PagingAndSortingRepository<KitDrugU
    @Query(" select count(1) from KitDrugUseRecord u where u.patientCode=?1 and u.useDrugStatus=?2 and u.deviceSn=?3 and u.useTime>=?4 and u.useTime<=?5")
    int findStatisticsCount(String patientCode,Integer useDrugStatus,String deviceSn,Date monthStart,Date monthEnd);
    @Query(" select count(1) from KitDrugUseRecord u where u.patientCode=?1 and u.useDrugStatus=?2 and u.useTime>=?3 and u.useTime<=?4")
    int findStatisticsCount(String patientCode,Integer useDrugStatus,Date monthStart,Date monthEnd);
    @Query(value = " select u.* from kit_drug_use_record u where u.patient_code=?1 and u.use_drug_status=?2 and u.device_sn=?3 and u.use_time>=?4 and u.use_time<=?5 order by DATE_FORMAT(u.use_time,'%c-%d') desc,u.use_drug_status desc",nativeQuery = true)
    List<KitDrugUseRecord> findStatistics(String patientCode,Integer useDrugStatus,String deviceSn,Date monthStart,Date monthEnd);

+ 8 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthIndexService.java

@ -307,17 +307,20 @@ public class PatientHealthIndexService extends BaseService {
        // 查询病人家庭签约的健康管理师
        SignFamily signFamily = signFamilyDao.findByjiatingPatientYes(patientCode);
        String healthDoctorFamily = "";
        String doctotFamily = "";
        String doctorName = "";
        String doctorOpenID = "";
        if (signFamily != null) {
            healthDoctorFamily = signFamily.getDoctorHealth();
            doctotFamily = signFamily.getDoctor();
            if (StringUtils.isNotEmpty(healthDoctorFamily)) {
                // 添加到消息接收人列表
                receivers.add(healthDoctorFamily);
                Doctor doctor = doctorDao.findByCode(healthDoctorFamily);
                doctorName = doctor.getName();
                doctorOpenID = doctor.getOpenid();
            } else {
            }
            if (StringUtils.isNotEmpty(doctotFamily)){
                // 添加到消息接收人列表
                receivers.add(signFamily.getDoctor());
                Doctor doctor = doctorDao.findByCode(signFamily.getDoctor());
@ -335,6 +338,10 @@ public class PatientHealthIndexService extends BaseService {
                // 添加到消息接收人列表
                receivers.add(healthDoctorTeam);
            }
            if (StringUtils.isNotEmpty(signFamilySS.getDoctor()) && !StringUtils.equals(doctotFamily, signFamilySS.getDoctor())) {
                // 添加到消息接收人列表
                receivers.add(doctotFamily);
            }
        }
        List<Message> messages = new ArrayList<Message>();
        JSONArray array = new JSONArray();

File diff ditekan karena terlalu besar
+ 37 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/bank/CreditLogService.java


+ 9 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/bank/TaskService.java

@ -152,6 +152,7 @@ public class TaskService {
     */
    public JSONObject attendTask(JSONObject object) throws Exception {
        String response = null;
        logger.info(object.toJSONString());
        String patientId = object.getString("patientId");
        SignFamily signFamily = signFamilyDao.findByPatient(patientId);
        if (signFamily == null){
@ -161,13 +162,16 @@ public class TaskService {
        }
        Patient patient = patientDao.findByCode(patientId);
        String unionId = object.getString("unionId");
        if(StringUtils.isNoneBlank(patient.getUnionid())){
            throw new Exception("该居民已报名!");
        }else {
            Patient patient1 = patientDao.findByUnionid(unionId);
            if (patient1 != null){
        logger.info("前端unionId:"+unionId);
        String sql = "select * from wlyy.wlyy_patient p RIGHT JOIN wlyy_health_bank.wlyy_health_bank_task_patient_detail btpd ON p.code = btpd.patient_id where union_id = '"+patient.getUnionid()+
                "' and activity_id = '"+ object.getString("activityId")+"' and patient_idcard ='"+patient.getIdcard()+"'";
        List<Patient> patientList = jdbcTemplate.query(sql,new BeanPropertyRowMapper(Patient.class));
        if (patientList != null && patientList.size()!=0){
            Patient patient1 = patientList.get(0);
            if(StringUtils.isNoneBlank(patient.getUnionid())&&patient1!=null){
                throw new Exception("该居民已报名!");
            }
        }else {
            patient.setUnionid(unionId);
            patientDao.save(patient);
        }

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -2051,7 +2051,7 @@ public class SignPatientLabelInfoService extends BaseService {
            for (SignPatientLabelInfo label : labels) {
                JSONObject json = new JSONObject(label);
                if (label.getLabelType().equals("4") && !label.getLabel().equals("1") && !label.getLabel().equals("2")) {
                if (StringUtils.isNotBlank(label.getLabelType()) && label.getLabelType().equals("4") && !label.getLabel().equals("1") && !label.getLabel().equals("2")) {
                    SignPatientLabel lb = labelService.getLabelByCodeAndType(label.getLabel(), "4");
                    // 有指定团队时不在团队内的过滤

+ 11 - 8
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -4719,14 +4719,6 @@ public class FamilyContractService extends BaseService {
                        patientCertificateDao.save(patientCertificate);
                    }
                }
                //删除修改图片
                if(StringUtils.isNotBlank(imgId)){
                    String[] ids = imgId.split(",");
                    for(int i =0;i<ids.length;i++){
                        Long id = Long.parseLong(ids[i]);
                        patientCertificateDao.delete(id);
                    }
                }
            }
        }catch (Exception e){
            logger.info(e.getMessage()+"___:"+e.toString());
@ -4734,6 +4726,17 @@ public class FamilyContractService extends BaseService {
        return "1";
    }
    public void delImg(String imgId){
        //删除修改图片
        if(StringUtils.isNotBlank(imgId)){
            String[] ids = imgId.split(",");
            for(int i =0;i<ids.length;i++){
                Long id = Long.parseLong(ids[i]);
                patientCertificateDao.delete(id);
            }
        }
    }
    public List<SignDict> getSignDict(){
        return signDictDao.findByYear(DateUtil.getSignYear()+"");
    }

+ 5 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -189,7 +189,7 @@ public class SignWebService extends BaseService {
                    " ( select renew_flag,code,patient,doctor,status,id,apply_date,patient_apply_date,expenses_time,reason,begin from wlyy_sign_family where doctor_health = ? and doctor is null  and status = ? and type = 2" +
                    (status == 3 ? " and expenses_status = '1'" : "") + " order by begin desc ) a " +
                    " ,wlyy_patient b " +
                    " where a.patient = b.code and (b.`name` like ? or b.code LIKE ? ) "+
                    " where a.patient = b.code and (b.`name` like ? or b.mobile LIKE ? ) "+
                    " order by applyDate desc limit " + page * pageSize + "," + pageSize;
        } else {
            // 查询语句
@ -217,7 +217,7 @@ public class SignWebService extends BaseService {
                    " ( select renew_flag,code,patient,doctor,status,id,apply_date,patient_apply_date,expenses_time,reason,begin from wlyy_sign_family where doctor = ?  and status = ? and type = 2" +
                    (status == 3 ? " and expenses_status = '1'" : "") + " order by begin desc ) a " +
                    " ,wlyy_patient b " +
                    " where a.patient = b.code  and (b.`name` like ? or b.code LIKE ? ) "+
                    " where a.patient = b.code  and (b.`name` like ? or b.mobile LIKE ? ) "+
                    "order by applyDate desc limit " + page * pageSize + "," + pageSize;
        }
@ -246,7 +246,7 @@ public class SignWebService extends BaseService {
                " ( select renew_flag,code,patient,doctor,status,id,apply_date,patient_apply_date,expenses_time,reason,begin from wlyy_sign_family where (doctor = ? or doctor_health = ?)  and status = ? and type = 2" +
                (status == 3 ? " and expenses_status = '1'" : "") + " order by begin desc ) a " +
                " ,wlyy_patient b " +
                " where a.patient = b.code  and (b.`name` like ? or b.code LIKE ? ) "+
                " where a.patient = b.code  and (b.`name` like ? or b.mobile LIKE ? ) "+
                "order by applyDate desc limit " + page * pageSize + "," + pageSize;
        // 未缴费查询语句
        String sqlExpenses = "select " +
@ -272,7 +272,7 @@ public class SignWebService extends BaseService {
                " from " +
                " ( select patient_apply_date,renew_flag,code,patient,doctor,status,id,apply_date,reason,begin,expenses_status,LENGTH(trim(ifnull(expenses_status,''))) len from wlyy_sign_family where (doctor = ? or doctor_health = ?)  and status > ? and type = 2 order by begin desc ) a " +
                " ,wlyy_patient b " +
                " where a.patient = b.code and (a.expenses_status = '0' or a.len < 1) and (b.`name` like ? or b.code LIKE ? ) "+
                " where a.patient = b.code and (a.expenses_status = '0' or a.len < 1) and (b.`name` like ? or b.mobile LIKE ? ) "+
                "order by applyDate desc limit " + page * pageSize + "," + pageSize;
        // 已解约查询语句
@ -299,7 +299,7 @@ public class SignWebService extends BaseService {
                " from " +
                " ( select patient_apply_date,renew_flag,code,patient,doctor,status,id,apply_date,apply_unsign_date,reason,begin from wlyy_sign_family where (doctor = ? or doctor_health = ?)  and ( status = ? or status = ? ) and type = 2 order by begin desc ) a " +
                " ,wlyy_patient b " +
                " where a.patient = b.code  and (b.`name` or b.code like ? ) " +
                " where a.patient = b.code  and (b.`name` or b.mobile like ? ) " +
                "order by applyDate desc limit " + page * pageSize + "," + pageSize;
        // 分页信息

+ 15 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -370,8 +370,7 @@ public class JMJkEduArticleService extends BaseService {
                                                     String currentUserRoleCode,
                                                     String currentUserRoleLevel) throws Exception {
        Set<String> openidSet = getOpenid(patientSet);
        List<HealthEduArticleES> healthEduArticleESList = new ArrayList<>();
        Doctor doctor = doctorDao.findByCode(sendCode);
        AdminTeam adminTeam =null;
@ -473,6 +472,7 @@ public class JMJkEduArticleService extends BaseService {
//            healthEduArticleES.setSendSource();
            healthEduArticleES.setAllCount(patientSet.size());
            healthEduArticleES.setUserType(1);
            healthEduArticleES.setOpenidSet(openidSet);
            healthEduArticleESList.add(healthEduArticleES);
        }
@ -1490,4 +1490,17 @@ public class JMJkEduArticleService extends BaseService {
//        List<HealthEduArticleES> esList = elasticsearchUtil.excute(sql.toString(),HealthEduArticleES.class, esIndex, esType);
//        return esList;
//    }
    public Set<String> getOpenid(Set<String> patientSet){
        Set<String> openidSet = new HashSet<>(patientSet);
        Patient one = null;
        for (String patient : patientSet) {
            one = patientDao.findByCode(patient);
            if(one==null){
                continue;
            }
            openidSet.add(one.getOpenid());
        }
        return openidSet;
    }
}

+ 43 - 23
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/kit/KitService.java

@ -2,6 +2,7 @@ package com.yihu.wlyy.service.kit;
import com.yihu.device.entity.DeviceDetail;
import com.yihu.wlyy.entity.device.PatientDevice;
import com.yihu.wlyy.entity.device.PatientDeviceLog;
import com.yihu.wlyy.entity.kit.KitDrugDetail;
import com.yihu.wlyy.entity.kit.KitDrugUseRecord;
import com.yihu.wlyy.entity.kit.KitUseRemindRecord;
@ -12,6 +13,7 @@ import com.yihu.wlyy.repository.kit.KitDrugUseRecordDao;
import com.yihu.wlyy.repository.kit.KitUseRemindRecordDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.PatientDeviceDao;
import com.yihu.wlyy.repository.patient.PatientDeviceLogDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.third.kit.JyKitService;
@ -57,6 +59,8 @@ public class KitService extends BaseService {
    private PatientDeviceDao patientDeviceDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private PatientDeviceLogDao patientDeviceLogDao;
    private String format = "yyyy-MM-dd HH:mm";
    private String format2 = "HH:mm" ;
@ -97,7 +101,7 @@ public class KitService extends BaseService {
            }
            deviceDetail = deviceDetailDao.save(deviceDetail);
            patientDevice = new PatientDevice();
            patientDevice.setDeviceId(deviceDetail.getId());
            patientDevice.setDeviceId(7L);//dm_device设备类型表的id
            patientDevice.setDeviceSn(deviceDetail.getDeviceCode());
            patientDevice.setDeviceName(deviceDetail.getDeviceName());
            patientDevice.setUser(patientCode);
@ -113,17 +117,7 @@ public class KitService extends BaseService {
                throw new Exception(" 数据库中没有该设备!");
            }
        }
        //添加绑定关系
//        PatientDevice patientDevice = new PatientDevice();
//        patientDevice.setDeviceId(deviceDetail.getId());
//        patientDevice.setDeviceSn(deviceDetail.getDeviceCode());
//        patientDevice.setDeviceName(deviceDetail.getDeviceName());
//        patientDevice.setUser(patientCode);
//        patientDevice.setCategoryCode("3");
//        patientDevice.setUserType("-1");
//        patientDevice.setUserIdcard(patient.getIdcard());
//        patientDevice.setCzrq(new Date());
        String typeTemp = type;
        if("1".equals(type)){
            type="0";
        }else if("2".equals(type)){
@ -131,6 +125,19 @@ public class KitService extends BaseService {
        }
        patientDevice.setDel(Integer.valueOf(type));
        patientDeviceDao.save(patientDevice);
        //由于PatientDevice绑定关系是物理删除,所以添加PatientDeviceLog绑定记录
        PatientDeviceLog patientDeviceLog = new PatientDeviceLog();
        patientDeviceLog.setDeviceId(7L);//dm_device设备类型表的id
        patientDeviceLog.setPatient(patientDevice.getUser());
        patientDeviceLog.setCategoryCode(patientDevice.getCategoryCode());
        patientDeviceLog.setDeviceName(patientDevice.getDeviceName());
        patientDeviceLog.setDeviceSn(patientDevice.getDeviceSn());
        patientDeviceLog.setRole(1);
        patientDeviceLog.setOperateCode(Integer.valueOf(typeTemp));
        patientDeviceLog.setAgreementPhoto(patientDevice.getAgreementPhoto());
        patientDeviceLog.setCreateTime(new Date());
        patientDeviceLog.setIsDel(1);
        patientDeviceLogDao.save(patientDeviceLog);
    }
    /**
@ -256,8 +263,6 @@ public class KitService extends BaseService {
     */
    public List<Map<String,Object>> getUseDrugRecordInfo(String patientCode,Integer recordType,String startTime,String endTime,Integer page,Integer pageSize) throws Exception{
        Date startDate = DateUtil.strToDate(startTime);
        Date endDate = DateUtil.strToDate(endTime);
        Specification specification = new Specification<KitDrugUseRecord>() {
            @Override
@ -268,9 +273,11 @@ public class KitService extends BaseService {
                    predicates.add(criteriaBuilder.equal(root.get("recordType"), recordType));
                }
                if(!StringUtils.isEmpty(startTime)){
                    Date startDate = DateUtil.strToDate(startTime);
                    predicates.add(criteriaBuilder.greaterThanOrEqualTo(root.get("useTime"), startDate));
                }
                if(!StringUtils.isEmpty(endTime)){
                    Date endDate = DateUtil.strToDate(endTime);
                    predicates.add(criteriaBuilder.lessThanOrEqualTo(root.get("useTime"), endDate));
                }
                criteriaQuery.orderBy(criteriaBuilder.desc(root.get("useTime")));//按时间降序排序
@ -362,14 +369,26 @@ public class KitService extends BaseService {
     * 本月用药情况
     * @param useDrugStatus (1、按时,2、超时,3、漏用)
     */
    public Map<String,Object> currentMonthDrugUse(String patientCode,Integer useDrugStatus,String deviceSn) throws Exception{
    public Map<String,Object> currentMonthDrugUse(String patientCode,Integer useDrugStatus,String deviceSn,String month) throws Exception{
        Map<String,Object> resultMap = new HashMap<>();
        Date monthStart = DateUtil.strToDate(DateUtil.getFristDayOfMonthThisDate(new Date()));
        Date monthEnd = new Date();
        Integer onTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,1,deviceSn,monthStart,monthEnd);//按时次数
        Integer overTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,2,deviceSn,monthStart,monthEnd);//超时次数
        Integer leakageCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,3,deviceSn,monthStart,monthEnd);//漏用次数
//        Date monthStart = DateUtil.strToDate(DateUtil.getFristDayOfMonthThisDate(new Date()));
//        Date monthEnd = new Date();
        Date monthStart = DateUtil.strToDate(month,"yyyy-MM");
        Date monthEnd = DateUtil.strToDate(DateUtil.getLastDayOfMonthThisDate(monthStart)+" 23:59:59");
        Integer onTimeCount = null;
        Integer overTimeCount = null;
        Integer leakageCount = null;
        if(StringUtils.isEmpty(deviceSn)){
            onTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,1,monthStart,monthEnd);//按时次数
            overTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,2,monthStart,monthEnd);//超时次数
            leakageCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,3,monthStart,monthEnd);//漏用次数
        }else{
            onTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,1,deviceSn,monthStart,monthEnd);//按时次数
            overTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,2,deviceSn,monthStart,monthEnd);//超时次数
            leakageCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,3,deviceSn,monthStart,monthEnd);//漏用次数
        }
        Specification specification = new Specification<KitDrugUseRecord>() {
            @Override
            public Predicate toPredicate(Root<KitDrugUseRecord> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
@ -397,7 +416,7 @@ public class KitService extends BaseService {
        Map<String,Map<String,Object>> map = new LinkedHashMap<>();
        for(KitDrugUseRecord one:list){
            String dateStr = DateUtil.dateToStr(one.getUseTime(),"MM-dd");
            String dateStr = DateUtil.dateToStr(one.getUseTime(),"yyyy-MM-dd");
            Map<String,Object> oneMap = null;
            if(map.containsKey(dateStr)){
                oneMap = map.get(dateStr);
@ -430,8 +449,8 @@ public class KitService extends BaseService {
        Collections.sort(resultList, new Comparator<Map<String,Object>>() {
            @Override
            public int compare(Map<String,Object> o1, Map<String,Object> o2) {
                Long day1 =  DateUtil.strToDate(o1.get("day").toString(), "MM-dd").getTime();
                Long day2 =  DateUtil.strToDate(o2.get("day").toString(), "MM-dd").getTime();
                Long day1 =  DateUtil.strToDate(o1.get("day").toString(), "yyyy-MM-dd").getTime();
                Long day2 =  DateUtil.strToDate(o2.get("day").toString(), "yyyy-MM-dd").getTime();
                if(day1-day2>0){
                    return -1;
                }else if(day1-day2<0){
@ -482,6 +501,7 @@ public class KitService extends BaseService {
            Map<String,Object> temp = new HashMap<>();
            temp.put("useTime",DateUtil.dateToStr(one.getUseTime(),"HH:mm"));
            temp.put("drugDetail",JSONArray.fromObject(one.getDrugDetail()));
            temp.put("useDrugStatus",one.getUseDrugStatus());
            resultList.add(temp);
        }
        return resultList;

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

@ -0,0 +1,141 @@
package com.yihu.wlyy.util;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
 * Created by Trick on 2018/8/1.
 */
@Component
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;
    }
}

+ 45 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/util/RedisController.java

@ -0,0 +1,45 @@
package com.yihu.wlyy.web.common.util;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
/**
 * Created by zhangdan-pc on 2018/07/30
 */
@RestController
@RequestMapping(value = "/common/redis")
@Api("查询正式库reids值")
public class RedisController extends BaseController {
    @Autowired
    private StringRedisTemplate redisTemplate;
    /**
     * 查询增删改路径
     *
     * @return
     */
    @RequestMapping(value = "/getByKey",method = RequestMethod.POST)
    @ApiOperation(value = "根据key值查询结果")
    public String getByKey(@RequestParam(value = "key")String key) {
        try {
            String response = redisTemplate.opsForValue().get(key);
            return write(200,"查询成功","data",response);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "查询失败");
        }
    }
}

+ 86 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java

@ -10,6 +10,7 @@ import com.yihu.wlyy.entity.device.PatientDeviceLog;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.manage.User;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.health.repository.DeviceDetailDao;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.manage.UserDao;
import com.yihu.wlyy.repository.patient.PatientDao;
@ -64,6 +65,8 @@ public class DataHandingService {
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private CreditLogService creditLogService;
    @Autowired
    private DeviceDetailDao deviceDetailDao;
    @Transactional
    public String producePatientAndDoctorPassword() {
@ -506,6 +509,89 @@ public class DataHandingService {
                logger.info("添加积分失败!");
            }
        }
    }
    /**
     * 导入药盒绑定设备的数据
     * @throws Exception
     */
    public List<String> importKitInfo(Integer batch)throws Exception{
        String sql = " select * from wlyy.kit_bind_info_temp where batch="+batch;
        List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql);
        List<String> errorList = new ArrayList<>();
        for(Map<String,Object> one:mapList){
            String name = one.get("name").toString();//居民名称
            String idcard = one.get("idcard").toString();//居民身份证
            String kitSn = one.get("kit_sn").toString();//药盒sn码
            String deviceType = one.get("device_type").toString();//药盒设备型号
            Patient patient = patientDao.findByIdcard(idcard);
            if(patient==null){//身份证不匹配
                errorList.add(kitSn);
                continue;
            }
            DeviceDetail deviceDetail = deviceDetailDao.findBySn(kitSn);
            if(deviceDetail==null){
                //添加设备
                deviceDetail = new DeviceDetail();
            }
            deviceDetail.setDeviceModel(deviceType);//设备型号
            deviceDetail.setDeviceName("巨烨科技智能药盒");
            deviceDetail.setDeviceCode(kitSn);
            deviceDetail.setLinkman(patient.getName());
            //通过签约关系获取团队信息,有则添加。
            String sql2 = " select f.* from wlyy_sign_family f where f.idcard='"+idcard+"' and f.status=1 ";
            List<Map<String, Object>> signFamilys1 = jdbcTemplate.queryForList(sql2);
            if(signFamilys1.size()>0){
                deviceDetail.setOrgName(signFamilys1.get(0).get("hospital_name")+"");
                deviceDetail.setGrantAdminTeam(signFamilys1.get(0).get("admin_team_code")+"");
                deviceDetail.setGrantOrgCode(signFamilys1.get(0).get("hospital")+"");
            }
            deviceDetail.setTel(patient.getMobile());
            deviceDetail.setGrantTime(new Date());
            deviceDetail = deviceDetailDao.save(deviceDetail);
            //添加设备绑定关系
            List<PatientDevice> patientDeviceList = patientDeviceDao.findByPatientAndDeviceSn(patient.getCode(),kitSn);
            PatientDevice patientDevice = null;
            if(patientDeviceList.size()>0){
                patientDevice = patientDeviceList.get(0);
            }else{
                patientDevice = new PatientDevice();
            }
            patientDevice.setDeviceId(7L);
            patientDevice.setDeviceSn(deviceDetail.getDeviceCode());
            patientDevice.setDeviceName(deviceDetail.getDeviceName());
            patientDevice.setUser(patient.getCode());
            patientDevice.setCategoryCode("3");
            patientDevice.setUserType("-1");
            patientDevice.setUserIdcard(patient.getIdcard());
            patientDevice.setCzrq(new Date());
            patientDevice.setDel(0);
            patientDeviceDao.save(patientDevice);
            //由于PatientDevice绑定关系是物理删除,所以添加PatientDeviceLog绑定记录
            PatientDeviceLog patientDeviceLog = new PatientDeviceLog();
            patientDeviceLog.setDeviceId(7L);
            patientDeviceLog.setPatient(patientDevice.getUser());
            patientDeviceLog.setCategoryCode(patientDevice.getCategoryCode());
            patientDeviceLog.setDeviceName(patientDevice.getDeviceName());
            patientDeviceLog.setDeviceSn(patientDevice.getDeviceSn());
            patientDeviceLog.setRole(1);
            patientDeviceLog.setOperateCode(1);
            patientDeviceLog.setAgreementPhoto(patientDevice.getAgreementPhoto());
//            if (role==1){
//                patientDeviceLog.setOperatorName(patientDevice.getDoctorName());
//                patientDeviceLog.setOperator(patientDevice.getDoctor());
//            }else if (role==2){
//                patientDeviceLog.setOperatorName(patientDevice.getAgentName());
//                patientDeviceLog.setOperator(patientDevice.getAgent());
//            }
            patientDeviceLog.setCreateTime(new Date());
            patientDeviceLog.setIsDel(1);
            patientDeviceLogDao.save(patientDeviceLog);
            String sqlUpdate = " update wlyy.kit_bind_info_temp set import=1 where kit_sn='"+kitSn+"'";
            jdbcTemplate.execute(sqlUpdate);
        }
        return errorList;
    }
}

+ 23 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java

@ -19,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -338,4 +340,25 @@ public class DataHandlingController extends BaseController {
            return write(-1,"请洗数据失败!");
        }
    }
    @RequestMapping(value = "/importKitInfo",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("导入药盒绑定设备的数据")
    public String importKitInfo(@ApiParam(name = "batch", value = "批次", required = true)
                                    @RequestParam(value = "batch") Integer batch){
        try{
            List<String> errorList = dataHandingService.importKitInfo(batch);
            if(errorList.size()>0){
                Map<String,Object> map = new HashMap<>();
                map.put("count",errorList.size());
                map.put("errorData",errorList);
                return write(200,"导入数据成功!","data",map);
            }else{
                return write(200,"导入数据成功!");
            }
        }catch (Exception e){
            e.printStackTrace();
            return write(-1,"导入数据失败!");
        }
    }
}

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEdu/DoctorJMJkEduArticleController.java

@ -2,6 +2,7 @@ package com.yihu.wlyy.web.doctor.jimeiJkEdu;
import com.alibaba.fastjson.JSONObject;
import com.yihu.es.entity.HealthEduArticleES;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.repository.doctor.DoctorAdminTeamDao;
import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService;
import com.yihu.wlyy.service.third.jkEduArticle.ThirdJkEduArticleService;
@ -120,6 +121,7 @@ public class DoctorJMJkEduArticleController extends BaseController {
    @RequestMapping(value = "manageSendArticleToPatients", method = RequestMethod.POST)
    @ApiOperation("卫计委(管理员)文章群推送")
    @ObserverRequired
    public BaseResultModel manageSendArticleToPatients(
//            @ApiParam(name = "sendType", value = "发送类型 1医生发送 2卫纪委(管理员)发送", required = true) @RequestParam(value = "sendType", required = true) Integer sendType,
//            @ApiParam(name = "sendName", value = "发送方名称(如:卫计委发送:集美区;医生发送:医生名称)", required = true) @RequestParam(value = "sendName", required = true) String sendName,
@ -292,6 +294,7 @@ public class DoctorJMJkEduArticleController extends BaseController {
    @RequestMapping(value = "doctorSendArticleToPatients", method = RequestMethod.POST)
    @ApiOperation("医生文章群推送")
    @ObserverRequired
    public BaseResultModel doctorSendArticleToPatients(
                                              @RequestParam(value = "patient", required = false) String patient,
                                              @RequestParam(value = "group", required = false, defaultValue = "") String group,
@ -368,6 +371,7 @@ public class DoctorJMJkEduArticleController extends BaseController {
    @RequestMapping(value = "doctorSendArticleToSingle", method = RequestMethod.POST)
    @ApiOperation("医生文章单个患者推送")
    @ObserverRequired
    public BaseResultModel doctorSendArticleToSingle(
            @ApiParam(name = "patientCode", value = "患者Code", required = true) @RequestParam(value = "patientCode", required = true) String patientCode,
            @ApiParam(name = "articleId", value = "文章ID", required = true) @RequestParam(value = "articleId", required = true) String articleId,

+ 4 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/kit/DoctorKitController.java

@ -64,9 +64,10 @@ public class DoctorKitController extends BaseController {
    public String currentMonthDrugUse(
            @ApiParam(name = "patientCode", value = "居民code", required = true) @RequestParam(value = "patientCode", required = true) String patientCode,
            @ApiParam(name = "useDrugStatus", value = "居民用药记录情况(1、按时,2、超时,3、漏用)", required = false) @RequestParam(value = "useDrugStatus", required = false) Integer useDrugStatus,
            @ApiParam(name = "deviceSn", value = "药盒设备sn码", required = false) @RequestParam(value = "deviceSn", required = false) String deviceSn){
            @ApiParam(name = "deviceSn", value = "药盒设备sn码", required = false) @RequestParam(value = "deviceSn", required = false) String deviceSn,
            @ApiParam(name = "month", value = "月份 yyyy-MM", required = false) @RequestParam(value = "month", required = false) String month){
        try {
            Map<String,Object> result =  kitService.currentMonthDrugUse(patientCode,useDrugStatus,deviceSn);
            Map<String,Object> result =  kitService.currentMonthDrugUse(patientCode,useDrugStatus,deviceSn,month);
            return write(200,"获取信息成功!","data",result);
        }catch (Exception e) {
            e.printStackTrace();
@ -88,7 +89,7 @@ public class DoctorKitController extends BaseController {
    }
    @RequestMapping(value = "/oneDayDrugUse", method = RequestMethod.GET)
    @ApiOperation("药盒统计分析--获取某个居民的所绑定的所有药盒设备信息")
    @ApiOperation("药盒统计分析--获取某个居民一天的用药提醒闹钟")
    public String oneDayDrugUse(
            @ApiParam(name = "patientCode", value = "居民code", required = true) @RequestParam(value = "patientCode", required = true) String patientCode,
            @ApiParam(name = "useDrugStatus", value = "居民用药记录情况(1、按时,2、超时,3、漏用)", required = false) @RequestParam(value = "useDrugStatus", required = false) Integer useDrugStatus,

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/DoctorPatientGroupController.java

@ -693,6 +693,8 @@ public class DoctorPatientGroupController extends BaseController {
                    jtJson.put("expensesTime", jtSign.getExpensesTime() == null ? "" : new SimpleDateFormat("yyyy-MM-dd HH:mm").format(jtSign.getExpensesTime()));
                    jtJson.put("jyDate", DateUtil.dateToStr(jtSign.getApplyUnsignDate(), DateUtil.YYYY_MM_DD));
                    jtJson.put("status", jtSign.getStatus());
                    jtJson.put("serverType", jtSign.getServerType());
                    jtJson.put("serverTypeName", jtSign.getServerTypeName());
                    Doctor d =  doctorInfoService.findDoctorByCode(jtSign.getDoctor());
                    jtJson.put("doctor",jtSign.getDoctor());

+ 7 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/kit/PatientKitController.java

@ -9,6 +9,7 @@ import io.swagger.annotations.ApiParam;
import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@ -32,9 +33,13 @@ public class PatientKitController extends BaseController {
    @ApiOperation("药盒绑定 ")
    public String kitBinding(
            @ApiParam(name = "deviceSn", value = "药盒设备sn码", required = true) @RequestParam(value = "deviceSn", required = true) String deviceSn,
            @ApiParam(name = "type", value = "1、绑定,2、解绑", required = true) @RequestParam(value = "type", required = true) String type){
            @ApiParam(name = "type", value = "1、绑定,2、解绑", required = true) @RequestParam(value = "type", required = true) String type,
            @ApiParam(name = "patientCode", value = "1、绑定,2、解绑", required = false) @RequestParam(value = "patientCode", required = false) String patientCode){
        try {
            kitService.kitBinding(deviceSn,type,getUID());
            if(StringUtils.isEmpty(patientCode)){
                patientCode=getUID();
            }
            kitService.kitBinding(deviceSn,type,patientCode);
            return write(200,"绑定成功!");
        }catch (Exception e) {
            e.printStackTrace();

+ 6 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/FamilyContractController.java

@ -450,7 +450,7 @@ public class FamilyContractController extends WeixinBaseController {
            } else {
                //1.4.9.1加入证件说明
                // 图片消息
                // 新增图片消息
                String content = fetchWxImages();
                // 将临时图片拷贝到正式存储路径下
                if (StringUtils.isNotEmpty(content)) {
@ -459,6 +459,9 @@ public class FamilyContractController extends WeixinBaseController {
                        familyContractService.saveCertificate(patient,content,sevId,imgId);
                    }
                }
                //删除图片
                familyContractService.delImg(imgId);
                return write(200, "签约申请成功");
            }
@ -528,6 +531,8 @@ public class FamilyContractController extends WeixinBaseController {
                        familyContractService.saveCertificate(patient,content,sevId,imgId);
                    }
                }
                //删除图片
                familyContractService.delImg(imgId);
                return write(200, "签约申请成功");
            }
        } catch (Exception e) {

+ 13 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/health/bank/AccountController.java

@ -188,6 +188,19 @@ public class AccountController extends WeixinBaseController {
        }
    }
    @RequestMapping(value = "/selectByDate",method = RequestMethod.POST)
    @ApiOperation("根据时间查询积分详情")
    public String selectByDate(@ApiParam(name = "objectStr",value = "参数json字符串")@RequestParam(name = "objectStr") String objectStr){
        try {
            JSONObject object = JSONObject.parseObject(objectStr);
            JSONObject object1 = service.selectByDate(object);
            return write(200,"获取成功","data",object1);
        }catch (Exception e){
            error(e);
            return error(-1,e.getMessage());
        }
    }
}

+ 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/

+ 75 - 37
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/
@ -58,43 +60,79 @@ wechat:
  wechat_base_url: http%3a%2f%2fwww.xmtyw.cn%2fwlyy
  accId: gh_ffd64560fb21
  message:
   ##医生追加建议提醒 --签约邀请
   doctor_invitel_template: MQn79bx1ofb6hekhmRIuqLU7KjySJQzaBzrimgqVrzA
   #咨询回复
   template_consult_notice: 0mF_vHj-ILx8EH8DwzmAi7LqzjqYiU9IrSRRmziTZyc
   #签约成功
   template_sign_success: 0D2vYZVRzFz15p9Y_pkZ1DKutDq8UOsks79FXUKS0tA
   #签约失败
   template_sign_failed: My2VNERjJt4NXR4Ibh42pdrP6B6ka8rQxZeWinQh99s
   #健康指导提醒
   template_health_notice: uv31ES_VCmq3tBYtyGmEQvIwU_zh9LDhF3bFpbIUt5g
   #解约提醒
   template_termination:  C0tdXtA_8k-Cy4a1EkzQuI877vqaqAtRkc-e_Gsd7sk
   #预约成功
   template_appoint_success:  FY3Pqa66tHIE1Fv-irbFBPOh5cYP71fkOzfZKH4S-Fo
   #预约取消
   template_appoint_failed:  tldWEb9AN7p_RoHoD8ml0GxWW3V1V_mpEEhp2v6p56s
   #缴费提醒
   template_expenses_remind:  AcrlihhoGbm22A8cdFFDQ4u38ptRw0aiIPf-aGvNxMM
   #健康教育
   template_healthy_article: a5-ZGf-IUUULsuRNoHWQiBMU6pSYhLgPPqV67SjdLRo
   #医生变更
   template_doctor_change:  dtzSHImbPKfwcrjWlJEjAw3lGlvrLjsobSOE8g4adZA
   #代办事项
   template_doctor_survey:  8ZWKJmoJ7VR7Uk4YS7aa0Z94QzCkxsyTW6R4CHhUJII
   #审核结果通知
   template_doctor_audit:  egrX5Larpkv8opQW67_hwsZoT0OHwwUpE1v7HeU_Jnw
   #服务结果通知
   template_doctor_service:  xhi1LEudiZwJfZylOHuZNo8EiA73GtSshPQv5XOt9Lk
   #体检报告提醒
   template_physical_examination:  jTsvKU3iFw0yiJi5ESyFGDTmFSVcWlMot3yHier39Vc
   #处理结果通知
   template_deal_with:  GyXCmXVYCD7PXi0IbHdPOD8apa-RQoSrSw-4-0pj9Go
   #设备绑定结果通知
   template_patient_bind_device: 1GWPw6LFcSuz2LFTo6LhE-YY8abtmcKRvor1fUzfxBE
   #积分到账通知
   template_healthbank_credit: A2L6WBm1p6bDPYGkGnUmoMvpWlRruP2lapYwHfLV7Rg
    ##医生追加建议提醒 --签约邀请
    doctor_invitel_template: MQn79bx1ofb6hekhmRIuqLU7KjySJQzaBzrimgqVrzA
    #咨询回复
    template_consult_notice: 0mF_vHj-ILx8EH8DwzmAi7LqzjqYiU9IrSRRmziTZyc
    #签约成功
    template_sign_success: 0D2vYZVRzFz15p9Y_pkZ1DKutDq8UOsks79FXUKS0tA
    #签约失败
    template_sign_failed: My2VNERjJt4NXR4Ibh42pdrP6B6ka8rQxZeWinQh99s
    #健康指导提醒
    template_health_notice: uv31ES_VCmq3tBYtyGmEQvIwU_zh9LDhF3bFpbIUt5g
    #解约提醒
    template_termination:  C0tdXtA_8k-Cy4a1EkzQuI877vqaqAtRkc-e_Gsd7sk
    #预约成功
    template_appoint_success:  FY3Pqa66tHIE1Fv-irbFBPOh5cYP71fkOzfZKH4S-Fo
    #预约取消
    template_appoint_failed:  tldWEb9AN7p_RoHoD8ml0GxWW3V1V_mpEEhp2v6p56s
    #缴费提醒
    template_expenses_remind:  AcrlihhoGbm22A8cdFFDQ4u38ptRw0aiIPf-aGvNxMM
    #健康教育
    template_healthy_article: a5-ZGf-IUUULsuRNoHWQiBMU6pSYhLgPPqV67SjdLRo
    #医生变更
    template_doctor_change:  dtzSHImbPKfwcrjWlJEjAw3lGlvrLjsobSOE8g4adZA
    #代办事项
    template_doctor_survey:  8ZWKJmoJ7VR7Uk4YS7aa0Z94QzCkxsyTW6R4CHhUJII
    #审核结果通知
    template_doctor_audit:  egrX5Larpkv8opQW67_hwsZoT0OHwwUpE1v7HeU_Jnw
    #服务结果通知
    template_doctor_service:  xhi1LEudiZwJfZylOHuZNo8EiA73GtSshPQv5XOt9Lk
    #体检报告提醒
    template_physical_examination:  jTsvKU3iFw0yiJi5ESyFGDTmFSVcWlMot3yHier39Vc
    #处理结果通知
    template_deal_with:  GyXCmXVYCD7PXi0IbHdPOD8apa-RQoSrSw-4-0pj9Go
    #设备绑定结果通知
    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:

+ 40 - 4
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/00/B0/Cl8WjVtgHraAdcSNAAEtENJp5q8010.png
    #居民抽奖图片地址
    patient_draw_pic_url: group1/M00/00/B0/Cl8WjVtgGbWAYqumAADhRnoXe38057.png
    #专科医生签约图片地址
    specialist_sign_url: group1/M00/00/AE/Cl8WjFtgHZqAHpknAAH7mgUpbH0162.png
    #健康金图片地址
    doctor_activity_url: group1/M00/00/B0/Cl8WjVtgGbWAUJixAAAde0sVAJk652.png
    #通用活动图片地址
    currency_url: group1/M00/00/B0/Cl8WjVtgGbWAfZI4AAD7PWeBzLo954.png
    #就诊记录
    patient_visit_pic: group1/M00/00/AE/Cl8WjFtgIK-AAhmHAAEML2dpBxA906.png
    #检查检验
    patient_inspect_pic: group1/M00/00/B0/Cl8WjVtgGy6AAs61AAAxJl28nU8047.png
    #社区体检
    patient_examination_pic: group1/M00/00/B0/Cl8WjVtgGbWAVj77AAAg8pVTY9s660.png
    #处方记录
    patient_prescription_pic: group1/M00/00/AE/Cl8WjFtgHZqAXPgzAAAyHL8RzEU114.png
    #居民取药码
    patient_QRCode_pic: group1/M00/00/B0/Cl8WjVtgG4WAC7JDAAAV7lNAUpY772.png
    #居民产检计划
    patient_prenata_pic: group1/M00/00/AE/Cl8WjFtgHZqAVhwaAACK6PRmuEE754.png
    #居民免疫计划
    patient_immune_pic: group1/M00/00/B0/Cl8WjVtgG4WANg5iAAAckaOvfLQ582.png
    #医生咨询操作指南
    patient_operatinginstrutions_pic_url: group1/M00/00/B0/Cl8WjVtgG4WALvB0AAFkoQR6sbI214.png
    #预约挂号
    patient_booking_pic_url: group1/M00/00/AE/Cl8WjFtgG8qAc0LRAAAh07_OGxo533.png
    #设备绑定
    patient_device_pic_url: group1/M00/00/AE/Cl8WjFtgG8qANy56AAArKMof5DE911.png
    #我的家庭
    patient_family_pic_url: group1/M00/00/AE/Cl8WjFtgHZmAb043AAA5I5LejjI793.png
    #续签
    patient_sign_again_pic_url: group1/M00/00/B0/Cl8WjVtgG4WAV-8SAAAc2gFIWBc275.png
    #家庭医生签约1+1+N
    doctor_qrcode_pic_url: group1/M00/00/AE/Cl8WjFtgJGaAZ1VyAAD3GkV403w850.png
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/
  yihu_OpenPlatform_appId: 9000276
@ -172,7 +210,5 @@ ylz:
  gateway:
    url: http://www.mstpay.com:1300/huangsb
juye:
#  url: http://api.zayata.com/index.php?s=/Company/Device/
  url: zayata.ocip.net:30080/index.php?s=/Company/Device/
  token: YTgzYjc2YWIzZjdjOTA1MTE0ODY2YjcyOGNkYWFmZWR6YXlhdGFjb21wYW55
  url: http://zayata.oicp.net:30080/index.php?s=/Company/Device/
  companyCode: 86350206000000001