瀏覽代碼

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

yeshijie 7 年之前
父節點
當前提交
90982a93e3

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

@ -825,8 +825,12 @@ public class PatientHealthIndexService extends BaseService {
	
	    PatientVO patient = new PatientVO();
	    String patientsql = "select group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 and (label = 1 or label = 2) and patient = '"+p.getCode()+"' GROUP BY patient";
	
	    String patientdisease = jdbcTemplate.queryForObject(patientsql,String.class);
        String patientdisease = "";
	    List<Map<String,Object>> diseases = jdbcTemplate.queryForList(patientsql);
        if(diseases!=null&&diseases.size()>0){
            patientdisease = (String)diseases.get(0).get("disease");
        }
        int bloodPressureBbnormalCount = 0;//血压异常次数
        int bloodSuggurBbnormalCount = 0;//血糖异常次数

+ 14 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheme/DoctorSchemeService.java

@ -975,7 +975,7 @@ public class DoctorSchemeService extends BaseService{
                " AND i.type = '3'  " +
                " AND i.user ='"+patient+"'" +
                " ORDER BY " +
                " i.record_date DESC LIMIT 1,1";
                " i.record_date DESC LIMIT 0,1";
        String xtSchSql="SELECT " +
                " l.*," +
                " s.name " +
@ -1070,7 +1070,19 @@ public class DoctorSchemeService extends BaseService{
    public Map<String,Object> getDoctorSwitchTrackPatient(String doctor){
        DoctorSwitch doctorSwitch = doctorSwitchDao.findByDoctor(doctor);
        Map<String,Object> rs = new HashedMap();
        rs.put("alertPatientSwitch",doctorSwitch.getAlertPatientSwitch());
        if(doctorSwitch!=null){
            rs.put("alertPatientSwitch",doctorSwitch.getAlertPatientSwitch());
        }else{
            DoctorSwitch dw = new DoctorSwitch();
            dw.setDoctor(doctor);
            dw.setAlertPatientSwitch("0");
            dw.setCreateTime(new Date());
            doctorSwitchDao.save(dw);
            rs.put("alertPatientSwitch","0");
        }
        return rs;
    }

+ 35 - 19
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/wechat/process/WeiXinEventProcess.java

@ -387,27 +387,43 @@ public class WeiXinEventProcess {
    public void setWifi(String openid,List<Map<String, String>> articles, Properties systemConf){
        try{
            String sql = "SELECT t.id FROM wlyy_patient t WHERE t.openid = '"+openid+"'";
            //判断是否是莲前社区签约居民
            String sql = "SELECT " +
                    " COUNT(1) AS total " +
                    " FROM " +
                    " wlyy_patient p " +
                    " JOIN wlyy_sign_family f ON f.patient = p.`code` " +
                    " WHERE " +
                    " p.openid ='"+openid+"' " +
                    " AND f.`status` >0 " +
                    " AND f.expenses_status ='1' " +
                    " AND f.hospital = '3502030400'";
            List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
            logger.info("setWifi_openid:"+openid+" openid_listSize:"+list.size());
            logger.info("hslq_Wifi_openid_info: "+openid);
            if(list!=null&&list.size()>0) {
                Map<String, String> articleConsult = new HashMap<>();
                // 图文URL
                String urlConsult = systemConf.getProperty("patient_wifi_url");
                // 图文消息图片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);
                articleConsult.put("Url", urlConsult);
                articleConsult.put("Title", "一键上网(莲前卫生服务中心家庭医生为您服务)");
                articleConsult.put("Description", "一键上网(莲前卫生服务中心家庭医生为您服务)");
                articleConsult.put("PicUrl", picUrlConsult);
                articles.add(articleConsult);
                //判断是否是莲前社区签约居民
                Long cout = (Long)list.get(0).get("total");
                logger.info("hslq_Wifi_total_info:"+cout);
                if(cout>0){
                    Map<String, String> articleConsult = new HashMap<>();
                    // 图文URL
                    String urlConsult = systemConf.getProperty("patient_wifi_url");
                    // 图文消息图片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);
                    articleConsult.put("Url", urlConsult);
                    articleConsult.put("Title", "一键上网(莲前卫生服务中心家庭医生为您服务)");
                    articleConsult.put("Description", "一键上网(莲前卫生服务中心家庭医生为您服务)");
                    articleConsult.put("PicUrl", picUrlConsult);
                    articles.add(articleConsult);
                }
            }
        }catch (Exception e){
            logger.info(e.getMessage());