| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.aspectj.weaver.patterns.Declare; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.jfpt.alarm.entity.Alarm; |
| | | import org.springblade.jfpt.alarm.service.IAlarmService; |
| | | import org.springblade.jfpt.alarm.vo.AlarmVO; |
| | | import org.springblade.jfpt.alarm.wrapper.AlarmWrapper; |
| | | import org.springblade.jfpt.animalheat.service.AnimalHeatService; |
| | | import org.springblade.jfpt.alarm.vo.AlarmExcel; |
| | | import org.springblade.jfpt.animalheat.vo.AnimalHeatExcel; |
| | | import org.springblade.jfpt.healthcode.service.IhealthcodeService; |
| | | import org.springblade.jfpt.operation.entity.Operation; |
| | | import org.springblade.jfpt.operation.service.IOperationService; |
| | | import org.springblade.jfpt.operation.vo.OperationVO; |
| | | import org.springblade.jfpt.parcel.service.ParcelService; |
| | |
| | | //获取类型集合数据 |
| | | String [] type = {"一键求助","违禁品","红色健康码","体温异常"}; |
| | | types = Arrays.asList(type); |
| | | if (null!=conditionVo){ |
| | | if (null!=conditionVo.getStartTime()){ |
| | | //获取时间集合数据 |
| | | times = DateUtils.getTimeOverOneDate(conditionVo.getStartTime(), conditionVo.getEndTime()); |
| | | //1.统计时间段内一键求助警情数量数据 3-20 修改展示紧急求助 |
| | | Map<String, Object> alarmData = alarmService.selectAlarmData(); |
| | | //1.统计时间段内一键求助警情数量数据 4-7 修改展示紧急求助 |
| | | Map<String, Object> alarmData = alarmService.selectAlarmTimeData(conditionVo); |
| | | alarmData.put("name", "一键求助"); |
| | | //2.统计时间段内违禁品的数量数据 |
| | | Map<String, Object> parcelData = parcelService.selectParcelData(conditionVo); |
| | | parcelData.put("name", "违禁品"); |
| | | //3.统计时间段内红色健康码人数数量数据 |
| | | Map<String, Object> healthcodeData = ihealthcodeService.selectHealthcodeData(); |
| | | Map<String, Object> healthcodeData = ihealthcodeService.selectHealthcodeTimeData(conditionVo); |
| | | healthcodeData.put("name", "红色健康码"); |
| | | //4.统计时间段内体温异常人数数量数据 |
| | | Map<String, Object> animalData = animalHeatService.selectAnimalData(); |
| | | Map<String, Object> animalData = animalHeatService.selectAnimalTimeData(conditionVo); |
| | | animalData.put("name", "体温异常"); |
| | | //封装数据 |
| | | dataList.add(alarmData); |
| | |
| | | List<Integer> alarmTimeDis = alarmService.selAlarmTimeDis(conditionVo); |
| | | //查询当前时间段区间时间违禁品个数 |
| | | List<Integer> parcelTimeDis = parcelService.selParcelTimeDis(conditionVo); |
| | | |
| | | //查询当前时间段区间时间红色健康码个数 |
| | | //查询当前时间段区间时间红色健康码个数 |
| | | List<Integer> healthcodeTimeDis = ihealthcodeService.selHealthcodeTimeDis(conditionVo); |
| | | //查询当前时间段区间时间体温异常次数 |
| | | List<Integer> animalTimeDis = animalHeatService.selAnimalTimeDis(conditionVo); |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询本年所有月份的警情数量 |
| | | * @param response 跨域配置 |
| | | * @param deviceNumber 条件 |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryYearAlarm") |
| | | public List<Map<String, Object>> queryYearAlarm(HttpServletResponse response, String deviceNumber) { |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials","true"); |
| | | |
| | | List<Map<String,Object>> list = alarmService.queryYearAlarm(deviceNumber); |
| | | |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 导出主动报警数据表格 |
| | | * @param alarmVO 查询条件 |
| | | * @param response |
| | | */ |
| | | @GetMapping("/export-alarm") |
| | | public void exportAlarm(AlarmVO alarmVO, HttpServletResponse response){ |
| | | List<AlarmExcel> list = alarmService.exportAlarm(alarmVO); |
| | | ExcelUtil.export(response, "主动报警数据" + DateUtil.time(), "主动报警数据表", list, AlarmExcel.class); |
| | | } |
| | | } |