liubing преди 3 години
родител
ревизия
e3ef34c595

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

@ -260,7 +260,7 @@ public class DoctorBirthdayWishesEndpoint extends BaseController {
                        message.put("content_type",41);
                        message.put("content_notice","");
                        String content_notice = null;
                        imUtil.sendPatientSystemMessage(messageDO.getReceiver(), JSON.toJSONString(messageDO, SerializerFeature.WriteMapNullValue));
                        imUtil.sendPatientSystemMessage(messageDO.getReceiver(), JSON.toJSONString(message, SerializerFeature.WriteMapNullValue));
                    }
                }
            }

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

@ -17,6 +17,7 @@ import org.json.JSONObject;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -350,8 +351,8 @@ public class BirthdayWishesService {
        Set<String> patientSet = new HashSet<>();
        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String createTime = f.format(new Date());
        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
        String createTime = f.format(new Date())+" 00:00:00";
        //医生今日推送的居民
        List<BirthDayWishesToPatient> sendPatientList = findSendPatientByCreateTime(p.toString(),createTime);
        Set<String> sendPatient = sendPatientList.stream().map(BirthDayWishesToPatient::getPatientCode).collect(Collectors.toSet());
@ -459,7 +460,7 @@ public class BirthdayWishesService {
            sql.append(" and patient_code in ( "+patient+" ) ") ;
        }
        sql.append(" limit 0,500000 ");
        List<BirthDayWishesToPatient> patientList = jdbcTemplate.queryForList(sql.toString(), BirthDayWishesToPatient.class);
        List<BirthDayWishesToPatient> patientList = jdbcTemplate.query(sql.toString(),new BeanPropertyRowMapper<>(BirthDayWishesToPatient.class));
        return patientList;
    }
}

+ 7 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/message/PatientMessageService.java

@ -95,10 +95,15 @@ public class PatientMessageService {
     */
    public List<Map<String,Object>> getSystemMessageList(String patient,String type,String isRead){
        String typeIn = " '"+type.replace(",","','")+"' ";
        String sql = " select id,title,type,relation_code,sender,sender_name,is_read,code,DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') create_time " +
        String sql = " select id,title,type,relation_code,sender,sender_name,is_read,code,DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') create_time,data " +
                "from base_system_message where receiver = '"+patient+"' and del=1 and type in ("+typeIn+" )  " ;
        if (StringUtils.isNotBlank(isRead)){
            sql += " and is_read = '"+isRead+"'";
            if ("1".equals(isRead)){
                sql += " and is_read = '1'";
            }else {
                sql += " and ( is_read = '0' or is_read is null ) ";
            }
        }
         sql +=  "ORDER BY create_time desc";
        return jdbcTemplate.queryForList(sql);

+ 2 - 2
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceService.java

@ -402,7 +402,7 @@ public class DeviceService {
                        content_notice.substring(0,content_notice.length()-2);
                        message.put("content_notice","您的key1过高,请注意饮食,尽量食用少油少盐食物".replace("key1",content_notice));
                    }
                    imUtil.sendPatientSystemMessage(messageDO.getReceiver(),JSON.toJSONString(messageDO,SerializerFeature.WriteMapNullValue));
                    imUtil.sendPatientSystemMessage(messageDO.getReceiver(),JSON.toJSONString(message,SerializerFeature.WriteMapNullValue));
                }
            }
@ -485,7 +485,7 @@ public class DeviceService {
                        content_notice.substring(0,content_notice.length()-2);
                        message.put("content_notice","您的key1过高,请注意饮食,尽量食用少油少盐食物".replace("key1",content_notice));
                    }
                    imUtil.sendPatientSystemMessage(messageDO.getReceiver(),JSON.toJSONString(messageDO,SerializerFeature.WriteMapNullValue));
                    imUtil.sendPatientSystemMessage(messageDO.getReceiver(),JSON.toJSONString(message,SerializerFeature.WriteMapNullValue));
                }
            }

+ 1 - 1
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceUploadService.java

@ -169,7 +169,7 @@ public class DeviceUploadService {
                        content_notice.substring(0,content_notice.length()-2);
                        message.put("content_notice","您的key1过高,请注意饮食,尽量食用少油少盐食物".replace("key1",content_notice));
                    }
                    imUtil.sendPatientSystemMessage(messageDO.getReceiver(),JSON.toJSONString(messageDO,SerializerFeature.WriteMapNullValue));
                    imUtil.sendPatientSystemMessage(messageDO.getReceiver(),JSON.toJSONString(message,SerializerFeature.WriteMapNullValue));
                }
            }
        } catch (Exception e) {