|  | @@ -22,6 +22,7 @@ import com.xunmei.common.redis.utils.RedisUtils;
 | 
	
		
			
				|  |  |  import com.xunmei.common.security.utils.DictUtils;
 | 
	
		
			
				|  |  |  import com.xunmei.common.security.utils.SecurityUtils;
 | 
	
		
			
				|  |  |  import com.xunmei.iot.dto.sensor.SensorAppPageDto;
 | 
	
		
			
				|  |  | +import com.xunmei.iot.dto.sensor.SensorLogPageDto;
 | 
	
		
			
				|  |  |  import com.xunmei.iot.dto.sensor.SensorPageDto;
 | 
	
		
			
				|  |  |  import com.xunmei.iot.mapper.IotCommonSensorMapper;
 | 
	
		
			
				|  |  |  import com.xunmei.iot.mapper.IotDeviceInfoMapper;
 | 
	
	
		
			
				|  | @@ -104,7 +105,7 @@ public class IotCommonSensorServiceImpl extends ServiceImpl<IotCommonSensorMappe
 | 
	
		
			
				|  |  |              record.setInfo(dealInfoData(info));
 | 
	
		
			
				|  |  |              record.setDeviceType(BaseDeviceTypeEnum.getDescByCode(record.getDeviceType()));
 | 
	
		
			
				|  |  |              String dictLabel = DictUtils.getDictLabel(DictConstants.SENSOR_ALARM_STATUS, record.getState());
 | 
	
		
			
				|  |  | -            record.setStateText(ObjectUtil.isEmpty(dictLabel)?"未知":dictLabel);
 | 
	
		
			
				|  |  | +            record.setStateText(ObjectUtil.isEmpty(dictLabel) ? "未知" : dictLabel);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return TableDataInfo.build(page);
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -125,9 +126,12 @@ public class IotCommonSensorServiceImpl extends ServiceImpl<IotCommonSensorMappe
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public TableDataInfo<IotDeviceStatusLogPageVo> selectDeviceStatusLogPage(SensorPageDto request) {
 | 
	
		
			
				|  |  | -        dealPageParam(request);
 | 
	
		
			
				|  |  | -        if (ObjectUtil.isEmpty(request.getDeviceCode())) {
 | 
	
		
			
				|  |  | +    public TableDataInfo<IotDeviceStatusLogPageVo> selectDeviceStatusLogPage(SensorLogPageDto request) {
 | 
	
		
			
				|  |  | +        if (ObjectUtil.isNotEmpty(request.getDateRange())) {
 | 
	
		
			
				|  |  | +            final Date[] dates = {DateUtil.beginOfDay(request.getDateRange()[0]), DateUtil.endOfDay(request.getDateRange()[1])};
 | 
	
		
			
				|  |  | +            request.setDateRange(dates);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (ObjectUtil.isEmpty(request.getDeviceStatusId())) {
 | 
	
		
			
				|  |  |              throw new RuntimeException("设备编码不能为空!");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          Page<IotDeviceStatusLogPageVo> page = deviceStatusLogMapper.selectPageData(request.getPageRequest(), request);
 |