Merge remote-tracking branch 'origin/wb' into qa
| | |
| | | |
| | | |
| | | |
| | | public Integer getDailyDustld(Map<String, Object> params,MultipartFile file ) throws ParseException; |
| | | Integer getDailyDustld(Map<String, Object> params,MultipartFile file ) throws ParseException; |
| | | |
| | | |
| | | public Map<String,Object> dailyDustld(Integer id ,List<MultipartFile> file); |
| | | Map<String,Object> dailyDustld(Integer id ,List<MultipartFile> file); |
| | | |
| | | |
| | | Map<String,Object> selectDust(Integer id ); |
| | |
| | | String start = timeForm.getStart(); |
| | | String end = timeForm.getEnd(); |
| | | List<Double> dust = historySecondCruiserMapper.getDust(start, end, mac); |
| | | list.addAll(dust); |
| | | ArrayList<Double> rsDouble = new ArrayList<>(); |
| | | for (Double aDouble : dust) { |
| | | double v =0.0; |
| | | if (aDouble>=0 && aDouble<40 ){ |
| | | v = aDouble + 170; |
| | | } |
| | | if (aDouble>=40 && aDouble<60 ){ |
| | | v = aDouble + 130; |
| | | } |
| | | if (aDouble>=60 && aDouble<100 ){ |
| | | v = aDouble + 110; |
| | | } |
| | | if (aDouble>=100 && aDouble<150 ){ |
| | | v = aDouble + 70; |
| | | } |
| | | if (aDouble>=150 && aDouble<180 ){ |
| | | v = aDouble + 30; |
| | | } |
| | | if (aDouble>=180){ |
| | | v= aDouble; |
| | | } |
| | | rsDouble.add(v); |
| | | } |
| | | list.addAll(rsDouble); |
| | | } |
| | | } |
| | | String format = ""; |
| | |
| | | /* |
| | | package com.moral.api.kafka.consumer; |
| | | |
| | | import com.moral.api.service.*; |
| | |
| | | |
| | | //秒数据,修改设备状态,缓存最新秒数据 |
| | | @KafkaListener(topics = KafkaConstants.TOPIC_SECOND, containerFactory = "stateListenerContainerFactory") |
| | | public void listenSecond(ConsumerRecord<String, String> record) { |
| | | public void listenSecond(ConsumerRecord<String, String> record, Acknowledgment ack) { |
| | | String msg = record.value(); |
| | | try { |
| | | Map<String, Object> data = JSON.parseObject(msg, Map.class); |
| | |
| | | //判断并修改设备状态 |
| | | data.put("mac", mac); |
| | | deviceService.judgeDeviceState(data); |
| | | ack.acknowledge(); |
| | | } catch (Exception e) { |
| | | log.error("param{}" + msg); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | */ |