Browse Source

Merge branch 'dev' of huangwenjie/patient-co-management into dev

yeshijie 7 years ago
parent
commit
2597a26d0c

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/health/repository/DevicePatientHealthIndexDao.java

@ -98,8 +98,8 @@ public interface DevicePatientHealthIndexDao
	@Query(value = "select DATE_FORMAT(a.record_date,'%Y-%m-%d') from device.wlyy_patient_health_index a where a.user = ?1 and a.record_date >= ?2 and a.record_date <= ?3 and a.del = '1' group by DATE_FORMAT(a.record_date,'%Y-%m-%d') order by DATE_FORMAT(a.record_date,'%Y-%m-%d') desc limit ?4 ,?5",nativeQuery = true)
	List<String> findDateList(String patient,Date start ,Date end,int currentSize,int pageSize);
	@Query(value= " select * from device.wlyy_patient_health_index where type in (?1) and record_date BETWEEN ?2 AND ?3  AND user in (select p.code from wlyy.wlyy_patient p INNER JOIN wlyy.wlyy_sign_family s on s.patient = p.code and s.status > 0 AND s.admin_team_code = ?4 and p.disease >0)",nativeQuery = true)
	List<DevicePatientHealthIndex> findByTeamcodeAndRecordDate(String type ,Date start, Date end,String teamcode);
	@Query(value= " select * from device.wlyy_patient_health_index where type in (?1) and record_date BETWEEN ?2 AND ?3  AND user in (select p.code from wlyy.wlyy_patient p INNER JOIN wlyy.wlyy_sign_family s on s.patient = p.code and s.status > 0 AND s.admin_team_code = ?4 and p.disease >0 and (s.doctor = ?5 or s.doctor_health =?5))",nativeQuery = true)
	List<DevicePatientHealthIndex> findByTeamcodeAndRecordDate(String type ,Date start, Date end,String teamcode,String doctorcode);
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and a.type =?2  order by recordDate desc ")
	List<DevicePatientHealthIndex> findByPatientAndTypeByPage(String patientCode, int type, Pageable pageable);

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

@ -478,7 +478,7 @@ public class DoctorSchemeService {
            Date end = DateUtil.strToDate(enddate);
            List<DevicePatientHealthIndex> devicePatientHealthIndices = devicePatientHealthIndexDao.findByTeamcodeAndRecordDate("1,2",start,end,teamCode);
            List<DevicePatientHealthIndex> devicePatientHealthIndices = devicePatientHealthIndexDao.findByTeamcodeAndRecordDate("1,2",start,end,teamCode,doctorcode);
            int sugar = 0;
            int sugar_unusual = 0;