|
@ -376,9 +376,19 @@ public class KitService extends BaseService {
|
|
|
// Date monthEnd = new Date();
|
|
|
Date monthStart = DateUtil.strToDate(month,"yyyy-MM");
|
|
|
Date monthEnd = DateUtil.strToDate(DateUtil.getLastDayOfMonthThisDate(monthStart)+" 23:59:59");
|
|
|
Integer onTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,1,deviceSn,monthStart,monthEnd);//按时次数
|
|
|
Integer overTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,2,deviceSn,monthStart,monthEnd);//超时次数
|
|
|
Integer leakageCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,3,deviceSn,monthStart,monthEnd);//漏用次数
|
|
|
Integer onTimeCount = null;
|
|
|
Integer overTimeCount = null;
|
|
|
Integer leakageCount = null;
|
|
|
if(StringUtils.isEmpty(deviceSn)){
|
|
|
onTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,1,monthStart,monthEnd);//按时次数
|
|
|
overTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,2,monthStart,monthEnd);//超时次数
|
|
|
leakageCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,3,monthStart,monthEnd);//漏用次数
|
|
|
}else{
|
|
|
|
|
|
onTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,1,deviceSn,monthStart,monthEnd);//按时次数
|
|
|
overTimeCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,2,deviceSn,monthStart,monthEnd);//超时次数
|
|
|
leakageCount = kitDrugUseRecordDao.findStatisticsCount(patientCode,3,deviceSn,monthStart,monthEnd);//漏用次数
|
|
|
}
|
|
|
Specification specification = new Specification<KitDrugUseRecord>() {
|
|
|
@Override
|
|
|
public Predicate toPredicate(Root<KitDrugUseRecord> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
|