liubing 3 rokov pred
rodič
commit
5ef424e554

+ 9 - 4
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/doctor/DoctorBirthdayWishesEndpoint.java

@ -229,8 +229,8 @@ public class DoctorBirthdayWishesEndpoint extends BaseController {
            //根据openid进行发送祝福
            String patient = one.getPatientCode();
            if (StringUtils.isNotBlank(patient)){
                String sql = " select p.id as patient,p.name,we.openid from base_patient p inner join  base_patient_wechat we on p.id = we.patient_id " +
                        "and we.patient_id = '"+patient+"' " +
                String sql = " select p.id as patient,p.name,we.openid from base_patient p Left join  base_patient_wechat we on p.id = we.patient_id " +
                        "where p.id = '"+patient+"' " +
                        "  order by we.create_time desc  ";
                List<Map<String,Object>> patients = jdbcTemplate.queryForList(sql);
                if (patients.size()>0){//发送生日祝福
@ -244,8 +244,13 @@ public class DoctorBirthdayWishesEndpoint extends BaseController {
//                    json.put("content", one.getContent());
//                    json.put("openid",tmp.get("openid").toString());
//                    json.put("represented","");//被代理人
                    boolean success =  messageUtil.putTemplateWxMessage(wxId,"template_success_notice","srzf",tmp.get("openid").toString(),first,
                            null,one.getContent(),26,json,"已发送", DateUtil.dateToChineseTime(new Date()));
                    boolean success=false;
                    if (null!=tmp.get("openid")&&StringUtils.isNotBlank(tmp.get("openid").toString())) {
                        success = messageUtil.putTemplateWxMessage(wxId, "template_success_notice", "srzf", tmp.get("openid").toString(), first,
                                null, one.getContent(), 26, json, "已发送", DateUtil.dateToChineseTime(new Date()));
                    }else {
                        success=true;
                    }
                    if (success){
                        SystemMessageDO messageDO = new SystemMessageDO();
                        messageDO.setTitle("收到来自"+one.getDoctorName()+"的关怀祝福:祝您"+tmp.get("name").toString()+"节日快乐!");

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/birthday/BirthdayWishesService.java

@ -409,7 +409,7 @@ public class BirthdayWishesService {
        Set<String> openidSet = new HashSet<>();
        BaseDoctorDO doctor = doctorDao.findById(doctorCode);
        String sql = " select * from ( select p.id as patient,p.name,we.openid from base_patient p inner join  base_patient_wechat we on p.id = we.patient_id and we.patient_id in ( "+p.toString()+") " +
        String sql = " select * from ( select p.id as patient,p.name,we.openid from base_patient p Left join  base_patient_wechat we on p.id = we.patient_id where p.id in ( "+p.toString()+") " +
                "  order by we.create_time desc )A group by A.patient  ";
        List<Map<String, Object>> patientInfos = jdbcTemplate.queryForList(sql);

+ 8 - 8
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/sign/CapacityAssessmentRecordService.java

@ -128,14 +128,14 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
        res.put("2",0);
        res.put("3",0);
        String sql = "SELECT COUNT(DISTINCT ar.patient) count,level_conclusion from  " +
                "base_capacity_assessment_record ar, " +
                "base_service_package_sign_record sr,base_service_package_record r,  " +
                "                base_service_package_item i,base_team_member m  " +
                "                WHERE sr.id = r.sign_id and sr.status=1 and r.service_package_id = i.service_package_id  " +
                "                and i.del = 1 and m.team_code = r.team_code and ar.patient = sr.patient " +
                "                and m.doctor_code = '"+doctorId+"' and m.del = '1' and sr.`status`=1 " +
                "GROUP BY ar.level_conclusion" ;
        String sql = " SELECT COUNT(DISTINCT A.patient) count,A.level_conclusion \n" +
                " from ( select ar.patient,ar.label_code as level_conclusion from  wlyy_patient_label ar, " +
                " base_service_package_sign_record sr,base_service_package_record r, base_service_package_item i,base_team_member m " +
                " WHERE sr.id = r.sign_id and sr.status=1 and r.service_package_id = i.service_package_id " +
                " and i.del = 1 and m.team_code = r.team_code and ar.patient = sr.patient and ar.label_type = 1 " +
                " and m.doctor_code = '"+doctorId+"' and m.del = '1' and sr.`status`=1  " +
                " GROUP BY ar.patient ORDER BY ar.czrq desc)A " +
                " GROUP BY a.level_conclusion " ;
        List<Map<String,Object>> countMapList = jdbcTemplate.queryForList(sql);
        for(Map<String,Object> map:countMapList){
            int c = Integer.valueOf(map.get("count").toString());