trick9191 8 jaren geleden
bovenliggende
commit
7de7c54c13

+ 3 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -40,6 +40,9 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query(" from Message a where a.read = 1 and over ='1' and a.sender = ?1 and a.receiver=?2 and a.signStatus='1'")
    Message findByPatient(String patient,String doctor);
    @Query(" from Message a where a.read = 1 and over ='1' and a.sender = ?1 and a.receiver=?2 ")
    Message findByPatientRenew(String patient,String doctor);
    @Query("select a from Message a where a.receiver = ?1 and a.sender=?2 and a.tzType=?3 order by a.createTime desc")
    List<Message> getHealthIndexMessageByPatient(String doctor,String patient,String type,Pageable pageRequest);

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

@ -281,23 +281,19 @@ public class SignPatientLabelInfoService extends BaseService {
            if(flag!=-1){
                String label[] = labelCode.split("-");
                sql = "SELECT " +
                        "    t1.* ," +
                        "    t2.openid AS opid" +
                        "    t1.* " +
                        " FROM " +
                        "    wlyy_sign_family t1 ,wlyy_patient t2" +
                        " WHERE t1.patient =t2.code " +
                        "    AND (t1.doctor = ? or t1.doctor_health = ?) " +
                        "    wlyy_sign_family t1 " +
                        " WHERE (t1.doctor = ? or t1.doctor_health = ?) " +
                        "    AND t1.status > 0 " +
                        "    AND t1.admin_team_code = ? AND  t1.special_population = '"+label[1]+"'";
                args = new Object[]{doctor, doctor, teamCode};
            }else{
                sql = "SELECT " +
                        "    t1.* ," +
                        "    t2.openid AS opid" +
                        "    t1.* "+
                        " FROM " +
                        "    wlyy_sign_family t1 ,wlyy_patient t2" +
                        " WHERE t1.patient =t2.code " +
                        "    AND (t1.doctor = ? or t1.doctor_health = ?) " +
                        "    wlyy_sign_family t1 " +
                        " WHERE (t1.doctor = ? or t1.doctor_health = ?) " +
                        "    AND t1.status > 0 " +
                        "    AND t1.admin_team_code = ? AND  t1.server_type = '"+labelCode+"'";
                args = new Object[]{doctor, doctor, teamCode};

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

@ -688,7 +688,7 @@ public class FamilyContractService extends BaseService {
            sf.setStatus(-1);
        }
        Message message = messageDao.findByPatient(patient, doctor);
        Message message = messageDao.findByPatientRenew(patient, doctor);
        //修改信息为无效
        if (message != null) {
            message.setRead(0);