| | |
| | | import org.springblade.jfpt.animalheat.util.ImageUtil; |
| | | import org.springblade.jfpt.animalheat.vo.AnimalHeatVo; |
| | | import org.springblade.jfpt.animalheat.vo.StatisVo; |
| | | import org.springblade.jfpt.parcel.vo.ConditionVo; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | float v1 = Float.parseFloat(temRedArr[1]); |
| | | int compare = Float.compare(v, v1); |
| | | bladeAnimalHeat.setTempRed(compare>=0 ? v:v1); |
| | | //和标志温度比较,大于37度为高温,标记为1,小于则为正常0 |
| | | int compare1 = Float.compare(37, compare >= 0 ? v : v1); |
| | | //和标志温度比较,大于37.2度为高温,标记为1,小于则为正常0 |
| | | int compare1 = Float.compare(37.2f, compare >= 0 ? v : v1); |
| | | bladeAnimalHeat.setStatus(compare1>0 ?0:1); |
| | | }else { |
| | | bladeAnimalHeat.setTempRed(Float.parseFloat(temRedArr[0])); |
| | | int compare1 = Float.compare(37, Float.parseFloat(temRedArr[0])); |
| | | int compare1 = Float.compare(37.2f, Float.parseFloat(temRedArr[0])); |
| | | bladeAnimalHeat.setStatus(compare1>0 ?0:1); |
| | | } |
| | | String person_rects = data.get("person_rect").toString(); |
| | |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> getAnimalStatis(AnimalHeatVo animalHeatVo) { |
| | | if(null!= animalHeatVo.getStatus()){ |
| | | if(null!= animalHeatVo.getType()){ |
| | | //查询当天的统计数据 |
| | | if (animalHeatVo.getStatus()==0){ |
| | | if (animalHeatVo.getType()==0){ |
| | | return baseMapper.getAnimalStatis(); |
| | | } |
| | | //查询本周的统计数据 |
| | | if (animalHeatVo.getStatus()==1){ |
| | | if (animalHeatVo.getType()==1){ |
| | | return baseMapper.getAnimalStatisWeek(); |
| | | } |
| | | //查询本月的统计数据 |
| | | if (animalHeatVo.getStatus()==2){ |
| | | if (animalHeatVo.getType()==2){ |
| | | return baseMapper.getAnimalStatisMonth(); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public List<Map<String, Integer>> selWeekDayAnimalStatis() { |
| | | List<Map<String,Integer>> selWeekDayAnimalStatis; |
| | | return baseMapper.selWeekDayAnimalStatis(); |
| | | } |
| | | |
| | |
| | | //返回数据 |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 查询当前时间段体温异常总次数 |
| | | * @param conditionVo |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer selAnimalTimeCount(ConditionVo conditionVo) { |
| | | return baseMapper.selAnimalTimeCount(conditionVo); |
| | | } |
| | | } |