| | |
| | | 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.统计时间段内一键求助警情数量数据 4-7 修改展示紧急求助 |
| | |
| | | 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); |
| | | } |
| | | } |