Prechádzať zdrojové kódy

Merge branch 'dev' of liubing/wlyy2.0 into dev

shikejing 4 rokov pred
rodič
commit
d813cb8950

+ 1 - 1
svr/svr-iot/src/main/java/com/yihu/iot/service/monitorPlatform/MonitorPlatformService.java

@ -175,7 +175,7 @@ public class MonitorPlatformService  {
                }
                sql.append(sqlCondition);
                sqlCounts.append(sqlCondition);
                sql.append( " limit "+(page-1)*size+","+page*size);
                sql.append( " limit "+(page-1)*size+","+size);
                totalCount = jdbcTemplate.queryForObject(sqlCounts.toString(),Integer.class);
                List<Map<String,Object>> result = jdbcTemplate.queryForList(sql.toString());
                List<LocationDataVO> locationDataVOList = new ArrayList<>();

+ 4 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/SpecialistPatientRelationDao.java

@ -15,7 +15,7 @@ public interface SpecialistPatientRelationDao extends PagingAndSortingRepository
        JpaSpecificationExecutor<SpecialistPatientRelationDO> {
    public List<SpecialistPatientRelationDO> findByDoctorAndStatus(String doctor,String status);
    @Query("select p from SpecialistPatientRelationDO p where p.doctor=?1 and p.patient =?2 and p.status>=0 and p.signStatus=1")
    @Query("select p from SpecialistPatientRelationDO p where p.doctor=?1 and p.patient =?2  and p.status>=0 and p.signStatus=1")
    public SpecialistPatientRelationDO findByDoctorAndPatient(String doctor,String patient);
    @Query("select p from SpecialistPatientRelationDO p where p.doctor=?1 and (p.patient=?2 or p.healthAssistant=?2) and p.signStatus='1' and p.status>=0 ")
@ -29,4 +29,7 @@ public interface SpecialistPatientRelationDao extends PagingAndSortingRepository
    @Query("select p from SpecialistPatientRelationDO p where p.teamCode=?1 and p.patient =?2 and p.status>=0 and p.signStatus=1")
    public SpecialistPatientRelationDO findByTeamCodeAndPatient(Integer teamCode,String patient);
    @Query("select p from SpecialistPatientRelationDO p where p.doctor=?1 and p.patient =?2 and p.teamCode =?3 and p.status>=0 and p.signStatus=1")
    public SpecialistPatientRelationDO findByDoctorAndPatientAndTeamCode(String doctor,String patient,Integer teamCode);
}

+ 7 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -1429,7 +1429,13 @@ public class RehabilitationManageService {
        Integer allCount = rehabilitationDetailDao.findAllByPlanId(planId);//计划总服务项目数
        Integer finishedCount = rehabilitationDetailDao.findByStatusAndPlanId(1,planId);
        PatientRehabilitationPlanDO p =patientRehabilitationPlanDao.findById(planId);
        SpecialistPatientRelationDO specialistPatientRelationDO = specialistPatientRelationDao.findByDoctorAndPatient(p.getCreateUser(), p.getPatient());
        SpecialistPatientRelationDO specialistPatientRelationDO;
        if (p.getTeamCode()!= null) {
             specialistPatientRelationDO = specialistPatientRelationDao.findByDoctorAndPatientAndTeamCode(p.getCreateUser(),p.getPatient(),p.getTeamCode());
        }
        else {
             specialistPatientRelationDO = specialistPatientRelationDao.findByDoctorAndPatient(p.getCreateUser(),p.getPatient());
        }
        resultMap.put("allCount",allCount);
        resultMap.put("finishedCount",finishedCount);
        resultMap.put("specialistPatientRelationDO",specialistPatientRelationDO);