Browse Source

代码修改

LAPTOP-KB9HII50\70708 1 năm trước cách đây
mục cha
commit
28794c9d67

+ 12 - 0
business/base-service/src/main/java/com/yihu/jw/device/dao/DeviceDataPushLogDao.java

@ -0,0 +1,12 @@
package com.yihu.jw.device.dao;
import com.yihu.jw.entity.care.device.DeviceDataPushLog;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Bing on 2021/9/2.
 */
public interface DeviceDataPushLogDao extends PagingAndSortingRepository<DeviceDataPushLog,Long>,
        JpaSpecificationExecutor<DeviceDataPushLog> {
}

+ 9 - 0
business/base-service/src/main/java/com/yihu/jw/device/dao/DeviceInfoDao.java

@ -0,0 +1,9 @@
package com.yihu.jw.device.dao;
import com.yihu.jw.entity.care.device.DeviceInfo;
import org.springframework.data.repository.CrudRepository;
import org.springframework.transaction.annotation.Transactional;
@Transactional
public interface DeviceInfoDao extends CrudRepository<DeviceInfo, Long> {
}

+ 5 - 1
business/base-service/src/main/java/com/yihu/jw/device/dao/DevicePatientHealthIndexDao.java

@ -22,7 +22,7 @@ public interface DevicePatientHealthIndexDao
	 * @param date
	 * @return
	 */
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and type = ?2 and a.recordDate = ?3 and a.del = '1'")
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and a.type = ?2 and a.recordDate = ?3 and a.del = '1'")
	Iterable<DevicePatientHealthIndex> findByPatienDate(String patientCode, int type, Date date);
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and a.type = ?2 and a.recordDate between ?3 and ?4 and a.del = '1' group by a.recordDate order by a.recordDate asc")
@ -123,6 +123,10 @@ public interface DevicePatientHealthIndexDao
	@Query("select count(a) from DevicePatientHealthIndex a where a.recordDate >= ?1 and a.recordDate <= ?2 and a.type in (1,2) and a.status = ?3 and a.del = '1' and a.user = ?4")
	int getCountByTimeAndStatus(Date start, Date end, int status, String patientCode);
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and a.deviceSn = ?2 and a.value1 = ?3 and a.type = ?4 and a.recordDate >= ?5 and a.recordDate<=?6 and a.del = '1' ")
	List<DevicePatientHealthIndex> findByTypeInHalfMinute(String patient, String deviceSn, String value1, Integer type, Date minDate,Date maxDate);
	@Query("select a from DevicePatientHealthIndex a where a.user = ?1 and a.deviceSn = ?2 and a.value1 = ?3 and a.value2=?7 and a.value3=?8 and a.type = ?4 and a.recordDate >= ?5 and a.recordDate<=?6 and a.del = '1' ")
	List<DevicePatientHealthIndex> findByTypeInHalfMinuteAllValue(String patient, String deviceSn, String value1, Integer type, Date minDate,Date maxDate,String value2,String value3);
}