| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.entity.ReportReturnData; |
| | | import org.springblade.jfpt.alarm.constant.AlarmTimeConstant; |
| | | import org.springblade.jfpt.alarm.vo.AlarmExcel; |
| | | import org.springblade.jfpt.alarm.vo.AlarmVO; |
| | | import org.springblade.jfpt.animalheat.entity.BladeAnimalHeat; |
| | | import org.springblade.jfpt.animalheat.mapper.AnimalHeatMapper; |
| | | import org.springblade.jfpt.animalheat.service.AnimalHeatService; |
| | | import org.springblade.jfpt.animalheat.util.ImageUtil; |
| | | import org.springblade.jfpt.animalheat.vo.AnimalHeatExcel; |
| | | import org.springblade.common.entity.AnimalHeatExcel; |
| | | import org.springblade.jfpt.animalheat.vo.AnimalHeatVo; |
| | | import org.springblade.jfpt.animalheat.vo.StatisVo; |
| | | import org.springblade.jfpt.healthcode.entity.Healthcode; |
| | | 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; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import static org.springblade.core.tool.utils.DateUtil.now; |
| | |
| | | int length = body.length(); |
| | | //3.截取,由于获取数据时,} 被去除,需要加上 |
| | | String dataBody = body.substring(i, length)+"}"; |
| | | System.out.println("dataBody = " + dataBody); |
| | | //4.数据转换 |
| | | Map<String,Object> data = (Map<String, Object>) JSONObject.parse(dataBody); |
| | | //5.创建体温数据对象 |
| | |
| | | //遍历集合 |
| | | for (BladeAnimalHeat animalHeat:collect) { |
| | | try { |
| | | System.out.println("animalHeat.getCreateTime() = " + animalHeat.getCreateTime()); |
| | | long hours = animalHeat.getCreateTime().getHours(); |
| | | if (hours>0 && hours< AlarmTimeConstant.TWO){ |
| | | count02+=1; |
| | |
| | | return baseMapper.exportAnimalHeat(animalHeatVo); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出体温数据列表 |
| | | * @param animalHeatVo 条件 |
| | | */ |
| | | @Override |
| | | public List<ReportReturnData> getAnimalHeatPie(AnimalHeatVo animalHeatVo) { |
| | | return baseMapper.getAnimalHeatPie(animalHeatVo); |
| | | } |
| | | } |