| 
					
				 | 
			
			
				@ -54,7 +54,7 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Page<DeviceHealthIndexVO> searchList(String deviceSn,String date,String idcard,String userName,String indexType,Integer page,Integer pageSize, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    Integer indexTypeMin1,Integer indexTypeMax1,Integer indexTypeMin2,Integer indexTypeMax2,String doctorName)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                Double indexTypeMin1,Double indexTypeMax1,Double indexTypeMin2,Double indexTypeMax2,String doctorName)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (page == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            page = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -87,10 +87,10 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and (s.doctor_name like '%"+doctorName+"%' or s.doctor_health_name like '%"+doctorName+"%') "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(!StringUtils.isEmpty(deviceSn)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.deviceSn="+deviceSn); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.device_sn='"+deviceSn+"' "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(!StringUtils.isEmpty(idcard)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.idcard="+idcard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.idcard='"+idcard+"' "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //体征数据创建时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(!StringUtils.isEmpty(date)){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -102,15 +102,15 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            calendar.set(Calendar.SECOND,59); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            calendar.set(Calendar.MILLISECOND,999); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Date endTimeTemp = calendar.getTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.czrq>=" + DateTimeUtil.utcDateTimeFormat(startTimeTemp)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.czrq<=" + DateTimeUtil.utcDateTimeFormat(endTimeTemp)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.czrq>='" + DateTimeUtil.simpleDateTimeFormat(startTimeTemp)+"'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.czrq<='" + DateTimeUtil.simpleDateTimeFormat(endTimeTemp)+"'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //指标类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(!StringUtils.isEmpty(indexType)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.type="+indexType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //体征数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if("1".equals(indexType)||"2".equals(indexType)||"4".equals(indexType)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        if("1".equals(indexType)||"2".equals(indexType)||"4".equals(indexType)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(indexTypeMin1!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                filter.append(" and value1>="+indexTypeMin1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -123,21 +123,22 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(indexTypeMax2!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                filter.append(" and value2<="+indexTypeMax2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(indexTypeMin1!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                filter.append(" and value3>="+indexTypeMin1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(indexTypeMax1!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                filter.append(" and value3<="+indexTypeMax1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(indexTypeMin2!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                filter.append(" and value4>="+indexTypeMin2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(indexTypeMax2!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                filter.append(" and value4<="+indexTypeMax2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if(indexTypeMin1!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                filter.append(" and value3>="+indexTypeMin1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if(indexTypeMax1!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                filter.append(" and value3<="+indexTypeMax1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if(indexTypeMin2!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                filter.append(" and value4>="+indexTypeMin2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            if(indexTypeMax2!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                filter.append(" and value4<="+indexTypeMax2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String f = filter.toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        System.out.println("sql:"+sql+f+" order by i.czrq desc "+" limit "+(page-1)+","+pageSize); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String, Object>> resultList = jdbcTemplate.queryForList(sql+f+" order by i.czrq desc "+" limit "+(page-1)+","+pageSize); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(resultList.size()<=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return new PageImpl<DeviceHealthIndexVO>(new ArrayList<>(), pageRequest, 0); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -225,8 +226,8 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            calendar.set(Calendar.SECOND,59); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            calendar.set(Calendar.MILLISECOND,999); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Date endTimeTemp = calendar.getTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.czrq>=" + DateTimeUtil.utcDateTimeFormat(startTimeTemp)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.czrq<=" + DateTimeUtil.utcDateTimeFormat(endTimeTemp)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.czrq>='" + DateTimeUtil.simpleDateTimeFormat(startTimeTemp)+"'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter.append(" and i.czrq<='" + DateTimeUtil.simpleDateTimeFormat(endTimeTemp)+"'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //指标类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(!StringUtils.isEmpty(indexType)){ 
			 |